:root {
  --bg-main: #f4f2ec; --bg-surface: #ffffff; --bg-inset: #eae6dc;
  --text-primary: #141518; --text-muted: #5a5f68;
  --border-subtle: rgba(20, 21, 24, 0.12); --border-strong: rgba(20, 21, 24, 0.24);
  --accent: #d9480f; --success: #1b7f4b; --danger: #c92a2a;
  --font-display: "Space Grotesk", sans-serif; --font-body: "Plus Jakarta Sans", sans-serif; --font-mono: "JetBrains Mono", monospace;
}
[data-theme="dark"] {
  --bg-main: #101214; --bg-surface: #181b1f; --bg-inset: #21252b;
  --text-primary: #f1f3f5; --text-muted: #9ba3ae;
  --border-subtle: rgba(255, 255, 255, 0.12); --border-strong: rgba(255, 255, 255, 0.24);
  --accent: #ff6b2b; --success: #2fb36d; --danger: #ff6b6b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-main); color: var(--text-primary); font-family: var(--font-body); font-size: 0.9375rem; line-height: 1.5; overflow-x: hidden; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.btn { min-height: 44px; padding: 0.5rem 1rem; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-surface); font-weight: 600; cursor: pointer; transition: transform 0.12s ease; }
.btn:active { transform: scale(0.97); }
.btn-sm { min-height: 36px; padding: 0.25rem 0.75rem; font-size: 0.825rem; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.adm-login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.adm-login-card { width: 100%; max-width: 400px; background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 2rem; }
.adm-brand { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.adm-mark { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 6px; font-family: var(--font-mono); font-weight: 700; }
.adm-form { display: flex; flex-direction: column; gap: 1rem; margin-top: 1rem; }
.adm-form label, .adm-drawer-body label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.825rem; font-weight: 600; }
.adm-form input, .adm-drawer-body input, .adm-drawer-body select, .adm-drawer-body textarea, .adm-toolbar input, .adm-toolbar select {
  min-height: 42px; padding: 0.5rem 0.75rem; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--bg-main);
}
.adm-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.adm-sidebar { background: var(--bg-surface); border-right: 1px solid var(--border-subtle); padding: 1.25rem; display: flex; flex-direction: column; justify-content: space-between; }
.adm-side-head { display: flex; justify-content: space-between; align-items: center; }
.adm-nav { display: flex; flex-direction: column; gap: 0.375rem; margin: 1.5rem 0 auto; }
.adm-nav-item { text-align: left; padding: 0.625rem 0.75rem; min-height: 44px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.adm-nav-item.active, .adm-nav-item:hover { background: var(--bg-inset); color: var(--text-primary); border-color: var(--border-subtle); }
.adm-side-foot { display: flex; flex-direction: column; gap: 0.5rem; }
.adm-topbar { background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); padding: 0.875rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.adm-pill { font-family: var(--font-mono); font-size: 0.78rem; padding: 0.25rem 0.625rem; border-radius: 6px; background: var(--bg-inset); border: 1px solid var(--border-subtle); }
.adm-workspace { padding: 1.5rem; display: flex; flex-direction: column; gap: 1.5rem; }
.adm-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; }
.adm-kpi { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 1rem; cursor: pointer; text-align: left; transition: transform 0.15s ease, border-color 0.15s ease; }
.adm-kpi:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.adm-kpi span { font-size: 0.8rem; color: var(--text-muted); display: block; }
.adm-kpi strong { font-family: var(--font-mono); font-size: 1.75rem; display: block; margin: 0.25rem 0; }
.adm-trend { font-family: var(--font-mono); font-size: 0.72rem; padding: 0.125rem 0.375rem; border-radius: 4px; background: rgba(27, 127, 75, 0.14); color: var(--success); }
.adm-trend.warn { background: rgba(201, 42, 42, 0.14); color: var(--danger); }
.adm-toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; }
.adm-table-wrap { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: 10px; overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.adm-table th, .adm-table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle); text-align: left; }
.adm-table th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); cursor: pointer; }
.adm-drawer { position: fixed; top: 0; right: 0; width: min(440px, 100vw); height: 100vh; background: var(--bg-surface); border-left: 1px solid var(--border-strong); z-index: 80; padding: 1.5rem; overflow-y: auto; box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18); }
.adm-drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.adm-drawer-body { display: flex; flex-direction: column; gap: 1rem; }
.adm-mobile-only { display: none; }
.skeleton { background: linear-gradient(90deg, var(--bg-inset) 25%, var(--bg-surface) 50%, var(--bg-inset) 75%); background-size: 200% 100%; animation: sh 1.3s infinite linear; border-radius: 6px; }
@keyframes sh { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.toast-stack { position: fixed; bottom: 1rem; right: 1rem; z-index: 999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: var(--bg-surface); border: 1px solid var(--border-strong); border-left: 4px solid var(--accent); padding: 0.75rem 1rem; border-radius: 6px; }
@media (max-width: 768px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 250px; z-index: 90; transform: translateX(-100%); transition: transform 0.25s ease; }
  .adm-sidebar.open { transform: translateX(0); }
  .adm-mobile-only { display: inline-flex; }
}
