:root {
    --admin-font: Roboto, "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    --admin-bg: #eef2f7;
    --admin-text: #18202a;
    --admin-muted: #667085;
    --admin-border: #d9e0e8;
    --admin-primary: #166534;
}
.admin-dashboard-page, .admin-login-page {
    font-family: var(--admin-font); font-size: 15px; line-height: 1.45; font-weight: 400;
    color: var(--admin-text); background: var(--admin-bg); letter-spacing: 0;
}
.admin-dashboard-page { display: block; }
.admin-dashboard-page *, .admin-login-page * { letter-spacing: 0; }
.admin-dashboard-page button, .admin-dashboard-page input, .admin-dashboard-page select,
.admin-login-page button, .admin-login-page input { font-family: inherit; }
.admin-dashboard-page h1, .admin-dashboard-page h2, .admin-dashboard-page strong,
.admin-login-page h1 { font-weight: 600; }
.admin-dashboard-page label, .admin-login-page label { font-size: 14px; font-weight: 500; }
.admin-dashboard-page input, .admin-login-page input {
    min-height: 44px; border-color: var(--admin-border); border-radius: 6px; font-size: 15px; color: var(--admin-text);
}
.admin-dashboard-page select {
    width: 100%; min-width: 0; height: 48px; padding: 0 12px; border: 1px solid var(--admin-border);
    border-radius: 6px; background: #fff; color: var(--admin-text); font-size: 15px;
}
.admin-dashboard-page input[type="checkbox"], .admin-login-page input[type="checkbox"] { min-height: 0; accent-color: var(--admin-primary); }
.admin-dashboard-page :focus-visible, .admin-login-page :focus-visible { outline: 3px solid #86bba0; outline-offset: 2px; }
.admin-sidebar { width: 248px; position: fixed; overflow-y: auto; background: #111827; padding: 24px 14px 16px; gap: 20px; }
.admin-brand { gap: 12px; padding: 0 10px; }
.admin-brand strong { font-size: 16px; font-weight: 600; }
.admin-brand small { color: #c1c9d6; font-size: 12px; }
.admin-menu { grid-template-columns: 1fr; gap: 4px; }
.menu-label { color: #9da9ba; font-size: 11px; font-weight: 500; margin: 12px 10px 4px; }
.admin-menu a, .admin-menu button { font-weight: 500; font-size: 14px; min-height: 44px; grid-template-columns: 20px minmax(0,1fr); gap: 12px; padding: 10px 12px; border-radius: 6px; color: #e4e7ec; }
.admin-menu a:hover, .admin-menu button:hover { background: #243145; }
.admin-menu a.is-active { background: var(--admin-primary); color: #fff; }
.admin-icon { width: 19px; height: 19px; filter: invert(1); opacity: .8; }
.admin-logout { font-weight: 500; font-size: 14px; min-height: 42px; border-radius: 6px; }
.admin-workspace { margin-left: 248px; min-width: 0; }
.admin-topbar { min-height: 66px; background: #fff; padding: 12px 28px; border-color: var(--admin-border); flex-direction: row; align-items: center; }
.admin-topbar strong { font-size: 14px; font-weight: 500; }
.admin-topbar span { color: var(--admin-muted); font-size: 12px; }
.admin-content { width: min(1280px, calc(100% - 56px)); gap: 24px; padding: 28px 0 40px; }
.admin-hero { min-height: 44px; padding: 0; border-radius: 0; background: none; color: var(--admin-text); flex-direction: row; align-items: center; }
.admin-hero h1 { font-size: 28px; line-height: 1.25; font-weight: 600; }
.hero-actions { flex-wrap: wrap; width: auto; justify-content: flex-end; }
.hero-actions span { color: var(--admin-muted); border: 0; padding: 0; font-size: 13px; font-weight: 400; }
.btn { min-height: 40px; font-size: 14px; font-weight: 500; border-radius: 6px; padding: 9px 14px; gap: 8px; }
.btn-primary, .btn-light { border-color: var(--admin-primary); background: var(--admin-primary); color: #fff; }
.btn-primary:hover, .btn-light:hover { background: #14532d; }
.btn-outline { color: #344054; border-color: #cbd3df; }
.btn-outline:hover { background: #f5f7fa; }
.admin-stat-row { gap: 16px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.admin-stat-card { min-height: 104px; padding: 18px 20px; background: #fff; border: 1px solid var(--admin-border); border-top: 3px solid #166534; box-shadow: none; border-radius: 6px; }
.admin-stat-card:nth-child(2) { border-top-color: #175cd3; }
.admin-stat-card:nth-child(3) { border-top-color: #0891a2; }
.admin-stat-card:nth-child(4) { border-top-color: #b54708; }
.admin-stat-card::after { content: none; }
.admin-stat-card span { color: var(--admin-muted); font-size: 13px; }
.admin-stat-card strong { margin-top: 8px; font-size: 30px; font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-card-grid { grid-template-columns: minmax(0, 2.5fr) minmax(235px, 1fr); align-items: start; gap: 24px; }
.admin-card { min-width: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.admin-card-head { padding: 18px 20px; min-height: 62px; border-bottom: 1px solid var(--admin-border); flex-wrap: wrap; flex-direction: row; align-items: center; }
.admin-card-head h2 { font-size: 16px; font-weight: 600; }
.card-actions { justify-content: flex-end; }
.embedded-table { border: 0; border-radius: 0; }
.admin-table { font-size: 14px; width: 100%; border-collapse: collapse; }
.admin-table th { background: #f8f9fb; color: var(--admin-muted); font-size: 12px; font-weight: 600; text-transform: none; padding: 12px 16px; border-color: var(--admin-border); }
.admin-table td { padding: 14px 16px; color: var(--admin-text); border-color: var(--admin-border); line-height: 1.5; font-variant-numeric: tabular-nums; }
.admin-table td strong { font-weight: 500; }
.admin-table td small { display: block; font-size: 12px; color: var(--admin-muted); font-weight: 400; }
.draws-table { table-layout: fixed; min-width: 590px; }
.draws-table th:nth-child(1) { width: 23%; }
.draws-table th:nth-child(2) { width: 29%; }
.draws-table th:nth-child(3) { width: 26%; }
.draws-table th:nth-child(4) { width: 22%; }
.draws-table td { overflow-wrap: anywhere; }
.admin-table tr[role="button"] { cursor: pointer; }
.admin-table tr[role="button"]:hover td, .admin-table tr[role="button"]:focus-visible td { background: #f0f7f3; }
.admin-table .table-actions { display: table-cell; white-space: nowrap; }
.table-actions form { display: inline-block; margin-left: 8px; }
.link-button, .danger-link { font-weight: 500; font-size: 13px; padding: 8px 4px; }
.link-button { color: #175cd3; }
.danger-link { color: #b42318; }
.status-pill { border-radius: 4px; font-weight: 500; font-size: 12px; }
.difficulty-5 { color: #166534; background: #dcfce7; }
.difficulty-3 { color: #854d0e; background: #fef9c3; }
.difficulty-1 { color: #991b1b; background: #fee2e2; }
.status-pill.is-off { color: #667085; background: #f2f4f7; }
.rank-list { padding: 4px 20px 16px; }
.rank-row { min-height: 58px; font-size: 14px; border-color: var(--admin-border); }
.rank-row strong { color: var(--admin-primary); font-weight: 600; }
.notice { font-weight: 500; font-size: 14px; }
.admin-modal { max-height: calc(100dvh - 32px); color: var(--admin-text); }
.modal-head { padding: 16px 20px; }
.modal-head h2 { font-size: 18px; font-weight: 600; }
.modal-form { padding: 20px; gap: 16px; }
.modal-actions { padding: 16px 20px; flex-wrap: wrap; }
.modal-close { width: 40px; height: 40px; flex-shrink: 0; }
.detail-list dt { font-weight: 500; color: var(--admin-muted); font-size: 13px; }
.detail-list dd { font-weight: 400; font-size: 14px; overflow-wrap: anywhere; }
.detail-list dd small { display: block; color: var(--admin-muted); margin-top: 4px; }
.detail-list a { color: #175cd3; }
.settings-links { padding: 16px 20px 0; }
.activation-receipt { display: grid; gap: 16px; text-align: center; padding: 28px 20px; }
.activation-receipt output { font: 600 36px ui-monospace, Consolas, monospace; color: #166534; overflow-wrap: anywhere; }
.activation-receipt p { color: var(--admin-muted); margin: 0; font-size: 14px; }
.admin-login-page .login-box { border-radius: 8px; border: 1px solid var(--admin-border); box-shadow: 0 12px 32px #1018280d; }
.admin-login-page h1 { font-size: 24px; }
.admin-login-page .brand { font-size: 18px; font-weight: 600; }
.admin-login-page .primary-action { background: var(--admin-primary); min-height: 48px; font-size: 16px; font-weight: 600; border-radius: 6px; box-shadow: none; }
.admin-login-page .activation-code-input { text-transform: uppercase; font: 600 26px ui-monospace, Consolas, monospace; text-align: center; }
.icon-button { display: inline-grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--admin-border); border-radius: 6px; background: white; cursor: pointer; flex-shrink: 0; }
.icon-button img { width: 20px; height: 20px; }
.sidebar-toggle, .sidebar-close, .sidebar-backdrop { display: none; }
@media (max-width: 1200px) { .admin-card-grid { grid-template-columns: 1fr; } }
@media (max-width: 1100px) {
    .admin-sidebar { position: fixed; width: 272px; max-width: 85vw; z-index: 51; transform: translateX(-100%); visibility: hidden; }
    .admin-workspace { margin-left: 0; }
    .sidebar-toggle, .sidebar-close { display: inline-grid; }
    .sidebar-close { position: absolute; top: 12px; right: 12px; }
    .sidebar-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; width: 100%; height: 100%; z-index: 50; border: 0; background: #10182870; }
    .sidebar-open { overflow: hidden; }
    .sidebar-open .admin-sidebar { transform: none; visibility: visible; }
    .admin-topbar > div { margin-right: auto; }
}
@media (max-width: 620px) {
    .admin-content { width: calc(100% - 28px); padding-top: 20px; gap: 20px; }
    .admin-topbar { padding: 10px 14px; gap: 12px; }
    .admin-topbar .btn { font-size: 13px; padding: 8px 10px; }
    .admin-hero { flex-wrap: wrap; }
    .admin-hero h1 { font-size: 26px; }
    .hero-actions, .hero-actions .btn, .card-actions .btn { width: auto; }
    .hero-actions span { display: none; }
    .admin-stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
    .admin-stat-card { padding: 14px 16px; }
    .admin-card-head { padding: 16px; gap: 12px; }
    .card-actions { justify-content: flex-start; }
    .tablet-actions .btn { flex: 1 1 auto; }
}
