/* ==========================================================================
    Manager Portal – Corporate Admin Theme
    Clean, professional design optimized for productivity
   ========================================================================== */

:root {
    --surface: #f5f7fb;
    --surface-strong: #e2e8f0;
    --surface-card: #ffffff;
    --surface-hover: #eef2ff;
    --sidebar-bg: #ffffff;
    --sidebar-border: #e2e8f0;
    --sidebar-pill: #eef2ff;
    --text-strong: #0f172a;
    --text-body: #1f2937;
    --text-muted: #94a3b8;
    --accent: #2563eb;
    --accent-muted: #dbeafe;
    --positive: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 20px 40px rgba(15, 23, 42, 0.08);
    --transition: 180ms ease;
    --sidebar-width: 280px;

    /* Legacy variables kept for compatibility */
    --color-bg: var(--surface);
    --color-sidebar: #111827;
    --color-sidebar-hover: #1f2937;
    --color-sidebar-active: var(--accent);
    --color-text: var(--text-body);
    --color-text-muted: var(--text-muted);
    --color-text-light: #cbd5f5;
    --color-border: var(--surface-strong);
    --color-card: var(--surface-card);
    --color-primary: var(--accent);
    --color-primary-hover: #1d4ed8;
    --color-success: var(--positive);
    --color-warning: var(--warning);
    --color-danger: var(--danger);
}

/* Generic alerts */
.alert {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.12);
    color: var(--color-text);
    line-height: 1.4;
}

.alert-info {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--accent);
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--positive);
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
    color: var(--danger);
}

body.theme-dark .alert {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.5);
    color: #f8fafc;
}

body.theme-dark .alert-info {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.45);
    color: #dce7ff;
}

body.theme-dark .alert-success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.45);
    color: #bbf7d0;
}

body.theme-dark .alert-error {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
    color: #fecaca;
}

/* Image preview visibility control */
#selected-image-preview {
    display: none;
}

#selected-image-preview.active {
    display: block;
}

/* Measurement/Comparison Price Controls */
.measurement-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-card);
    color: var(--color-text);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}

.measurement-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
}

.measurement-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.measurement-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Bulk Upload */

.bulk-upload-dropzone {
    border: 2px dashed rgba(37, 99, 235, 0.3);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background: rgba(37, 99, 235, 0.04);
    transition: border-color var(--transition), background var(--transition);
}

.bulk-upload-dropzone.is-dragover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.1);
}

.bulk-upload-dropzone .dropzone-visual {
    text-align: center;
    color: var(--color-text-muted);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: center;
}

.bulk-upload-dropzone svg {
    color: var(--accent);
}

.bulk-upload-help {
    margin-top: 1.4rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--surface-card);
}

.bulk-upload-help h3 {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.bulk-upload-help ul {
    list-style: disc;
    padding-left: 1.2rem;
    color: var(--color-text-muted);
}

.bulk-upload-toolbar {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.bulk-upload-toolbar .checkbox {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.bulk-upload-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.bulk-upload-table th,
.bulk-upload-table td {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    padding: 0.6rem 0.4rem;
    vertical-align: middle;
}

.bulk-upload-table th {
    text-align: left;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.bulk-upload-table .form-input-sm {
    padding: 0.35rem 0.45rem;
    font-size: 0.85rem;
}

.bulk-upload-table .filename {
    font-weight: 600;
    color: var(--color-text);
}

.bulk-upload-table .meta {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon:hover:not(:disabled) {
    border-color: var(--danger);
    color: var(--danger);
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    border-radius: 999px;
    padding: 0.1rem 0.65rem;
    font-size: 0.75rem;
    background: rgba(148, 163, 184, 0.15);
    color: var(--color-text-muted);
    font-weight: 600;
}

.status-pill--info {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent);
}

.status-pill--success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--positive);
}

.status-pill--danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

/* Image gallery */
.gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.gallery-search {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.gallery-search .form-input {
    padding-left: 2.25rem;
}

.gallery-search .input-icon {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
    display: inline-flex;
}

.gallery-tabs {
    display: inline-flex;
    gap: 0.35rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
}

.gallery-tab {
    border: none;
    background: transparent;
    padding: 0.6rem 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.gallery-tab.is-active {
    background: var(--accent);
    color: #fff;
}

.gallery-body {
    position: relative;
    min-height: 180px;
}

.gallery-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.gallery-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--color-border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface-card);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.gallery-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--surface-strong);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.badge-info {
    background: #ffffff;
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.badge-strong {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.badge-muted {
    background: #ffffff;
    color: #4b5563;
    border: 1px solid rgba(75, 85, 99, 0.12);
}

.gallery-links {
    margin-top: 0.5rem;
    padding: 0.5rem 0.6rem;
    background: rgba(148, 163, 184, 0.08);
    border-radius: var(--radius-sm);
}

.gallery-links__label {
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.gallery-links ul {
    margin: 0;
    padding-left: 1rem;
    color: var(--color-text-muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

/* Dark mode adjustments for gallery */
body.theme-dark .gallery-card {
    background: var(--surface-card);
    border-color: rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

body.theme-dark .gallery-thumb {
    background: var(--surface-hover);
}

body.theme-dark .badge {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

body.theme-dark .badge-info {
    background: #3b82f6;
    color: #f8fafc;
}

body.theme-dark .badge-strong {
    background: #111827;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .badge-muted {
    background: #475569;
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.08);
}

body.theme-dark .gallery-links {
    background: rgba(148, 163, 184, 0.12);
}

/* Dark mode polish for gallery */
body.theme-dark .page-header h1,
body.theme-dark .page-header .muted,
body.theme-dark .page-header ul.muted .alert {
    display: block;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-strong);
}

.alert-info {
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    color: var(--accent);
}

body.theme-dark .alert {
    background: #1f2937;
    border-color: rgba(148, 163, 184, 0.5);
    color: #f8fafc;
}

body.theme-dark .alert-info {
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(59, 130, 246, 0.45);
    color: #c3d9ff;
}

body.theme-dark .gallery-tab {
    color: #cbd5e1;
}

body.theme-dark .gallery-tab.is-active {
    background: #2563eb;
    color: #f8fafc;
    border: 1px solid #2563eb;
}

body.theme-dark .gallery-sub {
    color: #cbd5e1;
}

body.theme-dark .gallery-title,
body.theme-dark .gallery-links__label {
    color: #e2e8f0;
}

body.theme-dark .gallery-links ul {
    color: #cbd5e1;
}

body.theme-dark .gallery-actions .btn {
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

/* Page bullets (reuse across sections) */
.page-bullets {
    margin-top: 0.35rem;
    padding-left: 1.2rem;
    line-height: 1.5;
    color: inherit;
}

body.theme-dark .page-bullets {
    color: #cbd5e1;
}
.gallery-meta {
    padding: 0.75rem 0.9rem 0.5rem;
}

.gallery-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text);
}

.gallery-sub {
    margin-top: 0.25rem;
    color: var(--color-text-muted);
    font-size: 0.65rem;
}

.gallery-actions {
    padding: 0.75rem 0.9rem 0.9rem;
    display: flex;
    justify-content: flex-end;
}

.gallery-empty,
.gallery-error {
    margin-top: 1rem;
    color: var(--color-text-muted);
    text-align: center;
}

.gallery-pagination {
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.gallery-page-info {
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Gallery header tweaks */
.image-gallery-actions {
    margin-top: 0.5rem;
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

/* Page Actions */
.page-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.page-actions__details {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.page-actions__buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.sort-link .sort-indicator {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.sort-link.active {
    color: var(--color-primary);
}

.sort-link.active .sort-indicator {
    color: var(--color-primary);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.8rem;
    line-height: 1.3;
    color: var(--text-body);
    background: var(--surface);
}
/* ==========================================================================
   Dark Theme
   ========================================================================== */

body.theme-dark {
    --surface: #0b1220;
    --surface-strong: #1f2937;
    --surface-card: #131c2f;
    --surface-hover: #1e293b;
    --sidebar-bg: #0f172a;
    --sidebar-border: rgba(148, 163, 184, 0.2);
    --sidebar-pill: rgba(37, 99, 235, 0.15);
    --text-strong: #f8fafc;
    --text-body: #e2e8f0;
    --text-muted: #94a3b8;
    --color-border: rgba(148, 163, 184, 0.3);
}

/* Dark Theme: Cards & Surfaces
   ---------------------------------------- */
body.theme-dark .card,
body.theme-dark .card.is-table,
body.theme-dark .insight-card,
body.theme-dark .dashboard-hero {
    background: var(--surface-card);
    border-color: rgba(148, 163, 184, 0.15);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.45);
}

/* Dark Theme: Typography - Headings
   ---------------------------------------- */
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark .card-heading h2,
body.theme-dark .card-heading h3,
body.theme-dark .card-header,
body.theme-dark .section-title,
body.theme-dark .page-actions__details strong {
    color: #f8fafc;
}

/* Dark Theme: Typography - Muted Text
   ---------------------------------------- */
body.theme-dark .hero-subtitle,
body.theme-dark .muted,
body.theme-dark .page-actions__details,
body.theme-dark .nav-group__label {
    color: rgba(226, 232, 240, 0.75);
}

body.theme-dark .card-body,
body.theme-dark .card-heading p,
body.theme-dark .card-header small,
body.theme-dark .pane-body p {
    color: rgba(226, 232, 240, 0.9);
}

/* Dark Theme: Form Inputs
   ---------------------------------------- */
body.theme-dark .form-input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark input[type="file"] {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--text-body);
}

/* Dark Theme: Form Placeholders
   ---------------------------------------- */
body.theme-dark .form-input::placeholder,
body.theme-dark textarea::placeholder {
    color: rgba(226, 232, 240, 0.5);
}

/* Dark Theme: Select Dropdown Arrow
   ---------------------------------------- */
body.theme-dark select {
    background:
        rgba(15, 23, 42, 0.7)
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e")
        no-repeat right 0.75rem center;
    background-size: 16px;
}

/* Dark Theme: File Input
   ---------------------------------------- */
body.theme-dark input[type="file"] {
    background: rgba(15, 23, 42, 0.7);
    color: var(--text-body);
}

/* Dark Theme: Table Wrapper & Background
   ---------------------------------------- */
body.theme-dark .table-wrapper > table {
    background: rgba(19, 28, 47, 0.9);
}

body.theme-dark .table-wrapper {
    background: transparent;
}

/* Dark Theme: Table Headers
   ---------------------------------------- */
body.theme-dark .table-wrapper th {
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5f5;
}

/* Dark Theme: Table Cells
   ---------------------------------------- */
body.theme-dark .table-wrapper td,
body.theme-dark .table-wrapper th {
    border-bottom-color: rgba(148, 163, 184, 0.12);
    color: var(--text-body);
}

body.theme-dark .table-wrapper tr:last-child td {
    border-bottom-color: transparent;
}

/* Dark Theme: Table Rows & Striping
   ---------------------------------------- */
body.theme-dark tbody tr {
    background: rgba(19, 28, 47, 0.85);
}

body.theme-dark tbody tr:nth-child(odd) {
    background: rgba(24, 33, 56, 0.9);
}

/* Dark Theme: Table Row Hover
   ---------------------------------------- */
body.theme-dark tr:hover td {
    background: rgba(37, 99, 235, 0.08);
}

/* Dark Theme: Badges - Base
   ---------------------------------------- */
body.theme-dark .badge {
    border-color: transparent;
}

/* Dark Theme: Badges - Active State
   ---------------------------------------- */
body.theme-dark .badge-active {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

/* Dark Theme: Badges - Inactive State
   ---------------------------------------- */
body.theme-dark .badge-inactive {
    background: rgba(148, 163, 184, 0.2);
    color: #cbd5f5;
}

/* Dark Theme: Badges - Danger/Expired State
   ---------------------------------------- */
body.theme-dark .badge-expired,
body.theme-dark .badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* Dark Theme: Badges - Warning State
   ---------------------------------------- */
body.theme-dark .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Dark Theme: Pagination
   ---------------------------------------- */
body.theme-dark .pagination {
    color: var(--text-muted);
}

body.theme-dark .pagination strong {
    color: var(--text-body);
}

/* Dark Theme: Buttons - Secondary
   ---------------------------------------- */
body.theme-dark .btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
}

body.theme-dark .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Dark Theme: Buttons - Primary
   ---------------------------------------- */
body.theme-dark .btn-primary {
    background: var(--accent);
}

body.theme-dark .btn-primary:hover {
    background: #1e40af;
}

/* Dark Theme: Scrollbars
   ---------------------------------------- */
body.theme-dark .table-wrapper::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
    border-radius: 999px;
}

body.theme-dark .table-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
}

body.theme-dark .table-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.7);
}

/* Dark Theme: Slide Pane - Overlay
   ---------------------------------------- */
body.theme-dark .pane-overlay {
    background: rgba(2, 6, 23, 0.7);
}

/* Dark Theme: Slide Pane - Panel
   ---------------------------------------- */
body.theme-dark .pane-panel {
    background: #0f172a;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.6);
    border-left: 1px solid rgba(148, 163, 184, 0.2);
}

/* Dark Theme: Slide Pane - Header
   ---------------------------------------- */
body.theme-dark .pane-header {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

/* Dark Theme: Slide Pane - Close Button
   ---------------------------------------- */
body.theme-dark .pane-close {
    color: rgba(226, 232, 240, 0.7);
}

body.theme-dark .pane-close:hover {
    color: #fff;
}

/* Dark Theme: Slide Pane - Body
   ---------------------------------------- */
body.theme-dark .pane-body {
    background: transparent;
    color: var(--text-body);
}

/* Dark Theme: Form Labels
   ---------------------------------------- */
body.theme-dark .form-label,
body.theme-dark label {
    color: rgba(226, 232, 240, 0.9);
}

/* Dark Theme: Login Page
   ---------------------------------------- */
body.theme-dark .login-shell {
    background: linear-gradient(135deg, #020617 0%, #0f172a 100%);
}

body.theme-dark .login-card {
    background: #0f172a;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

body.theme-dark .login-card h1,
body.theme-dark .login-card .subtitle,
body.theme-dark .login-card label,
body.theme-dark .login-card p {
    color: rgba(248, 250, 252, 0.95);
}

body.theme-dark .login-card .form-input {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

/* ==========================================================================
   Layout Shell
   ========================================================================== */

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    align-items: stretch;
    overflow-x: hidden;
    background: var(--surface);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.manager-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    padding: 1.0rem;
    min-height: 100vh;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Sidebar profile */
.profile-switcher {
    position: relative;
    margin-bottom: 1rem;
}

.profile-trigger {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-lg);
    padding: 0.55rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--surface-card);
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.profile-trigger:hover {
    border-color: var(--accent-muted);
    box-shadow: var(--shadow-sm);
}

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--accent-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--accent);
}

.profile-meta {
    flex: 1;
    text-align: left;
}

.profile-name {
    display: block;
    font-weight: 600;
    color: var(--text-strong);
    font-size: 0.9rem;
}

.profile-meta small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.profile-switcher .chevron {
    color: var(--text-muted);
    transition: transform var(--transition);
}

.profile-switcher.is-open .chevron {
    transform: rotate(180deg);
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    right: 0;
    background: var(--surface-card);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    padding: 0.9rem;
    display: none;
    z-index: 20;
}

.profile-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 28px;
    width: 14px;
    height: 14px;
    background: var(--surface-card);
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    transform: rotate(45deg);
}

.profile-switcher.is-open .profile-dropdown {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--text-body);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.45rem 0.35rem;
    border-radius: var(--radius-md);
    transition: background var(--transition), color var(--transition);
}

.profile-link svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.profile-link:hover {
    background: var(--surface);
    color: var(--accent);
}

.theme-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.theme-toggle p {
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 0.15rem;
}

.theme-toggle small {
    color: var(--text-muted);
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
}

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

.theme-switch__slider {
    position: absolute;
    inset: 0;
    background: var(--surface-strong);
    border-radius: 999px;
    transition: background var(--transition);
}

.theme-switch__slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.2);
    transition: transform var(--transition);
}

.theme-switch input:checked + .theme-switch__slider {
    background: var(--accent);
}

.theme-switch input:checked + .theme-switch__slider::before {
    transform: translateX(18px);
}

.profile-signout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-muted) 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
}

.profile-signout svg {
    width: 16px;
    height: 16px;
    color: inherit;
}

.profile-signout:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.nav-group {
    margin-bottom: 1.0rem;
}

.nav-group__label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.nav-group ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.45rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-body);
    font-weight: 500;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.sidebar-nav a .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.sidebar-nav a:hover {
    background: var(--sidebar-pill);
    transform: translateX(4px);
}

.sidebar-nav a.is-active {
    background: var(--accent-muted);
    color: var(--accent);
}

.sidebar-nav a.is-active .nav-icon {
    background: #fff;
    color: var(--accent);
    box-shadow: var(--shadow-sm);
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-footer form {
    margin: 0;
}

.sidebar-footer button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--sidebar-border);
    background: #fff;
    color: var(--text-body);
    font-weight: 600;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.sidebar-footer button:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */

main {
    padding: 1.5rem clamp(1rem, 2.5vw, 2.5rem);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--text-body);
    font-weight: 600;
    margin-bottom: 1rem;
    cursor: pointer;
}

.nav-toggle svg {
    width: 20px;
    height: 20px;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 99;
}

body.nav-open .mobile-nav-overlay {
    opacity: 1;
    pointer-events: auto;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0 0 0.25rem 0;
}

.page-header p {
    color: var(--color-text-muted);
    margin: 0;
}

.page-header ul {
    color: var(--color-text-muted);
}


/* ==========================================================================
   Cards
   ========================================================================== */

.card,
.card.is-table {
    background: var(--surface-card);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
    font-weight: 600;
    color: var(--text-strong);
}

.card-body {
    padding: 1rem 1.1rem;
}

.insight-card {
    background: var(--surface-card);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

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

/* ==========================================================================
   Stat Cards (Overview)
   ========================================================================== */

.dashboard-hero {
    background: var(--surface-card);
    border: 1px solid rgba(15, 23, 42, 0.05);
    border-radius: 20px;
    padding: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.hero-details h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-strong);
    margin-bottom: 0.4rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.hero-subtitle {
    color: var(--text-muted);
}

.hero-tabs {
    display: inline-flex;
    background: var(--surface);
    border-radius: 999px;
    padding: 0.15rem;
    border: 1px solid rgba(15, 23, 42, 0.05);
    gap: 0.25rem;
}

.pill-tab {
    border: none;
    background: transparent;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.pill-tab.is-active {
    background: #fff;
    color: var(--text-strong);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.insight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.card-heading h2,
.card-heading h3 {
    margin: 0;
    color: var(--text-strong);
}

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

.progress-track {
    width: 100%;
    height: 8px;
    background: var(--surface);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #34d399, #10b981);
    border-radius: inherit;
    transition: width 400ms ease;
    width: var(--progress, 0%);
}

.team-avatars {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.avatar-chip {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.avatar-chip.-large {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}

.delta-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.delta-positive {
    background: #ecfdf5;
    color: #047857;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.mini-stats strong {
    font-size: 1.2rem;
    color: var(--text-strong);
}

.layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0.85rem;
}

.layout-primary,
.layout-secondary {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bar-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(40px, 1fr));
    gap: 0.6rem;
    align-items: end;
    min-height: 220px;
}

.bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.bar {
    width: 100%;
    border-radius: 999px;
    background: var(--accent);
    position: relative;
    box-shadow: inset 0 0 8px rgba(255,255,255,0.2);
    height: var(--bar-height, 40%);
}

.bar.-secondary {
    background: rgba(99, 102, 241, 0.3);
    margin-top: 0.35rem;
    height: var(--bar-height, 25%);
}

.activity-feed,
.segment-list,
.team-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-feed li,
.segment-list li,
.team-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.segment-marker {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
    flex-shrink: 0;
    background: var(--accent);
}

.segment-list li {
    align-items: flex-start;
}

.segment-list li > div {
    flex: 1;
}

.team-list li {
    align-items: center;
}

.icon-button {
    border: none;
    background: #fff;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}

.icon-button:hover {
    background: var(--surface);
    color: var(--text-strong);
}

.team-card ul li {
    padding: 0.25rem 0;
}

.team-card button {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}

.avatar-chip[data-theme="indigo"],
.avatar-chip.-large[data-theme="indigo"] {
    background: #eef2ff;
    color: #4f46e5;
}

.avatar-chip[data-theme="orange"],
.avatar-chip.-large[data-theme="orange"] {
    background: #fff7ed;
    color: #c2410c;
}

.avatar-chip[data-theme="teal"],
.avatar-chip.-large[data-theme="teal"] {
    background: #f0fdfa;
    color: #0f766e;
}

.segment-marker[data-theme="green"] {
    background: #10b981;
}

.segment-marker[data-theme="blue"] {
    background: #0ea5e9;
}

.segment-marker[data-theme="amber"] {
    background: #f59e0b;
}
.chart-card {
    padding-bottom: 2rem;
}

/* ==========================================================================
   Flash Messages
   ========================================================================== */

.flash-messages {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.flash {
    padding: 0.85rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    border: 1px solid transparent;
}

.flash.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.flash.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.flash.danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.flash.success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}

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

.btn-secondary {
    background: #fff;
    border-color: var(--color-border);
    color: var(--text-body);
}

.btn-secondary:hover {
    background: #f1f5f9;
}

.btn-danger {
    background: #ef4444;
    border-color: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.pane-root {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 999;
}

.pane-root.is-open {
    pointer-events: auto;
}

.pane-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity var(--transition);
}

.pane-root.is-open .pane-overlay {
    opacity: 1;
}

.pane-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(520px, 100%);
    background: #fff;
    box-shadow: -20px 0 40px rgba(15, 23, 42, 0.18);
    transform: translateX(100%);
    transition: transform var(--transition);
    display: flex;
    flex-direction: column;
}

.pane-root.is-open .pane-panel {
    transform: translateX(0);
}

.pane-header {
    display: flex;
    justify-content: flex-end;
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.pane-close {
    border: none;
    background: none;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.pane-close:hover {
    color: var(--color-text);
}

.pane-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.375rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: #fff;
    color: var(--color-text);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

select {
    width: 100%;
    padding: 0.55rem 2.2rem 0.55rem 0.85rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background:
        #fff
        url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236E7891' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e")
        no-repeat right 0.75rem center;
    background-size: 16px;
    font-size: 0.875rem;
    color: var(--color-text);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.1);
}

select:disabled {
    background-color: #f8fafc;
    color: var(--color-text-muted);
    cursor: not-allowed;
}

select[multiple],
select[size]:not([size="1"]) {
    padding-right: 0.85rem;
    background-image: none;
    min-height: 3rem;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border: 1px solid transparent;
}

.badge-active {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.badge-inactive {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

.badge-expired {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.badge-warning {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.badge-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    position: relative;
    display: block;
    -webkit-overflow-scrolling: touch;
}

.table-wrapper > table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}

.table-wrapper th,
.table-wrapper td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    word-break: break-word;
}

.table-wrapper[data-scroll-container] > table {
    width: max-content;
    max-width: none;
}

.table-wrapper[data-scroll-container] th,
.table-wrapper[data-scroll-container] td {
    white-space: nowrap;
}

.table-wrapper[data-scroll-container] td:first-child {
    min-width: 320px;
    white-space: normal;
}

.table-wrapper[data-scroll-container] td:nth-child(2) {
    min-width: 200px;
    white-space: normal;
}

.table-wrapper[data-scroll-container] td:nth-child(3) {
    min-width: 160px;
    white-space: normal;
}

tbody tr {
    background: #fff;
}

tbody tr:nth-child(odd) {
    background: #fdfdfd;
}

tbody tr + tr td {
    border-top: 1px solid rgba(15, 23, 42, 0.05);
}

th {
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #f8fafc;
}

.table-actions-cell {
    width: 1%;
    white-space: nowrap;
}

.table-actions {
    display: inline-flex;
    gap: 0.5rem;
}

.table-actions .btn {
    padding: 0.25rem 0.75rem;
}

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

.table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: #f8fafc;
}

/* ==========================================================================
   Login Page (centered layout)
   ========================================================================== */

.login-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

.login-card h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--color-text);
}

.login-card .subtitle {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.login-card .btn-primary {
    width: 100%;
    padding: 0.75rem 1rem;
}

/* "eller" divider between email/password and Google login */
.login-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--surface-strong);
}

/* Google Sign-In button */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--surface-strong);
    border-radius: var(--radius-sm);
    background: var(--surface-card);
    color: var(--text-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition);
}

.btn-google:hover {
    background: var(--surface-hover);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.btn-google svg {
    flex-shrink: 0;
}

/* Dark theme overrides for Google button and divider */
body.theme-dark .login-divider {
    color: rgba(148, 163, 184, 0.6);
}

body.theme-dark .login-divider::before,
body.theme-dark .login-divider::after {
    background: rgba(148, 163, 184, 0.2);
}

body.theme-dark .btn-google {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.25);
    color: #e2e8f0;
}

body.theme-dark .btn-google:hover {
    background: rgba(30, 41, 59, 0.8);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 1024px) {
    .app-shell {
        grid-template-columns: clamp(200px, 32vw, 260px) 1fr;
    }
    main {
        padding: 1.5rem;
    }
    .layout-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }
    .manager-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: clamp(240px, 80vw, 320px);
        transform: translateX(-100%);
        transition: transform var(--transition);
        z-index: 100;
        box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
        border-right: 1px solid var(--sidebar-border);
    }
    body.nav-open .manager-sidebar {
        transform: translateX(0);
    }
    .nav-toggle {
        display: inline-flex;
    }
    main {
        padding: 1.25rem;
    }
}

@media (max-width: 600px) {
    .dashboard-hero {
        padding: 1.5rem;
    }
    .hero-tabs {
        width: 100%;
        justify-content: space-between;
    }
    .insight-grid {
        grid-template-columns: 1fr;
    }
}
