/* Complya — design system (teal). */
:root{
  --primary:#0F766E; --primary-600:#0E6A63; --primary-700:#0B5853; --primary-050:#ECFDF8; --primary-100:#CFFAF0;
  --bg:#F4F6F8; --surface:#FFFFFF; --surface-2:#F8FAFB; --line:#E4E8EC; --line-2:#EDF0F3;
  --ink:#0E1726; --text:#1B2433; --text-dim:#5A6675; --text-mute:#8A94A3; --on-dark:#AEB9C6;
  --good:#15803D; --good-bg:#ECFDF5; --warn:#B45309; --warn-bg:#FFFBEB; --bad:#B91C1C; --bad-bg:#FEF2F2; --info:#1D4ED8; --info-bg:#EFF6FF;
  --r-sm:8px; --r:12px; --r-lg:16px; --pill:999px;
  --shadow-sm:0 1px 2px rgba(13,24,38,.06); --shadow:0 8px 28px rgba(13,24,38,.08); --shadow-lg:0 20px 55px rgba(13,24,38,.16);
  --font:"Inter",ui-sans-serif,system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --display:"Space Grotesk",var(--font); --mono:"JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
  --sidebar-w:248px; --topbar-h:62px; --bottomnav-h:64px; --maxw:1500px;
}
*,*::before,*::after{ box-sizing:border-box; }
body{ margin:0; font-family:var(--font); font-size:15px; line-height:1.5; color:var(--text); background:var(--bg); -webkit-font-smoothing:antialiased; }
h1,h2,h3,h4{ font-family:var(--display); color:var(--ink); margin:0; line-height:1.2; letter-spacing:-.01em; }
a{ color:var(--primary); text-decoration:none; } a:hover{ text-decoration:underline; }
img,svg{ display:block; max-width:100%; }
.muted{ color:var(--text-dim); } .small{ font-size:13px; }
label{ display:block; font-size:13px; font-weight:600; color:var(--text); margin-bottom:6px; }
input,select,textarea{ width:100%; font:inherit; font-size:14px; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:var(--r-sm); padding:10px 12px; transition:border-color .15s,box-shadow .15s; }
input:focus,select:focus,textarea:focus{ outline:none; border-color:var(--primary); box-shadow:0 0 0 3px rgba(15,118,110,.16); }
.field{ margin-bottom:14px; }
button,.btn{ font:inherit; font-weight:600; font-size:14px; cursor:pointer; border:1px solid transparent; border-radius:var(--r-sm); padding:10px 16px; display:inline-flex; align-items:center; justify-content:center; gap:8px; transition:background .15s,border-color .15s,opacity .15s; }
button[type=submit],.btn-primary{ background:var(--primary); color:#fff; }
button[type=submit]:hover,.btn-primary:hover{ background:var(--primary-600); }
.btn-ghost{ background:transparent; color:var(--text); border:1px solid var(--line); }
.btn-ghost:hover{ background:var(--surface-2); }
.btn-block{ width:100%; }
.alert,.err{ border-radius:var(--r-sm); padding:10px 12px; font-size:13px; border:1px solid; margin-bottom:12px; }
.err,.alert-error{ background:var(--bad-bg); color:var(--bad); border-color:#FBD5D5; }
.alert-ok{ background:var(--good-bg); color:var(--good); border-color:#BBF7D0; }
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-sm); }
.card-pad{ padding:18px 20px; }
.badge{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; padding:3px 9px; border-radius:var(--pill); background:var(--surface-2); color:var(--text-dim); border:1px solid var(--line); }
.badge-ok{ background:var(--good-bg); color:var(--good); border-color:#BBF7D0; }
.badge-warn{ background:var(--warn-bg); color:var(--warn); border-color:#FDE68A; }
.badge-bad{ background:var(--bad-bg); color:var(--bad); border-color:#FBD5D5; }
.table-wrap{ overflow-x:auto; }
table.data{ width:100%; border-collapse:collapse; font-size:14px; }
table.data th{ text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-mute); padding:10px 12px; border-bottom:1px solid var(--line); }
table.data td{ padding:12px; border-bottom:1px solid var(--line-2); }
.screen-auth{ min-height:100vh; min-height:100dvh; display:grid; place-items:center; padding:20px; background:radial-gradient(1100px 560px at 50% -12%, var(--primary-050), var(--bg)); }
.auth-card{ width:100%; max-width:384px; background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow); padding:34px 30px; }
.auth-card .brand{ font-size:24px; font-weight:700; letter-spacing:-.02em; color:var(--ink); margin:0 0 2px; display:flex; align-items:center; gap:9px; }
.auth-card .brand::before{ content:""; width:13px; height:13px; border-radius:4px; background:var(--primary); box-shadow:0 0 0 3px var(--primary-100); }
.auth-card .sub{ color:var(--text-dim); font-size:13px; margin:0 0 22px; }
.auth-card form button{ width:100%; margin-top:18px; }
.app{ display:grid; min-height:100vh; min-height:100dvh; grid-template-columns:var(--sidebar-w) 1fr; grid-template-rows:var(--topbar-h) 1fr; grid-template-areas:"sidebar topbar" "sidebar main"; }
.app-sidebar{ grid-area:sidebar; background:var(--ink); color:var(--on-dark); position:sticky; top:0; height:100vh; height:100dvh; display:flex; flex-direction:column; padding:18px 14px; gap:6px; z-index:40; }
.app-brand{ display:flex; align-items:center; gap:10px; color:#fff; font-family:var(--display); font-weight:700; font-size:18px; padding:6px 8px 14px; }
.app-brand::before{ content:""; width:14px; height:14px; border-radius:4px; background:var(--primary); box-shadow:0 0 0 3px rgba(15,118,110,.35); }
.nav-link{ display:flex; align-items:center; gap:11px; padding:10px 12px; border-radius:var(--r-sm); color:var(--on-dark); font-weight:500; font-size:14px; }
.nav-link:hover{ background:rgba(255,255,255,.06); color:#fff; text-decoration:none; }
.nav-link.active{ background:var(--primary); color:#fff; }
.nav-link svg{ width:18px; height:18px; flex:none; opacity:.9; }
.nav-sep{ margin-top:auto; }
.app-topbar{ grid-area:topbar; background:var(--surface); border-bottom:1px solid var(--line); display:flex; align-items:center; gap:12px; padding:0 20px; position:sticky; top:0; z-index:30; }
.app-topbar .title{ font-family:var(--display); font-weight:700; font-size:17px; color:var(--ink); }
.app-topbar .spacer{ flex:1; }
.user-chip{ display:flex; align-items:center; gap:9px; }
.avatar{ width:34px; height:34px; border-radius:50%; background:var(--primary); color:#fff; display:grid; place-items:center; font-weight:700; font-size:13px; }
.hamburger{ display:none; background:transparent; border:1px solid var(--line); border-radius:var(--r-sm); padding:8px; }
.hamburger svg{ width:20px; height:20px; }
.app-main{ grid-area:main; padding:24px; }
.app-main .wrap{ max-width:var(--maxw); margin:0 auto; }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:18px; }
.page-head h1{ font-size:22px; } .page-head p{ margin:4px 0 0; color:var(--text-dim); font-size:14px; }
.kpi-grid{ display:grid; gap:14px; grid-template-columns:repeat(4,1fr); margin-bottom:20px; }
.kpi{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:16px; box-shadow:var(--shadow-sm); }
.kpi .k-label{ font-size:13px; color:var(--text-dim); }
.kpi .k-value{ font-family:var(--display); font-size:26px; font-weight:700; color:var(--ink); margin-top:4px; }
.content-grid{ display:grid; gap:16px; grid-template-columns:2fr 1fr; }
.backdrop{ display:none; position:fixed; inset:0; background:rgba(8,15,26,.45); z-index:35; }
.app-bottomnav{ display:none; }
@media (max-width:1024px){
  .app{ grid-template-columns:1fr; grid-template-areas:"topbar" "main"; }
  .app-sidebar{ position:fixed; left:0; top:0; width:var(--sidebar-w); transform:translateX(-100%); transition:transform .22s ease; }
  .app.nav-open .app-sidebar{ transform:translateX(0); }
  .app.nav-open .backdrop{ display:block; }
  .hamburger{ display:inline-flex; }
  .content-grid{ grid-template-columns:1fr; }
  .kpi-grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px){
  .app-main{ padding:16px; padding-bottom:calc(var(--bottomnav-h) + 18px); }
  .kpi-grid{ grid-template-columns:1fr; }
  .app-bottomnav{ display:flex; position:fixed; bottom:0; left:0; right:0; height:var(--bottomnav-h); background:var(--surface); border-top:1px solid var(--line); z-index:36; padding-bottom:env(safe-area-inset-bottom); }
  .bn-link{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; color:var(--text-mute); font-size:11px; font-weight:600; }
  .bn-link svg{ width:21px; height:21px; }
  .bn-link.active{ color:var(--primary); } .bn-link:hover{ text-decoration:none; }
}

/* ===== menu do usuário (dropdown) ===== */
.user-menu{position:relative}
.user-chip{display:flex;align-items:center;gap:10px;background:none;border:0;cursor:pointer;font:inherit;padding:4px 6px;border-radius:10px}
.user-chip:hover{background:rgba(0,0,0,.05)}
.user-dropdown{position:absolute;right:0;top:calc(100% + 8px);min-width:190px;background:#fff;border:1px solid var(--line,#e2e8f0);border-radius:12px;box-shadow:0 14px 34px rgba(0,0,0,.14);padding:6px;display:none;z-index:60}
.user-menu.open .user-dropdown{display:block}
.user-dropdown a,.user-dropdown button{display:block;width:100%;text-align:left;padding:9px 12px;border-radius:8px;font-size:14px;color:var(--ink,#0f172a);text-decoration:none;background:none;border:0;cursor:pointer;font:inherit}
.user-dropdown a:hover,.user-dropdown button:hover{background:#f1f5f9}
.user-dropdown form{margin:0}
.user-dropdown .sep{height:1px;background:var(--line,#e2e8f0);margin:6px 4px}

/* ===== abas (perfil) ===== */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line,#e2e8f0);margin:0 0 20px}
.tabs a{padding:10px 14px;font-size:14px;font-weight:600;color:var(--text-dim,#64748b);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}
.tabs a:hover{color:var(--ink,#0f172a)}
.tabs a.on{color:var(--primary,#0F766E);border-bottom-color:var(--primary,#0F766E)}

/* ===== módulos: ações de linha + grid de formulário ===== */
.row-actions{ display:flex; gap:8px; align-items:center; }
.row-actions form{ display:inline; margin:0; }
.btn-sm{ padding:6px 12px; font-size:13px; min-width:90px; text-align:center; }
.btn-danger{ background:var(--bad-bg); color:var(--bad); border:1px solid #FBD5D5; }
.btn-danger:hover{ background:#FDE5E5; }
.empty-state{ text-align:center; color:var(--text-dim); padding:40px 16px; line-height:1.7; }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
.form-actions{ display:flex; gap:10px; margin-top:6px; }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }

/* ===== modal de confirmação ===== */
.modal-overlay{ position:fixed; inset:0; background:rgba(8,15,26,.5); display:flex; align-items:center; justify-content:center; padding:20px; z-index:80; animation:modal-fade .12s ease-out; }
.modal-overlay[hidden]{ display:none; }
.modal{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--shadow-lg); width:100%; max-width:420px; padding:24px; }
.modal-title{ font-size:18px; margin:0 0 8px; }
.modal-msg{ color:var(--text-dim); font-size:14px; line-height:1.55; margin:0 0 22px; }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; }
body.modal-open{ overflow:hidden; }
@keyframes modal-fade{ from{ opacity:0 } to{ opacity:1 } }

/* ===== formulário em seções ===== */
.form-section-title{ font-size:13px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-mute); font-weight:700; margin:24px 0 12px; padding-bottom:8px; border-bottom:1px solid var(--line-2); }
.form-section-title:first-of-type{ margin-top:0; }
.form-grid .field.full{ grid-column:1 / -1; }
.check-field{ display:flex; align-items:center; gap:10px; padding:8px 0; }
.check-field input{ width:auto; margin:0; }
.check-field label{ margin:0; font-weight:500; }

/* ===== consulta de CEP ===== */
.field-hint{ display:block; font-size:12px; color:var(--text-mute); margin-top:4px; min-height:14px; }
.field-hint.is-error{ color:var(--bad); }
input.input-error{ border-color:var(--bad); box-shadow:0 0 0 3px rgba(185,28,28,.12); }

/* ===== sidebar agrupado (mobile-first) ===== */
.app-sidebar{ overflow:hidden; }
.nav-scroll{ flex:1 1 auto; min-height:0; overflow-y:auto; overflow-x:hidden; display:flex; flex-direction:column; gap:2px; margin:2px -6px 2px 0; padding-right:6px; }
.nav-scroll::-webkit-scrollbar{ width:8px; }
.nav-scroll::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.12); border-radius:8px; }
.nav-group > summary{ list-style:none; cursor:pointer; display:flex; align-items:center; gap:11px; min-height:42px; padding:10px 12px; border-radius:var(--r-sm); color:var(--on-dark); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; user-select:none; }
.nav-group > summary::-webkit-details-marker{ display:none; }
.nav-group > summary:hover{ background:rgba(255,255,255,.06); color:#fff; }
.nav-group > summary svg{ width:18px; height:18px; flex:none; opacity:.85; }
.nav-group > summary .chev{ margin-left:auto; width:14px; height:14px; opacity:.7; transition:transform .18s ease; }
.nav-group[open] > summary .chev{ transform:rotate(90deg); }
.nav-group-items{ display:flex; flex-direction:column; gap:1px; padding:2px 0 8px; }
.nav-sub{ display:flex; align-items:center; min-height:40px; padding:9px 12px 9px 41px; border-radius:var(--r-sm); color:var(--on-dark); font-size:14px; font-weight:500; }
.nav-sub:hover{ background:rgba(255,255,255,.06); color:#fff; text-decoration:none; }
.nav-sub.active{ background:var(--primary); color:#fff; }
.nav-sub.disabled{ color:rgba(174,185,198,.45); cursor:default; }
.nav-sub .soon{ font-style:normal; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:rgba(174,185,198,.55); border:1px solid rgba(174,185,198,.22); border-radius:var(--pill); padding:1px 6px; margin-left:auto; }
.app-sidebar .nav-sep{ margin:4px 4px; height:1px; background:rgba(255,255,255,.08); }
.app-bottomnav button.bn-link{ background:none; border:0; font:inherit; cursor:pointer; }

/* ===== modal de herança ===== */
.inherit-list{ margin:0 0 20px; padding-left:18px; color:var(--text-dim); font-size:13px; line-height:1.7; }
.inherit-list strong{ color:var(--text); }

/* ===== tooltip de ajuda nos rótulos (info "i") ===== */
.label-row{ display:flex; align-items:center; gap:5px; margin-bottom:6px; }
.label-row label{ margin-bottom:0; }
.info{ position:relative; display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; padding:0; border:0; border-radius:50%; background:none; color:var(--text-mute); cursor:help; line-height:0; }
.info svg{ width:15px; height:15px; }
.info:hover, .info:focus{ color:var(--primary); outline:none; }
.info::after{ content:attr(data-tip); position:absolute; left:50%; top:calc(100% + 9px); transform:translateX(-50%); width:max-content; max-width:min(240px,72vw); white-space:normal; text-align:left; background:var(--ink); color:#fff; font-size:12px; font-weight:500; line-height:1.45; padding:8px 10px; border-radius:8px; box-shadow:var(--shadow); opacity:0; visibility:hidden; transition:opacity .12s ease; z-index:70; pointer-events:none; }
.info::before{ content:""; position:absolute; left:50%; top:calc(100% + 3px); transform:translateX(-50%); border:6px solid transparent; border-bottom-color:var(--ink); opacity:0; visibility:hidden; transition:opacity .12s ease; z-index:70; pointer-events:none; }
.info:hover::after, .info:hover::before, .info:focus::after, .info:focus::before{ opacity:1; visibility:visible; }

/* ===== Ativos: cards, filtros, seções por tipo ===== */
.stat-cards{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px}
.stat-card{flex:1 1 140px;background:#fff;border:1px solid var(--border,#e2e8f0);border-radius:12px;padding:14px 16px}
.stat-card .num{font-size:1.6rem;font-weight:700;color:var(--primary,#0F766E);line-height:1.1}
.stat-card .lbl{font-size:.8rem;color:#64748b;margin-top:2px}
.filter-bar{display:flex;gap:8px;flex-wrap:wrap;padding:12px;border-bottom:1px solid var(--border,#e2e8f0)}
.filter-bar input[type=search]{flex:2 1 220px;min-width:160px;padding:8px 10px;border:1px solid var(--border,#e2e8f0);border-radius:8px}
.filter-bar select{flex:1 1 140px;padding:8px 10px;border:1px solid var(--border,#e2e8f0);border-radius:8px;background:#fff}
.type-section{margin-top:6px;padding-top:6px;border-top:1px dashed var(--border,#e2e8f0)}
.type-section[hidden]{display:none}
.check-row{display:flex;gap:18px;flex-wrap:wrap;margin:10px 0}
.badge.env-production{background:#ecfdf5;color:#065f46}
.badge.env-staging{background:#fef9c3;color:#854d0e}
.badge.env-development,.badge.env-test{background:#eff6ff;color:#1e40af}
.badge.env-dr{background:#fef2f2;color:#991b1b}
.badge.env-retired{background:#f1f5f9;color:#475569}

/* ===== Importação CSV ===== */
.imp-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.5);display:none;align-items:center;justify-content:center;z-index:60;padding:16px}
.imp-backdrop.open{display:flex}
.imp-modal{background:#fff;border-radius:14px;max-width:640px;width:100%;max-height:85vh;overflow:auto;padding:20px;box-shadow:0 20px 50px rgba(0,0,0,.25)}
.imp-modal h3{margin:0 0 4px}
.imp-map{width:100%;border-collapse:collapse;margin:12px 0}
.imp-map th,.imp-map td{text-align:left;padding:6px 8px;border-bottom:1px solid #eef2f7;font-size:.9rem}
.imp-map th{color:#64748b;font-weight:600}
.imp-ignored{color:#94a3b8;font-style:italic}
.imp-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:12px}

/* ===== Vulnerabilidades ===== */
.badge.sev-critical{background:#fee2e2;color:#991b1b}
.badge.sev-high{background:#ffedd5;color:#9a3412}
.badge.sev-medium{background:#fef9c3;color:#854d0e}
.badge.sev-low{background:#dcfce7;color:#166534}
.badge.sev-info,.badge.sev-negligible,.badge.sev-informational{background:#f1f5f9;color:#475569}
.badge-kev{background:#7f1d1d;color:#fff}
.badge-threat{background:#fee2e2;color:#991b1b}
.deadline-late{color:#b91c1c;font-weight:600}
select[multiple]{padding:6px;border:1px solid var(--border,#e2e8f0);border-radius:8px;min-height:160px}

/* ===== Página de erro (403/404) ===== */
.error-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:2rem;}
.error-card{max-width:520px;text-align:center;background:var(--surface,#1a1d24);border:1px solid var(--border,#2a2f3a);border-radius:14px;padding:2.5rem 2rem;}
.error-code{font-size:3.5rem;font-weight:800;letter-spacing:.05em;color:var(--danger,#e5484d);line-height:1;}
.error-card h1{margin:.5rem 0 .75rem;font-size:1.4rem;}
.error-card p{color:var(--muted,#9aa4b2);margin-bottom:1.5rem;line-height:1.5;}

/* ===== Riscos (v17) ===== */
.risk-panel{background:var(--surface,#1a1d24);border:1px solid var(--border,#2a2f3a);border-radius:14px;padding:1.1rem 1.25rem;margin:1rem 0;}
.risk-panel-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-bottom:.75rem;}
.risk-panel-head h2{font-size:1.05rem;margin:0;}
.risk-heatmap{display:inline-grid;grid-template-columns:2rem repeat(5,46px);gap:5px;align-items:center;}
.rh-corner{width:2rem;height:24px;}
.rh-axis{font-size:.72rem;color:var(--muted,#9aa4b2);text-align:center;}
.rh-cell{width:46px;height:46px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.9rem;color:#0b0e13;}
.rh-cell.lvl-low{background:#2ea043;}
.rh-cell.lvl-medium{background:#d29922;}
.rh-cell.lvl-high{background:#f0883e;}
.rh-cell.lvl-critical{background:#e5484d;color:#fff;}
.rh-cell.empty{opacity:.22;}
.rh-legend{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.75rem;flex-wrap:wrap;}
.rh-axis-label{font-size:.72rem;color:var(--muted,#9aa4b2);}
.rh-legend .legend{display:flex;align-items:center;gap:.4rem;font-size:.74rem;color:var(--muted,#9aa4b2);}
.dot{width:12px;height:12px;border-radius:3px;display:inline-block;margin-left:.35rem;margin-right:.5rem;}
.dot.lvl-low{background:#2ea043;}
.dot.lvl-medium{background:#d29922;}
.dot.lvl-high{background:#f0883e;}
.dot.lvl-critical{background:#e5484d;}
.score-preview{display:flex;align-items:center;gap:.6rem;}
.score-chip{background:var(--surface-2,#11141a);border:1px solid var(--border,#2a2f3a);border-radius:8px;padding:.25rem .6rem;font-size:.82rem;}
.score-chip b{font-size:.95rem;}
.sev-critical-txt{color:#e5484d;}
.sev-high-txt{color:#f0883e;}
.badge.sev-informational{background:rgba(110,118,129,.18);color:#9aa4b2;}
.risk-status{display:inline-block;padding:.18rem .55rem;border-radius:999px;font-size:.74rem;border:1px solid var(--border,#2a2f3a);color:var(--muted,#c2c9d2);background:var(--surface-2,#11141a);}

/* ===== Riscos (v17) ===== */
.risk-panel{background:var(--surface,#1a1d24);border:1px solid var(--border,#2a2f3a);border-radius:14px;padding:1.1rem 1.25rem;margin:1rem 0;}
.risk-panel-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-bottom:.75rem;}
.risk-panel-head h2{font-size:1.05rem;margin:0;}
.risk-heatmap{display:inline-grid;grid-template-columns:2rem repeat(5,46px);gap:5px;align-items:center;}
.rh-corner{width:2rem;height:24px;}
.rh-axis{font-size:.72rem;color:var(--muted,#9aa4b2);text-align:center;}
.rh-cell{width:46px;height:46px;border-radius:9px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.9rem;color:#0b0e13;}
.rh-cell.lvl-low{background:#2ea043;}
.rh-cell.lvl-medium{background:#d29922;}
.rh-cell.lvl-high{background:#f0883e;}
.rh-cell.lvl-critical{background:#e5484d;color:#fff;}
.rh-cell.empty{opacity:.22;}
.rh-legend{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:.75rem;flex-wrap:wrap;}
.rh-axis-label{font-size:.72rem;color:var(--muted,#9aa4b2);}
.rh-legend .legend{display:flex;align-items:center;gap:.4rem;font-size:.74rem;color:var(--muted,#9aa4b2);}
.dot{width:12px;height:12px;border-radius:3px;display:inline-block;margin-left:.35rem;margin-right:.5rem;}
.dot.lvl-low{background:#2ea043;}
.dot.lvl-medium{background:#d29922;}
.dot.lvl-high{background:#f0883e;}
.dot.lvl-critical{background:#e5484d;}
.score-preview{display:flex;align-items:center;gap:.6rem;}
.score-chip{background:var(--surface-2,#11141a);border:1px solid var(--border,#2a2f3a);border-radius:8px;padding:.25rem .6rem;font-size:.82rem;}
.score-chip b{font-size:.95rem;}
.sev-critical-txt{color:#e5484d;}
.sev-high-txt{color:#f0883e;}
.badge.sev-informational{background:rgba(110,118,129,.18);color:#9aa4b2;}
.risk-status{display:inline-block;padding:.18rem .55rem;border-radius:999px;font-size:.74rem;border:1px solid var(--border,#2a2f3a);color:var(--muted,#c2c9d2);background:var(--surface-2,#11141a);}

/* ── Dashboard ───────────────────────────────────────────── */
.dash-kpis{ display:grid; grid-template-columns:repeat(6,1fr); gap:14px; margin-bottom:18px; }
.dash-kpi{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:16px 18px; box-shadow:var(--shadow-sm); position:relative; overflow:hidden; transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.dash-kpi:hover{ transform:translateY(-2px); box-shadow:var(--shadow); border-color:var(--line-2); }
.dash-kpi::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--primary); }
.dash-kpi.warn::before{ background:var(--warn); }
.dash-kpi.bad::before{ background:var(--bad); }
.dash-kpi .v{ font-family:var(--display); font-size:30px; font-weight:700; color:var(--ink); line-height:1; letter-spacing:-.02em; }
.dash-kpi .v small{ font-size:15px; color:var(--text-mute); font-weight:600; }
.dash-kpi .l{ font-size:12.5px; color:var(--text-dim); margin-top:8px; line-height:1.3; }

.dash-attn{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:0 0 18px; }
.dash-attn .ai{ display:flex; align-items:center; gap:14px; background:var(--surface); border:1px solid var(--line); border-left:4px solid var(--line-2); border-radius:var(--r); padding:14px 16px; box-shadow:var(--shadow-sm); }
.dash-attn .ai.on{ border-left-color:var(--bad); background:var(--bad-bg); }
.dash-attn .ai .n{ font-family:var(--display); font-size:26px; font-weight:700; color:var(--text-mute); line-height:1; min-width:1.2em; text-align:center; }
.dash-attn .ai.on .n{ color:var(--bad); }
.dash-attn .ai .t{ font-size:13px; color:var(--text-dim); }

.dash-grid-12{ display:grid; grid-template-columns:repeat(12,1fr); gap:16px; }
.dash-card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-sm); padding:18px 20px; transition:box-shadow .15s ease, border-color .15s ease; }
.dash-card:hover{ box-shadow:var(--shadow); border-color:var(--line-2); }
.dash-card h3{ font-size:15px; margin:0 0 4px; color:var(--ink); }
.dash-sub{ font-size:12px; color:var(--text-mute); margin-bottom:16px; }
.dash-c4{ grid-column:span 4; } .dash-c6{ grid-column:span 6; } .dash-c8{ grid-column:span 8; }
.dash-donut{ display:flex; align-items:center; gap:20px; }
.dash-legend{ font-size:13px; color:var(--text-dim); display:flex; flex-direction:column; gap:6px; }
.dash-legend b{ color:var(--ink); font-family:var(--display); font-size:16px; }
.dash-bar-row{ display:grid; grid-template-columns:120px 1fr 34px; align-items:center; gap:10px; margin:9px 0; font-size:13px; }
.dash-bar-label{ display:flex; align-items:center; gap:8px; color:var(--text-dim); }
.dash-dot{ width:9px; height:9px; border-radius:3px; flex:none; background:var(--text-mute); }
.dash-bar-track{ background:var(--line-2); border-radius:var(--pill); height:9px; overflow:hidden; }
.dash-bar-fill{ display:block; height:100%; border-radius:var(--pill); min-width:2px; width:var(--w,0); background:var(--primary); transition:width .5s ease; }
.dash-bar-count{ text-align:right; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.dash-c-critical .dash-dot,.dash-c-critical .dash-bar-fill{ background:var(--bad); }
.dash-c-high .dash-dot,.dash-c-high .dash-bar-fill{ background:#EA580C; }
.dash-c-medium .dash-dot,.dash-c-medium .dash-bar-fill{ background:var(--warn); }
.dash-c-low .dash-dot,.dash-c-low .dash-bar-fill{ background:#0891B2; }
.dash-c-info .dash-dot,.dash-c-info .dash-bar-fill{ background:#64748B; }
.dash-o-compliant .dash-dot,.dash-o-compliant .dash-bar-fill{ background:var(--good); }
.dash-o-partial .dash-dot,.dash-o-partial .dash-bar-fill{ background:var(--warn); }
.dash-o-non .dash-dot,.dash-o-non .dash-bar-fill{ background:var(--bad); }
.dash-o-na .dash-dot,.dash-o-na .dash-bar-fill{ background:#64748B; }
.dash-o-unknown .dash-dot,.dash-o-unknown .dash-bar-fill{ background:#94A3B8; }
.dash-mini{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:6px; }
.dash-mini .ms{ text-align:center; padding:12px 10px; background:var(--surface-2); border-radius:var(--r-sm); border:1px solid var(--line-2); }
.dash-mini .ms .n{ font-family:var(--display); font-size:24px; font-weight:700; color:var(--ink); }
.dash-mini .ms .t{ font-size:12px; color:var(--text-dim); margin-top:3px; }

.dash-overview{ margin-top:22px; }
.dash-overview h2{ font-size:16px; margin:0; color:var(--ink); }
.dash-overview .sub{ font-size:12px; color:var(--text-mute); margin:2px 0 0; }
.dash-doms{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:14px; }
.dash-dom{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-sm); padding:16px 18px; }
.dash-dom h4{ font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-mute); margin:0 0 10px; }
.dash-dom-row{ display:flex; justify-content:space-between; align-items:center; padding:7px 0; border-bottom:1px solid var(--line-2); font-size:13px; }
.dash-dom-row:last-child{ border-bottom:none; }
.dash-dom-row .nm{ color:var(--text-dim); }
.dash-dom-row .ct{ font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.dash-dom-row .ct.zero{ color:var(--text-mute); font-weight:600; }

@media(max-width:1000px){ .dash-kpis{ grid-template-columns:repeat(3,1fr); } .dash-c4,.dash-c6,.dash-c8{ grid-column:span 12; } .dash-attn{ grid-template-columns:1fr; } .dash-doms{ grid-template-columns:1fr; } }
@media(max-width:640px){ .dash-kpis{ grid-template-columns:repeat(2,1fr); } }

/* ===== GRC dashboards (executivo/operacional/seguranca) ===== */
.dash-tabs{ display:inline-flex; gap:4px; background:var(--line,#eef2f7); padding:4px; border-radius:999px; margin:4px 0 6px; }
.dash-tab{ padding:7px 16px; border-radius:999px; font-size:14px; font-weight:600; color:var(--text-dim,#64748b); text-decoration:none; }
.dash-tab.active{ background:var(--surface,#fff); color:var(--text,#0f172a); box-shadow:0 1px 2px rgba(0,0,0,.10); }
.exec-hero{ display:grid; grid-template-columns:260px 1fr; gap:16px; margin:14px 0; }

.exec-hero.has-tprm{ grid-template-columns:240px 240px 1fr; }
@media (max-width:1100px){ .exec-hero.has-tprm{ grid-template-columns:1fr 1fr; } }
@media (max-width:880px){ .exec-hero.has-tprm{ grid-template-columns:1fr; } }
.exec-score{ border-radius:var(--r-lg,14px); padding:20px; color:#fff; display:flex; flex-direction:column; justify-content:center; }
.exec-score-num{ font-size:48px; font-weight:700; line-height:1; }
.exec-score-num span{ font-size:22px; opacity:.85; }
.exec-score-lbl{ margin-top:6px; font-weight:600; }
.exec-score-sub{ margin-top:8px; font-size:13px; opacity:.92; }
.exec-kpis{ margin:0; }
.exec-score.band-intermediario{ color:#1f2937; }
.dash-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:4px; }
.fw-row{ display:grid; grid-template-columns:1fr 2fr auto; gap:12px; align-items:center; padding:9px 0; border-bottom:1px solid var(--line,#eef2f7); }
.fw-row:last-child{ border-bottom:0; }
.fw-name{ font-weight:600; }
.fw-score{ font-weight:700; white-space:nowrap; }
.scorebar{ height:10px; background:var(--line,#e5e7eb); border-radius:999px; overflow:hidden; }
.scorebar>span{ display:block; height:100%; width:var(--w,0%); border-radius:999px; }
.heat-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(110px,1fr)); gap:8px; }
.heat-cell{ border-radius:10px; padding:12px; color:#fff; min-height:64px; display:flex; flex-direction:column; justify-content:space-between; }
.heat-name{ font-size:12px; font-weight:600; opacity:.95; }
.heat-val{ font-size:22px; font-weight:700; }
.heat-legend{ margin-top:10px; display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.dot{ display:inline-block; width:10px; height:10px; border-radius:3px; vertical-align:middle; }
.risk-row{ display:flex; gap:10px; flex-wrap:wrap; }
.risk-pill{ padding:10px 14px; border-radius:10px; font-size:13px; font-weight:600; background:var(--line,#eef2f7); }
.risk-pill b{ font-size:18px; margin-right:6px; }
.band-otimizado{ background:#166534; color:#fff; }
.band-avancado{ background:#16a34a; color:#fff; }
.band-intermediario{ background:#ca8a04; color:#fff; }
.band-basico{ background:#ea580c; color:#fff; }
.band-inicial{ background:#dc2626; color:#fff; }
.band-none{ background:#94a3b8; color:#fff; }
@media (max-width:880px){ .exec-hero{ grid-template-columns:1fr; } .dash-grid{ grid-template-columns:1fr; } }

/* planos: evidencias por item */
.ev-list{margin:0;padding-left:1.05em;list-style:disc}
.ev-list li{margin:.12rem 0}
.item-done-form{display:flex;gap:.4rem;align-items:center;flex-wrap:wrap}
.item-done-form input[type=file]{max-width:200px;font-size:.8rem}

/* perfil */
.avatar-row{display:flex;gap:1rem;align-items:center;flex-wrap:wrap}
.avatar-form{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}
.avatar-lg{width:96px;height:96px;border-radius:50%;object-fit:cover;border:2px solid #e2e8f0}
.avatar-sm{width:36px;height:36px;border-radius:50%;object-fit:cover}
.avatar-ph{display:inline-flex;align-items:center;justify-content:center;background:#e2e8f0;color:#475569;font-weight:600}
.avatar-ph.lg{width:96px;height:96px;border-radius:50%;font-size:2rem}
.avatar-ph.sm{width:36px;height:36px;border-radius:50%;font-size:.8rem}
.read-only-field{padding:.45rem .1rem;color:#334155}
.section-gap{margin-top:1rem}
.pw-rules{font-size:.82rem;color:#64748b;margin:.4rem 0 0;padding-left:1.1em}
.pw-rules li{margin:.1rem 0}
.pw-status{font-weight:600}
.pw-status.ok{color:#16a34a}
.pw-status.warn{color:#ca8a04}
.pw-status.expired{color:#dc2626}
.org-chart{display:flex;flex-direction:column;align-items:center;margin:.5rem 0}
.org-node{display:flex;gap:.6rem;align-items:center;border:1px solid #e2e8f0;border-radius:10px;padding:.5rem .8rem;background:#fff;min-width:220px}
.org-node.me{border-color:#2563eb;box-shadow:0 0 0 2px rgba(37,99,235,.15)}
.org-node .nm{font-weight:600}
.org-node .jt{font-size:.8rem;color:#64748b}
.org-conn{width:2px;height:18px;background:#cbd5e1}
.reports-row{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.4rem}
.reports-row .org-node{min-width:180px}

/* perfil: checklist de senha (live) */
.pw-rules{list-style:none;padding-left:0}
.pw-rules li{display:flex;align-items:center;gap:.45rem;color:#64748b}
.pw-rules li::before{content:'\25CB';font-size:.95em;line-height:1}
.pw-rules li.rule-ok{color:#16a34a}
.pw-rules li.rule-ok::before{content:'\2713';font-weight:700}

/* avatar no topo */
img.avatar{width:32px;height:32px;object-fit:cover;border-radius:50%;display:inline-block;vertical-align:middle}

/* perfil: abas */
.tabs{display:flex;gap:.25rem;border-bottom:1px solid #e2e8f0;margin:.4rem 0 1.2rem}
.tabs a{padding:.55rem .9rem;color:#64748b;text-decoration:none;border-bottom:2px solid transparent;font-weight:500}
.tabs a:hover{color:#1e293b}
.tabs a.on{color:#2563eb;border-bottom-color:#2563eb}

/* perfil: aba login e seguranca */
.mfa-toggle{display:flex;align-items:center;gap:.6rem;margin:.2rem 0 1.1rem;cursor:pointer}
.mfa-toggle input{width:18px;height:18px;flex:none}
.mfa-methods-title{font-size:.85rem;font-weight:600;color:#475569;margin:.2rem 0 .55rem}
.mfa-methods{display:flex;flex-direction:column;gap:.5rem}
.mfa-option{display:flex;align-items:center;gap:.7rem;border:1px solid #e2e8f0;border-radius:10px;padding:.7rem .9rem;cursor:pointer;transition:border-color .12s,background .12s}
.mfa-option:hover{border-color:#cbd5e1}
.mfa-option:has(input:checked){border-color:#2563eb;background:#eff6ff}
.mfa-option.is-disabled{opacity:.55;cursor:not-allowed}
.mfa-option input{width:18px;height:18px;flex:none}
.mfa-option-body{display:flex;flex-direction:column;flex:1;min-width:0}
.mfa-option-name{font-weight:600}
.mfa-option-meta{font-size:.8rem;color:#64748b}
.qr-box{display:flex;justify-content:center;align-items:center;padding:1rem;background:#fff;border:1px solid #e2e8f0;border-radius:12px;width:max-content;max-width:100%;margin:.6rem 0}
.qr-box svg{width:180px;height:180px;display:block}
.mono{font-family:ui-monospace,Menlo,Consolas,monospace;letter-spacing:.06em}
.inline-confirm{display:flex;align-items:flex-end;gap:.7rem;flex-wrap:wrap;margin-top:.7rem}
.inline-confirm .field{margin:0}
.otp-input{max-width:150px;letter-spacing:.3em;text-align:center;font-size:1.05rem}

/* perfil: sessoes */
.tabs{flex-wrap:wrap}
.session-list{display:flex;flex-direction:column;gap:.5rem;margin-top:.6rem}
.session-row{display:flex;align-items:center;gap:.8rem;border:1px solid #e2e8f0;border-radius:10px;padding:.7rem .9rem}
.session-icon{width:34px;height:34px;flex:none;color:#475569}
.session-icon svg{width:34px;height:34px}
.session-info{flex:1;min-width:0}
.session-dev{font-weight:600}
.session-meta{font-size:.82rem;color:#64748b}

/* auditoria: detalhe */
.kv-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.6rem 1.4rem;margin:.4rem 0 .2rem}
.kv-grid > div{display:flex;flex-direction:column;gap:.15rem;font-size:.9rem}
.kv-k{font-size:.72rem;color:var(--text-mute,#8A94A3);text-transform:uppercase;letter-spacing:.03em}
.mt-sm{margin-top:.6rem}
.grow{flex:1}

/* auditoria: aprovacao + comentarios */
.approval-bar{display:flex;justify-content:space-between;align-items:center;gap:1rem;flex-wrap:wrap;background:var(--surface,#fff);border:1px solid var(--line,#E5E9F0);border-radius:var(--r,12px);padding:.7rem 1rem;margin-bottom:1rem;box-shadow:var(--shadow-sm,0 1px 2px rgba(16,24,40,.04))}
.approval-state{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.approval-bar .row-actions{margin:0}
.comment-thread{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.6rem}
.comment{border:1px solid var(--line,#E5E9F0);border-radius:var(--r-sm,8px);padding:.55rem .7rem;background:var(--surface,#fff)}
.comment-meta{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap;margin-bottom:.25rem}
.comment-body{font-size:.92rem;color:var(--text,#1B2430);white-space:pre-wrap}
.comment-form-actions{display:flex;gap:.5rem;align-items:center}

/* ═══ Vendor tabs ═══ */
.vtabs { display: flex; gap: 0; margin-top: 8px; }
.vtabs-nav { display: flex; flex-direction: column; min-width: 180px; border-right: 1px solid var(--border, #e2e8f0); background: var(--bg-muted, #f8fafc); border-radius: 8px 0 0 8px; padding: 8px 0; }
.vtab-link { display: flex; align-items: center; gap: 8px; padding: 10px 16px; font-size: 0.875rem; color: var(--text-muted, #64748b); text-decoration: none; border-left: 3px solid transparent; transition: all .15s; }
.vtab-link:hover { background: var(--bg-hover, #f1f5f9); color: var(--text, #1e293b); }
.vtab-link.is-active { color: var(--primary, #4f46e5); border-left-color: var(--primary, #4f46e5); background: var(--bg, #fff); font-weight: 600; }
.vtab-count { font-size: 0.75rem; background: var(--bg-muted, #e2e8f0); color: var(--text-muted, #64748b); border-radius: 10px; padding: 1px 7px; min-width: 20px; text-align: center; }
.vtab-link.is-active .vtab-count { background: var(--primary-light, #e0e7ff); color: var(--primary, #4f46e5); }
.vtabs-body { flex: 1; border-radius: 0 8px 8px 0; min-height: 300px; }
@media (max-width: 768px) {
  .vtabs { flex-direction: column; }
  .vtabs-nav { flex-direction: row; overflow-x: auto; min-width: 0; border-right: none; border-bottom: 1px solid var(--border, #e2e8f0); border-radius: 8px 8px 0 0; padding: 0; }
  .vtab-link { border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; padding: 10px 14px; }
  .vtab-link.is-active { border-bottom-color: var(--primary, #4f46e5); border-left-color: transparent; }
  .vtabs-body { border-radius: 0 0 8px 8px; }
}

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 0; padding-left: 20px; border-left: 2px solid var(--border, #e2e8f0); }
.tl-item { position: relative; padding: 12px 0 12px 20px; }
.tl-marker { position: absolute; left: -27px; top: 16px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--border, #e2e8f0); background: var(--bg, #fff); }
.tl-marker.tl-life { border-color: var(--primary, #4f46e5); background: var(--primary-light, #e0e7ff); }
.tl-marker.tl-mon { border-color: var(--warning, #f59e0b); background: #fef3c7; }
.tl-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.text-danger { color: var(--danger, #ef4444); font-weight: 600; }
.text-warn { color: var(--warning, #f59e0b); font-weight: 600; }

/* Crud inline form */
.crud-form > summary { cursor: pointer; list-style: none; }
.crud-form > summary::-webkit-details-marker { display: none; }
.crud-form[open] > summary { margin-bottom: 4px; }

/* ═══ Upload de arquivos ═══ */
.file-upload-field { display: flex; flex-direction: column; gap: 6px; }
.file-upload-field input[type=file] { padding: 8px; border: 1px dashed #CFFAF0; border-radius: 6px; background: #F8FAFB; cursor: pointer; font-size: .875rem; }
.file-upload-field input[type=file]:hover { border-color: #0F766E; background: #ECFDF8; }
.file-upload-current { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: #ECFDF8; border: 1px solid #CFFAF0; border-radius: 6px; font-size: .85rem; }
.file-upload-current a { color: #0F766E; font-weight: 600; }
.file-upload-current .small { color: #5A6675; }
.file-help { font-size: .75rem; color: #8A94A3; }

/* === Botoes padronizados em row-actions === */
.row-actions { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.row-actions form { display: inline-flex; margin: 0; }
.row-actions .btn-sm,
.row-actions form .btn-sm {
  min-width: 86px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  line-height: 1;
}
.row-actions form .btn-sm { width: 100%; }
/* row-actions-uniform marker */

/* btn-no-underline marker */
a.btn, a.btn:hover, a.btn:focus, a.btn:visited { text-decoration: none !important; }
.row-actions { white-space: nowrap; }
.row-actions .btn-sm { min-width: 72px; }

/* ─── Fix: altura uniforme entre input e select ─── */
.field select, .field input, .field textarea { box-sizing: border-box; height: 42px; line-height: 1.2; }
.field textarea { height: auto; min-height: 80px; }

/* ─── Fix: status badge na tabela não quebra em duas linhas ─── */
table.data td .badge { white-space: nowrap; display: inline-block; }

/* === Modais de formulario (estende .modal) === */
.modal-form{ max-width:640px; padding:24px; max-height:90vh; overflow-y:auto; border-top:6px solid var(--primary); }
.modal-form h3{ margin:0 0 18px; font-size:17px; }
.modal-form .form-actions{ display:flex; gap:8px; justify-content:flex-end; margin-top:16px; padding-top:16px; border-top:1px solid var(--line); }

/* === Banner de status (info verde, aviso amarelo, etc) === */
.banner{ padding:14px 18px; border-radius:8px; border-left:4px solid var(--primary); margin-bottom:14px; background:var(--surface-2,#F9FAFB); }
.banner-success{ background:#ECFDF5; border-left-color:#10B981; }
.banner-success strong{ color:#065F46; }
.banner-warn{ background:#FFFBEB; border-left-color:#F59E0B; }
.banner-warn strong{ color:#92400E; }
.banner-danger{ background:#FEF2F2; border-left-color:#B91C1C; }
.banner-danger strong{ color:#7F1D1D; }
.banner-sub{ font-size:12px; color:var(--text-mute); margin-top:4px; }

/* === Linhas de tabela destacadas === */
.tr-highlight-success{ background:#F0FDF4; }
/* utilitarios usados em tabelas */
.nowrap{ white-space:nowrap; }
.inline-form{ display:inline; }
.col-actions{ width:280px; }

/* === Toast notifications (flutuante topo direito) === */
.toast-container{ position:fixed; top:20px; right:20px; z-index:9999; display:flex; flex-direction:column; gap:10px; max-width:380px; }
.toast{ background:#fff; border:1px solid var(--line,#E4E8EC); border-left:4px solid var(--primary,#0F766E); border-radius:8px; padding:12px 16px; box-shadow:0 8px 24px rgba(8,15,26,.12); animation:toast-in .25s ease-out; display:flex; gap:10px; align-items:flex-start; }
.toast-success{ border-left-color:#10B981; }
.toast-error{ border-left-color:#B91C1C; }
.toast-icon{ font-size:18px; line-height:1; }
.toast-icon-success{ color:#10B981; }
.toast-icon-error{ color:#B91C1C; }
.toast-body{ flex:1; font-size:13px; line-height:1.45; color:var(--text,#1F2937); }
.toast-close{ background:none; border:0; cursor:pointer; color:var(--text-mute,#9CA3AF); font-size:16px; padding:0; line-height:1; }
.toast.is-out{ animation:toast-out .2s ease-out forwards; }
@keyframes toast-in{ from{ opacity:0; transform:translateX(40px); } to{ opacity:1; transform:translateX(0); } }
@keyframes toast-out{ from{ opacity:1; transform:translateX(0); } to{ opacity:0; transform:translateX(40px); } }

/* ========== Billing ========== */
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line,#E4E8EC); margin-bottom:18px; }
.tab{ padding:10px 18px; color:var(--text-mute,#6B7280); font-weight:600; font-size:13px; border-bottom:3px solid transparent; text-decoration:none; transition:.15s; margin-bottom:-1px; }
.tab:hover{ color:var(--text,#1F2937); }
.tab.is-active{ color:var(--primary,#0F766E); border-bottom-color:var(--primary,#0F766E); }

.billing-grid{ display:grid; grid-template-columns: 2fr 1fr; gap:14px; }
@media (max-width: 900px){ .billing-grid{ grid-template-columns:1fr; } }

.billing-plan-card{ border-top:4px solid var(--primary,#0F766E); }
.billing-plan-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:14px; }
.billing-plan-eyebrow{ font-size:11px; letter-spacing:2px; text-transform:uppercase; color:var(--text-mute,#9CA3AF); font-weight:700; margin-bottom:4px; }
.billing-plan-name{ font-size:22px; margin:0 0 4px; }
.billing-plan-status{ text-align:right; }
.billing-plan-price{ display:flex; align-items:baseline; gap:8px; margin:8px 0 22px; }
.billing-price-amount{ font-size:34px; font-weight:700; color:var(--text,#1F2937); }
.billing-price-cycle{ color:var(--text-mute,#6B7280); font-size:14px; }
.billing-info-grid{ display:flex; flex-direction:column; gap:0; }
.billing-info-row{ display:flex; justify-content:space-between; padding:10px 0; border-bottom:1px solid var(--line,#F3F4F6); }
.billing-info-row:last-child{ border-bottom:0; }
.billing-info-lbl{ color:var(--text-mute,#6B7280); font-size:13px; }
.billing-info-val{ color:var(--text,#1F2937); font-size:13px; font-weight:600; }
.billing-plan-actions{ margin-top:18px; display:flex; gap:8px; }

.billing-limits{ display:flex; flex-direction:column; gap:0; margin-bottom:14px; }
.billing-limit-row{ display:flex; justify-content:space-between; padding:8px 0; border-bottom:1px solid var(--line,#F3F4F6); font-size:13px; }
.billing-limit-row:last-child{ border-bottom:0; }
.billing-limit-lbl{ color:var(--text-mute,#6B7280); }
.billing-limit-val{ color:var(--text,#1F2937); font-weight:600; }

.billing-features{ display:flex; flex-direction:column; gap:6px; }
.billing-feature{ display:flex; align-items:center; gap:8px; font-size:13px; padding:4px 0; }
.billing-feature-icon{ display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; font-size:11px; font-weight:700; flex-shrink:0; }
.billing-feature-icon.ok{ background:#10B981; color:white; }
.billing-feature-icon.no{ background:#FEE2E2; color:#B91C1C; }
.billing-feature-lbl{ flex:1; color:var(--text,#1F2937); }
.billing-feature-val{ color:var(--text-mute,#6B7280); font-size:12px; font-weight:600; }

.invoice-summary{ display:grid; grid-template-columns: repeat(4,1fr); gap:14px; margin-bottom:14px; }
.invoice-summary-card{ background:var(--surface,#fff); border:1px solid var(--line,#E4E8EC); border-radius:8px; padding:14px 16px; }
@media (max-width: 700px){ .invoice-summary{ grid-template-columns:1fr 1fr; } }

.payment-methods-grid{ display:grid; grid-template-columns: repeat(auto-fill,minmax(280px,1fr)); gap:14px; }
.payment-method-card{ background:var(--surface,#fff); border:1px solid var(--line,#E4E8EC); border-radius:10px; padding:18px; }
.payment-method-card.is-default{ border-color:var(--primary,#0F766E); border-width:2px; }
.pm-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.pm-brand{ font-weight:700; font-size:11px; letter-spacing:2px; color:var(--primary,#0F766E); background:#F0FDFA; padding:4px 10px; border-radius:4px; }
.pm-number{ font-family:'Courier New',monospace; font-size:15px; font-weight:600; margin-bottom:8px; letter-spacing:1px; }
.pm-meta{ font-size:12px; line-height:1.5; color:var(--text,#1F2937); margin-bottom:14px; }
.pm-actions{ display:flex; gap:6px; justify-content:flex-end; flex-wrap:wrap; }

.billing-wallet-card{ text-align:center; border-top:4px solid var(--primary,#0F766E); }
.billing-wallet-balance{ font-size:42px; font-weight:700; color:var(--primary,#0F766E); margin:8px 0; }

.tr-highlight-danger{ background:#FEF2F2; }
.banner-info{ background:#EFF6FF; border-left-color:#3B82F6; }
.banner-info strong{ color:#1E40AF; }

/* Invoice detail extras */
.invoice-block-title{ font-size:11px; letter-spacing:2px; color:var(--text-mute,#9CA3AF); text-transform:uppercase; font-weight:700; margin:0 0 12px; }
.invoice-party{ font-size:13px; line-height:1.7; }
.invoice-party strong{ font-size:15px; }
.invoice-notes{ font-size:13px; line-height:1.6; color:var(--text,#1F2937); background:#FFFBEB; border-left:4px solid #FBBF24; padding:12px 16px; border-radius:0 6px 6px 0; }

/* Pagar agora modal */
.pay-methods{ display:flex; flex-direction:column; gap:8px; margin:14px 0; }
.pay-method-btn{ display:flex; align-items:center; gap:14px; padding:14px 16px; background:white; border:1px solid var(--line,#E4E8EC); border-radius:8px; cursor:pointer; text-align:left; transition:.15s; width:100%; font-family:inherit; }
.pay-method-btn:hover{ border-color:var(--primary,#0F766E); background:#F0FDFA; }
.pay-method-icon{ font-size:24px; }
.pay-detail{ background:#F9FAFB; border-radius:8px; padding:16px; margin-top:8px; }
.pay-detail h4{ margin:0 0 12px; font-size:14px; }
.pix-code-box{ background:white; border:1px solid var(--line,#E4E8EC); border-radius:6px; padding:12px; font-family:'Courier New',monospace; font-size:11px; word-break:break-all; line-height:1.4; color:var(--text,#1F2937); margin-bottom:10px; }

/* PIX QR Code + tabs */
.pix-tabs{ display:flex; gap:4px; border-bottom:1px solid var(--line,#E4E8EC); margin:8px 0 4px; }
.pix-tab{ padding:8px 14px; background:none; border:0; border-bottom:3px solid transparent; cursor:pointer; color:var(--text-mute,#6B7280); font-weight:600; font-size:12px; margin-bottom:-1px; font-family:inherit; }
.pix-tab.is-active{ color:var(--primary,#0F766E); border-bottom-color:var(--primary,#0F766E); }
.pix-content{ padding-top:8px; }
.pix-qr-row{ display:flex; gap:16px; align-items:center; background:white; border:1px solid var(--line,#E4E8EC); border-radius:8px; padding:14px; margin-bottom:10px; }
.pix-qr-img{ flex-shrink:0; }
.pix-qr-img svg{ width:180px; height:180px; display:block; }
.pix-qr-info{ flex:1; font-size:13px; }
.pix-qr-info strong{ font-size:14px; color:var(--text,#1F2937); }
.pix-key{ display:inline-block; font-family:'Courier New',monospace; font-size:12px; background:#F3F4F6; padding:3px 8px; border-radius:4px; margin-top:2px; word-break:break-all; }

/* Subscription lifecycle timeline */
.lifecycle-timeline{ display:flex; flex-direction:column; gap:0; }
.lifecycle-row{ display:flex; gap:14px; padding:12px 0; border-bottom:1px solid var(--line,#F3F4F6); position:relative; }
.lifecycle-row:last-child{ border-bottom:0; }
.lifecycle-dot{ width:10px; height:10px; border-radius:50%; background:var(--primary,#0F766E); margin-top:6px; flex-shrink:0; position:relative; }
.lifecycle-dot::before{ content:''; position:absolute; left:50%; top:18px; bottom:-28px; width:2px; background:var(--line,#E4E8EC); transform:translateX(-50%); }
.lifecycle-row:last-child .lifecycle-dot::before{ display:none; }
.lifecycle-content{ flex:1; }
.lifecycle-title{ font-weight:700; font-size:14px; color:var(--text,#1F2937); margin-bottom:2px; }
.lifecycle-detail{ font-size:13px; color:var(--text,#1F2937); margin-top:2px; }
.lifecycle-reason{ margin-top:4px; font-style:italic; }
.lifecycle-meta{ margin-top:4px; }

/* Usage cards */
.usage-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap:14px; }
.usage-card{ background:var(--surface,#fff); border:1px solid var(--line,#E4E8EC); border-radius:10px; padding:18px 20px; }
.usage-card-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.usage-card-label{ font-size:11px; letter-spacing:1.5px; text-transform:uppercase; color:var(--text-mute,#6B7280); font-weight:700; }
.usage-card-pct{ font-size:20px; font-weight:700; }
.usage-card-numbers{ margin-bottom:10px; }
.usage-card-current{ font-size:24px; color:var(--text,#1F2937); }
.usage-card-limit{ font-size:14px; color:var(--text-mute,#6B7280); margin-left:4px; }
.usage-bar{ height:8px; background:#F3F4F6; border-radius:4px; overflow:hidden; margin-bottom:10px; }
.usage-bar-fill{ height:100%; border-radius:4px; transition:width .3s ease; }
.usage-card-period{ margin-top:6px; }

/* Next invoice */
.next-invoice-grid{ display:grid; grid-template-columns: 1fr 2fr; gap:14px; }
@media (max-width: 900px){ .next-invoice-grid{ grid-template-columns:1fr; } }
.next-invoice-summary{ border-top:4px solid var(--primary,#0F766E); text-align:center; }
.next-invoice-amount{ font-size:42px; font-weight:700; color:var(--primary,#0F766E); margin:14px 0 4px; }

/* Checkbox row */
.checkbox-row{ display:flex; align-items:center; gap:8px; padding:8px 0; cursor:pointer; }
.checkbox-row input[type=checkbox]{ width:16px; height:16px; }

/* Notif toggles */
.notif-toggles{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:6px; }
.notif-toggle-row{ display:flex; align-items:center; gap:8px; padding:6px 8px; cursor:pointer; border-radius:4px; }
.notif-toggle-row:hover{ background:var(--surface-2,#F9FAFB); }
.notif-toggle-row input[type=checkbox]{ width:16px; height:16px; }
.notif-toggle-row span{ font-size:13px; color:var(--text,#1F2937); }

.card-head{ display:flex; justify-content:space-between; align-items:center; }

/* Integrations grid */
.integrations-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(280px,1fr)); gap:12px; }
.integration-card{ background:var(--surface,#fff); border:1px solid var(--line,#E4E8EC); border-radius:10px; padding:14px 16px; }
.integration-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.integration-type{ font-size:13px; font-weight:600; color:var(--text-mute,#6B7280); }
.integration-name{ margin-bottom:6px; font-size:14px; }
.integration-actions{ display:flex; gap:4px; margin-top:12px; flex-wrap:wrap; justify-content:flex-end; }

/* Approval card */
.approval-card{ background:var(--surface,#fff); border:1px solid var(--line,#E4E8EC); border-left:4px solid #F59E0B; border-radius:8px; padding:14px 16px; margin-bottom:10px; }
.approval-card.is-expired{ border-left-color:#9CA3AF; opacity:.7; }
.approval-head{ margin-bottom:10px; }
.approval-payload{ background:var(--surface-2,#F9FAFB); border-radius:6px; padding:10px 12px; margin:8px 0; font-size:12px; }
.approval-payload pre{ margin:6px 0 0; font-family:'Courier New',monospace; font-size:11px; white-space:pre-wrap; word-break:break-word; }
.approval-form textarea{ width:100%; min-height:50px; padding:8px; border:1px solid var(--line,#E4E8EC); border-radius:6px; font-family:inherit; font-size:13px; resize:vertical; margin-bottom:10px; }
.approval-actions{ display:flex; gap:8px; justify-content:flex-end; }

/* Top-up presets */
.topup-presets{ display:grid; grid-template-columns: repeat(4, 1fr); gap:8px; margin-bottom:14px; }
.topup-preset{ display:flex; flex-direction:column; align-items:center; padding:14px 8px; background:white; border:1px solid var(--line,#E4E8EC); border-radius:8px; cursor:pointer; font-family:inherit; font-weight:600; font-size:14px; transition:.15s; position:relative; }
.topup-preset:hover{ border-color:var(--primary,#0F766E); background:#F0FDFA; }
.topup-preset.is-recommended{ border-color:var(--primary,#0F766E); background:#F0FDFA; }
.topup-preset.is-recommended::before{ content:'RECOMENDADO'; position:absolute; top:-8px; left:50%; transform:translateX(-50%); background:#0F766E; color:white; padding:2px 6px; border-radius:4px; font-size:9px; letter-spacing:1px; white-space:nowrap; }
.topup-preset small{ font-size:11px; color:var(--text-mute,#6B7280); margin-top:2px; font-weight:400; }
@media (max-width: 600px) { .topup-presets{ grid-template-columns: repeat(2, 1fr); } }

/* Retention offer */
.retention-offer-card{ border-left:4px solid #0F766E; background:linear-gradient(180deg,#F0FDFA 0%,#FFFFFF 100%); }

/* Addons */
.addons-contracted{ display:flex; flex-direction:column; gap:10px; }
.addon-contracted-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:12px; background:var(--surface-2,#F9FAFB); border-radius:8px; }
.addons-grid{ display:grid; grid-template-columns: 1fr; gap:10px; margin:14px 0; max-height:400px; overflow-y:auto; }
.addon-card{ background:var(--surface-2,#F9FAFB); border:1px solid var(--line,#E4E8EC); border-radius:8px; padding:12px; }
.addon-card-head{ display:flex; justify-content:space-between; align-items:center; }
.addon-price{ font-weight:600; color:var(--primary,#0F766E); }

/* Schedules */
.schedules-list{ display:flex; flex-direction:column; gap:8px; }
.schedule-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:14px; padding:12px; background:#FFFBEB; border-left:3px solid #F59E0B; border-radius:0 6px 6px 0; }

/* Radio list */
.radio-list{ display:flex; flex-direction:column; gap:4px; }
.radio-row{ display:flex; align-items:center; gap:10px; padding:10px; cursor:pointer; border-radius:6px; border:1px solid transparent; }
.radio-row:hover{ background:var(--surface-2,#F9FAFB); }
.radio-row input[type=radio]:checked + span{ font-weight:600; color:var(--primary,#0F766E); }
.radio-row input[type=radio]{ width:16px; height:16px; }

/* Export scopes */
.export-scopes{ display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:4px; }

/* Insights & ROI */
.insights-grid{ display:grid; grid-template-columns: minmax(340px,1fr) 2fr; gap:14px; align-items:start; }
@media (max-width: 980px) { .insights-grid{ grid-template-columns: 1fr; } }

.insights-health{ text-align:center; }
.health-gauge{ display:flex; flex-direction:column; align-items:center; margin:8px 0 18px; }
.health-gauge svg{ display:block; }
.health-label{ font-size:16px; font-weight:700; margin-top:4px; }

.health-breakdown{ text-align:left; display:flex; flex-direction:column; gap:8px; padding-top:14px; border-top:1px solid var(--line,#E4E8EC); }
.health-breakdown-row{ display:grid; grid-template-columns: 1fr 100px 32px; align-items:center; gap:10px; font-size:13px; }
.health-mini-bar{ background:#F3F4F6; border-radius:3px; height:8px; overflow:hidden; }
.health-mini-bar > div{ height:100%; border-radius:3px; transition:width .3s ease; }

.health-tips{ text-align:left; padding-left:18px; margin:0; }
.health-tips li{ margin:6px 0; font-size:13px; color:var(--text,#1F2937); line-height:1.5; }

.insights-roi{ display:grid; grid-template-columns: repeat(2, 1fr); gap:10px; }
@media (max-width: 600px) { .insights-roi{ grid-template-columns: 1fr; } }

.roi-card{ background:var(--surface,#fff); border:1px solid var(--line,#E4E8EC); border-radius:10px; padding:16px 18px; }
.roi-card-label{ font-size:10px; letter-spacing:1.5px; text-transform:uppercase; color:var(--text-mute,#6B7280); font-weight:700; margin-bottom:6px; }
.roi-card-value{ font-size:24px; font-weight:700; color:var(--text,#1F2937); margin-bottom:4px; }
.roi-card-highlight{ background:linear-gradient(180deg,#F0FDFA 0%,#FFFFFF 100%); border-color:#0F766E; }
.roi-card-highlight .roi-card-value{ color:#0F766E; }

/* Recommendations */
.recommendations-list{ display:flex; flex-direction:column; gap:10px; }
.recommendation-card{ display:flex; gap:14px; padding:14px 16px; background:var(--surface-2,#F9FAFB); border-left:4px solid #6B7280; border-radius:0 8px 8px 0; }
.recommendation-icon{ width:42px; height:42px; border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; }
.recommendation-body{ flex:1; }
.recommendation-meta{ display:flex; gap:6px; align-items:center; margin-bottom:4px; }
.recommendation-priority{ font-size:10px; letter-spacing:1.5px; font-weight:700; }
.recommendation-title{ margin:0 0 6px; font-size:14px; color:var(--text,#1F2937); }
.recommendation-text{ margin:0 0 10px; font-size:13px; color:var(--text-mute,#6B7280); line-height:1.5; }
.recommendation-actions{ display:flex; gap:6px; align-items:center; }

/* Documentos */
.doc-grid{ display:grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap:14px; }
.doc-card{ display:flex; gap:14px; background:var(--surface-2,#F9FAFB); border:1px solid var(--line,#E4E8EC); border-radius:10px; padding:16px; }
.doc-icon{ font-size:32px; flex-shrink:0; }
.doc-body{ flex:1; }
.doc-form{ display:flex; gap:6px; align-items:center; margin:8px 0 6px; flex-wrap:wrap; }
.doc-form input[type=date]{ font-size:12px; padding:4px 6px; }
.doc-shortcuts{ display:flex; gap:4px; flex-wrap:wrap; margin-top:6px; }

/* Ticket meta */
.ticket-meta{ display:flex; gap:24px; padding:14px 18px; background:var(--surface-2,#F9FAFB); border-radius:8px; margin-bottom:14px; flex-wrap:wrap; }
.ticket-meta > div{ font-size:13px; }
.ticket-meta .muted{ display:block; margin-bottom:2px; }

/* Ticket thread */
.ticket-thread{ display:flex; flex-direction:column; gap:10px; }
.ticket-msg{ padding:14px 18px; border-radius:8px; max-width:80%; }
.ticket-msg-head{ display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:8px; font-size:13px; }
.ticket-msg-body{ font-size:14px; color:var(--text,#1F2937); line-height:1.6; white-space:pre-wrap; word-wrap:break-word; }
.ticket-msg-tenant{ align-self:flex-end; background:#F0FDFA; border:1px solid #99F6E4; }
.ticket-msg-support{ align-self:flex-start; background:var(--surface,#fff); border:1px solid var(--line,#E4E8EC); }
.ticket-msg-system{ align-self:center; background:#FFFBEB; border:1px solid #FCD34D; font-style:italic; }

/* Stat cards menores e mais compactos */
.task-stats{ grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap:8px; margin:14px 0; }
.task-stat-card{ padding:10px 12px; border-radius:8px; }
.task-stat-value{ font-size:22px; }
.task-stat-label{ font-size:10px; margin-top:4px; }

/* Lista mais densa */
.task-list{ gap:4px; }
.task-list-row{ padding:10px 14px; grid-template-columns: 4px 1fr 130px 90px 70px; gap:12px; border-radius:6px; }
.task-row-priority{ width:4px; height:36px; border-radius:2px; }
.task-row-title{ font-size:13px; }
.task-row-title strong{ font-weight:600; }
.task-row-meta{ font-size:11px; margin-top:2px; }
.task-row-due{ font-size:11px; }

/* Detalhe mais compacto */
.task-detail-grid{ grid-template-columns: 1fr 300px; gap:12px; }
.task-main, .task-sidebar{ gap:10px; }
.task-sidebar .card{ padding:14px; }
.task-sidebar .card-pad{ padding:14px; }
.section-title{ font-size:11px; margin:0 0 8px; }
.task-status-row{ margin-bottom:10px; gap:8px; }
.task-priority-pill{ padding:3px 8px; font-size:10px; }
.task-description{ font-size:13px; padding:8px 0; }
.task-quick-actions{ padding-top:10px; margin-top:10px; gap:5px; }

.meta-row{ padding:5px 0; font-size:12px; gap:8px; }
.meta-label{ font-size:10px; }

/* Checklist mais limpo */
.checklist-row{ padding:5px; }
.checklist-check{ font-size:16px; }
.checklist-label{ font-size:12px; }

/* Comments */
.comment{ padding:8px 12px; }
.comment-head{ font-size:11px; margin-bottom:4px; }
.comment-body{ font-size:12px; line-height:1.45; }
.comment-form textarea{ min-height:50px; font-size:12px; }

/* Audit list */
.audit-row{ font-size:12px; gap:8px; }
.audit-dot{ width:6px; height:6px; margin-top:5px; }

.task-filters{ gap:6px; margin-bottom:10px; }
.task-filters input, .task-filters select{ padding:5px 8px; font-size:12px; }
.task-filters input[type=search]{ max-width:260px; min-width:160px; }

/* Templates grid mais arrumado */
.templates-grid{ grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap:10px; }
.template-card{ padding:14px; }
.template-card h4{ font-size:13px; margin:0 0 4px; }
.template-meta{ gap:10px; padding-top:8px; margin-top:8px; }
.template-meta .small{ font-size:11px; }

/* Watchers e deps */
.watcher-row, .dep-row{ font-size:12px; padding:3px 0; }
.dep-type{ font-size:9px; padding:2px 5px; }

/* Tags pill menor */
.tag-pill{ font-size:10px; padding:2px 7px; }

/* Mobile: lista vira so titulo + status */
@media (max-width: 700px) {
  .task-list-row{ grid-template-columns: 4px 1fr; padding:10px 12px; }
  .task-detail-grid{ grid-template-columns: 1fr; }
  .task-sidebar{ position:static; }
  .task-stats{ grid-template-columns: repeat(2, 1fr); }
  .task-quick-actions{ flex-direction:column; align-items:stretch; }
  .task-quick-actions .btn{ width:100%; }
}

/* Stats no /tarefas/minhas iguais */
.task-stats > div.task-stat-card{ padding:10px 12px; }

/* Banner mais discreto */
.banner.banner-warn, .banner.banner-danger{ padding:10px 14px; font-size:13px; margin-bottom:10px; }
.banner-sub{ font-size:11px; margin-top:2px; }

/* Page head com menos margem */
.page-head{ margin-bottom:14px; }
.page-head h1{ font-size:22px; margin:2px 0; }

/* === TASKS V3 (so o que falta sobre componentes existentes) === */

/* Lista de tarefas */
.task-list{ display:flex; flex-direction:column; gap:6px; }
.task-list .row{
  display:grid; grid-template-columns: 4px 1fr 140px 110px 70px;
  gap:14px; align-items:center;
  padding:12px 16px;
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-sm);
  text-decoration:none; color:inherit; transition:.15s;
}
.task-list .row:hover{ border-color:var(--primary); }
.task-list .pri{ width:4px; height:36px; border-radius:2px; }
.task-list .pri.critical{ background:var(--bad); }
.task-list .pri.high{ background:var(--warn); }
.task-list .pri.medium{ background:var(--primary); }
.task-list .pri.low{ background:var(--text-mute); }
.task-list .main{ min-width:0; }
.task-list .title{ font-size:14px; color:var(--ink); font-weight:600; }
.task-list .sub{ font-size:12px; color:var(--text-dim); margin-top:2px; }
.task-list .right{ text-align:right; font-size:12px; color:var(--text-dim); }
@media (max-width: 700px){
  .task-list .row{ grid-template-columns: 4px 1fr; }
  .task-list .right, .task-list .progress-col{ display:none; }
}

/* Detalhe: layout sidebar */
.task-detail{ display:grid; grid-template-columns: 1fr 300px; gap:16px; align-items:start; }
@media (max-width: 900px){ .task-detail{ grid-template-columns:1fr; } }
.task-detail .col-main, .task-detail .col-side{ display:flex; flex-direction:column; gap:14px; }
.task-detail .col-side{ position:sticky; top:14px; }

.task-detail .status-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.task-detail .quick-actions{ display:flex; gap:8px; flex-wrap:wrap; padding-top:14px; border-top:1px solid var(--line-2); margin-top:14px; }

.meta-row{ display:flex; justify-content:space-between; gap:10px; padding:7px 0; font-size:13px; align-items:center; flex-wrap:wrap; }
.meta-row + .meta-row{ border-top:1px solid var(--line-2); }
.meta-label{ font-size:12px; color:var(--text-dim); }
.meta-value{ font-weight:600; color:var(--ink); }
.meta-value.is-danger{ color:var(--bad); }

/* Checklist */
.checklist{ display:flex; flex-direction:column; gap:2px; }
.checklist-row{ display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:var(--r-sm); border:none; background:none; cursor:pointer; }
.checklist-row:hover{ background:var(--surface-2); }
.checklist-check{ font-size:18px; color:var(--primary); background:none; border:none; padding:0; cursor:pointer; }
.checklist-label{ font-size:13px; color:var(--ink); text-align:left; }
.checklist-label.is-done{ text-decoration:line-through; color:var(--text-mute); }

/* Comentarios */
.comments-list{ display:flex; flex-direction:column; gap:10px; margin-bottom:14px; }
.comment{ padding:10px 14px; background:var(--surface-2); border:1px solid var(--line-2); border-radius:var(--r-sm); }
.comment-head{ display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; font-size:12px; color:var(--text-dim); }
.comment-head strong{ color:var(--ink); }
.comment-body{ font-size:13px; line-height:1.55; color:var(--text); white-space:pre-wrap; }
.comment-form{ display:flex; flex-direction:column; gap:8px; }

/* Audit log */
.audit-list{ display:flex; flex-direction:column; gap:8px; }
.audit-row{ display:flex; gap:10px; align-items:flex-start; font-size:12px; color:var(--text-dim); }
.audit-dot{ width:7px; height:7px; border-radius:50%; background:var(--primary); margin-top:6px; flex-shrink:0; }
.audit-content strong{ color:var(--ink); }

/* Watchers + deps inline */
.compact-list{ display:flex; flex-direction:column; gap:4px; margin-top:8px; }
.compact-list .item{ display:flex; justify-content:space-between; align-items:center; font-size:13px; padding:5px 0; }
.dep-tag{ font-size:10px; background:var(--surface-2); color:var(--text-dim); padding:2px 7px; border-radius:var(--pill); letter-spacing:.5px; text-transform:uppercase; font-weight:600; }

/* Tags */
.tag{ display:inline-block; padding:2px 8px; background:var(--surface-2); color:var(--text-dim); border-radius:var(--pill); font-size:11px; margin:2px 3px 0 0; }

/* Progress mini */
.progress-mini{ width:100%; height:6px; background:var(--surface-2); border-radius:3px; overflow:hidden; }
.progress-mini-bar{ height:100%; background:var(--primary); transition:width .3s ease; }

/* Filtros: garantir altura igual aos inputs */

/* WIZARD STEPPER */
.wz-stepper{display:flex;gap:0;margin-bottom:18px;border:1px solid var(--line);border-radius:var(--r);overflow:hidden;background:var(--surface)}
.wz-step{flex:1;padding:12px 8px;text-align:center;text-decoration:none;color:var(--text-dim);font-size:11px;border-right:1px solid var(--line);background:var(--surface)}
.wz-step:last-child{border-right:0}
.wz-step.is-active{background:var(--primary);color:#fff;font-weight:600}
.wz-step.is-done{background:var(--good-bg);color:var(--good)}
.wz-step.is-locked{opacity:.5;cursor:default;pointer-events:none}
.wz-step .wz-num{display:block;font-size:14px;font-family:var(--display);font-weight:700;margin-bottom:2px}
.wz-step .wz-lbl{display:block;line-height:1.2}

.wz-actions{display:flex;justify-content:space-between;margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
.wz-actions .left, .wz-actions .right{display:flex;gap:8px;align-items:center}

/* Area card no step 3 */
.area-card{padding:14px 16px;border:1px solid var(--line);border-radius:var(--r-sm);background:var(--surface);margin-bottom:10px}
.area-card-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.area-card-name{font-size:14px;font-weight:600;color:var(--ink);display:flex;align-items:center;gap:8px}
.area-color-dot{width:10px;height:10px;border-radius:50%;display:inline-block}
.area-assignees{display:flex;flex-direction:column;gap:4px;padding-top:8px;border-top:1px solid var(--line-2)}
.area-assignee-row{display:flex;justify-content:space-between;align-items:center;font-size:12px;padding:2px 0}
.area-add-row{display:flex;gap:6px;align-items:center;margin-top:6px}

/* Field grid horizontal */
.wz-field-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.wz-field-grid .full{grid-column:1/-1}
.wz-field-grid .field label{display:block;font-size:12px;color:var(--text-dim);margin-bottom:4px}
.wz-field-grid .field input, .wz-field-grid .field select, .wz-field-grid .field textarea{width:100%}

/* APPROVAL LEVELS */
.appr-level{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;margin-bottom:10px;display:flex;flex-direction:column;gap:10px}
.appr-head{display:flex;align-items:flex-start;gap:12px}
.appr-num{flex-shrink:0;width:36px;height:36px;border-radius:50%;background:var(--primary);color:#fff;display:flex;align-items:center;justify-content:center;font-family:var(--display);font-weight:700;font-size:16px}
.appr-title{flex:1;min-width:0}
.appr-title strong{display:block;font-size:14px;color:var(--ink);margin-bottom:2px}
.appr-title .meta{display:flex;gap:6px;flex-wrap:wrap;align-items:center;font-size:12px;color:var(--text-dim);margin-top:4px}
.appr-remove{flex-shrink:0}

.appr-approvers{padding-top:10px;border-top:1px solid var(--line-2)}
.appr-approvers-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.appr-approvers-head .lbl{font-size:11px;text-transform:uppercase;letter-spacing:.5px;color:var(--text-dim);font-weight:600}
.appr-chip-list{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}
.appr-chip{display:inline-flex;align-items:center;gap:6px;background:var(--surface-2);border:1px solid var(--line);padding:4px 4px 4px 10px;border-radius:var(--pill);font-size:12px}
.appr-chip strong{font-weight:500;color:var(--ink)}
.appr-chip .role{color:var(--text-dim);font-size:11px}
.appr-chip button{background:none;border:none;width:22px;height:22px;border-radius:50%;cursor:pointer;color:var(--text-mute);font-size:14px;line-height:1}
.appr-chip button:hover{background:var(--bad-bg);color:var(--bad)}
.appr-add{display:grid;grid-template-columns:1fr 160px auto;gap:6px;align-items:end}

.appr-empty{padding:20px;text-align:center;color:var(--text-dim);font-size:13px;background:var(--surface-2);border-radius:var(--r-sm);margin-bottom:10px}
.add-level-card{display:block;text-align:center;padding:18px;background:transparent;border:1.5px dashed var(--line);border-radius:var(--r);color:var(--text-dim);font-size:13px;cursor:pointer;transition:.15s;width:100%}
.add-level-card:hover{border-color:var(--primary);color:var(--primary);background:var(--primary-050)}

@media (max-width: 600px){
  .appr-add{grid-template-columns:1fr;gap:6px}
}


/* Botoes no header da pagina nunca quebram */
.page-head .btn,
.page-head a.btn{white-space:nowrap;flex-shrink:0}

/* Garante que botoes do header e filtros nunca quebrem */
.page-head .btn,
.page-head a.btn,
form .btn,
.dsr-filters .btn,
.lgpd-filters .btn{white-space:nowrap !important;flex-shrink:0 !important}

/* ESG submenu retrátil */
.nav-collapsible { display: flex; flex-direction: column; }
.nav-collapsible-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; background: transparent; border: 0; cursor: pointer;
  text-align: left; font: inherit; color: inherit;
}
.nav-collapsible-chev {
  transition: transform .2s ease;
  flex-shrink: 0; opacity: .6;
}
.nav-collapsible[data-open="true"] .nav-collapsible-chev {
  transform: rotate(180deg);
}
.nav-collapsible-body {
  display: none;
  flex-direction: column;
  margin: 4px 0 8px 14px;
  padding-left: 10px;
  border-left: 2px solid #E5E7EB;
}
.nav-collapsible[data-open="true"] .nav-collapsible-body {
  display: flex !important;
}
.nav-subsub {
  padding: 6px 10px;
  font-size: 12px;
  color: #6B7280;
  text-decoration: none;
  border-radius: 4px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-subsub:hover { background: #F3F4F6; color: #1F2937; }
.nav-subsub.active { background: #10B981; color: #FFFFFF; font-weight: 600; }

/* Framework status badges */
.fw-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid;
  white-space: nowrap;
}
.fw-status-badge.badge-inplan      { background:#ECFDF5; color:#15803D; border-color:#BBF7D0; }
.fw-status-badge.badge-addon-on    { background:#FFFBEB; color:#92400E; border-color:#FDE68A; }
.fw-status-badge.badge-addon-offer { background:#EFF6FF; color:#1D4ED8; border-color:#BFDBFE; }
.fw-status-badge.badge-denied      { background:#FEF2F2; color:#B91C1C; border-color:#FECACA; }
.fw-status-badge.badge-unavail     { background:#F8FAFC; color:#64748B; border-color:#E2E8F0; }
