:root {
    /* ESMT Brand Colors - constant across themes */
    --esmt-history: #001E4E;
    --esmt-dawn: #03318C;
    --esmt-offwhite: #FBF9F2;
    --esmt-yellow: #F7D070;
    --esmt-emerald: #71C279;
    
    /* Light mode (default) */
    --bg: var(--esmt-offwhite);
    --card: #fff;
    --text: #1f2937;
    --text-secondary: #64748b;
    --muted: #6b7280;
    --blue: var(--esmt-dawn);
    --line: #e2e7eb;
    --brand: var(--esmt-history);
    --accent: var(--esmt-yellow);
    --hover: #f8fafc;
    --shadow: rgba(0, 30, 78, 0.08);
}

/* Dark mode */
[data-theme="dark"] {
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --muted: #94a3b8;
    --line: #334155;
    --hover: #334155;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Smooth transitions for theme switching */
body, .card, .btn, input, select, textarea, .site-header {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
* { box-sizing:border-box; }
body { margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif; background:var(--bg); color:var(--text); }
.container { max-width: 920px; margin: 32px auto; padding: 0 16px; }
.card { background: var(--card); border:1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 16px; }
h1 { margin: 0 0 8px 0; font-size: 28px; }
h2 { margin: 0 0 8px 0; font-size: 20px; }
.muted { color: var(--muted); }
.note { color:#374151; font-size: 12px; margin-top: 8px; }
.grid { display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; margin: 16px 0; }
label { display:block; font-size: 14px; color:#111827; }
input, select, textarea { width:100%; margin-top:6px; padding:10px 12px; border:1px solid var(--line); border-radius:8px; font-size:14px; }
textarea { resize: vertical; }
.actions { display:flex; gap: 8px; align-items:center; }
.btn { display:inline-block; padding:10px 14px; border-radius:8px; border:1px solid var(--line); color:#111827; text-decoration:none; background:#fff; }
.btn.primary { background: var(--blue); color:#fff; border-color: var(--blue); }
.btn:hover { filter: brightness(0.98); }
.link { display:inline-block; margin-bottom: 8px; color: var(--blue); text-decoration:none; }
.row { padding:8px 0; border-bottom:1px solid var(--line); }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

/* Header */
.site-header { background: var(--brand); color:#fff; }
.site-header .inner { max-width: 1024px; margin:0 auto; padding:12px 16px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.site-header .brand { display:flex; align-items:center; gap:10px; text-decoration:none; color:#fff; }
.site-header .brand img { height:28px; display:block; }
.site-header nav { display:flex; gap:8px; align-items:center; }
.site-header nav a { color:#fff; text-decoration:none; padding:8px 10px; border-radius:8px; }
.site-header nav a:hover { background: rgba(255,255,255,0.1); }


