:root {
  --bg: #f3f1ea;
  --ink: #1b241d;
  --muted: #5d6a60;
  --paper: #fffcf6;
  --line: #ddd6c8;
  --green: #1c6b45;
  --green-2: #248056;
  --amber: #c47a12;
  --red: #b42318;
  --shadow: 0 18px 40px rgba(27, 36, 29, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "IBM Plex Sans", sans-serif;
  background:
    radial-gradient(900px 400px at 10% -10%, #dceee3, transparent 60%),
    var(--bg);
  color: var(--ink);
}

.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}

aside {
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: #f7f5ee;
}

.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 32px; }
.brand small { display: block; color: var(--muted); }
.mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--green); color: white; font-weight: 700;
}

nav { display: grid; gap: 8px; }
nav a {
  text-decoration: none; color: var(--ink);
  padding: 10px 12px; border-radius: 10px; font-weight: 500;
}
nav a.active, nav a:hover { background: #e7efe8; color: var(--green); }

main { padding: 40px 48px 64px; max-width: 1100px; }
h1 { margin: 0 0 8px; font-size: 32px; letter-spacing: -0.03em; }
.hero p, .hero { color: var(--muted); }
.hero { margin-bottom: 28px; }
.hero.row { display: flex; justify-content: space-between; align-items: end; gap: 16px; }

.drop, .card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.drop { display: grid; gap: 16px; }
.drop input[type=file] { position: absolute; opacity: 0; pointer-events: none; }
.drop label {
  border: 1.5px dashed #c9d6cc;
  border-radius: 14px;
  padding: 36px 20px;
  text-align: center;
  cursor: pointer;
  background: #f8faf6;
}
.drop label span { display: block; color: var(--muted); margin-top: 6px; }
.drop.hot label { border-color: var(--green); background: #eef6f0; }

button, .btn {
  appearance: none; border: 0; cursor: pointer;
  background: var(--green); color: white;
  padding: 12px 18px; border-radius: 12px;
  font-weight: 600; text-decoration: none; display: inline-block;
}
button:hover, .btn:hover { background: var(--green-2); }
.hidden { display: none !important; }

.table-wrap {
  overflow: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-weight: 600; background: #faf8f2; }
tr.running { background: #f3f8f4; }
tr.error { background: #fff6f4; }
a { color: var(--green); }

.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #d5e4da; border-top-color: var(--green);
  display: inline-block; vertical-align: -2px; margin-right: 6px;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pill, .tag {
  display: inline-block; padding: 3px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
}
.pill.ok { background: #e4f4ea; color: var(--green); }
.pill.bad { background: #fde8e6; color: var(--red); }
.tag.luce { background: #fff3d6; color: #8a5a00; }
.tag.gas { background: #e7eef8; color: #1d4e89; }
.err { color: var(--red); font-size: 12px; max-width: 280px; display: inline-block; }

fieldset {
  border: 1px solid var(--line); border-radius: 14px;
  padding: 16px 18px 18px; margin: 0 0 16px;
}
legend { padding: 0 6px; font-weight: 600; }
label { display: grid; gap: 6px; font-size: 14px; margin-bottom: 12px; color: var(--muted); }
input, select {
  font: inherit; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: white;
}
.split, .split3 { display: grid; gap: 12px; }
.split { grid-template-columns: 1fr 1fr; }
.split3 { grid-template-columns: 1fr 1fr 1fr; }
.check { align-content: end; }
.check input { width: auto; }
.banner { background: #fff1ef; color: var(--red); padding: 12px 14px; border-radius: 10px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  aside { border-right: 0; border-bottom: 1px solid var(--line); }
  main { padding: 24px; }
  .split, .split3 { grid-template-columns: 1fr; }
}
