/* AdminWeb — central control panel (dark sidebar, light content) */
:root { --admin-side: 264px; --admin-top: 60px; --side-bg: #0f172a; --side-ink: #cbd5e1; --side-active: #1d6fe0; }
body.admin { background: #f1f5f9; }
.admin-shell { display: grid; grid-template-columns: var(--admin-side) 1fr; min-height: 100vh; }
.admin-side { background: var(--side-bg); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.admin-side::-webkit-scrollbar { width: 6px; } .admin-side::-webkit-scrollbar-thumb { background: #334155; border-radius: 3px; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 16px 18px; color: #fff; font-weight: 800; font-size: 1.05rem; border-bottom: 1px solid rgba(255,255,255,.08); text-decoration: none !important; }
.admin-brand .mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #1d6fe0, #0f9d63); display: grid; place-items: center; font-size: .8rem; }
.admin-brand small { display: block; font-size: .65rem; font-weight: 500; color: #94a3b8; }
.site-switch { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-switch select { background: #1e293b; border-color: #334155; color: #fff; font-size: .85rem; padding: 8px 32px 8px 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
.admin-menu { padding: 10px 10px 30px; flex: 1; }
.admin-menu .group { margin-bottom: 4px; }
.admin-menu .group > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; background: none; color: var(--side-ink); font-weight: 600; font-size: .85rem; border-radius: 8px; text-align: left; }
.admin-menu .group > button:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-menu .group > button svg { width: 18px; height: 18px; color: #94a3b8; flex: none; }
.admin-menu .group > button .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .15s; }
.admin-menu .group.is-open > button .chev { transform: rotate(180deg); }
.admin-menu .group.is-open > button { color: #fff; }
.admin-menu .sub { display: none; padding: 2px 0 6px 12px; }
.admin-menu .group.is-open .sub { display: block; }
.admin-menu .sub a, .admin-menu > a { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 28px; border-radius: 8px; color: #94a3b8; font-size: .84rem; text-decoration: none !important; }
.admin-menu > a { padding-left: 12px; font-weight: 600; color: var(--side-ink); } .admin-menu > a svg { width: 18px; height: 18px; color: #94a3b8; }
.admin-menu .sub a:hover, .admin-menu > a:hover { color: #fff; background: rgba(255,255,255,.05); }
.admin-menu .sub a.is-active, .admin-menu > a.is-active { background: var(--side-active); color: #fff; } .admin-menu > a.is-active svg { color: #fff; }
.admin-menu .sub a .count { margin-left: auto; background: #f59e0b; color: #0f172a; font-size: .68rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.admin-menu .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 14px 12px 6px; font-weight: 700; }
.admin-main { min-width: 0; display: flex; flex-direction: column; }
.admin-top { height: var(--admin-top); background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 24px; position: sticky; top: 0; z-index: 50; }
.admin-top .search { flex: 1; max-width: 460px; } .admin-top .search input { padding: 8px 12px 8px 36px; border-radius: 9px; }
.admin-top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.admin-top .brand-links a { font-size: .8rem; padding: 5px 10px; border-radius: 999px; background: var(--bg-2); color: var(--ink-2); margin-right: 4px; }
.admin-content { padding: 24px; flex: 1; }
.admin-toggle { display: none; border: 0; background: none; padding: 6px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 1.45rem; margin: 0; } .page-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.kpi .label { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.kpi .value { font-size: 1.6rem; font-weight: 800; margin: 4px 0 2px; line-height: 1.1; }
.kpi .sub { font-size: .8rem; color: var(--muted); } .kpi .sub.up { color: var(--success); } .kpi .sub.down { color: var(--danger); }
.kpi.warn { border-color: #fde68a; background: #fffbeb; } .kpi.danger { border-color: #fecaca; background: #fef2f2; }
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filter-bar input, .filter-bar select { width: auto; min-width: 140px; padding: 8px 32px 8px 11px; font-size: .88rem; } .filter-bar input { padding-right: 11px; }
.filter-bar .btn { padding: 8px 14px; }
.bulk-bar { display: none; align-items: center; gap: 10px; padding: 10px 14px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; margin-bottom: 12px; font-size: .88rem; }
.bulk-bar.is-visible { display: flex; }
.admin-form { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.admin-form.single { grid-template-columns: 1fr; }
.settings-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; } .settings-nav a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: .84rem; font-weight: 600; color: var(--ink-2); } .settings-nav a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.setting-row { display: grid; grid-template-columns: 300px 1fr; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); } .setting-row:last-child { border-bottom: 0; }
.setting-row .label { font-weight: 600; font-size: .9rem; margin: 0; } .setting-row .desc { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.matrix table td { text-align: center; } .matrix td:first-child, .matrix th:first-child { text-align: left; }
.health-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .9rem; } .health-row .ok, .health-row .bad { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; } .health-row .ok { background: var(--success); } .health-row .bad { background: var(--danger); } .health-row code { margin-left: auto; color: var(--muted); }
.log-box { background: #0f172a; color: #cbd5e1; font-family: ui-monospace, monospace; font-size: .78rem; padding: 14px; border-radius: 10px; max-height: 560px; overflow: auto; white-space: pre-wrap; word-break: break-all; }
.chart-box { position: relative; min-height: 260px; }
.status-pill { padding: 3px 10px; border-radius: 999px; font-size: .74rem; font-weight: 700; display: inline-block; }
.status-active, .status-published, .status-verified, .status-paid, .status-hired, .status-completed, .status-sent, .status-delivered { background: var(--success-100); color: #166534; }
.status-pending_review, .status-pending, .status-under_review, .status-scheduled, .status-trial, .status-awaiting_proof, .status-proof_uploaded, .status-review { background: var(--warning-100); color: #92400e; }
.status-rejected, .status-suspended, .status-failed, .status-cancelled, .status-expired, .status-closed, .status-gone { background: var(--danger-100); color: #991b1b; }
.status-draft, .status-paused, .status-unpublished, .status-archived, .status-inactive, .status-withdrawn { background: var(--bg-2); color: var(--ink-2); }
.status-applied, .status-reviewed, .status-interview, .status-shortlisted, .status-offered, .status-assessment, .status-need_info { background: var(--info-100); color: #075985; }
.mini-list { list-style: none; padding: 0; margin: 0; } .mini-list li { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .88rem; } .mini-list li:last-child { border-bottom: 0; } .mini-list small { color: var(--muted); margin-left: auto; white-space: nowrap; }
.side-card { position: sticky; top: calc(var(--admin-top) + 16px); }
.variant-tabs { display: flex; gap: 6px; margin-bottom: 14px; } .variant-tabs button { padding: 8px 14px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font-weight: 600; font-size: .88rem; display: inline-flex; gap: 8px; align-items: center; } .variant-tabs button.is-active { background: var(--primary); color: #fff; border-color: var(--primary); } .variant-tabs .dot { width: 8px; height: 8px; }
.brand-box { border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; } .brand-box.jobnet { border-color: #bfd7f8; background: #f7faff; } .brand-box.dailyjob { border-color: #bfe8d4; background: #f5fcf8; }
.brand-box h4 { display: flex; align-items: center; gap: 8px; }
.sim-meter { display: flex; align-items: center; gap: 10px; font-size: .85rem; } .sim-meter .bar { flex: 1; height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; } .sim-meter .bar span { display: block; height: 100%; background: var(--success); } .sim-meter.warn .bar span { background: var(--warning); } .sim-meter.block .bar span { background: var(--danger); }
.section-editor { margin-bottom: 14px; } .section-editor .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; } .section-editor .head label { margin: 0; } .section-editor .ai-tools { display: flex; gap: 4px; }
.section-editor .ai-tools button { font-size: .72rem; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); } .section-editor .ai-tools button:hover { border-color: var(--primary); color: var(--primary); }
.json-editor { font-family: ui-monospace, monospace; font-size: .82rem; min-height: 200px; }
.checklist { list-style: none; padding: 0; margin: 0; } .checklist li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .88rem; } .checklist li::before { content: "✓"; color: var(--success); font-weight: 800; } .checklist li.todo::before { content: "○"; color: var(--muted-2); }
@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--admin-side); z-index: 200; transform: translateX(-100%); transition: transform .2s; }
  .admin-side.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .admin-toggle { display: inline-flex; }
  .admin-form { grid-template-columns: 1fr; } .side-card { position: static; }
  .setting-row { grid-template-columns: 1fr; gap: 8px; }
  .admin-top .brand-links { display: none; }
}
@media (max-width: 600px) { .admin-content { padding: 14px; } .admin-top { padding: 0 14px; } .admin-top .search { display: none; } }
