/* ======================================
   ADMIN DASHBOARD – STYLES v10
   Mobile-first, native-feel admin UI
   Layered on top of dashboard.css
   ====================================== */

/* ── Admin Design Tokens ── */
:root {
    --admin-accent: #DC2626;
    --admin-accent-soft: rgba(220,38,38,0.08);
    --admin-accent-glow: rgba(220,38,38,0.15);
    --admin-gradient: linear-gradient(135deg, #DC2626, #F97316);
    --admin-dark: #0F0F1A;
    --admin-dark-2: #161625;
    --admin-surface: #FFFFFF;
    --admin-surface-alt: #F8FAFC;
    --admin-border: #E5E7EB;
    --admin-radius: 16px;
    --admin-radius-sm: 10px;
    --admin-radius-xs: 8px;
    --admin-transition: 0.2s cubic-bezier(.4,0,.2,1);
    --admin-shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --admin-shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    --admin-shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
}

/* ── Admin Sidebar ── */
.admin-sidebar {
    background: linear-gradient(180deg, var(--admin-dark) 0%, var(--admin-dark-2) 100%);
}

.admin-badge-logo {
    font-size: 0.55rem;
    background: var(--admin-gradient);
    color: white;
    padding: 2px 7px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: super;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ── Admin Hero ── */
.admin-hero {
    background:
        radial-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(135deg, #0F0F1A 0%, #1A0A2E 25%, #2D0A0A 50%, #3B1010 75%, #1A0F0A 100%);
    background-size: 20px 20px, 100% 100%;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--admin-radius);
    position: relative;
}

.admin-hero::before {
    background: radial-gradient(circle, rgba(220, 38, 38, 0.2) 0%, transparent 70%);
}

.admin-hero::after {
    background: radial-gradient(circle, rgba(249, 115, 22, 0.15) 0%, transparent 70%);
}

.admin-gradient-text {
    background: linear-gradient(135deg, #FCA5A5, #F97316, #FBBF24);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ======================================
   KPI CARDS
   ====================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.kpi-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: all var(--admin-transition);
    box-shadow: var(--admin-shadow-sm);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--admin-gradient);
    opacity: 0;
    transition: opacity var(--admin-transition);
}

.kpi-card:hover {
    box-shadow: var(--admin-shadow-md);
    transform: translateY(-2px);
    border-color: transparent;
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--admin-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.kpi-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.kpi-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.kpi-trend {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 2px 7px;
    border-radius: 6px;
}

.kpi-trend.up   { background: rgba(16,185,129,0.1); color: #059669; }
.kpi-trend.down { background: rgba(239,68,68,0.1);  color: #DC2626; }

/* ======================================
   ACTIVITY FEED
   ====================================== */
.activity-feed {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--admin-border);
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 5px;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

.activity-body p {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.45;
    margin: 0;
}

.activity-time {
    font-size: 0.73rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: block;
}

/* ======================================
   HEALTH GRID
   ====================================== */
.health-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.health-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--admin-border);
}

.health-item:last-child { border-bottom: none; }

.health-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.health-indicator.online  { background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }
.health-indicator.warning { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,0.2); animation: pulseGlow 2s infinite; }
.health-indicator.offline { background: #EF4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.2); }

.health-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.health-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.health-status {
    font-size: 0.73rem;
    color: #10B981;
}

.health-uptime {
    font-size: 0.82rem;
    font-weight: 700;
    color: #10B981;
    flex-shrink: 0;
}

/* Mini Chart */
.mini-chart-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--admin-border);
}

.mini-chart-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.mini-bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 72px;
}

.bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.bar {
    width: 100%;
    border-radius: 4px 4px 0 0;
    background: rgba(220,38,38,0.15);
    transition: height 0.6s var(--admin-transition);
}

.bar.active-bar {
    background: var(--admin-gradient);
}

.bar-label {
    font-size: 0.62rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ======================================
   ADMIN TABLES
   ====================================== */
.table-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.82rem;
    pointer-events: none;
}

.search-box input {
    padding: 10px 16px 10px 38px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--admin-surface);
    color: var(--text);
    width: 240px;
    transition: all var(--admin-transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.filter-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    background: var(--admin-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%2394A3B8' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 12px center;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all var(--admin-transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--admin-accent);
    box-shadow: 0 0 0 3px var(--admin-accent-soft);
}

.admin-table-wrapper {
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow-sm);
    overflow: hidden;
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-table thead {
    background: var(--admin-surface-alt);
}

.admin-table thead th {
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
    font-size: 0.73rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--admin-border);
    white-space: nowrap;
}

.admin-table tbody td {
    padding: 14px 18px;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: middle;
    color: var(--text);
}

.admin-table tbody tr {
    transition: background var(--admin-transition);
}

.admin-table tbody tr:hover {
    background: var(--admin-surface-alt);
}

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

/* ── Table Cell Components ── */
.table-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--admin-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
}

.entity-block {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.entity-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entity-sub,
.table-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

.entity-meta {
    display: flex;
    gap: 8px;
    margin-top: 3px;
    flex-wrap: wrap;
}

.meta-chip {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.table-value {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.table-note {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.table-metric {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text);
}

/* Role Tags */
.role-tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.role-tag.seeker  { background: rgba(59,130,246,0.08); color: #2563EB; }
.role-tag.premium { background: rgba(234,179,8,0.1);   color: #B45309; }

/* Status + Verification */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    vertical-align: middle;
}

.status-dot.active    { background: #10B981; box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.status-dot.suspended { background: #F59E0B; box-shadow: 0 0 0 3px rgba(245,158,11,0.15); }

.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
}

.verification-badge.verified { background: rgba(16,185,129,0.08); color: #059669; }
.verification-badge.pending  { background: rgba(245,158,11,0.08); color: #D97706; }

/* Job Status */
.job-status {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
}

.job-status.active { background: rgba(16,185,129,0.08); color: #059669; }
.job-status.closed { background: rgba(107,114,128,0.08); color: #6B7280; }

/* Application Status */
.app-status-badge.is-submitted  { background: rgba(59,130,246,0.08);  color: #2563EB; }
.app-status-badge.is-reviewed   { background: rgba(16,185,129,0.08);  color: #059669; }
.app-status-badge.is-shortlisted { background: rgba(126,34,206,0.08); color: #7C3AED; }
.app-status-badge.is-rejected   { background: rgba(239,68,68,0.08);   color: #DC2626; }

/* Document Chips */
.document-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
}

.document-chip.success { background: rgba(16,185,129,0.08); color: #059669; }
.document-chip.accent  { background: rgba(99,102,241,0.08); color: #4F46E5; }
.document-chip.muted   { background: rgba(107,114,128,0.06); color: var(--text-muted); }

/* Actions Cell */
.actions-cell {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tbl-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--admin-radius-xs);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: all var(--admin-transition);
    -webkit-tap-highlight-color: transparent;
}

.tbl-btn:hover { background: var(--admin-surface-alt); border-color: #CBD5E1; }
.tbl-btn.warn { color: #D97706; }
.tbl-btn.warn:hover { background: rgba(234,179,8,0.06); border-color: rgba(234,179,8,0.2); }
.tbl-btn.danger { color: #DC2626; }
.tbl-btn.danger:hover { background: rgba(220,38,38,0.06); border-color: rgba(220,38,38,0.2); }

/* Table Footer */
.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 4px;
    flex-wrap: wrap;
    gap: 10px;
}

.table-info {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.table-pagination {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--admin-radius-xs);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--admin-transition);
}

.page-btn:hover { background: var(--admin-surface-alt); }
.page-btn.active-page { background: var(--admin-gradient); color: #fff; border-color: transparent; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.page-dots {
    font-size: 0.78rem;
    color: var(--text-muted);
    padding: 0 4px;
}

/* ======================================
   REPORT CARDS
   ====================================== */
.report-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.report-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 24px;
    box-shadow: var(--admin-shadow-sm);
}

.report-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.report-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--admin-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.report-card-data {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.report-card-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    display: block;
    line-height: 1.1;
}

.report-card-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
    line-height: 1.2;
}

.report-card-detail {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.report-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.report-bar-row > span:first-child {
    width: 72px;
    flex-shrink: 0;
}

.report-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #F1F5F9;
    overflow: hidden;
}

.report-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(.4,0,.2,1);
}

.report-bar-row > span:last-child {
    width: 40px;
    text-align: right;
    font-weight: 600;
    flex-shrink: 0;
}

/* Reports Toolbar */
.reports-toolbar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--admin-radius-sm);
    background: linear-gradient(135deg, #DC2626, #F97316);
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--admin-transition);
    -webkit-tap-highlight-color: transparent;
    margin-left: auto;
    white-space: nowrap;
    text-decoration: none;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.export-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220,38,38,0.3);
}

/* Audit Section Header */
.audit-section-header {
    margin-top: 28px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--admin-border);
}

.audit-section-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.audit-section-label i {
    color: #F59E0B;
    font-size: 0.85rem;
}

/* Audit Action Tags */
.audit-action {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: capitalize;
}

.audit-action.create { background: rgba(16,185,129,0.08); color: #059669; }
.audit-action.update { background: rgba(59,130,246,0.08);  color: #2563EB; }
.audit-action.verify { background: rgba(126,34,206,0.08);  color: #7C3AED; }
.audit-action.flag   { background: rgba(245,158,11,0.08);  color: #D97706; }
.audit-action.delete { background: rgba(239,68,68,0.08);   color: #DC2626; }

/* ======================================
   SETTINGS
   ====================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.settings-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 24px;
    box-shadow: var(--admin-shadow-sm);
}

.settings-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card-title i {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #F1F5F9;
}

.setting-row:last-child {
    border-bottom: none;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 16px;
    flex: 1;
    min-width: 0;
}

.setting-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
}

.setting-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    display: inline-block;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #D1D5DB;
    border-radius: 24px;
    transition: all 0.25s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--admin-gradient);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* ======================================
   RESPONSIVE – TABLET (1100px)
   ====================================== */
@media (max-width: 1100px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .report-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

/* ======================================
   RESPONSIVE – MOBILE (900px)
   ====================================== */
@media (max-width: 900px) {
    /* Bottom Tab Bar – visible on mobile */
    .btab-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--admin-surface);
        border-top: 1px solid var(--admin-border);
        z-index: 500;
        align-items: center;
        justify-content: space-around;
        padding: 0 4px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        background: rgba(255,255,255,0.95);
    }

    .btab-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        height: 100%;
        text-decoration: none;
        color: var(--text-muted);
        font-size: 0.62rem;
        font-weight: 600;
        transition: color var(--admin-transition);
        -webkit-tap-highlight-color: transparent;
        border: none;
        background: none;
        cursor: pointer;
        padding: 0;
        position: relative;
    }

    .btab-item i {
        font-size: 1.15rem;
        transition: all var(--admin-transition);
    }

    .btab-active {
        color: var(--admin-accent);
    }

    .btab-active i {
        transform: scale(1.12);
    }

    .btab-active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 28px;
        height: 3px;
        background: var(--admin-gradient);
        border-radius: 0 0 3px 3px;
    }

    /* More Sheet */
    .btab-more-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 600;
        opacity: 0;
        transition: opacity 0.25s;
    }

    .btab-overlay-active {
        display: block;
        opacity: 1;
    }

    .btab-more-sheet {
        display: block;
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        background: var(--admin-surface);
        border-radius: 24px 24px 0 0;
        z-index: 610;
        padding: 8px 20px 20px;
        padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
        transition: bottom 0.35s cubic-bezier(.4,0,.2,1);
        box-shadow: 0 -12px 40px rgba(0,0,0,0.12);
    }

    .btab-sheet-open {
        bottom: 0;
    }

    .btab-more-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 0;
        margin-bottom: 8px;
        border-bottom: 1px solid var(--admin-border);
    }

    .btab-more-header > span {
        font-size: 1rem;
        font-weight: 700;
        color: var(--text);
    }

    .btab-more-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: var(--admin-surface-alt);
        color: var(--text-secondary);
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    .btab-more-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }

    .btab-more-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 16px 8px;
        border-radius: var(--admin-radius);
        text-decoration: none;
        color: var(--text-secondary);
        font-size: 0.72rem;
        font-weight: 600;
        transition: all var(--admin-transition);
        background: var(--admin-surface-alt);
        -webkit-tap-highlight-color: transparent;
    }

    .btab-more-item i {
        font-size: 1.2rem;
    }

    .btab-more-item:active {
        transform: scale(0.95);
    }

    .btab-more-active {
        background: var(--admin-accent-soft);
        color: var(--admin-accent);
    }

    /* Main content - bottom padding for tab bar */
    .main-content {
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
    }

    /* KPI Grid */
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .kpi-card {
        padding: 16px;
        border-radius: 14px;
    }

    .kpi-icon {
        width: 40px;
        height: 40px;
    }

    .kpi-value { font-size: 1.2rem; }
    .kpi-label { font-size: 0.68rem; }

    /* Section layout */
    .section-title-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .table-controls {
        width: 100%;
    }

    .search-box {
        flex: 1;
    }

    .search-box input {
        width: 100%;
    }

    /* Report Cards */
    .report-cards {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .report-card {
        padding: 18px;
        border-radius: 14px;
    }

    .report-card-header {
        gap: 12px;
        margin-bottom: 14px;
    }

    .report-card-icon {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    .report-card-value { font-size: 1.3rem; }

    .report-bar-row {
        font-size: 0.75rem;
    }

    .report-bar-row > span:first-child {
        width: 66px;
    }

    /* Reports toolbar */
    .reports-toolbar-row {
        width: 100%;
    }

    .reports-toolbar-row .filter-select {
        flex: 1;
    }

    .export-btn {
        padding: 10px 16px;
        font-size: 0.8rem;
    }

    .audit-section-header {
        margin-top: 20px;
        margin-bottom: 12px;
    }

    /* ─── Mobile Card Tables ─── */
    .admin-table-wrapper {
        border: none;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
        overflow: visible;
    }

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table th,
    .admin-table td,
    .admin-table tr {
        display: block;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .admin-table tbody tr {
        background: var(--admin-surface);
        border-radius: var(--admin-radius);
        padding: 0;
        display: flex;
        flex-direction: column;
        gap: 0;
        border: 1px solid var(--admin-border);
        box-shadow: var(--admin-shadow-sm);
        position: relative;
        overflow: hidden;
        transition: all var(--admin-transition);
    }

    /* ─── User Card: redesigned mobile layout ─── */
    .card-row-users {
        padding: 0 !important;
        gap: 0 !important;
    }

    /* Header area: avatar + name + role */
    .card-row-users td:first-child {
        padding: 16px 16px 12px !important;
        border-bottom: 1px solid var(--admin-border) !important;
        background: var(--admin-surface-alt);
        flex-direction: row !important;
        align-items: center !important;
    }

    .card-row-users td:first-child::before { display: none; }

    .card-row-users td:first-child .table-user {
        width: 100%;
    }

    .card-row-users td:first-child .table-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        font-size: 0.82rem;
    }

    .card-row-users td:first-child .entity-title {
        font-size: 0.92rem;
        font-weight: 700;
    }

    .card-row-users td:first-child .entity-sub {
        font-size: 0.72rem;
        font-weight: 500;
        color: var(--text-muted);
    }

    /* Middle detail cells: compact grid-like rows */
    .card-row-users td:not(:first-child):not(.actions-cell) {
        padding: 10px 16px;
        border-bottom: 1px solid #F1F5F9;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card-row-users td:not(:first-child):not(.actions-cell)::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    /* Hide the Email cell on mobile since it's visible in the entity-sub or not needed */
    .card-row-users td[data-label="Email"] {
        font-size: 0.82rem;
    }

    .card-row-users td[data-label="Email"] .table-value span:first-child {
        font-size: 0.82rem;
        word-break: break-all;
    }

    .card-row-users td[data-label="Role"] .role-tag {
        font-size: 0.72rem;
        padding: 3px 10px;
    }

    .card-row-users td[data-label="Status"] {
        font-size: 0.82rem;
    }

    .card-row-users td:not(:first-child):not(.actions-cell) .table-value {
        align-items: flex-end;
        text-align: right;
    }

    .card-row-users td[data-label="Joined"] .table-value span:first-child { font-size: 0.82rem; }
    .card-row-users td[data-label="Joined"] .table-note { font-size: 0.68rem; }

    /* Actions row: bottom of card */
    .card-row-users td.actions-cell {
        padding: 12px 16px !important;
        background: var(--admin-surface-alt);
        border-top: 1px solid var(--admin-border) !important;
        display: flex;
        gap: 8px;
        justify-content: flex-end !important;
    }

    .card-row-users td.actions-cell::before { display: none; }

    .card-row-users td.actions-cell .tbl-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 0.85rem;
    }

    /* Generic card stripe — keep for non-user tables */
    .admin-table tbody tr:not(.card-row-users):not(.card-row-jobs):not(.card-row-recruiters):not(.card-row-apps):not(.card-row-docs)::before {
        content: '';
        position: absolute;
        top: 0; left: 0;
        width: 4px;
        height: 100%;
        border-radius: 4px 0 0 4px;
        background: linear-gradient(180deg, #94A3B8, #CBD5E1);
    }

    /* Color-coded side stripe per table type */
    .card-row-apps::before { display: none !important; }

    /* ─── Application Card: redesigned mobile layout ─── */
    .card-row-apps {
        padding: 0 !important;
        gap: 0 !important;
    }

    .card-row-apps td:first-child {
        padding: 16px 16px 12px !important;
        border-bottom: 1px solid var(--admin-border) !important;
        background: var(--admin-surface-alt);
        flex-direction: row !important;
        align-items: center !important;
    }

    .card-row-apps td:first-child::before { display: none; }

    .card-row-apps td:first-child .table-user { width: 100%; }

    .card-row-apps td:first-child .table-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        font-size: 0.82rem;
    }

    .card-row-apps td:first-child .entity-title {
        font-size: 0.92rem;
        font-weight: 700;
    }

    .card-row-apps td:first-child .entity-sub {
        font-size: 0.72rem;
        font-weight: 500;
        color: var(--text-muted);
    }

    .card-row-apps td:not(:first-child):not(.actions-cell) {
        padding: 10px 16px;
        border-bottom: 1px solid #F1F5F9;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card-row-apps td:not(:first-child):not(.actions-cell)::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    .card-row-apps td:not(:first-child):not(.actions-cell) .table-value {
        align-items: flex-end;
        text-align: right;
    }

    .card-row-apps td[data-label="Job"] { font-size: 0.85rem; }
    .card-row-apps td[data-label="Company"] { font-size: 0.85rem; }
    .card-row-apps td[data-label="Documents"] .document-chip { font-size: 0.72rem; }
    .card-row-apps td[data-label="Status"] { font-size: 0.82rem; }

    .card-row-apps td[data-label="Submitted"] .table-value span:first-child { font-size: 0.82rem; }
    .card-row-apps td[data-label="Submitted"] .table-note { font-size: 0.68rem; }

    .card-row-apps td.actions-cell {
        padding: 12px 16px !important;
        background: var(--admin-surface-alt);
        border-top: 1px solid var(--admin-border) !important;
        display: flex;
        gap: 8px;
        justify-content: flex-end !important;
    }

    .card-row-apps td.actions-cell::before { display: none; }

    .card-row-apps td.actions-cell .tbl-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 0.85rem;
    }

    /* ─── Document Card: redesigned mobile layout ─── */
    .card-row-docs::before { display: none !important; }

    .card-row-docs {
        padding: 0 !important;
        gap: 0 !important;
    }

    .card-row-docs td:first-child {
        padding: 16px 16px 12px !important;
        border-bottom: 1px solid var(--admin-border) !important;
        background: var(--admin-surface-alt);
        flex-direction: row !important;
        align-items: center !important;
    }

    .card-row-docs td:first-child::before { display: none; }

    .card-row-docs td:first-child .table-user { width: 100%; }

    .card-row-docs td:first-child .table-avatar {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        font-size: 0.82rem;
    }

    .card-row-docs td:first-child .entity-title {
        font-size: 0.92rem;
        font-weight: 700;
    }

    .card-row-docs td:first-child .entity-sub {
        font-size: 0.72rem;
        font-weight: 500;
        color: var(--text-muted);
    }

    .card-row-docs td:not(:first-child):not(.actions-cell) {
        padding: 10px 16px;
        border-bottom: 1px solid #F1F5F9;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card-row-docs td:not(:first-child):not(.actions-cell)::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    .card-row-docs td:not(:first-child):not(.actions-cell) .table-value {
        align-items: flex-end;
        text-align: right;
    }

    .card-row-docs td[data-label="Owner"] { font-size: 0.85rem; }
    .card-row-docs td[data-label="Type"] .document-chip { font-size: 0.72rem; }
    .card-row-docs td[data-label="Updated"] .table-value span:first-child { font-size: 0.82rem; }
    .card-row-docs td[data-label="Updated"] .table-note { font-size: 0.68rem; }

    .card-row-docs td.actions-cell {
        padding: 12px 16px !important;
        background: var(--admin-surface-alt);
        border-top: 1px solid var(--admin-border) !important;
        display: flex;
        gap: 8px;
        justify-content: flex-end !important;
    }

    .card-row-docs td.actions-cell::before { display: none; }

    .card-row-docs td.actions-cell .tbl-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 0.85rem;
    }

    /* ─── Job Card: redesigned mobile layout ─── */
    .card-row-jobs {
        padding: 0 !important;
        gap: 0 !important;
    }

    .card-row-jobs::before { display: none !important; }

    /* Header area: job title + meta chips */
    .card-row-jobs td:first-child {
        padding: 16px 16px 12px !important;
        border-bottom: 1px solid var(--admin-border) !important;
        background: var(--admin-surface-alt);
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .card-row-jobs td:first-child::before { display: none; }

    .card-row-jobs td:first-child .entity-title {
        font-size: 0.92rem;
        font-weight: 700;
    }

    .card-row-jobs td:first-child .entity-meta {
        margin-top: 6px;
    }

    .card-row-jobs td:first-child .meta-chip {
        font-size: 0.72rem;
    }

    /* Middle detail cells */
    .card-row-jobs td:not(:first-child):not(.actions-cell) {
        padding: 10px 16px;
        border-bottom: 1px solid #F1F5F9;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card-row-jobs td:not(:first-child):not(.actions-cell)::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    .card-row-jobs td:not(:first-child):not(.actions-cell) .table-value {
        align-items: flex-end;
        text-align: right;
    }

    .card-row-jobs td[data-label="Company"] .table-value span:first-child { font-size: 0.85rem; font-weight: 600; }
    .card-row-jobs td[data-label="Company"] .table-note { font-size: 0.72rem; }

    .card-row-jobs td[data-label="Applicants"] .table-metric { font-size: 0.95rem; }
    .card-row-jobs td[data-label="Applicants"] .table-note { font-size: 0.68rem; }

    .card-row-jobs td[data-label="Status"] .job-status { font-size: 0.72rem; }

    .card-row-jobs td[data-label="Posted"] .table-value span:first-child { font-size: 0.82rem; }
    .card-row-jobs td[data-label="Posted"] .table-note { font-size: 0.68rem; }

    /* Actions row */
    .card-row-jobs td.actions-cell {
        padding: 12px 16px !important;
        background: var(--admin-surface-alt);
        border-top: 1px solid var(--admin-border) !important;
        display: flex;
        gap: 8px;
        justify-content: flex-end !important;
    }

    .card-row-jobs td.actions-cell::before { display: none; }

    .card-row-jobs td.actions-cell .tbl-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 0.85rem;
    }

    /* ─── Recruiter Card: redesigned mobile layout ─── */
    .card-row-recruiters {
        padding: 0 !important;
        gap: 0 !important;
    }

    .card-row-recruiters::before { display: none !important; }

    .card-row-recruiters td:first-child {
        padding: 16px 16px 12px !important;
        border-bottom: 1px solid var(--admin-border) !important;
        background: var(--admin-surface-alt);
        flex-direction: row !important;
        align-items: center !important;
    }

    .card-row-recruiters td:first-child::before { display: none; }

    .card-row-recruiters td:first-child .table-user { width: 100%; }

    .card-row-recruiters td:first-child .table-avatar {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        font-size: 0.82rem;
    }

    .card-row-recruiters td:first-child .entity-title {
        font-size: 0.92rem;
        font-weight: 700;
    }

    .card-row-recruiters td:first-child .entity-sub {
        font-size: 0.72rem;
        font-weight: 500;
        color: var(--text-muted);
    }

    .card-row-recruiters td:not(:first-child):not(.actions-cell) {
        padding: 10px 16px;
        border-bottom: 1px solid #F1F5F9;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .card-row-recruiters td:not(:first-child):not(.actions-cell)::before {
        content: attr(data-label);
        font-size: 0.7rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.04em;
        flex-shrink: 0;
    }

    .card-row-recruiters td[data-label="Company"] { font-size: 0.85rem; font-weight: 600; }
    .card-row-recruiters td[data-label="Active Jobs"] { font-size: 0.85rem; }
    .card-row-recruiters td[data-label="Status"] { font-size: 0.82rem; }

    .card-row-recruiters td:not(:first-child):not(.actions-cell) .table-value {
        align-items: flex-end;
        text-align: right;
    }

    .card-row-recruiters td[data-label="Joined"] .table-value span:first-child { font-size: 0.82rem; }
    .card-row-recruiters td[data-label="Joined"] .table-note { font-size: 0.68rem; }

    .card-row-recruiters td.actions-cell {
        padding: 12px 16px !important;
        background: var(--admin-surface-alt);
        border-top: 1px solid var(--admin-border) !important;
        display: flex;
        gap: 8px;
        justify-content: flex-end !important;
    }

    .card-row-recruiters td.actions-cell::before { display: none; }

    .card-row-recruiters td.actions-cell .tbl-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        font-size: 0.85rem;
    }

    /* Generic fallback for older tables */
    .admin-table tbody td {
        padding: 0;
        border-bottom: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .admin-table tbody td:not(.card-row-users td):not(.card-row-jobs td):not(.card-row-recruiters td):not(.card-row-apps td)::before {
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 600;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        flex-shrink: 0;
        min-width: 72px;
    }

    /* First cell (entity cell) – full width — non-user/job tables */
    .admin-table tbody td:first-child:not(.card-row-users td:first-child):not(.card-row-jobs td:first-child):not(.card-row-recruiters td:first-child):not(.card-row-apps td:first-child) {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 10px;
        border-bottom: 1px solid #F1F5F9;
        margin-bottom: 2px;
    }

    .admin-table tbody td:first-child:not(.card-row-users td:first-child):not(.card-row-jobs td:first-child)::before {
        display: none;
    }

    /* Actions cell — non-user/job tables */
    .admin-table tbody td.actions-cell:not(.card-row-users td.actions-cell):not(.card-row-jobs td.actions-cell) {
        padding-top: 10px;
        border-top: 1px solid #F1F5F9;
        margin-top: 2px;
        justify-content: flex-start;
    }

    .admin-table tbody td.actions-cell:not(.card-row-users td.actions-cell):not(.card-row-jobs td.actions-cell)::before {
        display: none;
    }

    .tbl-btn {
        width: 38px;
        height: 38px;
        border-radius: var(--admin-radius-sm);
        font-size: 0.88rem;
    }

    /* Table footer */
    .table-footer {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
    }

    .table-pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-btn {
        width: 38px;
        height: 38px;
    }

    /* Settings */
    .settings-card {
        border-radius: var(--admin-radius);
        padding: 20px;
    }

    .setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .setting-info {
        padding-right: 0;
    }

    /* Activity */
    .activity-item {
        padding: 12px 0;
        gap: 10px;
    }

    .activity-body p {
        font-size: 0.85rem;
    }

    .health-item {
        padding: 11px 0;
    }
}

/* ======================================
   RESPONSIVE – SMALL MOBILE (480px)
   ====================================== */
@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .kpi-card {
        flex-direction: row;
        padding: 14px;
        border-radius: 14px;
    }

    .kpi-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .kpi-value { font-size: 1.15rem; }
    .kpi-label { font-size: 0.68rem; }

    .admin-table tbody tr {
        padding: 14px;
        border-radius: 14px;
    }

    .report-card {
        padding: 16px;
        border-radius: 14px;
    }

    .report-card-value { font-size: 1.2rem; }

    .report-card-header {
        gap: 10px;
        margin-bottom: 12px;
    }

    .report-card-icon {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .reports-toolbar-row {
        flex-direction: column;
    }

    .reports-toolbar-row .filter-select {
        width: 100%;
    }

    .export-btn {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .settings-card {
        padding: 16px;
        border-radius: 14px;
    }

    .table-controls {
        flex-direction: column;
    }

    .search-box input {
        font-size: 0.88rem;
    }

    .filter-select {
        width: 100%;
        font-size: 0.85rem;
    }

    .filter-row {
        flex-wrap: wrap;
    }

    .filter-row .filter-select {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    .card-row-users td:first-child {
        padding: 14px 14px 10px !important;
    }

    .card-row-users td:not(:first-child):not(.actions-cell) {
        padding: 8px 14px;
    }

    .card-row-users td.actions-cell {
        padding: 10px 14px !important;
    }

    .card-row-users td.actions-cell .tbl-btn {
        width: 38px;
        height: 38px;
    }

    .card-row-jobs td:first-child {
        padding: 14px 14px 10px !important;
    }

    .card-row-jobs td:not(:first-child):not(.actions-cell) {
        padding: 8px 14px;
    }

    .card-row-jobs td.actions-cell {
        padding: 10px 14px !important;
    }

    .card-row-jobs td.actions-cell .tbl-btn {
        width: 38px;
        height: 38px;
    }

    .btab-more-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mini-bar-chart {
        height: 60px;
    }
}

/* ======================================
   USER STATS BANNER
   ====================================== */
.user-stats-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.user-stat-card {
    background: var(--admin-surface);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--admin-shadow-sm);
    transition: all var(--admin-transition);
}

.user-stat-card:hover {
    box-shadow: var(--admin-shadow-md);
    transform: translateY(-2px);
}

.user-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--admin-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.user-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.user-stat-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.user-stat-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Users Toolbar (search + filters) ── */
.users-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.search-box-full {
    width: 100%;
}

.search-box-full input {
    width: 100%;
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-result-count {
    background: var(--admin-accent-soft);
    color: var(--admin-accent);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    margin-left: auto;
}

/* ======================================
   USER DETAIL DRAWER
   ====================================== */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 700;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.drawer-overlay.drawer-active {
    opacity: 1;
    pointer-events: auto;
}

.user-drawer {
    position: fixed;
    top: 0;
    right: -460px;
    width: 440px;
    max-width: 100vw;
    height: 100%;
    background: var(--admin-surface);
    z-index: 710;
    box-shadow: -8px 0 40px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}

.user-drawer.drawer-open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--admin-border);
    flex-shrink: 0;
}

.drawer-header h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--admin-surface-alt);
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--admin-transition);
    -webkit-tap-highlight-color: transparent;
}

.drawer-close:hover {
    background: #EF4444;
    color: #fff;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    -webkit-overflow-scrolling: touch;
}

/* Drawer profile section */
.drawer-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--admin-border);
}

.drawer-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 14px;
    position: relative;
}

.drawer-avatar-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--admin-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.5rem;
}

.drawer-avatar-badge.verified { background: #10B981; color: #fff; }
.drawer-avatar-badge.unverified { background: #F59E0B; color: #fff; }

.drawer-profile-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.drawer-profile-email {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
}

/* Drawer detail rows */
.drawer-details {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
    background: var(--admin-surface-alt);
    border-radius: var(--admin-radius);
    border: 1px solid var(--admin-border);
    overflow: hidden;
}

.drawer-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--admin-border);
}

.drawer-detail-row:last-child {
    border-bottom: none;
}

.drawer-detail-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-detail-label i {
    width: 16px;
    text-align: center;
    font-size: 0.82rem;
}

.drawer-detail-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}

/* Drawer actions */
.drawer-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--admin-radius-sm);
    border: 1px solid var(--admin-border);
    background: var(--admin-surface);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all var(--admin-transition);
    -webkit-tap-highlight-color: transparent;
}

.drawer-action-btn i {
    width: 20px;
    text-align: center;
    font-size: 0.9rem;
}

.drawer-action-btn:hover {
    background: var(--admin-surface-alt);
    border-color: #CBD5E1;
}

.drawer-action-btn.btn-impersonate { color: #7C3AED; }
.drawer-action-btn.btn-impersonate:hover { background: rgba(126,34,206,0.05); border-color: rgba(126,34,206,0.2); }
.drawer-action-btn.btn-verify { color: #059669; }
.drawer-action-btn.btn-verify:hover { background: rgba(16,185,129,0.05); border-color: rgba(16,185,129,0.2); }
.drawer-action-btn.btn-suspend { color: #D97706; }
.drawer-action-btn.btn-suspend:hover { background: rgba(234,179,8,0.05); border-color: rgba(234,179,8,0.2); }
.drawer-action-btn.btn-delete { color: #DC2626; }
.drawer-action-btn.btn-delete:hover { background: rgba(220,38,38,0.05); border-color: rgba(220,38,38,0.2); }

/* ======================================
   RESPONSIVE – USER STATS BANNER
   ====================================== */
@media (max-width: 1100px) {
    .user-stats-banner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .user-stats-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .user-stat-card {
        padding: 14px 16px;
        border-radius: 14px;
    }

    .user-stat-icon {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }

    .user-stat-value { font-size: 1.15rem; }

    .user-drawer {
        right: -100%;
        width: 100%;
        max-width: 100vw;
    }

    .user-drawer.drawer-open {
        right: 0;
    }

    /* Users toolbar mobile */
    .users-toolbar {
        gap: 10px;
    }

    .search-box-full {
        position: relative;
    }

    .search-box-full input {
        padding: 12px 16px 12px 42px;
        border-radius: 28px;
        font-size: 0.88rem;
        border: 1px solid var(--admin-border);
        background: var(--admin-surface);
        box-shadow: var(--admin-shadow-sm);
    }

    .search-box-full i {
        left: 16px;
        font-size: 0.85rem;
    }

    .filter-row {
        display: flex;
        gap: 8px;
    }

    .filter-row .filter-select {
        flex: 1;
        padding: 10px 32px 10px 12px;
        border-radius: 12px;
        font-size: 0.82rem;
    }

    .filter-result-count {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        border-radius: 16px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .user-stats-banner {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .user-stat-card {
        padding: 12px;
    }

    .user-stat-value { font-size: 1.1rem; }

    .drawer-body {
        padding: 18px;
    }

    .drawer-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.3rem;
    }
}

/* ======================================
   ADMIN TOAST (injected by JS)
   ====================================== */
.admin-toast {
    position: fixed;
    bottom: calc(80px + env(safe-area-inset-bottom, 0));
    right: 16px;
    left: 16px;
    background: var(--admin-dark);
    color: #fff;
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    animation: toastSlideUp 0.35s ease;
}

@keyframes toastSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Desktop-only toast positioning */
@media (min-width: 901px) {
    .admin-toast {
        left: auto;
        right: 30px;
        bottom: 30px;
        max-width: 380px;
    }
}
