/* ===== CSS Custom Properties for Theming ===== */
:root {
    --liberum-red: #BE1E2D;
    --bg-primary: #f8f9fc;
    --bg-secondary: #ffffff;
    --bg-sidebar: #1e293b;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-sidebar: #cbd5e1;
    --text-sidebar-active: #ffffff;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-light: #eef2ff;
    --border: #e2e8f0;
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --info: #3b82f6;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --badge-bg: #f1f5f9;
    --badge-text: #475569;
    --table-stripe: #f8fafc;
    --scrollbar-bg: #e2e8f0;
    --scrollbar-thumb: #94a3b8;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-sidebar: #0f172a;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-sidebar: #94a3b8;
    --text-sidebar-active: #f1f5f9;
    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-light: #1e1b4b;
    --border: #334155;
    --card-bg: #1e293b;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    --danger: #f87171;
    --success: #34d399;
    --warning: #fbbf24;
    --info: #60a5fa;
    --input-bg: #1e293b;
    --input-border: #475569;
    --badge-bg: #334155;
    --badge-text: #cbd5e1;
    --table-stripe: #162032;
    --scrollbar-bg: #1e293b;
    --scrollbar-thumb: #475569;
}

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}
a:hover {
    color: var(--accent-hover);
}

/* ===== Layout ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 240px;
    background: var(--bg-sidebar);
    padding: 1.5rem 0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    padding: 0 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
}

.sidebar-brand .liberum-logo {
    display: block;
    width: 100%;
    max-width: 170px;
    height: auto;
}

.sidebar-brand .liberum-logo .logo-wordmark {
    fill: var(--liberum-red);
}

.sidebar-brand .liberum-logo .logo-tagline {
    fill: var(--text-sidebar);
}

.sidebar-brand .app-subtitle {
    color: var(--text-sidebar);
    font-size: 0.7rem;
    display: block;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    position: relative;
    left: 6px;
}

.sidebar-nav {
    list-style: none;
    flex: 1;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: var(--text-sidebar);
    font-size: 0.9rem;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: var(--text-sidebar-active);
    background: rgba(255,255,255,0.05);
    border-left-color: var(--accent);
}

.sidebar-nav li a .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 240px;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.agent-status-banner {
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
}

.agent-status-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-status-banner .spinner {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    width: 14px;
    height: 14px;
}

.agent-status-banner .btn-danger {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    padding: 0.2rem 0.75rem;
    font-size: 0.8rem;
}

.agent-status-banner .btn-danger:hover {
    background: rgba(255, 255, 255, 0.35);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.content-area {
    padding: 2rem;
    flex: 1;
}

/* ===== Dark Mode Toggle ===== */
.theme-toggle {
    background: none;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    padding: 0.45rem;
    cursor: pointer;
    color: var(--text-sidebar);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-sidebar-active);
}
.theme-toggle svg {
    display: block;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: #ffffff;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #ffffff;
}

.btn-secondary {
    background: var(--badge-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--border);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.btn-sync {
    position: relative;
}
.btn-sync.syncing {
    pointer-events: none;
}

/* ===== Spinner ===== */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    flex-shrink: 0;
}

.btn-secondary .spinner {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--text-primary);
}

/* ===== Cards ===== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.25rem;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--card-shadow);
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-top: 0.25rem;
    line-height: 1.2;
}

.stat-card .stat-detail {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.3rem;
}

/* ===== Pipeline Bar ===== */
.pipeline-bar {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    height: 32px;
    margin-bottom: 0.5rem;
}

.pipeline-segment {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    min-width: 30px;
    transition: flex-grow 0.3s ease;
}

.pipeline-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.pipeline-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pipeline-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ===== Tables ===== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

tr:hover td {
    background: var(--accent-light);
}

tr:nth-child(even) td {
    background: var(--table-stripe);
}
tr:nth-child(even):hover td {
    background: var(--accent-light);
}

.table-link {
    color: var(--text-primary);
    display: block;
}
.table-link:hover {
    color: var(--accent);
}

/* ===== Sortable Columns ===== */
th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 1.6rem;
}
th.sortable:hover {
    color: var(--text-primary);
}
th.sortable::after {
    content: '\2195';
    position: absolute;
    right: 0.4rem;
    opacity: 0.3;
    font-size: 0.75rem;
}
th.sortable.asc::after {
    content: '\2191';
    opacity: 0.8;
}
th.sortable.desc::after {
    content: '\2193';
    opacity: 0.8;
}

/* ===== Badges ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-stage {
    background: var(--badge-bg);
    color: var(--badge-text);
}

.badge-active { background: #dcfce7; color: #166534; }
.badge-hired { background: #dbeafe; color: #1e40af; }
.badge-disqualified { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .badge-active { background: #052e16; color: #86efac; }
[data-theme="dark"] .badge-hired { background: #172554; color: #93c5fd; }
[data-theme="dark"] .badge-disqualified { background: #450a0a; color: #fca5a5; }

.badge-tag {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 0.7rem;
    margin-right: 0.25rem;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: border-color 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

textarea.form-control {
    resize: vertical;
    min-height: 200px;
}

/* ===== Filter Sidebar ===== */
.page-with-filters {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
}

.filter-panel {
    position: sticky;
    top: 80px;
    align-self: start;
}

.filter-panel .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-clear {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.filter-clear:hover {
    color: var(--danger);
}

/* ===== Candidate Detail ===== */
.candidate-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.candidate-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--badge-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.candidate-info h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.candidate-info .candidate-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.candidate-detail-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
}

/* ===== Notes ===== */
.note-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

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

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.note-author {
    font-weight: 600;
    font-size: 0.85rem;
}

.note-time {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.note-content {
    font-size: 0.9rem;
    line-height: 1.5;
}

.note-type-flag { border-left: 3px solid var(--danger); padding-left: 1rem; }
.note-type-vetting { border-left: 3px solid var(--accent); padding-left: 1rem; }
.note-type-comment { border-left: 3px solid var(--info); padding-left: 1rem; }

/* ===== Tabs ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    background: none;
    font-size: 0.9rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 1.5rem;
}

.pagination a, .pagination span {
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--accent-light);
    color: var(--accent);
    border-color: var(--accent);
}

.pagination .active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.pagination .disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* ===== Flash Messages ===== */
.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.flash-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }

[data-theme="dark"] .flash-success { background: #052e16; color: #86efac; border-color: #166534; }
[data-theme="dark"] .flash-error { background: #450a0a; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .flash-info { background: #172554; color: #93c5fd; border-color: #1e40af; }
[data-theme="dark"] .flash-warning { background: #451a03; color: #fcd34d; border-color: #92400e; }

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ===== Settings ===== */
.settings-section {
    margin-bottom: 2rem;
}

.settings-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

/* ===== Job Cards ===== */
.job-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.job-card {
    display: block;
    color: var(--text-primary);
}
.job-card:hover {
    color: var(--text-primary);
}
.job-card:hover .card {
    border-color: var(--accent);
}

.job-card .card-body h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.job-card .job-meta {
    color: var(--text-secondary);
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ===== Experience/Education Items ===== */
.timeline-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item h4 { font-size: 0.95rem; margin-bottom: 0.1rem; }
.timeline-item .timeline-sub { color: var(--text-secondary); font-size: 0.85rem; }
.timeline-item .timeline-date { font-size: 0.8rem; color: var(--text-secondary); }

/* ===== Skills ===== */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* ===== Score Badges ===== */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
}
.score-high { background: #dcfce7; color: #166534; }
.score-medium { background: #fef3c7; color: #92400e; }
.score-low { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .score-high { background: #052e16; color: #86efac; }
[data-theme="dark"] .score-medium { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .score-low { background: #450a0a; color: #fca5a5; }

.badge-shortlisted { background: #dbeafe; color: #1e40af; }
[data-theme="dark"] .badge-shortlisted { background: #172554; color: #93c5fd; }

/* ===== Liberum Assessment ===== */
.liberum-assessment {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.liberum-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 0.5rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
}

.liberum-grade-a { background: #dcfce7; color: #166534; }
.liberum-grade-b { background: #dbeafe; color: #1e40af; }
.liberum-grade-c { background: #fef3c7; color: #92400e; }
.liberum-grade-d { background: #fee2e2; color: #991b1b; }
.liberum-grade-f { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .liberum-grade-a { background: #052e16; color: #86efac; }
[data-theme="dark"] .liberum-grade-b { background: #172554; color: #93c5fd; }
[data-theme="dark"] .liberum-grade-c { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .liberum-grade-d { background: #450a0a; color: #fca5a5; }
[data-theme="dark"] .liberum-grade-f { background: #450a0a; color: #fca5a5; }

.liberum-assessment details summary {
    user-select: none;
}
.liberum-assessment details summary:hover {
    color: var(--accent);
}

/* ===== Criteria Editor ===== */
.criteria-textarea {
    min-height: 200px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* ===== Criteria Drag & Drop ===== */
.domain-item, .job-override-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.domain-item.dragging, .job-override-item.dragging {
    opacity: 0.4;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.drag-handle {
    cursor: grab;
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 0.25rem;
    user-select: none;
    flex-shrink: 0;
    margin-top: 0.25rem;
}
.drag-handle:active { cursor: grabbing; }

.domain-content, .override-content { flex: 1; min-width: 0; }

.domain-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

textarea.domain-instructions, textarea.override-instructions {
    min-height: 70px;
    font-size: 0.85rem;
    line-height: 1.5;
    resize: vertical;
}

.domain-delete { flex-shrink: 0; margin-top: 0.25rem; }

.override-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.override-actions {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .candidate-detail-grid {
        grid-template-columns: 1fr;
    }
    .page-with-filters {
        grid-template-columns: 1fr;
    }
    .filter-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .content-area {
        padding: 1rem;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== User Info (Sidebar) ===== */
.user-info {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.user-info-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-name {
    color: var(--text-sidebar-active);
    font-size: 0.85rem;
    font-weight: 600;
}

.user-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-sidebar {
    background: rgba(255,255,255,0.08);
    color: var(--text-sidebar);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    text-decoration: none;
}
.btn-sidebar:hover {
    background: rgba(255,255,255,0.15);
    color: var(--text-sidebar-active);
}

/* ===== Role Badges ===== */
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.role-super_admin {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}
.role-admin {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}
.role-user {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}
