/* Admin view (admin module): sub-navigation, panels, rows with a switch or an action. */
.admin-view { display: none; flex-direction: column; gap: 10px; width: 100%; padding-bottom: 1rem; }
/* The pills wrap onto a second row when they do not fit (phones); never cut off, never scrolled. */
.admin-subnav { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-subnav-btn {
    flex: none; box-sizing: border-box; height: var(--ctl-h); min-height: 0; padding: 0 12px; border-radius: var(--radius-pill);
    background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
    font: 600 12px/1 'Inter', sans-serif; cursor: pointer; white-space: nowrap;
}
.admin-subnav-btn:hover { border-color: var(--border-hover); color: var(--text-main); }
.admin-subnav-btn[aria-selected="true"] { color: var(--accent); border-color: var(--accent); background: var(--accent-glow); }
.admin-panel { background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.admin-panel[hidden] { display: none; }
.admin-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.admin-panel-head h3 { font-family: 'Outfit', sans-serif; font-size: 17px; font-weight: 800; color: var(--text-main); margin-bottom: 3px; }
.admin-panel-head p { font-size: 12px; color: var(--text-muted); line-height: 1.5; max-width: 70ch; }
.admin-panel-head .table-btn { flex: none; height: var(--ctl-h); }
.admin-rows { display: flex; flex-direction: column; gap: 8px; }
.admin-row {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.admin-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-row-title { font-size: 13px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-row-sub { font-size: 11px; color: var(--text-muted); line-height: 1.45; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.admin-row-actions .table-btn { height: var(--ctl-h); white-space: nowrap; }
.admin-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; padding: 2px 7px; border-radius: var(--radius-pill); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.admin-tag.on { color: var(--success-text); border-color: rgba(16, 185, 129, 0.35); }
.admin-tag.off { color: var(--text-dim); }
/* Switch: a real checkbox styled as a toggle. */
.admin-switch { position: relative; display: inline-flex; width: 40px; height: 22px; flex: none; }
.admin-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.admin-switch span { width: 100%; height: 100%; border-radius: var(--radius-pill); background: var(--surface-3); border: 1px solid var(--border); transition: background 0.15s; pointer-events: none; }
.admin-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-muted); transition: transform 0.15s, background 0.15s; }
.admin-switch input:checked + span { background: rgba(59, 130, 246, 0.35); border-color: var(--accent); }
.admin-switch input:checked + span::after { transform: translateX(18px); background: var(--accent); }
.admin-switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.admin-switch input:disabled { cursor: progress; }
.admin-switch input:disabled + span { opacity: 0.5; }
.admin-checklist { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.admin-check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.admin-check-dot { flex: none; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--text-dim); }
.admin-check.ok .admin-check-dot { background: var(--success); }
.admin-check.bad .admin-check-dot { background: var(--danger); }
.admin-check.warn .admin-check-dot { background: var(--warning); }
.admin-check-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.admin-check-title { font-size: 13px; font-weight: 700; color: var(--text-main); }
.admin-check-detail { font-size: 12px; color: var(--text-muted); line-height: 1.45; overflow-wrap: anywhere; }
.admin-check-next { font-size: 12px; color: var(--text-main); line-height: 1.45; overflow-wrap: anywhere; }
.admin-check-next::before { content: 'Next: '; font-weight: 700; color: var(--text-muted); }
.admin-checklist-summary { font-size: 12px; color: var(--text-muted); padding: 0 2px 2px; }
.admin-primary-btn[aria-disabled="true"] { opacity: 0.55; }
.admin-kv { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; font-size: 12px; }
.admin-kv:empty { display: none; }
.admin-kv dt, .admin-kv .k { color: var(--text-muted); }
.admin-kv dd, .admin-kv .v { color: var(--text-main); overflow-wrap: anywhere; }
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-primary-btn { border-color: var(--accent) !important; color: var(--accent) !important; height: var(--ctl-h); display: inline-flex; align-items: center; text-decoration: none; }
.admin-note { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.admin-note.err { color: var(--danger-text); }
.admin-note:empty { display: none; }
.admin-logo-preview { height: 28px; max-width: 120px; object-fit: contain; border-radius: 4px; background: var(--surface-3); padding: 2px 6px; }
.admin-empty { font-size: 12px; color: var(--text-muted); }
@media (max-width: 600px) {
    .admin-panel { padding: 12px; }
    .admin-panel-head { flex-direction: column; }
    .admin-row { flex-wrap: wrap; }
    .admin-row-actions { width: 100%; justify-content: flex-end; }
    .admin-row.has-switch { flex-wrap: nowrap; }
    .admin-row.has-switch .admin-row-actions { width: auto; }
    .admin-kv { grid-template-columns: 1fr; gap: 0 0; }
    .admin-kv .v { margin-bottom: 6px; }
}
