:root{
  --green-950:#042618;--green-900:#063d27;--green-800:#075131;--green-700:#087044;--green-600:#10965f;
  --green-100:#e6f5ed;--green-50:#f4fbf7;--blue:#2563eb;--yellow:#f59e0b;--red:#dc2626;
  --gray:#667085;--border:#dce7df;--bg:#f4f7f5;--card:#fff;--text:#1f2937;
  --shadow:0 16px 40px rgba(6,61,39,.10);--radius:18px;--sidebar:320px;
}
*{box-sizing:border-box}body{margin:0;min-height:100vh;font-family:Arial,Helvetica,sans-serif;background:radial-gradient(circle at top left,rgba(16,150,95,.16),transparent 34%),linear-gradient(180deg,#f8fbf9 0%,var(--bg) 100%);color:var(--text)}
body.dark-theme{--bg:#0f172a;--card:#111827;--text:#e5e7eb;--gray:#94a3b8;--border:#263445;--green-50:#14221b;--green-100:#173d2c;background:radial-gradient(circle at top left,rgba(16,150,95,.18),transparent 34%),linear-gradient(180deg,#08111f 0%,var(--bg) 100%)}
a{text-decoration:none;color:inherit}button,input,textarea,select{font-family:inherit}img{max-width:100%}
.page{width:min(1080px,calc(100% - 32px));margin:0 auto;padding:22px 0 42px}.topbar-public{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:20px}.brand{display:flex;align-items:center;gap:14px;min-width:0}.brand-logo,.brand-mark{width:68px;height:68px;border-radius:22px;background:rgba(255,255,255,.96);border:1px solid var(--border);display:grid;place-items:center;padding:6px;box-shadow:var(--shadow);overflow:hidden;flex:0 0 auto}.brand h1{margin:0;font-size:20px;color:var(--green-950);line-height:1.1}.brand p{margin:5px 0 0;color:var(--gray);font-size:13px}.dark-theme .brand h1{color:#ecfdf5}
.hero{display:grid;grid-template-columns:1.1fr .9fr;gap:18px;margin-bottom:20px}.hero-main{position:relative;overflow:hidden;border-radius:30px;padding:34px;color:#fff;background:linear-gradient(135deg,rgba(4,38,24,.95),rgba(8,112,68,.91)),linear-gradient(135deg,var(--green-950),var(--green-700));box-shadow:var(--shadow)}.hero-main:after{content:"";position:absolute;width:250px;height:250px;right:-80px;top:-80px;border-radius:50%;background:rgba(255,255,255,.10)}.tag{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.20);font-size:12px;font-weight:900;letter-spacing:.05em;text-transform:uppercase;margin-bottom:18px}.hero-main h2{position:relative;z-index:1;margin:0;font-size:clamp(30px,4vw,48px);line-height:1.04;letter-spacing:-1.2px}.hero-main p{position:relative;z-index:1;margin:16px 0 0;color:rgba(255,255,255,.84);line-height:1.6;font-size:16px;max-width:760px}.hero-important{position:relative;z-index:1;margin-top:16px;border-radius:18px;padding:14px 15px;line-height:1.45;font-size:13px;max-width:860px;background:rgba(245,158,11,.18);border:1px solid rgba(245,158,11,.45);color:#fff5d6}.hero-steps{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.step-card{background:var(--card);border:1px solid var(--border);border-radius:20px;box-shadow:0 10px 24px rgba(15,23,42,.06);padding:16px;min-height:148px}.step-number{width:34px;height:34px;border-radius:12px;display:grid;place-items:center;background:var(--green-100);color:var(--green-900);font-weight:900;margin-bottom:10px}.step-card b{display:block;margin-bottom:6px;font-size:15px;color:var(--green-950)}.dark-theme .step-card b{color:#ecfdf5}.step-card span{color:var(--gray);font-size:12px;line-height:1.45}
.app{display:grid;grid-template-columns:var(--sidebar) 1fr;min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;overflow-y:auto;background:linear-gradient(180deg,var(--green-950),var(--green-800));color:#fff;padding:22px 16px;box-shadow:18px 0 42px rgba(4,38,24,.18);z-index:5}.sidebar .brand{padding:8px 8px 22px;border-bottom:1px solid rgba(255,255,255,.14);margin-bottom:14px}.sidebar .brand-mark{width:58px;height:58px;flex:0 0 58px;border-radius:18px;box-shadow:none}.sidebar .brand strong{display:block;font-size:20px;line-height:1}.sidebar .brand span{display:block;font-size:12px;color:rgba(255,255,255,.75);margin-top:6px;line-height:1.25}.nav-section-title{padding:12px;margin:12px 0 6px;border-radius:14px;background:rgba(255,255,255,.08);font-weight:900}.nav-btn{width:100%;border:0;color:rgba(255,255,255,.86);background:transparent;border-radius:13px;padding:11px 10px;display:grid;grid-template-columns:26px minmax(0,1fr) auto;gap:8px;text-align:left;align-items:center;cursor:pointer;font-size:13px;min-height:42px;line-height:1}.nav-btn span:nth-child(2){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.nav-btn small{opacity:.72;font-weight:800;font-size:10px;text-transform:uppercase;letter-spacing:.04em;white-space:nowrap}.nav-btn:hover{background:rgba(255,255,255,.09);color:#fff}.nav-btn.active{background:#fff;color:var(--green-900);box-shadow:0 10px 20px rgba(0,0,0,.15);font-weight:900}.sidebar-footer{margin-top:18px;padding:14px;border-radius:18px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);font-size:12px;line-height:1.45;color:rgba(255,255,255,.78)}.logout-form{margin-top:14px}.logout-form button{width:100%}
.main{min-width:0;padding:86px 28px 28px}.user-bar{position:fixed;top:18px;right:28px;z-index:30;display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:18px;background:rgba(255,255,255,.92);box-shadow:0 12px 32px rgba(6,61,39,.16);backdrop-filter:blur(10px)}.dark-theme .user-bar{background:rgba(17,24,39,.92);box-shadow:0 12px 32px rgba(0,0,0,.28)}.user-avatar{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,var(--green-900),var(--green-600));color:#fff;font-weight:900;letter-spacing:.02em}.user-info strong{display:block;color:var(--green-950);font-size:13px;white-space:nowrap}.dark-theme .user-info strong{color:#ecfdf5}.user-info span{display:block;color:var(--gray);font-size:11px;margin-top:3px;white-space:nowrap}.theme-toggle{border:1px solid var(--border);background:var(--green-50);color:var(--green-900);border-radius:999px;padding:8px 10px;cursor:pointer;font-weight:900;font-size:12px;white-space:nowrap}.dark-theme .theme-toggle{background:#0b1220;color:#d1fae5}
.topbar{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:22px}.topbar h1,.topbar h2{margin:0;color:var(--green-950);font-size:30px;line-height:1.15}.dark-theme .topbar h1,.dark-theme .topbar h2{color:#ecfdf5}.topbar p{margin:8px 0 0;color:var(--gray);max-width:980px;line-height:1.5}.top-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end}.btn{border:0;border-radius:14px;padding:12px 15px;cursor:pointer;font-weight:900;font-size:13px;display:inline-flex;gap:8px;align-items:center;justify-content:center;transition:.2s ease;text-decoration:none}.btn:hover{transform:translateY(-1px);filter:brightness(1.02)}.btn-primary{background:linear-gradient(135deg,var(--green-900),var(--green-600));color:#fff;box-shadow:0 12px 24px rgba(8,112,68,.22)}.btn-secondary{background:#fff;color:var(--green-900);border:1px solid var(--border)}.dark-theme .btn-secondary{background:#111827;color:#d1fae5}.btn-warning{background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.btn-danger{background:#fff1f2;color:var(--red);border:1px solid #fecdd3}
.card,.doc-card,.kpi,.doc{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow);padding:20px;min-width:0}.card h3,.doc-card h3,.kpi strong{color:var(--green-950)}.dark-theme .card h3,.dark-theme .doc-card h3,.dark-theme .kpi strong{color:#ecfdf5}.card p{color:var(--gray);line-height:1.5}.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:18px}.kpi{min-height:118px;position:relative;overflow:hidden}.kpi:after{content:"";position:absolute;inset:auto -20px -26px auto;width:82px;height:82px;border-radius:50%;background:var(--green-100)}.kpi span{font-size:12px;text-transform:uppercase;color:var(--gray);font-weight:900;letter-spacing:.04em}.kpi strong{display:block;font-size:34px;margin-top:8px}.kpi p{margin:6px 0 0;color:var(--gray);font-size:13px}.list{display:grid;gap:12px}.list-item{display:grid;grid-template-columns:48px minmax(0,1fr) auto;gap:12px;align-items:center;background:var(--card);border:1px solid var(--border);border-radius:18px;padding:12px;box-shadow:0 8px 18px rgba(6,61,39,.06)}.list-icon{width:42px;height:42px;border-radius:50%;background:var(--green-900);color:#fff;display:grid;place-items:center;font-weight:900}.list-item h4{margin:0;color:var(--green-900);font-size:15px}.dark-theme .list-item h4{color:#bbf7d0}.list-item p{margin:4px 0 0;color:var(--gray);font-size:12px;line-height:1.4}.list-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.empty{border:1px dashed var(--border);background:var(--green-50);border-radius:16px;padding:16px;color:var(--gray);line-height:1.5}.pill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;white-space:nowrap}.pill-green{background:var(--green-100);color:var(--green-900)}.pill-blue{background:#dbeafe;color:#1d4ed8}.pill-yellow{background:#fef3c7;color:#92400e}.pill-red{background:#fee2e2;color:#991b1b}.pill-gray{background:#f1f5f9;color:#475569}.stage-bars{display:grid;gap:12px;margin-top:16px}.stage-bar{display:grid;grid-template-columns:190px 1fr 34px;align-items:center;gap:12px;font-size:13px}.track{height:12px;border-radius:999px;background:#eef4f0;overflow:hidden}.dark-theme .track{background:#1f2937}.fill{height:100%;width:var(--w);border-radius:inherit;background:linear-gradient(90deg,var(--green-800),var(--green-600))}
.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}.field{display:grid;gap:7px;margin-bottom:14px}.field.full{grid-column:1/-1}label{display:block;color:var(--gray);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}input,select,textarea{width:100%;border:1px solid var(--border);background:var(--card);color:var(--text);border-radius:14px;padding:12px 13px;outline:none;transition:.2s;font-size:14px}textarea{min-height:112px;resize:vertical;line-height:1.45}input:focus,select:focus,textarea:focus{border-color:var(--green-600);box-shadow:0 0 0 4px rgba(16,150,95,.12)}.helptext,.help{color:var(--gray);font-size:12px;line-height:1.35}.errorlist{margin:0 0 8px;padding:10px 14px;border-radius:14px;background:#fee2e2;color:#991b1b;list-style:none;font-size:13px}.messages{display:grid;gap:10px;margin-bottom:18px}.message{padding:12px 14px;border-radius:14px;background:var(--green-100);color:var(--green-900);font-weight:700}.message.error{background:#fee2e2;color:#991b1b}.message.warning{background:#fef3c7;color:#92400e}.file-input-box{border:1px dashed var(--border);border-radius:16px;padding:14px;background:var(--green-50)}
.doc{max-width:1040px;margin:0 auto}.doc-header{border-bottom:3px solid var(--green-900);padding-bottom:16px;margin-bottom:18px;display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.doc-header h2{margin:0;color:var(--green-950);font-size:26px}.dark-theme .doc-header h2{color:#ecfdf5}.doc-header p{margin:6px 0 0;color:var(--gray);font-size:13px;line-height:1.4}.doc-logo{width:90px;text-align:right}.doc-section{page-break-inside:avoid;border:1px solid var(--border);border-radius:14px;margin:14px 0;overflow:hidden}.doc-section h3{margin:0;padding:11px 14px;background:var(--green-900);color:#fff;font-size:15px}.doc-section .body{padding:14px;line-height:1.55;color:var(--text);font-size:14px;white-space:pre-wrap}.doc-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.doc-box{border:1px solid var(--border);border-radius:12px;padding:10px;background:var(--green-50)}.doc-box small{display:block;text-transform:uppercase;font-size:10px;color:var(--gray);font-weight:900;letter-spacing:.04em;margin-bottom:4px}.bottom-actions{display:flex;justify-content:center;gap:12px;margin:22px auto 0;max-width:1020px;flex-wrap:wrap}.canvas-board{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.canvas-block{border:1px solid var(--border);border-radius:18px;background:var(--card);overflow:hidden;min-height:160px;box-shadow:0 8px 18px rgba(6,61,39,.06)}.canvas-block header{padding:12px 14px;font-weight:900;color:#fff;background:var(--zone,var(--green-900))}.canvas-block div{padding:14px;line-height:1.5;font-size:14px;white-space:pre-wrap;overflow-wrap:anywhere}.canvas-block.big{grid-column:span 2}.canvas-block.full{grid-column:1/-1}.projects-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:18px}.projects-table{width:100%;min-width:980px;border-collapse:collapse;font-size:13px}.projects-table th{background:var(--green-900);color:#fff;padding:11px 10px;text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:.04em}.projects-table td{padding:10px;border-bottom:1px solid var(--border);vertical-align:top}.projects-table tr:last-child td{border-bottom:0}
@media(max-width:1180px){:root{--sidebar:300px}.grid-4{grid-template-columns:repeat(2,1fr)}.canvas-board{grid-template-columns:repeat(2,minmax(0,1fr))}.hero{grid-template-columns:1fr}.hero-main{min-height:auto}}
@media(max-width:780px){.app{grid-template-columns:1fr}.sidebar{position:relative;height:auto}.main{padding:96px 18px 18px}.user-bar{top:14px;right:14px;left:14px;justify-content:space-between}.topbar,.topbar-public{flex-direction:column}.top-actions{justify-content:flex-start}.grid-4,.doc-grid,.canvas-board,.form-grid,.hero-steps{grid-template-columns:1fr}.canvas-block.big,.canvas-block.full{grid-column:1}.list-item{grid-template-columns:42px 1fr}.list-actions{grid-column:1/-1;justify-content:flex-start}.stage-bar{grid-template-columns:1fr}.page{width:min(100% - 24px,1080px);padding-top:14px}.hero-main{padding:24px}}
@media print{body{background:#fff}.sidebar,.topbar,.user-bar,.no-print,.bottom-actions{display:none!important}.app{display:block}.main{padding:0}.doc,.card{box-shadow:none;border:0;max-width:none;padding:0}.doc-section,.canvas-block{page-break-inside:avoid}@page{size:A4;margin:12mm}}

/* Ajustes E-Proj: menu sem etiquetas laterais e chave de classificação de inovação */
.nav-btn{grid-template-columns:26px minmax(0,1fr)}
.nav-btn small{display:none!important}
.demand-meta{margin-top:8px;display:flex;gap:8px;flex-wrap:wrap;align-items:center}.innovation-row{align-items:flex-start}.innovation-actions{min-width:260px;align-items:flex-end}.innovation-toggle-form{width:100%;display:flex;justify-content:flex-end}.switch-label{display:flex!important;align-items:center;justify-content:flex-end;gap:10px;text-transform:none;letter-spacing:0;font-size:12px;color:var(--gray);font-weight:900;cursor:pointer;white-space:nowrap}.switch-label input{display:none}.switch-label i{position:relative;width:52px;height:28px;border-radius:999px;background:#cbd5e1;transition:.2s;display:inline-block;flex:0 0 auto}.switch-label i:after{content:"";position:absolute;top:4px;left:4px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 2px 6px rgba(0,0,0,.2);transition:.2s}.switch-label input:checked+i{background:linear-gradient(135deg,var(--green-900),var(--green-600))}.switch-label input:checked+i:after{left:28px}.timeline-forward{margin:8px 0 0;font-size:13px;color:#475569}.audit-note{background:var(--green-50);border:1px solid var(--border);border-radius:14px;padding:12px;margin-top:10px;color:var(--gray);font-size:13px;line-height:1.45}


/* Configurações de IA */
.config-panel{max-width:1120px}.config-header{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;margin-bottom:18px}.config-form{margin-top:18px}.ai-feature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.modern-checkline{display:flex!important;align-items:center;gap:12px;text-transform:none;letter-spacing:0;font-size:14px;color:var(--text);font-weight:900;cursor:pointer;background:var(--green-50);border:1px solid var(--border);border-radius:18px;padding:14px}.modern-checkline .toggle-checkbox{display:none}.modern-check-ui{position:relative;width:54px;height:30px;border-radius:999px;background:#cbd5e1;box-shadow:inset 0 0 0 1px rgba(15,23,42,.08);transition:.2s;flex:0 0 54px}.modern-check-ui:after{content:"";position:absolute;top:4px;left:4px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 3px 8px rgba(15,23,42,.25);transition:.2s}.toggle-checkbox:checked + .modern-check-ui{background:linear-gradient(135deg,var(--green-900),var(--green-600))}.toggle-checkbox:checked + .modern-check-ui:after{left:28px}@media(max-width:780px){.ai-feature-grid{grid-template-columns:1fr}.config-header{display:grid}}


.solution-toggle-box {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.85);
}

.solution-switch {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.solution-switch input {
  display: none;
}

.modern-switch-track {
  width: 54px;
  height: 30px;
  border-radius: 999px;
  background: #cbd5e1;
  position: relative;
  flex-shrink: 0;
  transition: 0.25s ease;
}

.modern-switch-thumb {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  position: absolute;
  left: 3px;
  top: 3px;
  transition: 0.25s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.solution-switch input:checked + .modern-switch-track {
  background: #16a34a;
}

.solution-switch input:checked + .modern-switch-track .modern-switch-thumb {
  transform: translateX(24px);
}

.modern-switch-text {
  display: flex;
  flex-direction: column;
  font-weight: 700;
}

.modern-switch-text small {
  font-weight: 400;
  opacity: 0.75;
  margin-top: 2px;
}

.hero.hero-full {
  display: block;
  width: 100%;
  margin-bottom: 28px;
}

.hero-card-green {
  width: 100%;
  box-sizing: border-box;
  background: linear-gradient(135deg, #047857, #16a34a);
  color: #ffffff;
  border-radius: 28px;
  padding: 34px 38px;
  box-shadow: 0 20px 48px rgba(4, 120, 87, 0.24);
}

.hero-card-green h2 {
  margin: 10px 0 10px;
  color: #ffffff;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.08;
  max-width: 980px;
}

.hero-card-green p {
  margin: 0;
  max-width: 980px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 17px;
  line-height: 1.6;
}

.tag-light {
  display: inline-flex;
  width: fit-content;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.flow-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
}

.flow-inline span {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.20);
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 800;
  color: #ffffff;
}

.flow-inline b {
  color: rgba(255, 255, 255, 0.78);
}

.hero-warning {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.96);
  max-width: 100%;
}

@media (max-width: 720px) {
  .hero-card-green {
    padding: 26px 22px;
    border-radius: 22px;
  }

  .flow-inline {
    gap: 8px;
  }

  .flow-inline b {
    display: none;
  }

  .flow-inline span {
    width: 100%;
    text-align: center;
  }
}

/* =========================================================
   E-Proj - Ajuste responsivo mobile com menu hamburger
   Corrige sobreposição da barra do usuário sobre a logo
   e transforma a sidebar em drawer lateral no celular.
   ========================================================= */
.mobile-topbar,
.sidebar-overlay{
  display:none;
}

.mobile-menu-btn{
  appearance:none;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--green-900);
  width:44px;
  height:44px;
  border-radius:14px;
  display:grid;
  place-items:center;
  gap:4px;
  padding:10px;
  cursor:pointer;
  box-shadow:0 8px 20px rgba(6,61,39,.10);
}
.mobile-menu-btn span{
  width:20px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  display:block;
}
.mobile-brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.mobile-brand img{
  width:40px;
  height:40px;
  object-fit:contain;
  border-radius:12px;
  background:#fff;
  padding:4px;
  border:1px solid var(--border);
}
.mobile-brand strong{
  display:block;
  color:var(--green-950);
  font-size:15px;
  line-height:1;
}
.mobile-brand small{
  display:block;
  color:var(--gray);
  font-size:11px;
  margin-top:3px;
}
.dark-theme .mobile-brand strong{
  color:#ecfdf5;
}

@media(max-width:780px){
  body{
    overflow-x:hidden;
  }
  .app{
    display:block;
    min-height:100vh;
  }
  .mobile-topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:64px;
    padding:10px 14px;
    z-index:140;
    background:rgba(255,255,255,.94);
    border-bottom:1px solid var(--border);
    box-shadow:0 10px 28px rgba(6,61,39,.12);
    backdrop-filter:blur(12px);
  }
  .dark-theme .mobile-topbar{
    background:rgba(17,24,39,.94);
    box-shadow:0 10px 28px rgba(0,0,0,.30);
  }
  .sidebar{
    position:fixed !important;
    top:0;
    bottom:0;
    left:0;
    width:min(86vw, 330px);
    height:100dvh !important;
    z-index:150;
    transform:translateX(-106%);
    transition:transform .24s ease;
    border-radius:0 26px 26px 0;
    box-shadow:24px 0 44px rgba(0,0,0,.26);
    padding:20px 16px 24px;
  }
  .sidebar-open .sidebar{
    transform:translateX(0);
  }
  .sidebar-overlay{
    display:block;
    position:fixed;
    inset:0;
    z-index:145;
    background:rgba(2,6,23,.48);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
  }
  .sidebar-open .sidebar-overlay{
    opacity:1;
    pointer-events:auto;
  }
  .main{
    padding:82px 14px 18px !important;
    min-width:0;
  }
  .user-bar{
    position:static !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    width:100%;
    margin:0 0 16px;
    border-radius:22px;
    padding:10px;
    justify-content:flex-start;
    gap:10px;
  }
  .user-info{
    min-width:0;
    flex:1;
  }
  .user-info strong,
  .user-info span{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  .theme-toggle{
    flex:0 0 auto;
    padding:8px 10px;
  }
  .sidebar .brand{
    padding-top:4px;
  }
  .nav-section-title{
    margin-top:10px;
  }
  .sidebar-footer{
    margin-bottom:12px;
  }
}

@media(max-width:420px){
  .mobile-topbar{
    padding-left:12px;
    padding-right:12px;
  }
  .main{
    padding-left:12px !important;
    padding-right:12px !important;
  }
  .user-avatar{
    width:38px;
    height:38px;
    font-size:13px;
  }
  .user-info strong{
    font-size:12px;
  }
  .theme-toggle{
    font-size:11px;
    padding:7px 9px;
  }
}


/* =========================================================
   E-Proj - Genesis Design System
   KPIs com borda colorida, menu ativo amarelo, tipografia,
   ícones SVG, menu recolhível e mobile drawer.
   ========================================================= */
:root{
  --sidebar-expanded:320px;
  --sidebar-collapsed:88px;
  --accent-yellow:#f4b400;
  --accent-blue:#2563eb;
  --accent-purple:#7c3aed;
  --accent-teal:#0f766e;
  --accent-red:#b42318;
  --soft-shadow:0 18px 42px rgba(15,23,42,.08);
}
body.eproj-internal{
  --sidebar:var(--sidebar-expanded);
  font-family:"Inter","Segoe UI",Roboto,Arial,sans-serif;
  font-size:14px;
  letter-spacing:-.01em;
}
body.eproj-internal .app{transition:grid-template-columns .24s ease;}
body.eproj-internal .main{transition:padding .24s ease;}

/* Tipografia mais limpa */
body.eproj-internal .topbar h1,
body.eproj-internal .topbar h2,
body.eproj-internal .page-header h1{
  font-size:clamp(24px,2.4vw,34px);
  font-weight:900;
  letter-spacing:-.04em;
}
body.eproj-internal .topbar p,
body.eproj-internal .page-header p,
body.eproj-internal .card p,
body.eproj-internal .list-item p{
  font-size:13.5px;
  line-height:1.55;
}

/* Sidebar premium */
body.eproj-internal .sidebar{
  padding:20px 14px;
  background:linear-gradient(180deg,#032416 0%,#06452c 54%,#04301f 100%);
  border-right:1px solid rgba(255,255,255,.08);
}
body.eproj-internal .sidebar .brand{
  gap:12px;
  align-items:center;
  padding:8px 6px 18px;
}
body.eproj-internal .sidebar .brand-mark{
  width:54px;height:54px;flex-basis:54px;
  border-radius:18px;
  background:rgba(255,255,255,.96);
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}
body.eproj-internal .sidebar .brand strong{font-size:18px;font-weight:950;letter-spacing:-.04em;}
body.eproj-internal .sidebar .brand span{font-size:11.5px;line-height:1.3;}
body.eproj-internal .nav-section-title{
  background:rgba(255,255,255,.075);
  border:1px solid rgba(255,255,255,.08);
  color:rgba(255,255,255,.72);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.08em;
  padding:10px 12px;
}
body.eproj-internal .nav-btn{
  position:relative;
  display:grid;
  grid-template-columns:34px minmax(0,1fr);
  gap:10px;
  min-height:46px;
  padding:10px 12px;
  border-radius:15px;
  border:1px solid transparent;
  color:rgba(255,255,255,.84);
  font-size:13.5px;
  font-weight:760;
  transition:background .18s ease,color .18s ease,border-color .18s ease,transform .18s ease;
}
body.eproj-internal .nav-btn:hover{
  background:rgba(255,255,255,.10);
  color:#fff;
  transform:translateX(1px);
}
body.eproj-internal .nav-btn.active{
  color:var(--accent-yellow)!important;
  background:linear-gradient(90deg,rgba(244,180,0,.22),rgba(255,255,255,.10));
  border-color:rgba(244,180,0,.42);
  box-shadow:0 12px 26px rgba(0,0,0,.20);
}
body.eproj-internal .nav-btn.active::before{
  content:"";
  position:absolute;
  left:-1px;top:9px;bottom:9px;
  width:4px;
  border-radius:999px;
  background:var(--accent-yellow);
  box-shadow:0 0 0 4px rgba(244,180,0,.13);
}
body.eproj-internal .nav-icon{
  width:34px;height:34px;
  border-radius:12px;
  display:grid;
  place-items:center;
  background:rgba(255,255,255,.09);
  color:rgba(255,255,255,.86);
}
body.eproj-internal .nav-icon svg{width:18px;height:18px;display:block;fill:currentColor;}
body.eproj-internal .nav-btn.active .nav-icon{
  background:rgba(244,180,0,.18);
  color:var(--accent-yellow);
}
body.eproj-internal .sidebar-footer{
  font-size:11.5px;
  border-radius:16px;
}

/* Botão de recolher menu no desktop */
.sidebar-collapse-btn{
  position:absolute;
  top:16px;right:12px;
  width:36px;height:36px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.16);
  border-radius:13px;
  background:rgba(255,255,255,.10);
  color:#fff;
  cursor:pointer;
  z-index:20;
}
.collapse-lines{display:grid;gap:4px;}
.collapse-lines i{display:block;width:17px;height:2px;border-radius:99px;background:currentColor;}
@media(min-width:781px){
  body.sidebar-collapsed{--sidebar:var(--sidebar-collapsed);}
  body.sidebar-collapsed .sidebar{padding-left:12px;padding-right:12px;overflow-x:hidden;}
  body.sidebar-collapsed .sidebar .brand{justify-content:center;padding-top:52px;}
  body.sidebar-collapsed .brand-text,
  body.sidebar-collapsed .nav-section-title,
  body.sidebar-collapsed .nav-btn span:nth-child(2),
  body.sidebar-collapsed .sidebar-footer{display:none!important;}
  body.sidebar-collapsed .nav-btn{grid-template-columns:1fr;padding:8px;justify-items:center;}
  body.sidebar-collapsed .nav-btn.active::before{left:2px;top:10px;bottom:10px;}
  body.sidebar-collapsed .logout-form button{font-size:0;padding:12px 0;}
  body.sidebar-collapsed .logout-form button::before{content:"⇥";font-size:18px;}
}

/* KPIs estilo Genesis: borda colorida */
body.eproj-internal .grid-4>.kpi,
body.eproj-internal .grid-4>.card,
body.eproj-internal .cards-grid>.card,
body.eproj-internal .dashboard-kpi,
body.eproj-internal .kpi-card{
  position:relative;
  overflow:hidden;
  border-radius:18px;
  border:1px solid var(--border);
  border-left:5px solid var(--kpi-color,var(--green-700));
  box-shadow:var(--soft-shadow);
}
body.eproj-internal .grid-4>.kpi::before,
body.eproj-internal .grid-4>.card::before,
body.eproj-internal .cards-grid>.card::before,
body.eproj-internal .dashboard-kpi::before,
body.eproj-internal .kpi-card::before{
  content:"";
  position:absolute;
  left:0;top:12px;bottom:12px;
  width:4px;
  border-radius:0 999px 999px 0;
  background:var(--kpi-color,var(--green-700));
}
body.eproj-internal .grid-4>*:nth-child(1),body.eproj-internal .cards-grid>*:nth-child(1){--kpi-color:#0b6b3a;}
body.eproj-internal .grid-4>*:nth-child(2),body.eproj-internal .cards-grid>*:nth-child(2){--kpi-color:#0f766e;}
body.eproj-internal .grid-4>*:nth-child(3),body.eproj-internal .cards-grid>*:nth-child(3){--kpi-color:#2563eb;}
body.eproj-internal .grid-4>*:nth-child(4),body.eproj-internal .cards-grid>*:nth-child(4){--kpi-color:#7c3aed;}
body.eproj-internal .grid-4>*:nth-child(5),body.eproj-internal .cards-grid>*:nth-child(5){--kpi-color:#b42318;}
body.eproj-internal .kpi strong,
body.eproj-internal .cards-grid .card strong{
  font-size:clamp(28px,3vw,38px);
  letter-spacing:-.06em;
}
body.eproj-internal .kpi span,
body.eproj-internal .card-label{
  font-size:11px;
  font-weight:900;
  letter-spacing:.075em;
}

/* Listas/cards com acabamento mais moderno */
body.eproj-internal .list-item,
body.eproj-internal .card,
body.eproj-internal .panel,
body.eproj-internal .doc-card{
  border-radius:20px;
}
body.eproj-internal .list-icon{
  border-radius:15px;
  background:linear-gradient(135deg,var(--green-900),var(--green-600));
}
body.eproj-internal .btn{border-radius:14px;font-weight:850;}

/* Tema claro: item ativo permanece amarelo, como no Genesis */
body.eproj-internal:not(.dark-theme) .nav-btn.active{
  color:var(--accent-yellow)!important;
}
body.eproj-internal:not(.dark-theme) .nav-btn.active .nav-icon{
  color:var(--accent-yellow)!important;
}

/* Mobile: hamburger/drawer sem sobrepor logo e dados do login */
.mobile-topbar,.sidebar-overlay{display:none;}
.mobile-menu-btn{appearance:none;border:1px solid var(--border);background:var(--card);color:var(--green-900);width:44px;height:44px;border-radius:14px;display:grid;place-items:center;gap:4px;padding:10px;cursor:pointer;box-shadow:0 8px 20px rgba(6,61,39,.10)}
.mobile-menu-btn span{width:20px;height:2px;border-radius:999px;background:currentColor;display:block}
.mobile-brand{display:flex;align-items:center;gap:10px;min-width:0}.mobile-brand img{width:40px;height:40px;object-fit:contain;border-radius:12px;background:#fff;padding:4px;border:1px solid var(--border)}.mobile-brand strong{display:block;color:var(--green-950);font-size:15px;line-height:1}.mobile-brand small{display:block;color:var(--gray);font-size:11px;margin-top:3px}.dark-theme .mobile-brand strong{color:#ecfdf5}
@media(max-width:780px){
  body{overflow-x:hidden}.sidebar-collapse-btn{display:none!important}.app{display:block;min-height:100vh}.mobile-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;position:fixed;top:0;left:0;right:0;height:64px;padding:10px 14px;z-index:140;background:rgba(255,255,255,.94);border-bottom:1px solid var(--border);box-shadow:0 10px 28px rgba(6,61,39,.12);backdrop-filter:blur(12px)}.dark-theme .mobile-topbar{background:rgba(17,24,39,.94);box-shadow:0 10px 28px rgba(0,0,0,.30)}
  body.eproj-internal .sidebar{position:fixed!important;top:0;bottom:0;left:0;width:min(86vw,330px);height:100dvh!important;z-index:150;transform:translateX(-106%);transition:transform .24s ease;border-radius:0 26px 26px 0;box-shadow:24px 0 44px rgba(0,0,0,.26);padding:20px 16px 24px}.sidebar-open .sidebar{transform:translateX(0)}.sidebar-overlay{display:block;position:fixed;inset:0;z-index:145;background:rgba(2,6,23,.48);opacity:0;pointer-events:none;transition:opacity .2s ease}.sidebar-open .sidebar-overlay{opacity:1;pointer-events:auto}
  body.eproj-internal .main{padding:82px 14px 18px!important;min-width:0}.user-bar{position:static!important;top:auto!important;left:auto!important;right:auto!important;width:100%;margin:0 0 16px;border-radius:22px;padding:10px;justify-content:flex-start;gap:10px}.user-info{min-width:0;flex:1}.user-info strong,.user-info span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.theme-toggle{flex:0 0 auto;padding:8px 10px}.sidebar .brand{padding-top:4px}.nav-section-title{margin-top:10px}.sidebar-footer{margin-bottom:12px}
}
@media(max-width:420px){.mobile-topbar{padding-left:12px;padding-right:12px}.main{padding-left:12px!important;padding-right:12px!important}.user-avatar{width:38px;height:38px;font-size:13px}.user-info strong{font-size:12px}.theme-toggle{font-size:11px;padding:7px 9px}}

/* =========================================================
   E-Proj — menu recolhível, sidebar compacta e scroll moderno
   ========================================================= */
:root{
  --sidebar:280px;
  --sidebar-collapsed:76px;
}

.sidebar{
  padding:18px 10px;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.28) transparent;
}
.sidebar::-webkit-scrollbar{width:5px;height:5px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.22);border-radius:999px}
.sidebar::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.36)}

.sidebar-footer{display:none!important}

.sidebar-collapse-toggle{
  width:38px;
  height:38px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:13px;
  background:rgba(255,255,255,.10);
  color:#fbbf24;
  display:grid;
  place-items:center;
  font-size:20px;
  line-height:1;
  cursor:pointer;
  margin:0 0 14px auto;
  transition:.18s ease;
}
.sidebar-collapse-toggle:hover{background:rgba(255,255,255,.16);transform:translateY(-1px)}

.mobile-hamburger{
  display:none;
  position:fixed;
  top:16px;
  left:16px;
  z-index:120;
  width:44px;
  height:44px;
  border:1px solid var(--border);
  border-radius:15px;
  background:rgba(255,255,255,.94);
  color:var(--green-900);
  box-shadow:0 12px 32px rgba(6,61,39,.16);
  align-items:center;
  justify-content:center;
  font-size:24px;
  cursor:pointer;
  backdrop-filter:blur(10px);
}
.dark-theme .mobile-hamburger{background:rgba(17,24,39,.94);color:#fbbf24}

body.sidebar-collapsed .app{grid-template-columns:var(--sidebar-collapsed) 1fr}
body.sidebar-collapsed .sidebar{padding:18px 9px}
body.sidebar-collapsed .sidebar-collapse-toggle{margin-left:auto;margin-right:auto}
body.sidebar-collapsed .sidebar .brand{justify-content:center;padding:4px 0 18px;margin-bottom:10px}
body.sidebar-collapsed .sidebar .brand > div:not(.brand-mark){display:none!important}
body.sidebar-collapsed .sidebar .brand-mark{width:48px;height:48px;flex-basis:48px;border-radius:15px}
body.sidebar-collapsed .nav-section-title{
  height:1px;
  min-height:1px;
  padding:0;
  margin:12px 8px;
  overflow:hidden;
  color:transparent;
  background:rgba(255,255,255,.20);
}
body.sidebar-collapsed .nav-btn{
  grid-template-columns:1fr!important;
  justify-items:center;
  padding:12px 0;
  min-height:46px;
}
body.sidebar-collapsed .nav-btn span:first-child{font-size:18px;line-height:1}
body.sidebar-collapsed .nav-btn span:not(:first-child),
body.sidebar-collapsed .nav-btn small{display:none!important}
body.sidebar-collapsed .logout-form button{
  width:100%;
  min-height:42px;
  padding:10px 0;
  font-size:0!important;
}
body.sidebar-collapsed .logout-form button::before{content:'⏻';font-size:18px;line-height:1}

body.sidebar-collapsed .nav-btn.active{
  color:#fbbf24;
  border-left:3px solid #fbbf24;
  background:rgba(255,255,255,.12);
}

@media(max-width:780px){
  :root{--sidebar:280px}
  .mobile-hamburger{display:flex}
  .sidebar-collapse-toggle{display:none!important}
  .app{display:block!important}
  .sidebar{
    position:fixed!important;
    left:0;
    top:0;
    bottom:0;
    width:min(84vw,280px)!important;
    height:100vh!important;
    transform:translateX(-105%);
    transition:transform .22s ease;
    z-index:100;
    padding:72px 12px 18px;
  }
  body.sidebar-open::after{
    content:'';
    position:fixed;
    inset:0;
    background:rgba(2,6,23,.42);
    z-index:90;
  }
  body.sidebar-open .sidebar{transform:translateX(0)}
  .main{padding:86px 16px 24px!important}
  .user-bar{left:72px!important;right:12px!important;top:14px!important;max-width:calc(100vw - 84px);overflow:hidden}

  body.sidebar-collapsed .app{display:block!important}
  body.sidebar-collapsed .sidebar{padding:72px 12px 18px}
  body.sidebar-collapsed .sidebar .brand{justify-content:flex-start;padding:8px 8px 18px}
  body.sidebar-collapsed .sidebar .brand > div:not(.brand-mark){display:block!important}
  body.sidebar-collapsed .nav-section-title{
    height:auto;
    min-height:initial;
    padding:12px;
    margin:12px 0 6px;
    overflow:visible;
    color:inherit;
    background:rgba(255,255,255,.08);
  }
  body.sidebar-collapsed .nav-btn{
    grid-template-columns:26px minmax(0,1fr)!important;
    justify-items:stretch;
    padding:11px 10px;
  }
  body.sidebar-collapsed .nav-btn span:not(:first-child){display:block!important}
}

/* =========================================================
   E-Proj — ajuste fino sidebar estreita sem sobreposição
   ========================================================= */
:root{
  --sidebar:252px;
  --sidebar-collapsed:72px;
}

.app{
  grid-template-columns:var(--sidebar) minmax(0,1fr)!important;
}

.sidebar{
  width:var(--sidebar)!important;
  max-width:var(--sidebar)!important;
  padding:14px 8px!important;
  overflow-x:hidden!important;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.24) transparent;
}
.sidebar::-webkit-scrollbar{width:5px;height:5px}
.sidebar::-webkit-scrollbar-track{background:transparent}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.20);border-radius:999px}
.sidebar::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.34)}

.sidebar-footer{display:none!important}

.sidebar .brand{
  position:relative!important;
  z-index:2!important;
  min-height:54px!important;
  margin:0 0 8px!important;
  padding:4px 6px 12px!important;
  gap:9px!important;
}
.sidebar .brand-mark{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  flex:0 0 42px!important;
}
.sidebar .brand strong{font-size:.92rem!important;line-height:1.1!important}
.sidebar .brand span{font-size:.70rem!important;line-height:1.2!important}

.sidebar-collapse-toggle{
  position:static!important;
  inset:auto!important;
  transform:none!important;
  z-index:3!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.10)!important;
  color:#fbbf24!important;
  display:grid!important;
  place-items:center!important;
  font-size:19px!important;
  line-height:1!important;
  cursor:pointer!important;
  margin:-4px 2px 10px auto!important;
  box-shadow:none!important;
}
.sidebar-collapse-toggle:hover{
  background:rgba(255,255,255,.16)!important;
  transform:none!important;
}

.nav-section-title{
  padding:9px 10px 5px!important;
  font-size:.68rem!important;
  letter-spacing:.08em!important;
}
.nav-btn{
  min-height:42px!important;
  padding:9px 9px!important;
  gap:8px!important;
  border-radius:13px!important;
}
.nav-btn span:first-child{
  width:22px!important;
  min-width:22px!important;
  display:inline-flex!important;
  justify-content:center!important;
}
.nav-btn span:not(:first-child){font-size:.84rem!important;line-height:1.18!important}

body.sidebar-collapsed .app{
  grid-template-columns:var(--sidebar-collapsed) minmax(0,1fr)!important;
}
body.sidebar-collapsed .sidebar{
  width:var(--sidebar-collapsed)!important;
  max-width:var(--sidebar-collapsed)!important;
  padding:14px 7px!important;
}
body.sidebar-collapsed .sidebar .brand{
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  min-height:46px!important;
  margin:0 auto 6px!important;
  padding:0!important;
}
body.sidebar-collapsed .sidebar .brand > div:not(.brand-mark){
  display:none!important;
}
body.sidebar-collapsed .sidebar .brand-mark{
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  flex:0 0 44px!important;
  margin:0 auto!important;
  position:relative!important;
  z-index:2!important;
}
body.sidebar-collapsed .sidebar-collapse-toggle{
  position:static!important;
  display:grid!important;
  margin:8px auto 13px!important;
  width:34px!important;
  height:34px!important;
  z-index:3!important;
}
body.sidebar-collapsed .nav-section-title{
  height:1px!important;
  min-height:1px!important;
  padding:0!important;
  margin:10px 8px!important;
  overflow:hidden!important;
  color:transparent!important;
  background:rgba(255,255,255,.18)!important;
  border-radius:999px!important;
}
body.sidebar-collapsed .nav-btn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:42px!important;
  padding:9px 0!important;
}
body.sidebar-collapsed .nav-btn span:first-child{
  width:auto!important;
  min-width:0!important;
  font-size:17px!important;
  line-height:1!important;
}
body.sidebar-collapsed .nav-btn span:not(:first-child),
body.sidebar-collapsed .nav-btn small{
  display:none!important;
}
body.sidebar-collapsed .nav-btn.active{
  color:#fbbf24!important;
  border-left:3px solid #fbbf24!important;
  background:rgba(255,255,255,.12)!important;
}
body.sidebar-collapsed .logout-form button{
  width:100%!important;
  min-height:40px!important;
  padding:9px 0!important;
  font-size:0!important;
}
body.sidebar-collapsed .logout-form button::before{
  content:'⏻';
  font-size:17px!important;
  line-height:1!important;
}

.mobile-hamburger{
  display:none;
  position:fixed;
  top:14px;
  left:14px;
  z-index:120;
  width:42px;
  height:42px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.94);
  color:var(--green-900);
  box-shadow:0 12px 32px rgba(6,61,39,.16);
  align-items:center;
  justify-content:center;
  font-size:23px;
  cursor:pointer;
  backdrop-filter:blur(10px);
}
.dark-theme .mobile-hamburger{background:rgba(17,24,39,.94);color:#fbbf24}

@media(max-width:780px){
  :root{--sidebar:266px;--sidebar-collapsed:266px}
  .app{display:block!important;grid-template-columns:1fr!important}
  .mobile-hamburger{display:flex!important}
  .sidebar-collapse-toggle{display:none!important}
  .sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    width:min(84vw,266px)!important;
    max-width:min(84vw,266px)!important;
    height:100vh!important;
    transform:translateX(-105%)!important;
    transition:transform .22s ease!important;
    z-index:100!important;
    padding:70px 10px 18px!important;
  }
  body.sidebar-open::after{
    content:'';
    position:fixed;
    inset:0;
    background:rgba(2,6,23,.42);
    z-index:90;
  }
  body.sidebar-open .sidebar{transform:translateX(0)!important}
  .main{padding:82px 14px 24px!important}
  .user-bar{
    left:68px!important;
    right:10px!important;
    top:12px!important;
    max-width:calc(100vw - 78px)!important;
    overflow:hidden!important;
  }
  body.sidebar-collapsed .sidebar{
    width:min(84vw,266px)!important;
    max-width:min(84vw,266px)!important;
    padding:70px 10px 18px!important;
  }
  body.sidebar-collapsed .sidebar .brand{
    justify-content:flex-start!important;
    min-height:54px!important;
    padding:4px 6px 12px!important;
    margin:0 0 8px!important;
  }
  body.sidebar-collapsed .sidebar .brand > div:not(.brand-mark){display:block!important}
  body.sidebar-collapsed .nav-section-title{
    height:auto!important;
    min-height:initial!important;
    padding:9px 10px 5px!important;
    margin:0!important;
    overflow:visible!important;
    color:inherit!important;
    background:transparent!important;
  }
  body.sidebar-collapsed .nav-btn{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    justify-content:initial!important;
    justify-items:stretch!important;
    padding:9px 9px!important;
  }
  body.sidebar-collapsed .nav-btn span:not(:first-child){display:block!important}
}

/* =========================================================
   E-Proj — menu final: estreito, recolhido sem sobreposição e seções em acordeão
   ========================================================= */
:root{
  --sidebar:238px;
  --sidebar-collapsed:96px;
}

.app{
  grid-template-columns:var(--sidebar) minmax(0,1fr)!important;
}

.sidebar{
  width:var(--sidebar)!important;
  max-width:var(--sidebar)!important;
  padding:13px 8px!important;
  overflow-x:hidden!important;
  scrollbar-width:thin!important;
  scrollbar-color:rgba(255,255,255,.22) transparent!important;
}
.sidebar::-webkit-scrollbar{width:5px!important;height:5px!important}
.sidebar::-webkit-scrollbar-track{background:transparent!important}
.sidebar::-webkit-scrollbar-thumb{background:rgba(255,255,255,.20)!important;border-radius:999px!important}
.sidebar::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,.34)!important}
.sidebar-footer{display:none!important}

.sidebar .brand{
  position:relative!important;
  z-index:2!important;
  min-height:50px!important;
  margin:0 0 7px!important;
  padding:3px 5px 10px!important;
  gap:8px!important;
  overflow:visible!important;
}
.sidebar .brand-mark{
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  flex:0 0 40px!important;
}
.sidebar .brand strong{font-size:.88rem!important;line-height:1.05!important}
.sidebar .brand span{font-size:.67rem!important;line-height:1.15!important}

.sidebar-collapse-toggle{
  position:static!important;
  inset:auto!important;
  transform:none!important;
  z-index:3!important;
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  border:1px solid rgba(255,255,255,.18)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.10)!important;
  color:#fbbf24!important;
  display:grid!important;
  place-items:center!important;
  font-size:19px!important;
  line-height:1!important;
  cursor:pointer!important;
  margin:-2px 4px 10px auto!important;
  box-shadow:none!important;
}
.sidebar-collapse-toggle:hover{background:rgba(255,255,255,.16)!important;transform:none!important}

.nav-section-title{
  position:relative!important;
  padding:8px 10px 5px!important;
  font-size:.64rem!important;
  letter-spacing:.075em!important;
  user-select:none!important;
}
.nav-section-title.is-collapsible-nav{
  cursor:pointer!important;
  border-radius:12px!important;
  padding-right:28px!important;
  transition:background .18s ease, color .18s ease!important;
}
.nav-section-title.is-collapsible-nav:hover{
  background:rgba(255,255,255,.08)!important;
  color:#fbbf24!important;
}
.nav-section-title.is-collapsible-nav::after{
  content:'▸';
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  font-size:.72rem;
  color:#fbbf24;
  opacity:.95;
}
.nav-section-title.is-collapsible-nav.is-open::after{content:'▾'}

.nav-group-items{
  display:grid!important;
  gap:4px!important;
  overflow:hidden!important;
  transition:max-height .22s ease, opacity .18s ease, margin .18s ease!important;
  max-height:380px!important;
  opacity:1!important;
}
.nav-group-items.is-collapsed{
  max-height:0!important;
  opacity:0!important;
  margin:0!important;
  pointer-events:none!important;
}
.nav-btn{
  min-height:40px!important;
  padding:8px 9px!important;
  gap:8px!important;
  border-radius:12px!important;
}
.nav-btn span:first-child{
  width:22px!important;
  min-width:22px!important;
  display:inline-flex!important;
  justify-content:center!important;
}
.nav-btn span:not(:first-child){font-size:.82rem!important;line-height:1.16!important}

body.sidebar-collapsed .app{
  grid-template-columns:var(--sidebar-collapsed) minmax(0,1fr)!important;
}
body.sidebar-collapsed .sidebar{
  width:var(--sidebar-collapsed)!important;
  max-width:var(--sidebar-collapsed)!important;
  padding:13px 9px!important;
}
body.sidebar-collapsed .sidebar .brand{
  display:grid!important;
  grid-template-columns:1fr!important;
  justify-items:center!important;
  align-items:center!important;
  min-height:50px!important;
  margin:0 auto 6px!important;
  padding:0!important;
  overflow:visible!important;
}
body.sidebar-collapsed .sidebar .brand > div:not(.brand-mark){display:none!important}
body.sidebar-collapsed .sidebar .brand-mark{
  width:48px!important;
  height:48px!important;
  min-width:48px!important;
  flex:0 0 48px!important;
  margin:0 auto!important;
  position:relative!important;
  z-index:2!important;
}
body.sidebar-collapsed .sidebar-collapse-toggle{
  position:static!important;
  display:grid!important;
  margin:8px auto 12px!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  z-index:3!important;
  clear:both!important;
}
body.sidebar-collapsed .nav-section-title{
  height:1px!important;
  min-height:1px!important;
  padding:0!important;
  margin:10px 9px!important;
  overflow:hidden!important;
  color:transparent!important;
  background:rgba(255,255,255,.18)!important;
  border-radius:999px!important;
  cursor:default!important;
}
body.sidebar-collapsed .nav-section-title::after{display:none!important}
body.sidebar-collapsed .nav-group-items{
  display:grid!important;
  gap:4px!important;
  max-height:none!important;
  opacity:1!important;
  overflow:visible!important;
  pointer-events:auto!important;
}
body.sidebar-collapsed .nav-group-items.is-collapsed{
  max-height:none!important;
  opacity:1!important;
  pointer-events:auto!important;
}
body.sidebar-collapsed .nav-btn{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:42px!important;
  padding:9px 0!important;
}
body.sidebar-collapsed .nav-btn span:first-child{
  width:auto!important;
  min-width:0!important;
  font-size:17px!important;
  line-height:1!important;
}
body.sidebar-collapsed .nav-btn span:not(:first-child),
body.sidebar-collapsed .nav-btn small{display:none!important}
body.sidebar-collapsed .nav-btn.active{
  color:#fbbf24!important;
  border-left:3px solid #fbbf24!important;
  background:rgba(255,255,255,.12)!important;
}
body.sidebar-collapsed .logout-form button{
  width:100%!important;
  min-height:40px!important;
  padding:9px 0!important;
  font-size:0!important;
}
body.sidebar-collapsed .logout-form button::before{
  content:'⏻';
  font-size:17px!important;
  line-height:1!important;
}

.mobile-hamburger{
  display:none;
  position:fixed;
  top:14px;
  left:14px;
  z-index:120;
  width:42px;
  height:42px;
  border:1px solid var(--border);
  border-radius:14px;
  background:rgba(255,255,255,.94);
  color:var(--green-900);
  box-shadow:0 12px 32px rgba(6,61,39,.16);
  align-items:center;
  justify-content:center;
  font-size:23px;
  cursor:pointer;
  backdrop-filter:blur(10px);
}
.dark-theme .mobile-hamburger{background:rgba(17,24,39,.94);color:#fbbf24}

@media(max-width:780px){
  :root{--sidebar:272px;--sidebar-collapsed:272px}
  .app{display:block!important;grid-template-columns:1fr!important}
  .mobile-hamburger{display:flex!important}
  .sidebar-collapse-toggle{display:none!important}
  .sidebar{
    position:fixed!important;
    left:0!important;
    top:0!important;
    bottom:0!important;
    width:min(86vw,272px)!important;
    max-width:min(86vw,272px)!important;
    height:100vh!important;
    transform:translateX(-105%)!important;
    transition:transform .22s ease!important;
    z-index:100!important;
    padding:70px 10px 18px!important;
  }
  body.sidebar-open::after{
    content:'';
    position:fixed;
    inset:0;
    background:rgba(2,6,23,.42);
    z-index:90;
  }
  body.sidebar-open .sidebar{transform:translateX(0)!important}
  .main{padding:82px 14px 24px!important}
  .user-bar{
    left:68px!important;
    right:10px!important;
    top:12px!important;
    max-width:calc(100vw - 78px)!important;
    overflow:hidden!important;
  }
  body.sidebar-collapsed .sidebar{
    width:min(86vw,272px)!important;
    max-width:min(86vw,272px)!important;
    padding:70px 10px 18px!important;
  }
  body.sidebar-collapsed .sidebar .brand{
    display:flex!important;
    justify-content:flex-start!important;
    min-height:54px!important;
    padding:4px 6px 12px!important;
    margin:0 0 8px!important;
  }
  body.sidebar-collapsed .sidebar .brand > div:not(.brand-mark){display:block!important}
  body.sidebar-collapsed .nav-section-title{
    height:auto!important;
    min-height:initial!important;
    padding:8px 10px 5px!important;
    margin:0!important;
    overflow:visible!important;
    color:inherit!important;
    background:transparent!important;
    cursor:pointer!important;
  }
  body.sidebar-collapsed .nav-section-title::after{display:block!important}
  body.sidebar-collapsed .nav-group-items.is-collapsed{
    max-height:0!important;
    opacity:0!important;
    pointer-events:none!important;
    overflow:hidden!important;
  }
  body.sidebar-collapsed .nav-btn{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    justify-content:initial!important;
    justify-items:stretch!important;
    padding:8px 9px!important;
  }
  body.sidebar-collapsed .nav-btn span:not(:first-child){display:block!important}
}

