:root {
  --bg: #0b1115;
  --panel: #111a20;
  --panel-2: #16232b;
  --text: #eef7f2;
  --muted: #9fb2aa;
  --line: rgba(255,255,255,.10);
  --primary: #11a36b;
  --primary-2: #0b7f54;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #38bdf8;
  --ok: #22c55e;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 280px; background: #081014; border-right: 1px solid var(--line); padding: 22px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark, .logo-big { background: linear-gradient(135deg, #0f3b2e, #11a36b); color: white; display:flex; align-items:center; justify-content:center; font-weight:800; }
.brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.logo-big { width: 72px; height: 72px; border-radius: 22px; margin: 0 auto 14px; }
.brand span { color: var(--muted); display:block; font-size: 14px; }
.nav { display:flex; flex-direction: column; gap: 8px; }
.nav button { text-align:left; color: var(--muted); background: transparent; border: 1px solid transparent; padding: 12px 14px; border-radius: 12px; cursor:pointer; }
.nav button:hover, .nav button.active { background: var(--panel); color: var(--text); border-color: var(--line); }
.sidebar-footer { margin-top:auto; display:flex; flex-direction: column; gap: 10px; color: var(--muted); }
.main { width: calc(100% - 280px); padding: 28px; }
.main.full { width: 100%; display: flex; align-items: center; justify-content: center; }
.center-card { width: min(520px, 92vw); background: var(--panel); padding: 34px; border-radius: 24px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.center-card h1 { text-align:center; margin: 0 0 8px; }
.center-card p { text-align:center; color: var(--muted); }
label { display:block; margin: 18px 0 8px; color: #d8e8df; font-weight: 700; font-size: 14px; }
input, select { width:100%; background:#0b1419; color:var(--text); border:1px solid var(--line); border-radius:12px; padding:13px 14px; outline:none; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(17,163,107,.15); }
.btn { border: 0; border-radius: 12px; padding: 12px 16px; cursor: pointer; color: var(--text); display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.btn-primary { width: 100%; margin-top: 20px; background: var(--primary); font-weight: 800; }
.btn-primary:hover { background: var(--primary-2); }
.btn-ghost { background: rgba(255,255,255,.06); border: 1px solid var(--line); }
.btn-small { padding: 8px 10px; font-size: 13px; }
.btn-danger { background: rgba(239,68,68,.18); color:#fecaca; border:1px solid rgba(239,68,68,.35); }
.private-app { width: 100%; }
.topbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom: 24px; }
.topbar h1 { margin:0 0 4px; font-size: 32px; }
.topbar p { margin:0; color:var(--muted); }
.top-actions { display:flex; align-items:center; gap: 12px; }
.status-dot { color:#c7f9dc; background: rgba(34,197,94,.12); border:1px solid rgba(34,197,94,.3); padding: 8px 10px; border-radius: 999px; font-size: 13px; }
.content { display:flex; flex-direction:column; gap:22px; }
.grid { display:grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card { background: var(--panel); border:1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.card h2 { margin: 0 0 14px; font-size: 20px; }
.kpi { background: var(--panel); border:1px solid var(--line); border-radius: 18px; padding: 18px; }
.kpi span { color:var(--muted); font-size:13px; }
.kpi strong { display:block; margin-top: 8px; font-size: 28px; }
.table-wrap { overflow:auto; border-radius:16px; border: 1px solid var(--line); }
table { width:100%; border-collapse: collapse; min-width: 880px; background: #0d151a; }
th, td { padding: 12px 14px; text-align:left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color:#cfe1d9; font-size:13px; background: #101b21; position: sticky; top:0; }
td { color:#e9f2ee; }
.badge { display:inline-flex; align-items:center; padding: 5px 9px; border-radius:999px; font-size:12px; font-weight:700; border: 1px solid var(--line); }
.badge.ok { color:#bbf7d0; background: rgba(34,197,94,.12); border-color:rgba(34,197,94,.35); }
.badge.warn { color:#fde68a; background: rgba(245,158,11,.12); border-color:rgba(245,158,11,.35); }
.badge.danger { color:#fecaca; background: rgba(239,68,68,.12); border-color:rgba(239,68,68,.35); }
.badge.info { color:#bae6fd; background: rgba(56,189,248,.12); border-color:rgba(56,189,248,.35); }
.toolbar { display:flex; gap: 12px; align-items:end; flex-wrap: wrap; }
.toolbar > div { min-width: 220px; }
.message { margin-top: 12px; color: #fecaca; text-align:center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #102019; color: white; border: 1px solid rgba(17,163,107,.35); padding: 14px 16px; border-radius: 14px; box-shadow: var(--shadow); z-index: 20; }
.alert-row { display:flex; align-items:flex-start; gap: 12px; padding: 14px; border:1px solid var(--line); border-radius:16px; background:#0d151a; margin-bottom:10px; }
.alert-icon { width:12px; height:12px; border-radius:999px; margin-top:6px; background: var(--info); }
.alert-icon.grave { background: var(--danger); }
.alert-icon.medio, .alert-icon.leve { background: var(--warning); }
.alert-icon.info { background: var(--info); }
.file-drop { border: 1px dashed rgba(255,255,255,.25); padding: 22px; border-radius: 18px; background:#0d151a; }
.preview-box { white-space: pre-wrap; background:#081014; border: 1px solid var(--line); padding: 14px; border-radius: 14px; color:#d7e8df; max-height: 320px; overflow:auto; }
@media (max-width: 980px) {
  .app-shell { display:block; }
  .sidebar { width:100%; height:auto; position: static; }
  .main { width:100%; padding: 18px; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .topbar { align-items:flex-start; flex-direction:column; }
}
