/* =========================================
   ADMIN DASHBOARD 3.0 - CYBERPUNK / NEON
   ========================================= */

:root {
    /* --- COLOR PALETTE (CYBERPUNK) --- */
    --adm-bg: #0a0a0b;
    --adm-panel: rgba(20, 20, 20, 0.8);
    --adm-border: #333;
    --adm-hover: rgba(0, 255, 157, 0.1);
    --adm-text-main: #e0e0e0;
    --adm-text-muted: #888;

    /* --- ACCENTS --- */
    --adm-primary: #00ff9d;
    /* Neon Green */
    --adm-primary-dim: rgba(0, 255, 157, 0.1);
    --adm-accent: #00ff9d;
    /* Matches primary — no cyan */
    --adm-success: #00ff9d;
    --adm-warning: #facc15;
    --adm-danger: #ff4757;

    /* --- LAYOUT --- */
    --sidebar-w: 260px;
    --header-h: 70px;
    --global-header-h: 64px;
    --radius:var(--modern-rounded-sm);
    --font-ui: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --glow: 0 0 10px rgba(0, 255, 157, 0.3);
}

/* --- BASE --- */
main.admin-root {
    background: transparent;
    color: var(--adm-text-main);
    font-family: var(--font-ui);
    min-height: calc(100vh - var(--global-header-h)) !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    position: relative !important;
    flex: 1 !important;
    border: 0;
    border-radius: 0;
    overflow: visible !important;
}

/* base.html always renders #site-footer-wrapper after content. On the admin dashboard the footer
   block is empty, but the wrapper + ::before (style.css) still sat in the flex row as a ~fourth
   column and stole width from .adm-main — visible as a brief “full” layout then a squeeze. */
main.admin-root #site-footer-wrapper {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    order: 10;
    box-sizing: border-box;
}

/* --- SIDEBAR --- */
.adm-sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: rgba(10, 10, 11, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    position: relative;
    left: 0;
    top: auto;
    height: auto;
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: var(--modern-rounded-lg);
    overflow: hidden;
}

.adm-sidebar.open {
    z-index: 10000;
}

.adm-brand {
    height: var(--header-h);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--adm-primary);
    border-bottom: 1px solid var(--adm-border);
    letter-spacing: 2px;
    font-family: var(--font-mono);
    text-shadow: var(--glow);
}

.adm-brand i {
    margin-right: 0.75rem;
}

.adm-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    overflow-y: auto;
}

.adm-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--adm-text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.15s ease;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    width: 100%;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.adm-nav-item:hover {
    background: var(--adm-hover);
    color: var(--adm-primary);
    border-color: var(--adm-primary-dim);
    text-shadow: var(--glow);
}

.adm-nav-item:active,
.adm-nav-item.press-feedback {
    transform:var(--ulp-press-transform, scale(0.982));
    background: var(--adm-hover);
    color: var(--adm-primary);
    border-color: var(--adm-primary-dim);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.adm-nav-item.active {
    background: var(--adm-primary-dim);
    color: var(--adm-primary);
    border-color: var(--adm-primary);
    font-weight: 600;
    box-shadow: inset 0 0 10px rgba(0, 255, 157, 0.1);
}

.adm-nav-item.search-match:not(.active) {
    border-color: rgba(0, 255, 157, 0.45);
    color: var(--adm-accent);
    box-shadow: inset 0 0 8px rgba(0, 255, 157, 0.12);
}

.adm-nav-item i {
    width: 24px;
    margin-right: 0.75rem;
    font-size: 1rem;
}

.adm-nav-footer {
    padding: 1rem;
    border-top: 1px solid var(--adm-border);
}

/* Sidebar dimmer: out of document flow so it does not steal flex space from .adm-main */
.adm-overlay {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
}

.adm-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* --- MAIN CONTENT WRAPPER --- */
.adm-main {
    flex: 1 1 0;
    margin-left: 0.5rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* With flex-grow, width:0 lets this column absorb remaining row space (sidebar + main under main.container). */
    width: 0;
    max-width: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--modern-rounded-lg);
    overflow: hidden;
}

/* --- HEADER --- */
.adm-header {
    height: var(--header-h);
    border-bottom: 1px solid var(--adm-border);
    background: rgba(10, 10, 11, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: relative;
    top: auto;
    z-index: 1;
    border-radius: var(--modern-rounded-lg) var(--modern-rounded-lg) 0 0;
}

.adm-mobile-nav {
    display: none;
}

.adm-search {
    position: relative;
    width: 320px;
}

.adm-search input {
    width: 100%;
    background: rgba(30, 30, 30, 0.5);
    border: 1px solid var(--adm-border);
    color: #fff;
    font-size: 0.9rem;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-family: var(--font-ui);
}

.adm-search input:focus {
    outline: none;
    border-color: var(--adm-primary);
    box-shadow: var(--glow);
}

.adm-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--adm-text-muted);
}

.adm-search-results {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    max-height: min(70vh, 560px);
    overflow: auto;
    background: rgba(10, 10, 11, 0.98);
    border: 1px solid var(--adm-border);
    border-radius: var(--modern-rounded-sm);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
    z-index: 1200;
    padding: 0.5rem;
}

.adm-search-results.hidden {
    display: none;
}

.adm-search-category {
    margin-bottom: 0.5rem;
}

.adm-search-category-title {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--adm-accent);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.45rem;
}

.adm-search-item {
    width: 100%;
    text-align: left;
    border: 1px solid transparent;
    background: transparent;
    color: var(--adm-text-main);
    border-radius: var(--radius);
    padding: 0.45rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.adm-search-item:hover {
    border-color: rgba(0, 255, 157, 0.25);
    background: rgba(0, 255, 157, 0.08);
}

.adm-search-item-label {
    font-size: 0.8rem;
    color: #fff;
}

.adm-search-item-meta {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    color: var(--adm-text-muted);
    white-space: nowrap;
}

/* --- CONTENT AREA --- */
.adm-content {
    padding: 1.5rem;
    max-width: 100%;
    width: 100%;
    margin: 0;
}

/* --- COMPONENTS: CARDS --- */
.adm-card {
    background: var(--adm-panel);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* List tabs (Files, Resources, Users, Orders, Online): no nested panel frame — table uses full width */
#tab-approved > .adm-card,
#tab-resources > .adm-card,
#tab-users > .adm-card,
#tab-orders > .adm-card,
#tab-online > .adm-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 1rem;
}

#tab-approved .adm-table-wrapper--mgmt,
#tab-resources .adm-table-wrapper--mgmt,
#tab-users .adm-table-wrapper--mgmt,
#tab-orders .adm-table-wrapper--mgmt,
#tab-online .adm-table-wrapper--mgmt {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0.75rem;
}

#tab-approved .adm-table--files {
    table-layout: auto;
    width: 100%;
}

#tab-approved .adm-table--files .adm-td-file,
#tab-resources .adm-td-file {
    max-width: none;
    width: auto;
}

.adm-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.adm-stat {
    background: var(--adm-panel);
    border: 1px solid var(--adm-border);
    padding: 1.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 0.2s;
}

.adm-stat:hover {
    border-color: var(--adm-primary-dim);
}

.adm-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--modern-rounded-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.adm-stat-info {
    display: flex;
    flex-direction: column;
}

.adm-stat-label {
    font-size: 0.8rem;
    color: var(--adm-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.adm-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    font-family: var(--font-mono);
}

/* --- COMPONENTS: TABLES --- */
.adm-panel-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.55rem 1rem;
    margin-bottom: 0.75rem;
}

.adm-panel-head__title {
    margin: 0;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.adm-panel-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.adm-btn--compact {
    padding: 0.38rem 0.75rem;
    font-size: 0.72rem;
    min-height: 30px;
}

.adm-table-wrapper {
    background: var(--adm-panel);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-gutter: stable;
    padding: 6px 0;
}

.adm-table-wrapper--mgmt {
    margin-bottom: 1rem;
}

.adm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.adm-table th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--adm-primary);
    font-weight: 600;
    padding: 1rem;
    border-bottom: 1px solid var(--adm-border);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.adm-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--adm-border);
    color: var(--adm-text-main);
}

/* Unified compact management tables (Users, Files, Resources, Orders, Moderation, VIP, Online). */
.adm-table--mgmt {
    font-size: 0.8rem;
}

.adm-table--mgmt th {
    padding: 0.3rem 0.28rem;
    font-size: 0.62rem;
    letter-spacing: 0.07em;
    white-space: nowrap;
}

.adm-table--mgmt td {
    padding: 0.28rem 0.28rem;
    vertical-align: middle;
    line-height: 1.3;
}

.adm-table--mgmt tbody tr:hover td {
    background: rgba(0, 255, 157, 0.035);
}

.adm-table--mgmt .adm-td-control {
    white-space: nowrap;
    width: 1%;
    text-align: right;
    vertical-align: middle;
}

.adm-table--mgmt .adm-control-cell {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    vertical-align: middle;
}

.adm-table--mgmt .adm-btn-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    flex-shrink: 0;
    font-size: 0.72rem;
}

/* Member / author column: fixed row slot — no z-index on <td>:hover (that caused fast-mouseout row jitter). */
.adm-user-chip-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    max-width: 100%;
    min-height: 24px;
}

.adm-table td.adm-col-member,
.adm-table td.adm-td-author,
.adm-table td:has(.adm-user-chip-wrap),
.adm-table .adm-online-td-identity {
    vertical-align: middle;
    box-sizing: border-box;
    overflow: visible;
}

main.admin-root .adm-table a.username-tag,
main.admin-root .adm-online-identity a.username-tag {
    align-self: center;
    max-width: 100%;
}

/* Same transitions as the public site; stacking only on the avatar slot, never the whole <td>. */
main.admin-root .adm-table .username-tag,
main.admin-root .adm-online-identity .username-tag {
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}

main.admin-root .adm-table .username-tag .user-avatar-slot .user-avatar-circle,
main.admin-root .adm-online-identity .username-tag .user-avatar-slot .user-avatar-circle {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

main.admin-root .adm-table .username-tag .group-badge-pile .group-badge,
main.admin-root .adm-online-identity .username-tag .group-badge-pile .group-badge {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
}

main.admin-root .adm-table .username-tag:hover .user-avatar-slot,
main.admin-root .adm-online-identity .username-tag:hover .user-avatar-slot {
    z-index: 10 !important;
}

/* Nickname chips in admin use global style.css hover (avatar scale 1.5, badge scale 1.28). */
main.admin-root .adm-table .username-tag .group-badge-pile .group-badge:hover,
main.admin-root .adm-online-identity .username-tag .group-badge-pile .group-badge:hover {
    transform: scale(1.28);
}

.adm-table tr:last-child td {
    border-bottom: none;
}

.adm-table:not(.adm-table--mgmt) tr:hover td {
    background: rgba(0, 255, 157, 0.02);
}

.adm-table tr.adm-row-focus td {
    background: rgba(0, 255, 157, 0.1) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 255, 157, 0.22);
}

.adm-table a:not(.username-tag) {
    color: var(--adm-accent);
    text-decoration: none;
    transition: 0.2s;
}

.adm-table a:not(.username-tag):hover {
    color: var(--adm-primary);
    text-shadow: var(--glow);
}

/* --- COMPONENTS: BUTTONS --- */
.adm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-mono);
}

.adm-btn-primary {
    background: var(--adm-primary);
    color: #000;
    border-color: var(--adm-primary);
}

.adm-btn-primary:hover {
    background: #00e68e;
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.4);
}

.adm-btn-outline {
    background: transparent;
    border: 1px solid var(--adm-border);
    color: var(--adm-text-main);
}

.adm-btn-outline:hover {
    border-color: var(--adm-primary);
    color: var(--adm-primary);
}

.adm-btn-danger {
    background: rgba(255, 71, 87, 0.1);
    color: var(--adm-danger);
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.adm-btn-danger:hover {
    background: var(--adm-danger);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.3);
}

.adm-btn:active,
.adm-btn.press-feedback,
.adm-btn-icon:active,
.adm-btn-icon.press-feedback {
    transform: var(--ulp-press-transform, scale(0.982));
}

.adm-btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--adm-text-muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--adm-border);
    cursor: pointer;
    transition: 0.2s;
}

.adm-btn-icon:hover {
    color: var(--adm-primary);
    border-color: var(--adm-primary);
    background: var(--adm-primary-dim);
}

.adm-input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius);
    color: #fff;
    font-family: var(--font-mono);
    box-sizing: border-box;
}

.adm-input:focus {
    outline: none;
    border-color: var(--adm-primary);
    box-shadow: 0 0 0 2px rgba(0, 255, 157, 0.12);
}

.broadcast-icon-picker-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.broadcast-icon-preview {
    width: 40px;
    height: 40px;
    border-radius: var(--modern-rounded-sm);
    border: 1px solid var(--adm-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--adm-primary);
    background: rgba(0, 0, 0, 0.25);
    flex: 0 0 40px;
}

.broadcast-chip-card {
    border: 1px solid var(--adm-border);
    border-radius: var(--modern-rounded-sm);
    background: rgba(0, 0, 0, 0.18);
    padding: 0.6rem;
    min-height: 0;
}

.broadcast-chip-title {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--adm-text-muted);
    margin-bottom: 0.55rem;
    font-family: var(--font-mono);
}

.broadcast-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    max-height: 140px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.broadcast-chip-item {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    border: 1px solid var(--adm-border);
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    background: rgba(255, 255, 255, 0.02);
    color: var(--adm-text-main);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.broadcast-chip-item:hover {
    border-color: rgba(0, 255, 157, 0.45);
    background: rgba(0, 255, 157, 0.08);
}

.broadcast-chip-item input[type="checkbox"] {
    accent-color: #00ff9d;
}

/* Broadcast builder — compact layout */
.broadcast-builder {
    margin-bottom: 0.75rem;
}

.broadcast-builder__head {
    margin-bottom: 0.6rem;
}

.broadcast-builder__title {
    color: var(--adm-primary);
    margin: 0 0 0.35rem;
}

.broadcast-builder__lead {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--adm-text-muted);
    max-width: 52rem;
}

.broadcast-builder__top {
    display: grid;
    grid-template-columns: 1fr 1fr minmax(11rem, 15rem);
    gap: 0.45rem 0.65rem;
    align-items: end;
    margin-bottom: 0.5rem;
}

.broadcast-builder__field--full {
    margin-bottom: 0.5rem;
}

.broadcast-builder__lbl {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--adm-text-muted);
    margin-bottom: 0.26rem;
    font-family: var(--font-mono);
}

.broadcast-builder__muted {
    opacity: 0.65;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.broadcast-icon-preview--sm {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: var(--radius);
}

.broadcast-icon-picker-wrap--compact .adm-input {
    min-width: 0;
}

.broadcast-builder__fieldset {
    border: 1px solid var(--adm-border);
    border-radius: var(--modern-rounded-sm);
    padding: 0.42rem 0.6rem 0.52rem;
    margin: 0 0 0.5rem;
}

.broadcast-builder__legend {
    padding: 0 0.35rem;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--adm-primary);
    font-family: var(--font-mono);
}

.broadcast-builder__toggles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.25rem, 1fr));
    gap: 0.32rem 0.45rem;
}

.broadcast-toggle {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    font-size: 0.78rem;
    color: var(--adm-text-main);
    cursor: pointer;
    margin: 0;
}

.broadcast-toggle input[type='checkbox'] {
    accent-color: #00ff9d;
    flex-shrink: 0;
}

.broadcast-builder__channel-hint {
    margin: 0 0 0.55rem;
    font-size: 0.74rem;
    line-height: 1.45;
    color: var(--adm-text-muted);
}

.broadcast-builder__legend-note {
    font-size: 0.62rem;
    text-transform: none;
    letter-spacing: 0;
    color: var(--adm-text-muted);
    font-family: var(--font-ui);
    font-weight: 400;
}

.broadcast-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 0.55rem;
}

.broadcast-channel {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin: 0;
    padding: 0.55rem 0.6rem;
    border: 1px solid var(--adm-border);
    border-radius: var(--modern-rounded-sm);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.broadcast-channel:hover {
    border-color: rgba(0, 255, 157, 0.35);
    background: rgba(0, 255, 157, 0.04);
}

.broadcast-channel input[type='checkbox'] {
    margin-top: 0.15rem;
    accent-color: #00ff9d;
    flex-shrink: 0;
}

.broadcast-channel__body {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.broadcast-channel__title {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--adm-text-main);
}

.broadcast-channel__title i {
    color: var(--adm-primary);
    width: 1rem;
    text-align: center;
}

.broadcast-channel__desc {
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--adm-text-muted);
}

.broadcast-channel__sub {
    margin: 0.35rem 0 0.15rem 1.65rem;
    font-size: 0.72rem;
    color: var(--adm-text-main);
}

.broadcast-channel__sub-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    margin: 0;
}

.broadcast-builder__toggles--audience {
    margin-bottom: 0.45rem;
}

.broadcast-builder__fieldset--muted {
    opacity: 0.55;
}

.broadcast-builder__fieldset--muted .broadcast-builder__advanced {
    pointer-events: none;
}

.broadcast-builder__lead code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    color: var(--adm-primary);
}

.broadcast-builder__delivery-note {
    margin: 0.4rem 0 0;
    padding: 0.4rem 0.45rem;
    border-radius: var(--modern-rounded-sm);
    border: 1px dashed rgba(0, 255, 157, 0.28);
    background: rgba(0, 255, 157, 0.05);
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--adm-text-muted);
}

.broadcast-builder__delivery-note em {
    color: var(--adm-primary);
    font-style: normal;
    font-weight: 600;
}

.adm-btn-broadcast-sticky-on {
    border-color: rgba(0, 255, 157, 0.55) !important;
    color: var(--adm-primary, #00ff9d) !important;
    background: rgba(0, 255, 157, 0.08) !important;
}

.adm-btn-broadcast-editing {
    border-color: rgba(255, 193, 7, 0.55) !important;
    color: #ffc107 !important;
    background: rgba(255, 193, 7, 0.08) !important;
}

.broadcast-toggle--hint,
.broadcast-chip-item--hint,
.broadcast-builder__lbl--hint {
    cursor: help;
}

.broadcast-builder__advanced {
    margin-bottom: 0.5rem;
}

.broadcast-builder__summary {
    cursor: pointer;
    list-style: none;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--adm-border);
    border-radius: var(--modern-rounded-sm);
    font-size: 0.8rem;
    color: var(--adm-text-main);
    background: rgba(0, 0, 0, 0.22);
}

.broadcast-builder__summary::-webkit-details-marker {
    display: none;
}

.broadcast-builder__sumhint {
    display: block;
    margin-top: 0.22rem;
    font-size: 0.68rem;
    color: var(--adm-text-muted);
    font-weight: 400;
}

@media (min-width: 520px) {
    .broadcast-builder__sumhint {
        display: inline;
        margin-top: 0;
        margin-left: 0.35rem;
    }
}

.broadcast-builder__advanced-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.45rem;
    padding: 0.5rem 0.55rem 0.55rem;
    border: 1px solid var(--adm-border);
    border-radius: 0 0 var(--modern-rounded-sm) var(--modern-rounded-sm);
    border-top: none;
    background: rgba(0, 0, 0, 0.14);
}

.broadcast-builder__advanced[open] > .broadcast-builder__summary {
    border-radius: var(--modern-rounded-sm) var(--modern-rounded-sm) 0 0;
    border-bottom: none;
}

.broadcast-builder__named {
    grid-column: 1 / -1;
}

.broadcast-builder__trust {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.broadcast-builder__field--flush .broadcast-builder__lbl {
    margin-bottom: 0.22rem;
}

.broadcast-chip-card--compact {
    min-height: 0;
    padding: 0.42rem 0.48rem;
}

.broadcast-chip-list--compact {
    max-height: 92px;
}

.broadcast-builder__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.broadcast-toggle--enabled {
    flex: 1 1 100%;
    margin-bottom: 0.15rem;
}

.broadcast-library__title {
    color: #fff;
    margin: 0 0 0.55rem;
}

@media (max-width: 1100px) {
    .broadcast-builder__top {
        grid-template-columns: 1fr 1fr;
    }

    .broadcast-builder__field--icon {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .broadcast-builder__advanced-body {
        grid-template-columns: 1fr;
    }

    .broadcast-builder__trust {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .broadcast-builder__top {
        grid-template-columns: 1fr;
    }
}

/* --- BADGES --- */
.adm-badge {
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid transparent;
}

.adm-scheduled-when {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    line-height: 1.3;
    font-family: var(--font-mono, monospace);
}

.adm-scheduled-count {
    color: #7ee8ff;
    font-weight: 600;
}

.adm-file-payload-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

/* Role text + Font Awesome (Users table ME chip, VIP subscribers, broadcast targets) */
.role-label-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    flex-wrap: nowrap;
}

.adm-badge.role-label-inline {
    gap: 0.35rem;
}

.role-label-icon {
    font-size: 0.65rem;
    line-height: 1;
    flex-shrink: 0;
    opacity: 0.95;
}

.role-label-text {
    line-height: 1;
}

.role-label-inline:has(.icon-gem-gradient) .role-label-text {
    color: var(--vip-caption-color, #fff1c9);
    text-shadow: 0 0 10px rgba(245, 197, 66, 0.28), 0 0 16px rgba(252, 211, 77, 0.14);
}

/* Override adm-badge-blue mint on VIP subscribers table (Role column) */
.adm-badge.role-label-inline:has(.icon-gem-gradient) {
    background: linear-gradient(135deg, rgba(255, 236, 180, 0.16) 0%, rgba(245, 197, 66, 0.1) 45%, rgba(146, 64, 14, 0.12) 100%);
    border-color: rgba(251, 191, 36, 0.45);
    color: #fff1c9;
    box-shadow: 0 0 14px rgba(245, 197, 66, 0.12);
}

.role-label-me-prefix {
    flex-shrink: 0;
}

.adm-status-toggle {
    cursor: pointer;
    background: transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.adm-status-toggle:hover:not(:disabled) {
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.18);
}

.adm-status-toggle:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.adm-badge-blue {
    background: rgba(0, 255, 157, 0.1);
    color: var(--adm-accent);
    border-color: rgba(0, 255, 157, 0.2);
}

.adm-badge-green {
    background: rgba(0, 255, 157, 0.1);
    color: var(--adm-primary);
    border-color: rgba(0, 255, 157, 0.2);
}

.adm-badge-red {
    background: rgba(255, 71, 87, 0.1);
    color: var(--adm-danger);
    border-color: rgba(255, 71, 87, 0.2);
}

.adm-badge-yellow {
    background: rgba(250, 204, 21, 0.1);
    color: var(--adm-warning);
    border-color: rgba(250, 204, 21, 0.2);
}

.adm-badge-gray {
    background: rgba(255, 255, 255, 0.05);
    color: var(--adm-text-muted);
    border-color: var(--adm-border);
}

/* Resource category column: match public directory labels (Forums, Groups, …) */
.adm-badge.adm-listing-category {
    text-transform: none !important;
    letter-spacing: 0.04em;
    font-weight: 600;
}

/* Invoice status chips (Admin Orders tab) */
.adm-invoice-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 116px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

.adm-invoice-status.status-pending {
    color: var(--adm-warning);
    border-color: rgba(250, 204, 21, 0.35);
    background: rgba(250, 204, 21, 0.12);
}

.adm-invoice-status.status-processing {
    color: var(--adm-accent);
    border-color: rgba(0, 255, 157, 0.35);
    background: rgba(0, 255, 157, 0.12);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.15);
    animation: pulse 2s infinite;
}

.adm-invoice-status.status-paid {
    color: var(--adm-success);
    border-color: rgba(0, 255, 157, 0.35);
    background: rgba(0, 255, 157, 0.14);
    box-shadow: 0 0 12px rgba(0, 255, 157, 0.14);
}

.adm-invoice-status.status-expired {
    color: var(--adm-danger);
    border-color: rgba(255, 71, 87, 0.35);
    background: rgba(255, 71, 87, 0.14);
}

/* --- TABS --- */
.adm-tab-content {
    display: none;
}

.adm-tab-content.active {
    display: block;
    animation: fade-in 0.3s ease;
    min-width: 0;
    max-width: 100%;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- MASS ACTIONS BAR --- */
.adm-mass-actions {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(10, 10, 11, 0.9);
    border: 1px solid var(--adm-primary);
    padding: 1rem 2rem;
    border-radius: 99px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.2);
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    pointer-events: none;
}

.adm-mass-actions.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* --- CHECKBOX CUSTOM --- */
.adm-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--adm-primary);
}

/* --- MOBILE RESPONSIVENESS --- */
.mobile-toggle {
    display: none;
}

@media (max-width: 768px) {
    :root {
        --global-header-h: 66px;
        /* Offset for site header */
    }

    main.admin-root {
        display: block !important;
        border-radius: var(--modern-rounded-md);
    }

    .adm-main {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: var(--modern-rounded-md);
    }

    .adm-sidebar,
    .mobile-toggle,
    .adm-overlay {
        display: none !important;
    }

    .adm-header {
        padding: 0.4rem 0.5rem;
        height: auto;
        min-height: 44px;
        flex-direction: column;
        top: auto;
        position: relative !important;
        z-index: 1;
        background: var(--adm-bg);
        border-bottom: 2px solid var(--adm-border);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
        border-radius: var(--modern-rounded-md) var(--modern-rounded-md) 0 0;
    }

    .adm-header-left,
    .adm-actions {
        display: none !important;
    }

    .adm-mobile-nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.4rem;
        padding: 0.2rem 0;
        width: 100%;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .adm-mobile-nav::-webkit-scrollbar {
        display: none;
    }

    .adm-mobile-nav .adm-nav-item {
        flex: 0 0 auto;
        width: auto;
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
        height: 32px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid var(--adm-border);
        display: flex;
        align-items: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .adm-mobile-nav .adm-nav-item i {
        margin-right: 0.3rem;
        font-size: 0.8rem;
        width: auto;
    }

    .adm-content {
        padding: 1.5rem 0.75rem 2rem 0.75rem;
        /* Increased padding to prevent overlap with sticky headers */
        max-width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    /* Overview tab: KPI strip + panels must not exceed viewport */
    .adm-overview {
        max-width: 100%;
        min-width: 0;
    }

    .adm-overview-top {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        min-width: 0;
    }

    .adm-overview-kpis {
        flex: none !important;
        width: 100%;
        max-width: 100% !important;
        min-width: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .adm-overview-kpi {
        overflow: hidden;
    }

    .adm-overview-kpi-val {
        font-size: 0.92rem;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .adm-overview-kpi-lbl {
        hyphens: auto;
        -webkit-hyphens: auto;
    }

    .adm-overview-grid {
        grid-template-columns: minmax(0, 1fr);
        min-width: 0;
    }

    .adm-overview-panel {
        min-width: 0;
    }

    .adm-overview-dl {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.2rem 0;
    }

    .adm-overview-dl dd {
        text-align: left;
        margin-bottom: 0.35rem;
    }

    .adm-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .adm-table-wrapper {
        font-size: 0.8rem;
    }
}

/* --- PAGINATION --- */
.adm-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--adm-border);
    gap: 1rem;
    flex-wrap: wrap;
}

.adm-pagination-info {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--adm-text-muted);
    letter-spacing: 1px;
}

.adm-page-spacer {
    width:calc(var(--filter-chip-height, 40px) - 4px);
    height:1px
}

/* User directory: role controls match main-site .username-tag (24px height, 6px radius, same padding) */
.adm-table .adm-select-small {
    height: 24px;
    min-height: 24px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-main);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0 6px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    cursor: pointer;
    width: 100%;
    max-width: 120px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.adm-table .adm-select-small:focus {
    border-color: var(--adm-primary);
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 255, 157, 0.15);
}

.adm-table .adm-status-toggle.adm-badge {
    min-height: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--radius);
    box-sizing: border-box;
    font-size: 0.65rem;
}

.adm-table td .adm-badge.adm-badge-red {
    min-height: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--radius);
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
}

/* --- User directory & files archive (rich cells) --- */
.adm-tab-hint {
    font-size: 0.72rem;
    color: var(--adm-text-muted);
    margin: 0 0 1rem;
    line-height: 1.4;
    max-width: 48rem;
}

.adm-user-block {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}

.adm-user-block .username-tag {
    font-size: 0.82rem;
}

.adm-user-block__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.adm-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.58rem;
    font-weight: 700;
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.adm-pill--id {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--adm-border);
    color: var(--adm-text-muted);
}

.adm-pill--danger {
    background: rgba(255, 71, 87, 0.15);
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: var(--adm-danger);
}

.adm-pill--link {
    background: rgba(0, 255, 157, 0.12);
    border: 1px solid rgba(0, 255, 157, 0.35);
    color: var(--adm-accent);
    text-decoration: none;
}

.adm-pill--link:hover {
    color: #fff;
}

.adm-presence-card {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0.28rem 0.5rem;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 255, 157, 0.22);
    background: rgba(0, 255, 157, 0.06);
    font-family: var(--font-mono);
    cursor: help;
}

.adm-presence-card__ago {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--adm-primary);
    line-height: 1.2;
}

.adm-presence-card--empty {
    display: inline-block;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius);
    border: 1px dashed var(--adm-border);
    color: var(--adm-text-muted);
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

.adm-metric {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: var(--adm-text-main);
    margin-bottom: 0.25rem;
}

.adm-metric:last-child {
    margin-bottom: 0;
}

.adm-metric i {
    color: var(--adm-text-muted);
    width: 0.9rem;
    text-align: center;
    font-size: 0.65rem;
}

.adm-metric__sep {
    opacity: 0.45;
    margin: 0 0.05rem;
}

.adm-metric__lbl {
    font-size: 0.58rem;
    color: var(--adm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.adm-groups-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    max-width: 15rem;
}

.adm-user-group-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 2px 6px 2px 4px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    line-height: 1.2;
    border: 1px solid rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.35);
    max-width: 100%;
    box-sizing: border-box;
}

.adm-user-group-chip > i:first-of-type {
    font-size: 0.72rem;
    width: 1rem;
    flex-shrink: 0;
    text-align: center;
}

.adm-user-group-chip.group-badge--vars > i:first-of-type:not([style]) {
    color: var(--badge-icon-color, #f5f8ff);
}

.adm-user-group-chip.group-badge--shell > i:first-of-type:not([style]) {
    color: inherit;
}

.adm-user-group-chip__label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f0f0f0;
}

.adm-group-chip__x {
    margin-left: 4px;
    cursor: pointer;
    opacity: 0.55;
}

.adm-group-chip__x:hover {
    opacity: 1;
}

.adm-status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

/* --- User directory (column tweaks on top of adm-table--mgmt) --- */
.adm-table--users-dir .adm-td-author {
    min-width: 8.5rem;
}

.adm-table--users-dir .adm-td-author .adm-user-chip-wrap {
    max-width: 13rem;
}

.adm-table--users-dir .adm-td-mono-muted {
    color: var(--adm-primary);
    opacity: 0.8;
    font-size: 0.7rem;
}

.adm-activity-line--live {
    color: var(--adm-primary);
    font-weight: 600;
}

.adm-activity-line--live .adm-activity-label {
    color: var(--adm-primary);
    opacity: 0.85;
}

.adm-engage-grid--user-lib {
    grid-template-columns: 1fr;
    gap: 0.22rem;
}

.adm-engage-grid--user-lib span {
    color: #fff;
}

.adm-user-achievements.ad-groups-wrap {
    max-width: 12rem;
}

.adm-control-cell {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    gap: 0.2rem;
    justify-content: flex-end;
    min-width: 0;
}

/* Files / Resources: fixed author width so badge hover scale does not resize columns. */
.adm-table--files .adm-td-mono-muted,
#tab-resources .adm-td-mono-muted {
    width: 2.2rem;
    padding-right: 0.15rem;
}

.adm-table--files .adm-td-file,
#tab-resources .adm-td-file {
    max-width: min(18rem, 30vw);
    min-width: 5.5rem;
}

.adm-table--files .adm-td-author,
#tab-resources .adm-td-author {
    width: 10rem;
    max-width: 10rem;
    min-width: 10rem;
}

.adm-table--files .adm-user-chip-wrap,
#tab-resources .adm-user-chip-wrap {
    max-width: 100%;
}

.adm-table--files .adm-td-activity {
    width: 3.4rem;
    white-space: nowrap;
}

.adm-table--files .adm-td-engage {
    width: 4.1rem;
}

.adm-table--files .adm-td-flags {
    max-width: 5.5rem;
}

.adm-table--files .adm-engage-grid {
    gap: 0.1rem 0.25rem;
}

#tab-resources .adm-td-control,
.adm-table--files .adm-td-control {
    width: 1%;
    white-space: nowrap;
}

.adm-table--archive .adm-file-title {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

/* Files / Resources: mid-width desktop — scroll instead of crushing filenames */
@media (min-width: 901px) and (max-width: 1320px) {
    #tab-approved .adm-table-wrapper--mgmt,
    #tab-resources .adm-table-wrapper--mgmt {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    #tab-approved .adm-table--archive,
    #tab-resources .adm-table--archive {
        min-width: 52rem;
        table-layout: auto;
    }

    .adm-table--archive.adm-table--files .adm-td-file,
    #tab-resources .adm-table--archive .adm-td-file {
        max-width: none;
        min-width: 8.5rem;
        width: auto;
    }

    .adm-table--archive.adm-table--files .adm-td-author,
    #tab-resources .adm-table--archive .adm-td-author {
        width: auto;
        max-width: 11rem;
        min-width: 7.5rem;
    }
}

/* Files / Resources: mobile — card rows; checkbox + title on top line */
@media (max-width: 900px) {
    #tab-approved .adm-table-wrapper--mgmt,
    #tab-resources .adm-table-wrapper--mgmt {
        overflow-x: visible;
        background: transparent;
        border: none;
    }

    #tab-approved .adm-table--archive,
    #tab-resources .adm-table--archive {
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0 0.65rem;
    }

    #tab-approved .adm-table--archive thead,
    #tab-resources .adm-table--archive thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    #tab-approved .adm-table--archive tbody,
    #tab-resources .adm-table--archive tbody {
        display: block;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row,
    #tab-resources .adm-table--archive tr.adm-archive-row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: start;
        gap: 0.35rem 0.55rem;
        padding: 0.7rem 0.85rem;
        background: var(--adm-panel);
        border: 1px solid var(--adm-border);
        border-radius: var(--radius);
        margin-bottom: 0;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row:hover td,
    #tab-resources .adm-table--archive tr.adm-archive-row:hover td {
        background: transparent;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row td,
    #tab-resources .adm-table--archive tr.adm-archive-row td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 0;
        border: none;
        text-align: left;
        word-break: break-word;
        overflow-wrap: anywhere;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row td::before,
    #tab-resources .adm-table--archive tr.adm-archive-row td::before {
        content: attr(data-label);
        font-size: 0.6rem;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--adm-primary);
        font-weight: 600;
        line-height: 1.25;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-check,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-check {
        grid-column: 1;
        grid-row: 1;
        align-self: center;
        padding-top: 0.1rem;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-check::before,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-check::before {
        content: none;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-file,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-file {
        grid-column: 2;
        grid-row: 1;
        min-width: 0;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-file::before,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-file::before {
        content: none;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-control,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-control {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-control::before,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-control::before {
        content: none;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-mono-muted,
    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-author,
    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-activity,
    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-engage,
    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-flags,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-category,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-author,
    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-mono-muted {
        grid-column: 1 / -1;
        padding-top: 0.35rem;
        border-top: 1px solid rgba(255, 255, 255, 0.06);
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-mono-muted {
        grid-row: 2;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        border-top: none;
        padding-top: 0;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-author {
        grid-row: 3;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-activity {
        grid-row: 4;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-engage {
        grid-row: 5;
    }

    #tab-approved .adm-table--archive tr.adm-archive-row .adm-td-flags {
        grid-row: 6;
        border-bottom: none;
    }

    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-category {
        grid-row: 2;
        border-top: none;
        padding-top: 0;
    }

    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-author {
        grid-row: 3;
    }

    #tab-resources .adm-table--archive tr.adm-archive-row .adm-td-mono-muted {
        grid-row: 4;
    }

    #tab-approved .adm-table--archive .adm-file-title,
    #tab-resources .adm-table--archive .adm-file-title {
        font-size: 0.9rem;
        font-weight: 600;
        color: #fff;
    }

    #tab-approved .adm-table--archive .adm-control-cell,
    #tab-resources .adm-table--archive .adm-control-cell {
        flex-flow: row nowrap;
    }

    #tab-approved .adm-table--archive .adm-engage-grid {
        flex-wrap: wrap;
    }
}

#tab-users .adm-table-wrapper--users {
    overflow-x: auto;
}

.adm-td-mono-muted {
    font-family: var(--font-mono);
    color: var(--adm-text-muted);
    font-size: 0.75rem;
    white-space: nowrap;
}

.adm-file-title {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.78rem;
    color: var(--adm-primary);
    text-decoration: none;
    word-break: break-word;
}

.adm-file-title:hover {
    color: #fff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(0, 255, 157, 0.35);
}

.adm-file-title--missing {
    color: var(--error-color);
    cursor: default;
    text-decoration: none;
}

.adm-file-title--missing:hover {
    color: var(--error-color);
    text-decoration: none;
    text-shadow: none;
}

.adm-file-desc {
    margin-top: 0.2rem;
    font-size: 0.65rem;
    color: var(--adm-text-muted);
    line-height: 1.35;
    max-width: 22rem;
}

.adm-td-activity {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    line-height: 1.35;
}

.adm-activity-line {
    margin-bottom: 0.15rem;
}

.adm-activity-label {
    display: inline-block;
    min-width: 2.1rem;
    color: var(--adm-text-muted);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.adm-engage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.68rem;
}

.adm-engage-grid span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.adm-engage-grid i {
    color: var(--adm-text-muted);
    width: 0.85rem;
    text-align: center;
    font-size: 0.6rem;
}

.adm-file-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-width: 11rem;
}

.adm-pill--flag {
    font-size: 0.58rem !important;
    padding: 0.2rem 0.35rem !important;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--adm-border) !important;
    color: var(--adm-text-muted) !important;
    text-transform: none;
    letter-spacing: 0;
}

.adm-pill--warn {
    border-color: rgba(250, 204, 21, 0.45) !important;
    color: var(--adm-warning) !important;
}

.adm-pill--mono {
    font-size: 0.52rem !important;
    max-width: 6.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Screen-reader only (admin) */
.adm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Online tab header */
.adm-online-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
}

.adm-online-header__left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.adm-online-header__title {
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

.adm-online-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

.adm-online-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    font-size: 0.72rem;
    color: var(--adm-text-muted);
    font-family: var(--font-mono);
    margin: 0;
    user-select: none;
}

.adm-online-toolbar input {
    accent-color: var(--adm-primary);
}

/* Help popover (details/summary) */
.adm-online-help {
    position: relative;
    flex-shrink: 0;
}

.adm-online-help__trigger {
    list-style: none;
    cursor: pointer;
    width: 1.75rem;
    height: 1.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--adm-border);
    color: var(--adm-primary);
    background: var(--adm-primary-dim);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.adm-online-help__trigger:hover {
    border-color: var(--adm-primary);
    background: rgba(0, 255, 157, 0.18);
}

.adm-online-help__trigger::-webkit-details-marker {
    display: none;
}

.adm-online-help__panel {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    z-index: 40;
    min-width: min(22rem, calc(100vw - 3rem));
    max-width: min(26rem, calc(100vw - 2rem));
    padding: 1rem 1.1rem;
    background: rgba(14, 14, 16, 0.98);
    border: 1px solid var(--adm-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    font-size: 0.72rem;
    line-height: 1.45;
    color: var(--adm-text-muted);
}

.adm-online-help__panel p {
    margin: 0 0 0.65rem;
}

.adm-online-help__panel p:last-child {
    margin-bottom: 0;
}

.adm-online-help__lead {
    color: var(--adm-text-main);
    font-weight: 600;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem !important;
}

.adm-online-help__list {
    margin: 0 0 0.85rem;
    padding-left: 1.1rem;
}

.adm-online-help__list li {
    margin-bottom: 0.35rem;
}

/* Online table layout */
.adm-table--online {
    table-layout: fixed;
    width: 100%;
}

.adm-table--online th:nth-child(1) {
    width: 34%;
}

.adm-table--online th:nth-child(2) {
    width: 18%;
}

.adm-table--online th:nth-child(3) {
    width: 5rem;
}

.adm-table--online th:nth-child(4),
.adm-table--online th:nth-child(5) {
    width: 14%;
}

.adm-online-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
}

.adm-online-identity > .adm-badge:first-child {
    flex-shrink: 0;
}

.adm-online-identity .username-tag {
    margin: 0;
}

.adm-online-trust {
    margin: 0 !important;
}

.adm-online-active-tab {
    margin: 0 !important;
}

.adm-table--online .adm-online-td-time {
    vertical-align: middle;
}

.adm-online-muted {
    color: var(--adm-text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

.adm-online-ip-cell {
    display: inline-block;
    max-width: 100%;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    line-height: 1.35;
    color: var(--adm-text-muted);
    word-break: break-all;
    cursor: help;
}

.adm-online-client-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 4px;
    border: 1px solid var(--adm-border);
    color: var(--adm-accent);
    background: rgba(255, 255, 255, 0.04);
    cursor: help;
    box-sizing: border-box;
}

.adm-online-client-cell i {
    font-size: 0.82rem;
    opacity: 0.9;
}

.adm-online-rel {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--adm-text-main);
    cursor: help;
}

.adm-table--online td {
    vertical-align: middle;
}

.adm-table--online td.adm-online-td-identity {
    vertical-align: middle;
}

/* Online tab: narrow screens — stack rows as cards (avoids crushed 5-col table) */
@media (max-width: 900px) {
    #tab-online .adm-table-wrapper--online {
        overflow-x: visible;
        background: transparent;
        border: none;
    }

    #tab-online .adm-table--online {
        table-layout: auto;
        border-collapse: separate;
        border-spacing: 0 0.65rem;
    }

    #tab-online .adm-table--online thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    #tab-online .adm-table--online tbody {
        display: block;
    }

    #tab-online .adm-table--online tr.adm-online-row {
        display: block;
        background: var(--adm-panel);
        border: 1px solid var(--adm-border);
        border-radius: var(--radius);
        margin-bottom: 0;
    }

    #tab-online .adm-table--online tr.adm-online-row:hover td {
        background: transparent;
    }

    #tab-online .adm-table--online tr.adm-online-row td {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        padding: 0.65rem 0.85rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        text-align: left;
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    #tab-online .adm-table--online tr.adm-online-row td:last-child {
        border-bottom: none;
    }

    #tab-online .adm-table--online tr.adm-online-row td::before {
        content: attr(data-label);
        font-size: 0.6rem;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--adm-primary);
        font-weight: 600;
        line-height: 1.25;
    }

    #tab-online .adm-online-ip-cell {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    #tab-online .adm-online-client-cell {
        width: 2rem;
        height: 2rem;
    }

    #tab-online .adm-online-identity {
        width: 100%;
    }

    #tab-online #online-users-container {
        padding-bottom: 4.5rem;
    }
}

@media (min-width: 901px) and (max-width: 1200px) {
    #tab-online .adm-table-wrapper--online {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    #tab-online .adm-table--online {
        min-width: 620px;
    }
}

/* User directory: horizontal scroll on mid-width (matches Orders / Online pattern) */
@media (min-width: 901px) and (max-width: 1320px) {
    #tab-users .adm-table-wrapper--users {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    #tab-users .adm-table--users {
        min-width: 720px;
    }
}

/* --- Layout / CSP utilities (replace inline style= in admin templates) --- */
.adm-kpi-ratio {
    opacity: 0.45;
    font-size: 0.85em;
}

.adm-panel-note {
    margin: 0 0 0.45rem;
    font-size: 0.62rem;
    color: var(--adm-text-muted);
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.adm-panel-note--spark {
    margin: 0.35rem 0 0.2rem;
    font-size: 0.58rem;
}

.adm-panel-footnote {
    margin: 0.45rem 0 0;
    font-size: 0.6rem;
    line-height: 1.4;
}

.adm-panel-footnote--loose {
    margin: 0.5rem 0 0;
    font-size: 0.65rem;
}

.adm-mt-xs { margin-top: 0.5rem; }
.adm-mt-sm { margin-top: 0.75rem; }
.adm-mt-md { margin-top: 0.85rem; }
.adm-mt-lg { margin-top: 0.95rem; }
.adm-mb-0 { margin-bottom: 0; }
.adm-mb-card { margin-bottom: 1.2rem; }
.adm-mb-section { margin-bottom: 3rem; }
.adm-mb-row { margin-bottom: 2rem; }
.adm-mb-header { margin-bottom: 1rem; }
.adm-mt-quarter { margin-top: 0.25rem; }

.adm-card--flush-top { margin-top: 0; }
.adm-flex-between { display: flex; justify-content: space-between; align-items: center; }
.adm-flex-gap { display: flex; gap: 0.5rem; }
.adm-flex-gap-sm { display: flex; gap: 0.45rem; align-items: center; }
.adm-inline-flex-gap { display: flex; align-items: center; gap: 0.5rem; }
.adm-flex-1-field { flex: 1; min-width: 180px; max-width: 100%; }

.adm-stat-label--hero { color: #fff; margin-bottom: 0.5rem; }
.adm-stat-label--hero-tight { color: #fff; margin: 0; margin-bottom: 0.9rem; }
.adm-text-white { color: #fff; }
.adm-text-strong { font-weight: 500; color: #fff; }
.adm-icon-muted { opacity: 0.85; margin-right: 0.35rem; }
.adm-icon-bright { opacity: 0.9; }

.adm-btn-icon--primary { color: var(--adm-primary); }
.adm-btn-icon--accent { color: var(--adm-accent); }
.adm-btn-icon--danger { color: var(--adm-danger); }
.adm-btn-icon--warning { color: var(--adm-warning); }
.adm-btn-icon--disabled { opacity: 0.4; cursor: not-allowed; }

.adm-th-check { width: 40px; }
.adm-empty-muted { text-align: center; color: var(--adm-text-muted); padding: 1.2rem; }
.adm-empty-panel {
    padding: 1.5rem;
    text-align: center;
    color: var(--adm-text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.adm-table-empty { text-align: center; padding: 2rem; color: var(--adm-text-muted); }
.adm-vip-intro--tight { margin: 0; }
.adm-vip-intro--spaced { margin-bottom: 0.85rem; }
.adm-vip-row-actions { border-top: none; margin-top: 0.85rem; padding-top: 0; }
.adm-vip-row-actions--tight { border-top: none; margin-top: 0.75rem; padding-top: 0; }
.adm-form--full { width: 100%; }
.adm-input--days { width: 90px; }
.adm-td-actions { display: flex; gap: 0.5rem; align-items: center; }

.adm-section-title {
    color: var(--adm-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.adm-section-title--accent { color: var(--adm-accent); }
.adm-section-title--warn { color: var(--adm-warning); }

.adm-hub-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.adm-hub-sub { font-size: 0.75rem; color: var(--adm-text-muted); margin-top: 0.25rem; }

.adm-nav-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.65rem;
}

.adm-nav-group-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--adm-text-muted);
    padding: 0.15rem 0.65rem 0.35rem;
    font-family: var(--font-mono);
}

.adm-nav-badge {
    margin-left: auto;
    min-width: 1.35rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.68rem;
    line-height: 1.2;
    text-align: center;
    background: rgba(255, 71, 87, 0.18);
    color: #ff6b7a;
    border: 1px solid rgba(255, 71, 87, 0.45);
    font-variant-numeric: tabular-nums;
}

.adm-nav-item--priority {
    border-color: rgba(255, 71, 87, 0.35);
}

.adm-nav-item--priority.active {
    border-color: var(--adm-primary);
}

.adm-mod-shell {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.adm-mod-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.adm-mod-title {
    margin: 0;
    font-size: 1.15rem;
    color: var(--adm-primary);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.adm-mod-summary {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: var(--adm-text-muted);
}

.adm-mod-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.adm-mod-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: var(--radius);
    border: 1px solid var(--adm-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--adm-text-muted);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.adm-mod-tab:hover {
    color: var(--adm-primary);
    border-color: var(--adm-primary-dim);
}

.adm-mod-tab.active {
    color: var(--adm-primary);
    border-color: var(--adm-primary);
    background: var(--adm-primary-dim);
}

.adm-mod-tab--has-items:not(.active) {
    border-color: rgba(255, 71, 87, 0.35);
    color: #ffb3ba;
}

.adm-mod-tab-count {
    min-width: 1.1rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    font-size: 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    font-variant-numeric: tabular-nums;
}

.adm-mod-tab--has-items .adm-mod-tab-count {
    background: rgba(255, 71, 87, 0.2);
    color: #ff8f9a;
}

.adm-mod-panels {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.adm-mod-shell[data-mod-view="files"] .adm-mod-panel:not([data-mod-section="files"]),
.adm-mod-shell[data-mod-view="resources"] .adm-mod-panel:not([data-mod-section="resources"]),
.adm-mod-shell[data-mod-view="comments"] .adm-mod-panel:not([data-mod-section="comments"]),
.adm-mod-shell[data-mod-view="forum"] .adm-mod-panel:not([data-mod-section="forum"]),
.adm-mod-shell[data-mod-view="chat"] .adm-mod-panel:not([data-mod-section="chat"]) {
    display: none;
}

.adm-mod-panel {
    border: 1px solid var(--adm-border);
    border-radius: var(--radius);
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.15);
}

.adm-comment-preview {
    font-size: 0.85rem;
    max-width: 360px;
    min-width: 140px;
    vertical-align: top;
    color: #fff;
}

.adm-comment-preview-inner {
    max-height: 260px;
    overflow: auto;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.adm-traffic-spark-bar { height: var(--spark-h, 0%); }

.adm-badge-dynamic {
    background: color-mix(in srgb, var(--badge-color), transparent 82%);
    color: var(--badge-color);
    border: 1px solid color-mix(in srgb, var(--badge-color), transparent 55%);
}

.adm-help-inline { margin-top: 0.45rem; margin-bottom: 0.4rem; font-size: 0.72rem; line-height: 1.45; }
.adm-code-sm { font-size: 0.92em; }
.adm-font-semibold { font-weight: 600; }
.adm-text-muted-sm { color: var(--adm-text-muted); font-size: 0.75rem; }

.adm-tag-outline {
    font-size: 0.65rem;
    border: 1px solid var(--adm-primary);
    color: var(--adm-primary);
    background: transparent;
}

.adm-guest-label { font-size: 0.8rem; }
.adm-vip-caption-icon { color: var(--vip-caption-color, var(--adm-primary)); }

.adm-mt-2rem { margin-top: 2rem; }
.adm-td-preview {
    font-size: 0.85rem;
    max-width: 280px;
    white-space: normal;
    word-break: break-word;
    color: #fff;
}

.adm-td-sm { font-size: 0.8rem; }
.adm-td-meta { font-size: 0.72rem; line-height: 1.35; }
.adm-icon-accent { color: var(--adm-accent); }
.adm-icon-primary { color: var(--adm-primary); }
.adm-empty-panel--lg { padding: 3rem; }
.adm-mono-muted { font-family: var(--font-mono); color: var(--adm-text-muted); }
.adm-section-label--warn {
    color: var(--adm-warning);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.adm-subtext { opacity: 0.75; font-size: 0.8rem; }
.adm-muted-70 { opacity: 0.7; }
.adm-flex-wrap { flex-wrap: wrap; }
.adm-empty-muted--pad { padding: 1.2rem; }

.adm-toolbar-row {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.adm-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
}

.adm-toolbar-label {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.adm-toolbar-sep {
    height: 20px;
    width: 1px;
    background: var(--surface-border);
    margin: 0 0.5rem;
}

.adm-btn-compact {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.adm-btn-compact--danger {
    border-color: var(--error-color);
    color: var(--error-color);
}

/* Modals: hidden by default; JS toggles .active (replaces inline display:none/flex) */
.modal-overlay.adm-modal-hidden {
    display: none !important;
}

.modal-overlay.adm-modal-active {
    display: flex !important;
}

#group-assign-modal {
    z-index: 10002;
    backdrop-filter: blur(5px);
}

.adm-assign-modal-panel {
    max-width: 450px;
    padding: 0;
    border: 1px solid var(--adm-primary);
    box-shadow: 0 0 30px rgba(0, 255, 157, 0.2);
    animation: fade-in 0.2s ease-out;
}

.adm-assign-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 255, 157, 0.05);
}

.adm-assign-modal-title {
    color: var(--adm-primary);
    margin: 0;
    font-size: 1rem;
}

.adm-assign-modal-close {
    border: none;
    background: transparent;
}

.adm-assign-modal-body {
    padding: 1.5rem;
}

.adm-assign-modal-intro {
    font-size: 0.9rem;
    color: var(--adm-text-main);
    margin-bottom: 1.5rem;
}

.adm-assign-modal-username {
    color: var(--adm-primary);
    font-family: var(--font-mono);
}

.adm-assign-modal-label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.35rem;
    color: var(--adm-text-muted);
}

.adm-assign-modal-textarea {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
    padding: 0.65rem;
    border-radius: var(--radius);
    border: 1px solid var(--adm-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--adm-text-main);
    font-family: var(--font-ui);
    font-size: 0.85rem;
    resize: vertical;
}

.adm-assign-group-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.adm-group-select-btn {
    text-align: left;
    justify-content: flex-start;
    padding: 1rem;
    border-color: var(--adm-border);
    transition: all 0.2s;
}

.adm-assign-group-badge {
    margin-right: 12px;
    min-width: 80px;
    text-align: center;
}

.adm-assign-group-desc {
    font-size: 0.8rem;
    color: var(--adm-text-muted);
    font-family: var(--font-ui);
}

.adm-assign-empty {
    text-align: center;
    color: var(--adm-text-muted);
    font-size: 0.8rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius);
}

.adm-assign-empty-icon {
    margin-bottom: 0.5rem;
    display: block;
}

.adm-assign-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--adm-border);
    text-align: right;
    background: rgba(0, 0, 0, 0.2);
}

.adm-selected-count {
    margin-left: auto;
    color: var(--primary-color);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: bold;
    background: rgba(0, 255, 157, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.adm-input--criteria {
    width: 100%;
    padding: 0.45rem;
    margin-bottom: 0.55rem;
    box-sizing: border-box;
}

.group-badge--help {
    cursor: help;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* Forum admin */
.adm-card--mb-lg { margin-bottom: 1.5rem; }
.adm-mt-1 { margin-top: 1rem; }
.adm-mt-075 { margin-top: 0.75rem; }
.adm-mt-125 { margin-top: 1.25rem; }
.adm-mb-075 { margin-bottom: 0.75rem; }
.adm-mb-1 { margin-bottom: 1rem; }
.adm-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.adm-forum-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.adm-forum-tree-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.75rem; }
.adm-help-tight { font-size: 0.72rem; color: var(--adm-text-muted); margin: 0 0 0.5rem 0; line-height: 1.45; }
.adm-help-tight--after { font-size: 0.72rem; color: var(--adm-text-muted); margin: 0.35rem 0 0 0; }
.adm-help-intro { font-size: 0.75rem; color: var(--adm-text-muted); margin-bottom: 1rem; }
.adm-help-intro--prefix { font-size: 0.75rem; color: var(--adm-text-muted); margin: 0.35rem 0 0; }
.adm-input--mb { margin-bottom: 0.65rem; }
.adm-modal-sm { max-width: 440px; width: 100%; }
.adm-modal-xs { max-width: 420px; width: 100%; }
.adm-modal-md { max-width: 520px; width: 100%; }
.adm-modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: 1.25rem; }
.adm-btn-cancel-muted { border-color: #555; color: #aaa; }
.adm-check-row { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.85rem; }
.adm-check-row--spaced { margin: 0.75rem 0; }
.adm-check-row--spaced-sm { margin: 0.5rem 0 0.75rem; }
.adm-prefix-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.adm-th-actions { width: 120px; }
.adm-form-inline { display: inline; }
.adm-table-empty-row { text-align: center; padding: 1.5rem; color: var(--adm-text-muted); }
.adm-prefix-color-row { display: flex; gap: 0.65rem; align-items: center; flex-wrap: wrap; margin-bottom: 0.35rem; }
.adm-prefix-color-native { width: 44px; height: 38px; padding: 2px; border: 1px solid rgba(255, 255, 255, 0.15); cursor: pointer; background: transparent; border-radius: 4px; }
.adm-prefix-color-text { flex: 1; min-width: 160px; }
.adm-help-xs { font-size: 0.7rem; color: var(--adm-text-muted); margin: 0 0 0.85rem; line-height: 1.45; }
.adm-help-xs--tight { font-size: 0.7rem; color: var(--adm-text-muted); margin: 0.35rem 0 0; }
.adm-badge-xs { font-size: 0.55rem; }
.adm-tree-status { font-size: 0.7rem; color: var(--adm-text-muted); font-family: var(--font-mono); }
.adm-delete-msg { font-size: 0.9rem; color: var(--adm-text-secondary); margin-bottom: 1rem; }
