/* Inscripchat admin — Bootstrap 5.3 theme layer. Brand tokens injected by ThemeService. */
:root {
  --ink-soft: #464545; --ink-muted: #707070; --line: #d9dfd6; --steel: #e6ebf1;
  --sidebar-w: 248px; --topbar-h: 60px; --radius-sm: 6px; --radius: 10px;
  --shadow-1: 0 1px 2px rgba(23,32,25,.06), 0 1px 8px rgba(23,32,25,.04);
  --bs-body-font-family: var(--font-body); --bs-body-bg: #f3f5f2; --bs-body-color: var(--ink);
  --bs-link-color: var(--brand); --bs-link-hover-color: var(--brand-dark); --bs-primary: var(--brand); --bs-primary-rgb: var(--brand-rgb); --bs-border-color: var(--line);
  --bs-focus-ring-color: rgba(var(--brand-rgb), .25);
}
body.adm-body { background: var(--bs-body-bg); color: var(--bs-body-color); }
h1, h2, h3, .h1, .h2, .h3, .wordmark { font-family: var(--font-display); }
.wordmark { font-weight: 700; font-size: 1.3rem; color: var(--brand); }
.adm-brand-tag { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); margin-left: .4rem; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 2000; background: var(--brand); color: #fff; padding: .5rem .75rem; border-radius: var(--radius-sm); }
.text-brand { color: var(--brand) !important; }
.btn { border-radius: var(--radius-sm); font-weight: 500; }
.btn-brand { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff; --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-color: #fff; --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand); --bs-btn-disabled-color: #fff; }
.btn-outline-brand { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--brand-dark); --bs-btn-active-color: #fff; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; }
.btn[aria-busy="true"] { pointer-events: none; opacity: .75; }
.form-control, .form-select { border-radius: var(--radius-sm); }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(var(--brand-rgb), .18); }
.form-label { font-weight: 500; font-size: .9rem; }
.tabular { font-variant-numeric: tabular-nums; }

/* shell */
.adm-shell { display: flex; min-height: 100vh; }
.adm-sidebar { width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 1040; }
[data-sidebar="right"] .adm-shell { flex-direction: row-reverse; } [data-sidebar="right"] .adm-sidebar { border-right: 0; border-left: 1px solid var(--line); }
.adm-brand { display: flex; align-items: baseline; padding: 1rem 1.1rem; text-decoration: none; border-bottom: 1px solid var(--line); }
.adm-nav { padding: .75rem .6rem; display: flex; flex-direction: column; gap: 2px; }
.adm-section { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-muted); padding: .9rem .6rem .3rem; font-weight: 600; }
.adm-link { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--ink-soft); text-decoration: none; font-weight: 500; font-size: .93rem; }
.adm-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; color: var(--ink-muted); }
.adm-link:hover { background: #f3f5f2; color: var(--ink); }
.adm-link.active { background: var(--brand-soft); color: var(--brand); } .adm-link.active i { color: var(--brand); }
.adm-sidebar-foot { margin-top: auto; padding: 1rem 1.1rem; border-top: 1px solid var(--line); font-size: .85rem; }
.adm-sidebar-foot a { color: var(--ink-muted); text-decoration: none; } .adm-sidebar-foot a:hover { color: var(--brand); }
.adm-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.adm-topbar { height: var(--topbar-h); display: flex; align-items: center; gap: .75rem; padding: 0 1.25rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.adm-title { font-size: 1.15rem; margin: 0; font-weight: 600; }
.adm-main { padding: 1.25rem; outline: none; }
@media (min-width: 1200px) { .adm-main { padding: 1.5rem 2rem; } }
@media (max-width: 991.98px) {
  .adm-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-1); }
  .adm-sidebar.open { transform: none; }
  [data-sidebar="right"] .adm-sidebar { left: auto; right: 0; transform: translateX(100%); }
}

/* cards, tables, stats */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 1rem; margin: 0; font-weight: 600; font-family: var(--font-body); }
.panel-body { padding: 1rem; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .75rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; }
.stat .k { font-size: .75rem; color: var(--ink-muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.stat .v { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1.1; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.stat .d { font-size: .78rem; color: var(--ink-muted); margin-top: .2rem; }
.stat .d.up { color: #1a7f4f; } .stat .d.down { color: #b3261e; }
.table { --bs-table-bg: transparent; font-size: .92rem; }
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); font-weight: 600; border-bottom-width: 1px; white-space: nowrap; }
.table td { vertical-align: middle; }
.table-wrap { overflow-x: auto; }
.table a.row-link { color: inherit; text-decoration: none; font-weight: 500; } .table a.row-link:hover { color: var(--brand); }
.sort-link { color: inherit; text-decoration: none; } .sort-link.active { color: var(--brand); }
.pill { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.pill-ok { background: #e3f3ea; color: #1a7f4f; } .pill-warn { background: #fbefd4; color: #8a5a00; } .pill-bad { background: #f8e3e1; color: #b3261e; } .pill-muted { background: var(--steel); color: var(--ink-soft); } .pill-brand { background: var(--brand-soft); color: var(--brand); }
.avatar { --avatar-size: 36px; width: var(--avatar-size); height: var(--avatar-size); border-radius: 50%; object-fit: cover; background: var(--steel); }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; width: var(--avatar-size, 36px); height: var(--avatar-size, 36px); border-radius: 50%; font-weight: 600; font-size: calc(var(--avatar-size, 36px) * .38); color: var(--brand); background: var(--brand-soft); }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-bar .form-control, .filter-bar .form-select { width: auto; min-width: 140px; }
.bulk-bar { display: flex; gap: .5rem; align-items: center; padding: .6rem .9rem; background: var(--brand-soft); border-radius: var(--radius-sm); margin-bottom: .75rem; flex-wrap: wrap; }
.empty-state { text-align: center; padding: 2.5rem 1rem; color: var(--ink-muted); }
.empty-state i { font-size: 2rem; color: var(--brand); opacity: .6; display: block; margin-bottom: .5rem; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; font-size: .92rem; } .kv dt { color: var(--ink-muted); font-weight: 500; } .kv dd { margin: 0; }
.chart-box { position: relative; height: 300px; }
.color-field { display: flex; align-items: center; gap: .5rem; } .color-field input[type="color"] { width: 44px; height: 38px; padding: 2px; border-radius: var(--radius-sm); }
.qr-box svg { width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px; background: #fff; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: .4rem; } .recovery-codes code { display: block; padding: .5rem; text-align: center; background: #f3f5f2; border-radius: var(--radius-sm); font-size: 1rem; }
.adm-auth { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.adm-auth-card { width: 100%; max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.preview-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.ql-editor { min-height: 320px; font-family: var(--font-body); font-size: 1rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; }
.diff-json { white-space: pre-wrap; font-size: .8rem; background: #f3f5f2; padding: .5rem; border-radius: var(--radius-sm); max-height: 240px; overflow: auto; }
@media print { .adm-sidebar, .adm-topbar, .btn { display: none !important; } .adm-main { padding: 0; } }
