:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5e7eb;
  --accent: #1f4b99;
  --accent-dark: #173a78;
  --accent-soft: #eff6ff;
  --danger: #b42318;
  --danger-soft: #fff1f3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --shadow: 0 16px 40px rgba(15, 23, 42, .08);
  --radius: 18px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
.hidden { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #dbeafe, transparent 35%), var(--bg); }
.login-card { width: min(460px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.login-card h1 { margin: 0; font-size: 25px; letter-spacing: -.03em; }
.login-card p { color: var(--muted); line-height: 1.5; margin: 8px 0 18px; }
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
aside { background: #0f172a; color: #fff; padding: 26px 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, #fff, #93c5fd); color: #0f172a; display: grid; place-items: center; font-weight: 800; }
.brand h1 { font-size: 16px; margin: 0; line-height: 1.15; }
.brand span { display: block; font-size: 12px; color: #cbd5e1; font-weight: 500; margin-top: 2px; }
nav button { width: 100%; border: 0; background: transparent; color: #cbd5e1; text-align: left; padding: 12px 14px; border-radius: 12px; margin-bottom: 6px; cursor: pointer; font-size: 14px; font-weight: 650; }
nav button.active, nav button:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-note { margin-top: 28px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.08); color: #cbd5e1; font-size: 12px; line-height: 1.45; }
.user-box { margin-top: auto; padding-top: 24px; color: #cbd5e1; font-size: 12px; word-break: break-word; }
main { padding: 28px; overflow-x: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.title h2 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.title p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
button, .button { font-family: inherit; border: 1px solid var(--line); background: #fff; color: var(--text); border-radius: 12px; padding: 10px 14px; cursor: pointer; font-weight: 700; font-size: 13px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
button:hover, .button:hover { filter: brightness(.98); }
button.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
button.primary:hover { background: var(--accent-dark); }
button.danger { color: var(--danger); border-color: #fecaca; background: #fff5f5; }
button.ghost { color: #cbd5e1; background: transparent; border-color: rgba(255,255,255,.18); width: 100%; justify-content: center; margin-top: 12px; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(5, minmax(150px, 1fr)); margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi { padding: 18px; min-height: 104px; }
.kpi span { display: block; font-size: 12px; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.kpi strong { display: block; margin-top: 10px; font-size: 32px; letter-spacing: -.04em; }
.toolbar { padding: 16px; margin-bottom: 18px; }
.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(130px, 1fr)); gap: 10px; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; color: var(--text); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #93c5fd; box-shadow: 0 0 0 4px rgba(59,130,246,.12); }
.content-section { display: none; }
.content-section.active { display: block; }
.agenda-list { display: grid; gap: 12px; }
.hearing-card { padding: 16px; display: grid; grid-template-columns: 1fr auto; gap: 14px; }
.hearing-card h3 { margin: 0 0 8px; font-size: 16px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13px; }
.pill { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; background: #f2f4f7; color: #344054; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warning-soft); color: var(--warning); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.blue { background: var(--accent-soft); color: var(--accent); }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-content: start; }
.details { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: #475467; font-size: 13px; line-height: 1.45; }
table { width: 100%; border-collapse: collapse; background: #fff; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: top; }
th { color: #475467; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; background: #f9fafb; }
tr:hover td { background: #fcfcfd; }
.form-card { padding: 18px; max-width: 1100px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
label { display: grid; gap: 6px; color: #344054; font-size: 13px; font-weight: 800; }
label.full { grid-column: 1 / -1; }
textarea { min-height: 94px; resize: vertical; }
.checklist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 8px; }
.check { border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 13px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.check input { width: auto; }
.empty { padding: 34px; text-align: center; color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 20; }
.modal-backdrop.open { display: flex; }
.modal { width: min(880px, 100%); max-height: 92vh; overflow: auto; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px rgba(15, 23, 42, .28); padding: 18px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.modal-header h3 { margin: 0; font-size: 20px; }
.notice { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 50; background: #111827; color: #fff; padding: 12px 14px; border-radius: 14px; box-shadow: var(--shadow); display: none; max-width: 420px; font-size: 13px; }
.toast.open { display: block; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #dbeafe; border-top-color: var(--accent); animation: spin 800ms linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 1100px) { .app { grid-template-columns: 1fr; } aside { position: relative; height: auto; } .kpis { grid-template-columns: repeat(2, 1fr); } .filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { main { padding: 18px; } .topbar, .hearing-card { grid-template-columns: 1fr; display: grid; } .kpis, .filters, .form-grid, .checklist { grid-template-columns: 1fr; } .card-actions { justify-content: flex-start; } table { display: block; overflow-x: auto; } }
