/* -----------------------------------------------------------
   OLIVEW · PAINEL PRATA
   Design editorial premium — sidebar + canvas + terminal
   ----------------------------------------------------------- */

:root{
  /* --- Paleta Olivew --- */
  --green-950:#001a0c;
  --green-900:#002a14;
  --green-800:#004E25;
  --green-700:#006B35;
  --green-600:#00813f;
  --green-500:#5DB94B;
  --green-400:#7dd66a;
  --green-300:#a8e898;
  --green-50:#f0f7f2;

  /* --- Neutros --- */
  --paper:#fbfaf5;
  --paper-2:#f5f2e8;
  --cream:#faf7ee;
  --ink:#111413;
  --ink-2:#2a2d2b;
  --ink-3:#4a4d4b;
  --ink-4:#757673;
  --ink-5:#a5a5a2;
  --line:#e8e5dc;
  --line-2:#d8d4c8;
  --white:#ffffff;

  /* --- Acentos --- */
  --red:#b93b3b;
  --red-soft:#f5dede;
  --amber:#b87500;

  /* --- Terminal --- */
  --term-bg:#0a0f0c;
  --term-bar:#161d18;
  --term-fg:#c8e0cf;
  --term-dim:#4d7158;
  --term-border:#1f2a23;

  /* --- Shadows --- */
  --sh-1:0 1px 2px rgba(0,40,20,.04), 0 1px 1px rgba(0,40,20,.03);
  --sh-2:0 4px 12px rgba(0,40,20,.06), 0 2px 4px rgba(0,40,20,.04);
  --sh-3:0 12px 32px rgba(0,40,20,.09), 0 4px 10px rgba(0,40,20,.05);

  /* --- Métricas --- */
  --sidebar-w:256px;
  --radius:10px;
  --radius-lg:14px;
}

/* ----------- RESET ----------- */
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size:14px;
  line-height:1.55;
  color:var(--ink);
  background:var(--paper);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  font-feature-settings:"ss01", "cv11";
}
a{color:inherit;text-decoration:none}
button{font:inherit;border:none;background:none;cursor:pointer;color:inherit}
input{font:inherit;color:inherit}

/* ----------- APP SHELL ----------- */
.app{
  display:grid;
  grid-template-columns:var(--sidebar-w) 1fr;
  min-height:100vh;
  background:
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(93,185,75,.05) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 90%, rgba(0,107,53,.04) 0%, transparent 55%),
    var(--paper);
}

/* ----------- SIDEBAR ----------- */
.sidebar{
  background:var(--green-900);
  color:#e8ecea;
  display:flex;
  flex-direction:column;
  border-right:1px solid var(--green-950);
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  z-index:30;
  background-image:
    linear-gradient(180deg, rgba(0,107,53,.08) 0%, transparent 40%),
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(93,185,75,.08) 0%, transparent 60%);
}

.sidebar-top{
  padding:28px 24px 20px;
  border-bottom:1px solid rgba(255,255,255,.06);
}

.logo-mark{
  display:block;
  padding:20px 16px 18px;
  background:transparent;
  border-radius:0;
  box-shadow:none;
  border-bottom:1px solid rgba(255,255,255,.12);
  text-align:center;
  transition:opacity .2s;
}
.logo-mark img{
  display:block;
  width:100%;
  max-width:190px;
  height:auto;
  max-height:70px;
  object-fit:contain;
  object-position:center;
  filter:brightness(0) invert(1);
  margin:0 auto;
}
.logo-mark:hover{
  transform:translateY(-1px);
  box-shadow:0 1px 0 rgba(255,255,255,.1), 0 6px 18px rgba(0,0,0,.28);
}


.org-tag{
  margin-top:14px;
  display:inline-flex;
  align-items:center;
  gap:7px;
  font-size:10.5px;
  font-weight:500;
  letter-spacing:.09em;
  text-transform:uppercase;
  color:rgba(255,255,255,.55);
  padding:4px 10px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:100px;
  background:rgba(255,255,255,.03);
}
.org-tag-dot{
  width:5px;height:5px;border-radius:50%;
  background:var(--green-400);
  box-shadow:0 0 6px rgba(125,214,106,.8);
}

/* --- NAV --- */
.nav{padding:18px 14px;flex:1}
.nav-section{margin-bottom:22px}
.nav-section-title{
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:rgba(255,255,255,.35);
  padding:0 12px 10px;
}

.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  font-size:13.5px;
  font-weight:500;
  color:rgba(255,255,255,.75);
  border-radius:8px;
  margin-bottom:2px;
  position:relative;
  transition:all .15s;
}
.nav-item:hover:not(.disabled){
  background:rgba(255,255,255,.05);
  color:#fff;
}
.nav-item.active{
  background:linear-gradient(90deg, rgba(93,185,75,.14), rgba(93,185,75,.05));
  color:#fff;
  font-weight:600;
}
.nav-item.active::before{
  content:"";
  position:absolute;
  left:-14px;
  top:10px;bottom:10px;
  width:3px;
  background:var(--green-400);
  border-radius:0 3px 3px 0;
  box-shadow:0 0 8px rgba(125,214,106,.6);
}
.nav-item.disabled{
  color:rgba(255,255,255,.28);
  cursor:not-allowed;
}

.nav-item-glyph{
  width:6px;height:6px;
  border-radius:50%;
  background:currentColor;
  opacity:.55;
  flex-shrink:0;
}
.nav-item.active .nav-item-glyph{
  background:var(--green-400);
  opacity:1;
  box-shadow:0 0 6px rgba(125,214,106,.8);
}

.nav-item-text{flex:1}

.nav-item-badge{
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.08em;
  padding:3px 7px;
  background:rgba(125,214,106,.15);
  color:var(--green-300);
  border-radius:4px;
}
.nav-item-soon{
  font-size:10px;
  font-weight:500;
  letter-spacing:.04em;
  font-style:italic;
  color:rgba(255,255,255,.3);
}
.nav-item-ext{
  font-size:12px;
  opacity:.5;
}

.sidebar-foot{
  padding:18px 24px 22px;
  border-top:1px solid rgba(255,255,255,.06);
  font-size:11px;
  color:rgba(255,255,255,.4);
}
.sidebar-foot-line{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:13px;
  color:rgba(255,255,255,.75);
  letter-spacing:-0.01em;
  margin-bottom:2px;
}
.sidebar-foot-sub{font-size:10.5px;letter-spacing:.02em}

/* ----------- MAIN ----------- */
.main{
  display:flex;
  flex-direction:column;
  min-width:0;
}

/* --- TOPBAR --- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 40px;
  border-bottom:1px solid var(--line);
  background:rgba(251,250,245,.85);
  backdrop-filter:blur(12px);
  position:sticky;
  top:0;
  z-index:20;
}
.breadcrumbs{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:12.5px;
  font-weight:500;
  color:var(--ink-4);
  letter-spacing:.01em;
}
.crumb-sep{color:var(--ink-5);font-weight:300}
.breadcrumbs .current{
  color:var(--ink);
  font-weight:600;
}

.status-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 14px 6px 11px;
  background:#fff;
  border:1px solid var(--line-2);
  border-radius:100px;
  font-size:12px;
  font-weight:500;
  color:var(--ink-2);
  box-shadow:var(--sh-1);
}
.status-pill .dot{
  width:7px;height:7px;border-radius:50%;
  background:var(--green-500);
  box-shadow:0 0 6px rgba(93,185,75,.6);
}
.status-pill.running .dot{
  background:#ffb020;
  box-shadow:0 0 6px rgba(255,176,32,.6);
  animation:pulse 1.2s ease-in-out infinite;
}
.status-pill.done .dot{background:var(--green-500)}
.status-pill.error .dot{background:var(--red);box-shadow:0 0 6px rgba(185,59,59,.6)}

@keyframes pulse{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:.5;transform:scale(1.5)}
}

/* ----------- HERO ----------- */
.hero{
  padding:48px 40px 36px;
  max-width:980px;
}
.hero-meta{
  display:flex;
  align-items:center;
  gap:14px;
  font-size:11px;
  font-weight:600;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--green-700);
  margin-bottom:18px;
}
.hero-meta-line{
  display:inline-block;
  width:32px;height:1.5px;
  background:var(--green-700);
}
.hero-title{
  font-family:'Fraunces', serif;
  font-weight:500;
  font-size:46px;
  line-height:1.05;
  letter-spacing:-0.025em;
  color:var(--green-900);
  margin-bottom:18px;
  font-variation-settings:"opsz" 96;
}
.hero-title em{
  font-style:italic;
  font-weight:600;
  color:var(--green-700);
  font-variation-settings:"opsz" 96;
}
.hero-lead{
  font-size:15.5px;
  line-height:1.65;
  color:var(--ink-3);
  max-width:620px;
  font-weight:400;
}
.hero-lead strong{
  color:var(--ink);
  font-weight:600;
  font-family:'JetBrains Mono', monospace;
  font-size:12.5px;
  background:var(--green-50);
  padding:2px 7px;
  border-radius:4px;
  letter-spacing:-.01em;
  border:1px solid rgba(0,107,53,.12);
}

/* ----------- GRID ----------- */
.grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 320px;
  gap:20px;
  padding:0 40px 20px;
  max-width:1200px;
}

/* ----------- PANEL BASE ----------- */
.panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  box-shadow:var(--sh-1);
  overflow:hidden;
  transition:box-shadow .2s, border-color .2s;
}
.panel:hover{box-shadow:var(--sh-2)}

.panel-header{
  display:flex;
  align-items:flex-start;
  gap:16px;
  padding:22px 26px 18px;
  border-bottom:1px solid var(--line);
  background:linear-gradient(to bottom, rgba(251,250,245,.4), transparent);
}
.panel-num{
  font-family:'Fraunces', serif;
  font-weight:500;
  font-size:15px;
  color:var(--green-700);
  letter-spacing:-0.01em;
  padding:3px 10px;
  border:1px solid rgba(0,107,53,.2);
  border-radius:6px;
  background:var(--green-50);
  flex-shrink:0;
  font-variant-numeric:tabular-nums;
}
.panel-heading{flex:1;min-width:0}
.panel-heading-row{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
}
.panel-title{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:18px;
  letter-spacing:-0.015em;
  color:var(--green-900);
  margin-bottom:3px;
}
.panel-sub{
  font-size:12.5px;
  color:var(--ink-4);
  font-weight:400;
}

.panel-body{padding:24px 26px 26px}

/* ----------- CONFIG PANEL ----------- */
.field-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:18px;
  margin-bottom:22px;
}
.field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.field-label{
  font-family:'Fraunces', serif;
  font-weight:500;
  font-size:13px;
  color:var(--green-800);
  letter-spacing:-0.01em;
}
.field input{
  padding:12px 14px;
  font-size:16px;
  font-family:'JetBrains Mono', monospace;
  font-weight:500;
  background:var(--paper);
  border:1.5px solid var(--line);
  border-radius:8px;
  color:var(--ink);
  transition:all .15s;
  font-variant-numeric:tabular-nums;
}
.field input:hover{
  border-color:var(--line-2);
  background:#fff;
}
.field input:focus{
  outline:none;
  border-color:var(--green-600);
  background:#fff;
  box-shadow:0 0 0 3px rgba(0,107,53,.12);
}
.field-hint{
  font-size:11px;
  color:var(--ink-5);
  font-style:italic;
  letter-spacing:.01em;
}

/* ----------- BUTTONS ----------- */
.actions{
  display:flex;
  gap:10px;
  padding-top:4px;
  border-top:1px dashed var(--line);
  margin-top:4px;
  padding-top:18px;
}
.btn{
  display:inline-flex;
  align-items:center;
  gap:9px;
  padding:11px 20px;
  font-size:13.5px;
  font-weight:600;
  letter-spacing:.005em;
  border-radius:8px;
  transition:all .18s cubic-bezier(.4,0,.2,1);
}
.btn:disabled{opacity:.4;cursor:not-allowed}

.btn-primary{
  background:var(--green-800);
  color:#fff;
  box-shadow:0 1px 0 rgba(255,255,255,.12) inset, 0 2px 6px rgba(0,78,37,.3), 0 1px 2px rgba(0,0,0,.08);
}
.btn-primary:hover:not(:disabled){
  background:var(--green-700);
  box-shadow:0 1px 0 rgba(255,255,255,.15) inset, 0 4px 14px rgba(0,78,37,.38), 0 2px 4px rgba(0,0,0,.08);
  transform:translateY(-1px);
}
.btn-primary:active:not(:disabled){transform:translateY(0)}
.btn-dot{
  width:6px;height:6px;border-radius:50%;
  background:var(--green-400);
  box-shadow:0 0 6px rgba(125,214,106,.9);
}

.btn-ghost{
  background:#fff;
  color:var(--ink-3);
  border:1px solid var(--line-2);
}
.btn-ghost:hover:not(:disabled){
  background:var(--paper);
  border-color:var(--ink-5);
  color:var(--ink);
}

/* ----------- ASIDE PANEL ----------- */
.panel-aside{
  padding:24px 22px;
  display:flex;
  flex-direction:column;
  gap:18px;
  background:linear-gradient(170deg, #fff 0%, var(--green-50) 100%);
  border-color:rgba(0,107,53,.14);
}
.aside-kicker{
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--green-700);
}
.aside-metric-value{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:40px;
  line-height:1;
  letter-spacing:-0.035em;
  color:var(--green-900);
  margin-bottom:6px;
  font-variation-settings:"opsz" 120;
}
.aside-metric-label{
  font-size:12px;
  color:var(--ink-4);
  font-weight:500;
}
.aside-divider{
  height:1px;
  background:linear-gradient(to right, var(--line-2), transparent);
}
.aside-stack{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.aside-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:12.5px;
  padding:3px 0;
}
.aside-row-label{
  color:var(--ink-4);
  font-weight:500;
}
.aside-row-value{
  display:inline-flex;
  align-items:center;
  gap:6px;
  color:var(--ink);
  font-weight:600;
  font-family:'JetBrains Mono', monospace;
  font-size:12px;
}
.aside-dot{
  width:6px;height:6px;border-radius:50%;
  background:var(--green-500);
  box-shadow:0 0 5px rgba(93,185,75,.6);
}
.aside-note{
  margin-top:auto;
  padding:14px 16px;
  background:rgba(0,107,53,.05);
  border-left:2px solid var(--green-600);
  border-radius:0 6px 6px 0;
}
.aside-note-title{
  font-family:'Fraunces', serif;
  font-weight:600;
  font-size:12.5px;
  color:var(--green-800);
  letter-spacing:-.01em;
  margin-bottom:4px;
}
.aside-note-body{
  font-size:11.5px;
  line-height:1.5;
  color:var(--ink-3);
}

/* ----------- LOG / TERMINAL ----------- */
.panel-log{
  grid-column:1 / -1;
  padding:0;
}
.log-meta{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-family:'JetBrains Mono', monospace;
  color:var(--ink-5);
  padding:4px 10px;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:100px;
  white-space:nowrap;
}
.live-dot{
  width:6px;height:6px;border-radius:50%;
  background:var(--ink-5);
  transition:all .3s;
}
.live-dot.active{
  background:var(--green-500);
  box-shadow:0 0 5px rgba(93,185,75,.7);
  animation:pulse 1.2s ease-in-out infinite;
}

.terminal{
  background:var(--term-bg);
  border-top:1px solid var(--term-border);
}
.terminal-bar{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 18px;
  background:var(--term-bar);
  border-bottom:1px solid var(--term-border);
}
.terminal-dot{
  width:11px;height:11px;border-radius:50%;
  display:inline-block;
  box-shadow:0 1px 0 rgba(0,0,0,.3) inset;
}
.terminal-dot-r{background:#ff5f57}
.terminal-dot-y{background:#febc2e}
.terminal-dot-g{background:#28c840}
.terminal-title{
  margin-left:auto;margin-right:auto;
  font-family:'JetBrains Mono', monospace;
  font-size:11px;
  color:var(--term-dim);
  font-weight:500;
  letter-spacing:.02em;
}

.terminal-panel{
  padding:20px 26px;
  font-family:'JetBrains Mono', monospace;
  font-size:12.5px;
  line-height:1.75;
  color:var(--term-fg);
  height:360px;
  overflow-y:auto;
  white-space:pre-wrap;
  word-break:break-word;
  background:
    linear-gradient(180deg, rgba(93,185,75,.02) 0%, transparent 4%),
    var(--term-bg);
}
.terminal-panel::-webkit-scrollbar{width:8px}
.terminal-panel::-webkit-scrollbar-track{background:rgba(255,255,255,.02)}
.terminal-panel::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.1);
  border-radius:10px;
}
.terminal-panel::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.18)}

.log-empty{
  color:var(--term-dim);
  font-style:italic;
  display:flex;
  gap:10px;
  align-items:flex-start;
}
.log-empty-chevron{
  color:var(--green-400);
  font-style:normal;
  font-weight:700;
  font-family:'JetBrains Mono', monospace;
}
.log-empty strong{
  color:var(--term-fg);
  font-style:normal;
  font-weight:600;
}

.log-line{margin-bottom:1px}
.log-line .log-ts{
  color:var(--term-dim);
  margin-right:10px;
  font-size:11px;
  font-weight:400;
}
.log-line.success{color:#7fd89a}
.log-line.error  {color:#ff8878}
.log-line.warn   {color:#ffc960}
.log-line.info   {color:var(--term-fg)}

/* ----------- SUMMARY ----------- */
.panel-summary{grid-column:1 / -1}
.stats{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:0;
  border-top:1px solid var(--line);
}
.stat{
  padding:28px 26px;
  border-right:1px solid var(--line);
  transition:background .2s;
}
.stat:last-child{border-right:none}
.stat:hover{background:var(--paper)}
.stat-num{
  font-family:'Fraunces', serif;
  font-weight:500;
  font-size:52px;
  line-height:1;
  letter-spacing:-0.04em;
  color:var(--ink);
  font-variation-settings:"opsz" 144;
  font-variant-numeric:tabular-nums;
  margin-bottom:12px;
}
.stat-ok .stat-num{color:var(--green-700)}
.stat-err .stat-num{color:var(--red)}
.stat-sep{
  width:28px;
  height:2px;
  background:var(--ink);
  margin-bottom:10px;
  opacity:.85;
}
.stat-ok .stat-sep{background:var(--green-700)}
.stat-err .stat-sep{background:var(--red)}
.stat-label{
  font-size:11.5px;
  font-weight:600;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--ink-4);
}

.summary-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin:20px 26px 24px;
  padding:11px 18px;
  background:var(--green-800);
  color:#fff;
  font-size:13px;
  font-weight:600;
  border-radius:8px;
  transition:all .18s;
  box-shadow:0 2px 6px rgba(0,78,37,.22);
}
.summary-link:hover{
  background:var(--green-700);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,78,37,.3);
}
.summary-link .arrow{
  transition:transform .18s;
}
.summary-link:hover .arrow{transform:translateX(3px)}

/* ----------- RESPONSIVE ----------- */
@media (max-width: 1100px){
  .grid{grid-template-columns:1fr}
}

@media (max-width: 860px){
  .app{grid-template-columns:1fr}
  .sidebar{
    position:relative;
    height:auto;
    flex-direction:row;
    align-items:center;
    padding:14px 20px;
    gap:16px;
  }
  .sidebar-top{
    padding:0;
    border-bottom:none;
    flex-shrink:0;
  }
 .logo-mark{
  display:block;
  padding:20px 16px 18px;
  background:transparent;
  border-radius:0;
  box-shadow:none;
  border-bottom:1px solid rgba(255,255,255,.12);
  text-align:center;
  transition:opacity .2s;
}
.logo-mark img{
  display:block;
  width:100%;
  max-width:190px;
  height:auto;
  max-height:70px;
  object-fit:contain;
  object-position:center;
  filter:brightness(0) invert(1);
  margin:0 auto;
}  .org-tag{display:none}
  .nav, .sidebar-foot{display:none}

  .topbar{padding:14px 20px}
  .hero{padding:32px 20px 24px}
  .hero-title{font-size:34px}
  .grid{padding:0 20px 20px;gap:16px}
  .panel-header{padding:18px 20px 14px}
  .panel-body{padding:20px}
  .field-grid{grid-template-columns:1fr;gap:14px}
  .stats{grid-template-columns:1fr}
  .stat{border-right:none;border-bottom:1px solid var(--line)}
  .stat:last-child{border-bottom:none}
  .actions{flex-wrap:wrap}
  .summary-link{margin:16px 20px 20px}
}

@media (max-width: 480px){
  .hero-title{font-size:28px}
  .hero-lead{font-size:14.5px}
  .stat-num{font-size:42px}
}