/* ==========================================================================
   Administration, user profiles, groups and "My account"
   Uses only design tokens from app.css so light and dark mode both work.
   ========================================================================== */

/* ---------- Overview ---------- */
.admin-warnings { display: flex; flex-direction: column; gap: 0; margin-bottom: 8px; }
.admin-warnings .callout { align-items: center; margin-bottom: 10px; }
.admin-warnings .callout > .icon { margin-top: 0; }
.callout-danger > .icon { color: var(--danger); }
.callout-warning > .icon { color: var(--warning); }
.callout-info > .icon { color: var(--primary); }
.callout-success > .icon { color: var(--success); }
.callout > .icon { margin-top: 2px; }

.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.admin-stat { display: flex; gap: 14px; align-items: center; padding: 16px 18px; color: var(--text); transition: border-color .12s, box-shadow .12s, transform .12s; }
.admin-stat:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow); color: var(--text); }
.admin-stat > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.admin-stat .stat-value { font-size: 1.6rem; }
.admin-stat-sub { color: var(--text-faint); font-size: .82rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-stat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
  background: hsl(var(--h) 70% 50% / .13); color: hsl(var(--h) 60% 45%); }
:root[data-theme="dark"] .admin-stat-icon { color: hsl(var(--h) 70% 68%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .admin-stat-icon { color: hsl(var(--h) 70% 68%); } }
.admin-stat-icon .icon { width: 22px; height: 22px; }

.admin-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.admin-tile { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); transition: border-color .12s, background .12s, box-shadow .12s; }
.admin-tile:hover { text-decoration: none; color: var(--text); border-color: color-mix(in srgb, var(--primary) 45%, var(--border)); box-shadow: var(--shadow-sm); background: var(--bg-subtle); }
.admin-tile-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex-shrink: 0; }
.admin-tile-icon .icon { width: 19px; height: 19px; }
.admin-tile-body { display: flex; flex-direction: column; min-width: 0; }
.admin-tile-title { font-weight: 600; }
.admin-tile-desc { color: var(--text-muted); font-size: .9rem; line-height: 1.4; margin-top: 2px; }
.admin-tile-meta { color: var(--text-faint); font-size: .8rem; margin-top: 6px; font-weight: 500; }

/* ---------- Generic admin bits ---------- */
.admin-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.admin-filters .input { width: auto; min-width: 150px; }
.admin-filters .input[type=search] { min-width: 240px; flex: 1 1 240px; max-width: 360px; }
.admin-table td .sub { display: block; color: var(--text-muted); font-size: .86rem; }
.admin-table td.cell-user { min-width: 220px; }
.admin-table .user-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-table .user-cell .avatar { flex-shrink: 0; }
.admin-table .user-cell .name { font-weight: 600; color: var(--text); }
.admin-table tr.is-locked td { opacity: .72; }
.admin-table tr.is-archived td { background: color-mix(in srgb, var(--bg-muted) 55%, transparent); }
.admin-table .row-actions { display: inline-flex; gap: 2px; align-items: center; justify-content: flex-end; }
.admin-table .position-actions { display: inline-flex; gap: 0; }
.admin-table .position-actions .btn { color: var(--text-muted); }
.admin-table td.check, .admin-table th.check { width: 34px; text-align: center; padding-right: 0; }
.admin-table td.check input, .admin-table th.check input { width: 15px; height: 15px; accent-color: var(--primary); }
.yes-icon { color: var(--success); }
.no-icon { color: var(--text-faint); }
.status-pill { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 11px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill.s-1 { background: var(--success-soft); color: var(--success); }
.status-pill.s-2 { background: var(--warning-soft); color: var(--warning); }
.status-pill.s-3 { background: var(--danger-soft); color: var(--danger); }
.status-pill.s-4 { background: var(--primary-soft); color: var(--primary); }
.bulk-bar { display: flex; gap: 10px; align-items: center; padding: 8px 12px; margin-bottom: 10px; border-radius: var(--radius); background: var(--primary-soft); color: var(--text); border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); }
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bg-muted); color: var(--text-muted); font-size: .74rem; font-weight: 700; }
.tabs a.active .tab-count { background: var(--primary-soft); color: var(--primary); }
.form-narrow { max-width: 640px; }
.admin-section-title { font-size: 1.05rem; margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
.admin-section-title:first-child { margin-top: 0; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--border)); border-radius: var(--radius-lg); padding: 16px 18px; background: color-mix(in srgb, var(--danger-soft) 55%, var(--surface)); }
.danger-zone h3 { color: var(--danger); font-size: 1rem; margin-bottom: 6px; }
.inline-fields { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.inline-fields .input { width: auto; }
.input-mono { font-family: var(--mono); }
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--c); vertical-align: -1px; border: 1px solid color-mix(in srgb, var(--c) 70%, #000); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 18px; }
.checkbox-grid .checkbox { margin-right: 0; }
.scroll-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px; background: var(--surface); }
.scroll-list .checkbox { display: flex; margin: 0; }
.scroll-list .depth-1 { padding-left: 18px; } .scroll-list .depth-2 { padding-left: 36px; } .scroll-list .depth-3 { padding-left: 54px; } .scroll-list .depth-4 { padding-left: 72px; }
.kv-table { width: 100%; border-collapse: collapse; }
.kv-table th, .kv-table td { padding: 7px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.kv-table th { width: 38%; color: var(--text-muted); font-weight: 500; }
.kv-table tr:last-child th, .kv-table tr:last-child td { border-bottom: 0; }
.kv-table code { word-break: break-all; }
.ext-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ext-list .badge { font-family: var(--mono); font-weight: 500; }
.hint-inline { color: var(--text-faint); font-size: .85rem; }

/* ---------- Edit pages with side tabs ---------- */
.admin-edit-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-edit-header h1 { margin: 0; font-size: 1.5rem; }
.admin-edit-header .meta { color: var(--text-muted); font-size: .9rem; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-edit-header .page-actions { margin-left: auto; }

/* ---------- Permissions ---------- */
.perm-module { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: 12px; }
.perm-module-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.perm-module-header h3 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 8px; }
.perm-module-body { padding: 8px 14px 10px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 18px; }
.perm-module-body .checkbox { margin-right: 0; }
.perm-module.is-disabled .perm-module-body { opacity: .55; }
.perm-report-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.perm-report { border-collapse: separate; border-spacing: 0; font-size: .92rem; min-width: 100%; }
.perm-report th, .perm-report td { padding: 5px 10px; border-bottom: 1px solid var(--border); background: var(--surface); }
.perm-report thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-subtle); font-weight: 600; text-align: center; vertical-align: bottom; font-size: .85rem; color: var(--text-muted); min-width: 92px; }
.perm-report thead th:first-child { left: 0; z-index: 3; text-align: left; }
.perm-report tbody th { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 400; white-space: nowrap; }
.perm-report td { text-align: center; }
.perm-report td input { width: 15px; height: 15px; accent-color: var(--primary); }
.perm-report tr.module-row th, .perm-report tr.module-row td { background: var(--bg-muted); font-weight: 600; }
.perm-report tbody tr:hover th, .perm-report tbody tr:hover td { background: var(--bg-hover); }
.perm-report .row-toggle, .perm-report .col-toggle { border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 0 2px; font-size: .78rem; }
.perm-report .row-toggle:hover, .perm-report .col-toggle:hover { color: var(--primary); }

/* ---------- Workflows ---------- */
.wf-select { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-subtle); }
.wf-select label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: .9rem; }
.wf-select .input { min-width: 200px; }
.wf-matrix-wrap { width: fit-content; max-width: 100%; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); max-height: calc(100vh - 260px); }
.wf-matrix { border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.wf-matrix th, .wf-matrix td { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 4px 8px; background: var(--surface); }
.wf-matrix thead th { position: sticky; top: 0; z-index: 2; background: var(--bg-subtle); vertical-align: bottom; font-weight: 600; font-size: .84rem; }
.wf-matrix thead tr:first-child th { top: 0; }
.wf-matrix thead tr:nth-child(2) th { top: 33px; }
.wf-matrix tbody th { position: sticky; left: 0; z-index: 1; text-align: left; font-weight: 500; white-space: nowrap; background: var(--bg-subtle); }
.wf-matrix thead th.corner { left: 0; z-index: 3; text-align: left; }
.wf-matrix .status-head { writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; padding: 8px 2px; min-height: 100px; text-align: left; }
.wf-matrix td { text-align: center; min-width: 34px; }
.wf-matrix td.same { background: repeating-linear-gradient(45deg, var(--bg-subtle), var(--bg-subtle) 4px, var(--bg-muted) 4px, var(--bg-muted) 8px); }
.wf-matrix td input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.wf-matrix tbody tr:hover th, .wf-matrix tbody tr:hover td:not(.same) { background: var(--bg-hover); }
.wf-matrix td.col-hover:not(.same) { background: var(--bg-hover); }
.wf-toggle { border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 0 3px; line-height: 1; }
.wf-toggle:hover { color: var(--primary); }
.wf-toggle .icon { width: 14px; height: 14px; }
.wf-summary td.num a { font-variant-numeric: tabular-nums; }
.wf-summary td.empty-cell { color: var(--text-faint); }

/* ---------- Types / statuses / enumerations ---------- */
.type-color-cell { display: flex; align-items: center; gap: 8px; }
.color-presets { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.color-presets button { width: 20px; height: 20px; border-radius: 5px; border: 1px solid rgba(0,0,0,.12); background: var(--c); cursor: pointer; padding: 0; }
.color-presets button:hover { transform: scale(1.12); }
.color-presets button.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.color-preview { display: inline-flex; gap: 10px; align-items: center; margin-left: 6px; }

/* ---------- Custom fields ---------- */
.possible-values { display: flex; flex-direction: column; gap: 6px; }
.pv-row { display: flex; gap: 6px; align-items: center; }
.pv-row .drag { cursor: grab; color: var(--text-faint); display: inline-grid; place-items: center; width: 22px; }
.pv-row.dragging { opacity: .5; }
.pv-row .input { flex: 1; }

/* ---------- Working days ---------- */
.weekday-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.weekday-picker label { display: inline-flex; align-items: center; justify-content: center; min-width: 108px; height: 40px; padding: 0 14px; border: 1px solid var(--border-strong);
  border-radius: var(--radius); cursor: pointer; background: var(--surface); font-weight: 500; user-select: none; gap: 8px; }
.weekday-picker input { width: 15px; height: 15px; accent-color: var(--primary); }
.weekday-picker label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.year-nav { display: inline-flex; align-items: center; gap: 4px; }
.year-nav strong { min-width: 60px; text-align: center; font-size: 1.1rem; }
.holiday-weekday { color: var(--text-muted); }

/* ---------- Projects admin ---------- */
.project-name-cell { display: flex; align-items: center; gap: 8px; }
.project-name-cell .indent { display: inline-block; flex-shrink: 0; }
.project-avatar { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; background: hsl(var(--h, 210) 55% 45%); color: #fff; font-weight: 700; font-size: 11px; flex-shrink: 0; }
.tree-line { color: var(--text-faint); font-family: var(--mono); }

/* ---------- User profile ---------- */
.profile-header { display: flex; gap: 20px; align-items: center; padding: 22px 24px; margin-bottom: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 9%, var(--surface)), var(--surface) 60%); flex-wrap: wrap; }
.profile-header .avatar-xl { box-shadow: 0 0 0 4px var(--surface), var(--shadow); }
.profile-header h1 { margin: 0 0 2px; font-size: 1.6rem; }
.profile-header .meta { color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.profile-header .meta span { display: inline-flex; gap: 5px; align-items: center; }
.profile-header .page-actions { margin-left: auto; }
.profile-projects { list-style: none; margin: 0; padding: 0; }
.profile-projects li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.profile-projects li:last-child { border-bottom: 0; }
.profile-projects .roles { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.member-chip { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.member-chip .user-link { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-chip form { margin-left: auto; }
a.member-chip { color: var(--text); }
a.member-chip:hover { text-decoration: none; border-color: var(--border-strong); background: var(--bg-hover); }
.profile-ident { min-width: 0; }
.profile-header h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.profile-header h1 .badge, .profile-header h1 .status-pill { font-size: .78rem; }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.profile-layout > .stack { min-width: 0; }
.profile-groups { display: grid; grid-template-columns: 1fr; gap: 6px; }
.profile-project-name { display: flex; flex-direction: column; min-width: 0; }
.profile-project-name .sub { color: var(--text-faint); font-size: .82rem; }
.profile-project-name .badge { align-self: flex-start; }
.profile-wp-table td:first-child a { font-weight: 500; }
.profile-wp-table td.text-danger, .text-danger { color: var(--danger); }
.profile-activity { margin: 0; padding: 0; }
.profile-activity .activity-item { padding-left: 16px; padding-right: 16px; }
.card-header .counter + a.small { margin-left: auto; }

/* ---------- My account ---------- */
.account-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.account-nav { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 2px; }
.account-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius); color: var(--text); }
.account-nav a:hover { background: var(--bg-hover); text-decoration: none; }
.account-nav a.active { background: var(--bg-active); color: var(--primary); font-weight: 600; }
.account-nav .account-nav-user { display: flex; align-items: center; gap: 10px; padding: 4px 12px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.account-nav .account-nav-user strong { display: block; line-height: 1.2; }
.account-nav a.account-nav-user { border-radius: var(--radius) var(--radius) 0 0; padding-top: 8px; }
.account-nav .account-nav-user > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; }
.account-nav a.danger { color: var(--danger); }
.account-nav a.danger.active { background: var(--danger-soft); color: var(--danger); }
.account-nav .icon { flex-shrink: 0; }
.account-main { min-width: 0; }
.account-main > .page-header { margin-bottom: 18px; }
.twofa-status { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.twofa-status .grow { flex: 1 1 320px; min-width: 0; }
.twofa-status-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-muted); color: var(--text-muted); flex-shrink: 0; }
.twofa-status-icon.is-on { background: var(--success-soft); color: var(--success); }
.twofa-status-icon .icon { width: 22px; height: 22px; }
.twofa-code { width: 140px; font-family: var(--mono); font-size: 1.15rem; letter-spacing: 3px; text-align: center; }
.counter.counter-warn { background: var(--warning-soft); color: var(--warning); }
.qr-box:empty::after { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #d0d7e0; border-top-color: #1a67a3; animation: qr-spin .8s linear infinite; }
@keyframes qr-spin { to { transform: rotate(360deg); } }
.pw-meter { height: 5px; border-radius: 3px; background: var(--bg-muted); margin-top: 6px; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .2s, background .2s; }
.pw-meter[data-score="1"] span { width: 25%; background: var(--danger); }
.pw-meter[data-score="2"] span { width: 50%; background: var(--warning); }
.pw-meter[data-score="3"] span { width: 75%; background: color-mix(in srgb, var(--success) 70%, var(--warning)); }
.pw-meter[data-score="4"] span { width: 100%; background: var(--success); }
.is-dimmed { opacity: .5; }
.api-usage summary { cursor: pointer; color: var(--primary); font-weight: 500; }
.api-usage .code-sample code { background: none; padding: 0; font-size: inherit; }
@media print {
  body:has(.backup-codes-card) .app-header, body:has(.backup-codes-card) .app-sidebar, body:has(.backup-codes-card) .account-nav,
  body:has(.backup-codes-card) .account-main > :not(.backup-codes-card), body:has(.backup-codes-card) .backup-codes-card .row,
  body:has(.backup-codes-card) .breadcrumbs, body:has(.backup-codes-card) .flashes { display: none !important; }
}
.theme-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 150px)); gap: 10px; }
.theme-choice { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); cursor: pointer; background: var(--surface); }
.theme-choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent); }
.theme-choice input { position: absolute; opacity: 0; }
.theme-choice:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.theme-choice .preview { height: 56px; border-radius: 6px; display: grid; grid-template-columns: 28% 1fr; overflow: hidden; border: 1px solid rgba(127,127,127,.25); --pl: #d5dce5; --pa: #1a67a3; }
.theme-choice .preview i { display: block; }
.theme-choice .preview b { display: block; margin: 9px 9px 0;
  background: linear-gradient(var(--pa) 0 0) 0 0 / 55% 6px no-repeat, linear-gradient(var(--pl) 0 0) 0 13px / 92% 4px no-repeat,
    linear-gradient(var(--pl) 0 0) 0 22px / 74% 4px no-repeat, linear-gradient(var(--pl) 0 0) 0 31px / 84% 4px no-repeat; }
.theme-choice .preview.light { background: #fff; } .theme-choice .preview.light i { background: #f1f4f8; }
.theme-choice .preview.dark { background: #131c27; --pl: #2c3a4b; --pa: #4d9be6; } .theme-choice .preview.dark i { background: #0f1720; }
.theme-choice .preview.auto { background: linear-gradient(120deg, #fff 0 50%, #131c27 50% 100%); --pl: #8b97a7; --pa: #3f86c9; }
.theme-choice .preview.auto i { background: linear-gradient(120deg, #f1f4f8 0 62%, #0f1720 62% 100%); }
.theme-choice span { font-weight: 500; text-align: center; font-size: .92rem; }

.twofa-setup { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.qr-box { width: 220px; height: 220px; padding: 10px; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); display: grid; place-items: center; }
.qr-box svg, .qr-box canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.secret-key { font-family: var(--mono); font-size: 1.02rem; letter-spacing: 1px; padding: 8px 12px; background: var(--bg-subtle); border: 1px dashed var(--border-strong); border-radius: var(--radius); word-break: break-all; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; padding: 14px 18px; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--bg-subtle); font-family: var(--mono); font-size: 1.05rem; max-width: 420px; }
.backup-codes span::before { content: "□ "; color: var(--text-faint); }
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 40px; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .88rem; }
.token-box { display: flex; gap: 8px; align-items: center; }
.token-box code { flex: 1; min-width: 0; padding: 8px 12px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); word-break: break-all; font-size: .95rem; }
.code-sample { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; font-size: .88rem; margin: 6px 0 0; white-space: pre-wrap; word-break: break-all; }

/* Notification settings */
.notif-table { width: 100%; border-collapse: collapse; }
.notif-table th, .notif-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.notif-table thead th { font-size: .82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .3px; background: var(--bg-subtle); font-weight: 600; }
.notif-table td.c, .notif-table th.c { text-align: center; width: 120px; }
.notif-table input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
.notif-table select.input { min-width: 150px; }
.notif-table tr.group-head td { background: var(--bg-muted); font-weight: 600; }
.notif-table .desc { display: block; color: var(--text-muted); font-size: .86rem; }
.notif-project-head { display: flex; gap: 4px; align-items: center; justify-content: center; max-width: 170px; margin: 0 auto; text-transform: none; letter-spacing: 0; }
.notif-table thead th .desc { text-transform: none; letter-spacing: 0; font-weight: 400; }
.notif-table thead th.is-focus { background: var(--primary-soft); color: var(--primary); }
.notif-table td:first-child { min-width: 220px; }
.notif-table td.c select.input { min-width: 0; width: 160px; }
.notif-table .desc-inline { color: var(--text-muted); font-weight: 400; font-size: .86rem; margin-left: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .account-layout { grid-template-columns: 1fr; gap: 14px; }
  .account-nav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
  .account-nav .account-nav-user { display: none; }
  .account-nav a { white-space: nowrap; padding: 6px 10px; }
  .twofa-setup { grid-template-columns: 1fr; }
  .profile-header .page-actions { margin-left: 0; }
  .profile-layout { grid-template-columns: 1fr; }
  .admin-filters .input, .admin-filters .input[type=search] { min-width: 0; flex: 1 1 140px; max-width: none; }
  .theme-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .admin-stats { grid-template-columns: 1fr; }
  .admin-tiles { grid-template-columns: 1fr; }
  .backup-codes { grid-template-columns: 1fr; }
  .admin-table .hide-sm, .profile-wp-table .hide-sm { display: none; }
  .profile-header { padding: 16px; gap: 14px; }
  .notif-table td.c, .notif-table th.c { width: auto; padding-left: 6px; padding-right: 6px; }
  .notif-table td:first-child { min-width: 150px; }
  .notif-table .desc-inline { display: none; }
  .notif-table td.c select.input { width: 128px; }
  .admin-edit-header .page-actions { margin-left: 0; width: 100%; }
}
