:root {
  --navy: #10233f;
  --blue: #1f5b9d;
  --gold: #c89b3c;
  --ink: #172033;
  --muted: #6f7a8a;
  --line: #dce3ee;
  --bg: #f5f7fb;
  --success: #15803d;
  --warning: #b45309;
  --danger: #b91c1c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--blue); text-decoration: none; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 32px; background: linear-gradient(135deg, #eef4fb, #fff); }
.auth-card, .panel, .stat-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 32px rgba(16, 35, 63, .08); }
.auth-card { width: min(460px, 100%); padding: 28px; }
.brand { color: var(--navy); font-weight: 700; font-size: 22px; margin-bottom: 4px; }
.subtle { color: var(--muted); }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar { background: var(--navy); color: #fff; padding: 24px 18px; }
.sidebar a { display: block; color: #dbe7f5; padding: 11px 12px; border-radius: 6px; margin: 4px 0; }
.sidebar a.active, .sidebar a:hover { background: rgba(255,255,255,.12); color: #fff; }
.main { min-width: 0; }
.topbar { height: 66px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.top-search { width: min(460px, 45vw); }
.top-search input { height: 40px; }
.notification-menu { position: relative; }
.notification-menu summary { list-style: none; }
.notification-menu summary::-webkit-details-marker { display: none; }
.notification-dropdown { position: absolute; right: 0; top: 46px; width: 320px; max-width: 82vw; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 14px 32px rgba(16,35,63,.16); padding: 10px; z-index: 20; }
.notification-item { border-bottom: 1px solid var(--line); padding: 10px 4px; }
.notification-item:last-child { border-bottom: 0; }
.notification-item p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.notification-item.unread strong { color: var(--blue); }
.content { padding: 28px; }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { grid-template-columns: 1.2fr .8fr; }
.stat-card, .panel { padding: 18px; }
.stat-value { font-size: 30px; color: var(--navy); font-weight: 700; margin-top: 8px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; padding: 10px 11px; font: inherit; background: #fff; }
textarea { min-height: 110px; resize: vertical; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.full { grid-column: 1 / -1; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; padding: 10px 14px; background: var(--blue); color: #fff; font-weight: 700; cursor: pointer; }
.btn.secondary { background: #e8eef7; color: var(--navy); }
.btn.gold { background: var(--gold); color: #10233f; }
.btn.danger { background: var(--danger); color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.code-box { white-space: pre-wrap; overflow-x: auto; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 14px; font-family: Consolas, monospace; font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { padding: 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; background: #f8fafc; }
.badge { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #e8eef7; color: var(--navy); }
.flash { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; background: #dcfce7; color: var(--success); }
.error { padding: 12px 14px; border-radius: 6px; margin-bottom: 16px; background: #fee2e2; color: var(--danger); }
.timeline { border-left: 2px solid var(--line); padding-left: 16px; }
.timeline-item { margin-bottom: 16px; }
.muted-small { color: var(--muted); font-size: 12px; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .stats, .two-col, .form-grid { grid-template-columns: 1fr; }
  .topbar { height: auto; padding: 14px; align-items: stretch; flex-direction: column; gap: 10px; }
  .topbar-actions { flex-wrap: wrap; }
  .top-search { width: 100%; }
  .content { padding: 18px; }
}
