:root {
    --brand: #206BA4;
    --brand-hover: #1a5688;
    --brand-soft: #BBD9EE;
    --brand-mist: #EBF4FA;
    --bg: #F0F5FA;
    --surface: #fff;
    --ink: #1e3a52;
    --muted: #5a7389;
    --ok: #2f9d62;
    --err: #b05a52;
    --max: 1280px;
    --radius: 16px;
    --font: "Onest", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body.adm-body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -0.03em; }
code { font-size: 0.92em; background: var(--brand-mist); padding: 2px 6px; border-radius: 6px; }

.adm-wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.adm-wrap--narrow { max-width: 760px; }
.adm-muted { color: var(--muted); font-size: 14px; }
.adm-back { display: inline-block; margin-bottom: 16px; font-size: 14px; font-weight: 600; }

.adm-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--brand); font-size: 18px; text-decoration: none; }
.adm-brand--center { justify-content: center; margin-bottom: 20px; }
.adm-brand:hover { text-decoration: none; }

.adm-header { position: sticky; top: 0; z-index: 50; background: rgba(240,245,250,.92); backdrop-filter: blur(16px); border-bottom: 1px solid rgba(32,107,164,.12); }
.adm-header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; flex-wrap: wrap; padding: 8px 0; }
.adm-nav { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; font-weight: 600; color: var(--muted); margin-right: auto; }
.adm-nav a { color: inherit; text-decoration: none; }
.adm-nav a:hover, .adm-nav a.is-active { color: var(--brand); }
.adm-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.adm-user-pill { padding: 6px 12px; border-radius: 999px; background: var(--brand-mist); color: var(--brand); font-size: 13px; font-weight: 600; }

.adm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; border-radius: 999px; border: 0; background: var(--brand); color: #fff; font-weight: 600; cursor: pointer; text-decoration: none; }
.adm-btn:hover { background: var(--brand-hover); text-decoration: none; color: #fff; }
.adm-btn--secondary { background: #fff; color: var(--brand); border: 1px solid rgba(32,107,164,.22); }
.adm-btn--secondary:hover { background: var(--brand-mist); }
.adm-btn--ghost { background: transparent; color: var(--brand); border: 1px solid rgba(32,107,164,.2); }
.adm-btn--sm { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.adm-btn--full { width: 100%; }

.adm-main { padding: 28px 0 48px; }
.adm-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.adm-page-head h1 { font-size: clamp(1.6rem, 3vw, 2rem); }

.adm-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 24px; }
.adm-kpi { background: var(--surface); border: 1px solid rgba(32,107,164,.12); border-radius: var(--radius); padding: 18px; }
.adm-kpi--accent { background: linear-gradient(135deg, var(--brand), var(--brand-hover)); color: #fff; border: 0; }
.adm-kpi-num { display: block; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em; }
.adm-kpi-label { display: block; margin-top: 4px; font-size: 13px; opacity: .85; }

.adm-split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 16px; }
.adm-panel { background: var(--surface); border: 1px solid rgba(32,107,164,.12); border-radius: var(--radius); padding: 20px; }
.adm-panel h2 { font-size: 1rem; margin-bottom: 14px; }
.adm-panel--form { margin-top: 8px; }

.adm-queue-list { display: grid; gap: 10px; }
.adm-queue-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--brand-mist); color: inherit; text-decoration: none; font-weight: 600; }
.adm-queue-item:hover { background: var(--brand-soft); text-decoration: none; }
.adm-queue-item strong { font-size: 1.25rem; color: var(--brand); }

.adm-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.adm-chart-bar { flex: 1; min-width: 4px; height: calc(var(--h, 4%) + 4px); background: linear-gradient(180deg, var(--brand-soft), var(--brand)); border-radius: 4px 4px 0 0; }
.adm-chart-caption { margin-top: 10px; }

.adm-search { display: flex; gap: 8px; align-items: center; }
.adm-search input, .adm-search select, .adm-field input { width: 100%; min-height: 42px; border: 1px solid rgba(32,107,164,.2); border-radius: 12px; padding: 10px 14px; background: #fff; }
.adm-search input[type="search"] { min-width: 220px; }

.adm-table-wrap { overflow: auto; border: 1px solid rgba(32,107,164,.12); border-radius: var(--radius); background: var(--surface); }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th, .adm-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid rgba(32,107,164,.08); vertical-align: middle; }
.adm-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--brand-mist); }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-empty { text-align: center; color: var(--muted); padding: 28px !important; }

.adm-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--brand-mist); color: var(--brand); font-size: 12px; font-weight: 700; text-transform: capitalize; }
.adm-pill--active { background: #e8f7ee; color: var(--ok); }
.adm-pill--canceled { background: #fdf3f1; color: var(--err); }
.adm-pill--paid { background: #e8f7ee; color: var(--ok); }
.adm-pill--requested, .adm-pill--processing { background: #fff8ee; color: #7a6840; }
.adm-pill--admin { background: #1e3a52; color: #fff; }

.adm-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 20px; }
.adm-page-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface); border: 1px solid rgba(32,107,164,.15); color: var(--brand); font-weight: 700; text-decoration: none; }
.adm-page-btn.is-disabled { opacity: .4; pointer-events: none; }
.adm-page-info { font-size: 13px; color: var(--muted); }

.adm-detail-grid { display: grid; gap: 16px; }
.adm-dl { display: grid; gap: 10px; margin: 0; }
.adm-dl div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid rgba(32,107,164,.08); }
.adm-dl dt { margin: 0; color: var(--muted); font-size: 13px; }
.adm-dl dd { margin: 0; font-weight: 600; text-align: right; }
.adm-list-row { padding: 10px 0; border-bottom: 1px solid rgba(32,107,164,.08); }
.adm-list-row strong { display: block; }
.adm-inline-form { margin: 0; }

.adm-form { display: grid; gap: 14px; }
.adm-form--wide { max-width: 480px; }
.adm-field { display: grid; gap: 6px; }
.adm-field span { font-size: 13px; font-weight: 600; color: var(--muted); }

.adm-auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.adm-auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid rgba(32,107,164,.12); border-radius: 20px; padding: 32px 28px; box-shadow: 0 20px 50px rgba(32,107,164,.08); }
.adm-auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; text-align: center; }
.adm-auth-card .adm-muted { text-align: center; margin-bottom: 20px; }

.adm-alert { padding: 12px 14px; border-radius: 12px; font-size: 14px; }
.adm-alert--err { background: #fdf3f1; color: var(--err); }
.adm-flash { position: fixed; top: 16px; right: 16px; z-index: 100; background: #1e3a52; color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.15); }

@media (max-width: 900px) {
    .adm-split { grid-template-columns: 1fr; }
    .adm-nav { order: 3; width: 100%; margin-left: 0; overflow-x: auto; padding-bottom: 4px; }
    .adm-header-inner { justify-content: space-between; }
}
