:root {
    /* Premium Color Palette - Teal & Slate */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;
    
    --primary: var(--primary-600);
    --primary-dark: var(--primary-700);
    --primary-light: var(--primary-300);
    --primary-hover: var(--primary-500);
    
    /* Slate Grays */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Accent Colors */
    --indigo: #6366f1;
    --indigo-dark: #4f46e5;
    --emerald: #10b981;
    --rose: #f43f5e;
    --amber: #f59e0b;
    
    /* Surfaces & Backgrounds */
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --surface-hover: var(--slate-50);
    --background: var(--slate-50);
    --background-secondary: var(--slate-100);
    
    /* Text Colors */
    --text-primary: var(--slate-900);
    --text-secondary: var(--slate-600);
    --text-tertiary: var(--slate-400);
    --text-on-primary: #ffffff;
    --text-muted: var(--slate-500);
    
    /* Borders & Dividers */
    --border: var(--slate-200);
    --border-light: var(--slate-100);
    --border-hover: var(--slate-300);
    --divider: var(--slate-200);
    
    /* Shadows - Layered & Sophisticated */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
    --shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.06);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    
    /* Colored Shadows */
    --shadow-primary: 0 4px 14px 0 rgba(13, 148, 136, 0.15);
    --shadow-primary-lg: 0 8px 24px 0 rgba(13, 148, 136, 0.2);
    
    /* Transitions & Animations */
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    
    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing Scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(to bottom, var(--slate-50) 0%, var(--slate-100) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    padding: var(--space-4);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 15px;
    min-height: 100vh;
}

@media (min-width: 768px) {
    body {
        padding: var(--space-6);
    }
}

@media (min-width: 1024px) {
    body {
        padding: var(--space-8);
    }
}

.container {
    max-width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 1200px;
    }
}

header {
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (min-width: 768px) {
    header {
        margin-bottom: var(--space-8);
    }
}

.header-controls {
    display: flex;
    flex-direction: column;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    gap: var(--space-3);
    transition: var(--transition-slow);
    box-shadow: var(--shadow-md);
}

.controls-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
    flex: 1;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.nav-links::-webkit-scrollbar {
    display: none;
}

.nav-filters {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
}

.nav-filters .aggregation-select {
    width: 100%;
}

@media (min-width: 768px) {
    .header-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: var(--space-3) var(--space-5);
    }

    .controls-left {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .nav-filters {
        width: auto;
    }

    .nav-filters .aggregation-select {
        width: auto;
    }
}

.btn {
    padding: 11px 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: var(--surface);
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-xs);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
    color: var(--text-on-primary);
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-600) 100%);
    box-shadow: var(--shadow-primary-lg);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #f0fdfa;
    border-color: var(--primary-light);
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: var(--space-12);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    text-align: center;
    max-width: 480px;
    margin: 100px auto;
    box-shadow: var(--shadow-2xl);
}

.login-card h1 {
    margin-bottom: 20px;
}

.login-card p {
    margin-bottom: 30px;
    color: #6c757d;
}

.sync-info {
    background: var(--surface);
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.sync-info p {
    margin: 0;
    color: #6c757d;
}

.controls-right {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.btn-link {
    background: transparent;
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-3);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: var(--transition-fast);
    white-space: nowrap;
    border: 1px solid transparent;
    flex-shrink: 0;
    position: relative;
}

@media (min-width: 768px) {
    .btn-link {
        padding: 8px 16px;
        font-size: 0.875rem;
    }
}

.btn-link:hover {
    background: var(--primary-50);
    color: var(--primary-700);
    border-color: var(--primary-100);
}

.btn-link.active {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
    color: var(--text-on-primary);
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

.btn-link.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.5;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
}

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

.btn-icon:active {
    background: var(--border);
}

.divider {
    display: none;
}

@media (min-width: 768px) {
    .divider {
        display: block;
        width: 1px;
        height: 32px;
        background: var(--divider);
        margin: 0 12px;
    }
}

.aggregation-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    min-height: 38px;
    font-weight: 600;
    font-family: inherit;
    flex-shrink: 0;
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

@media (min-width: 768px) {
    .aggregation-select {
        padding: 10px 16px;
        font-size: 0.875rem;
        min-height: 40px;
    }
}

.aggregation-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-100), var(--shadow-sm);
}

.aggregation-select:hover {
    border-color: var(--primary-200);
    background: var(--primary-50);
    box-shadow: var(--shadow-sm);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.stats {
    color: #6c757d;
    font-size: 14px;
}

.loading {
    text-align: center;
    padding: 40px;
    background: var(--card-background);
    border-radius: 8px;
    margin-bottom: 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.measurements-table {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: visible;
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow-lg);
}

.measurements-table > div {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.col-date {
    width: 16%;
}

.col-metric {
    width: 10.5%;
}

.col-bmi {
    width: 9%;
}

th, td {
    text-align: center;
    white-space: nowrap;
}

th {
    padding: 12px 16px;
    background: linear-gradient(to bottom, var(--slate-100) 0%, var(--slate-50) 100%);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid var(--primary-200);
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.9375rem;
}

tbody tr {
    transition: var(--transition-fast);
}

tbody tr:hover {
    background: var(--primary-50);
}

tbody tr.weekend {
    background: #fff3cd;
}

tbody tr.weekend:hover {
    background: #ffe69c;
}

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

/* Metric Cell Color Gradient - Pastel Palette */
.metric-cell {
    position: relative;
    transition: all 0.25s var(--ease-out);
    font-weight: 600;
}

.date-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
}

.date-gym {
    font-size: 0.95em;
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.date-gym:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

.metric-cell:hover {
    box-shadow: var(--shadow), 0 0 0 3px var(--primary-100);
    transform: scale(1.02);
    z-index: 5;
}

/* Pastel Green Spectrum (Best Values) */
.metric-cell.excellent {
    background: #d4f4dd;
    color: #1a5f3a;
}

.metric-cell.very-good {
    background: #dff7e6;
    color: #2d6e4a;
}

.metric-cell.good {
    background: #e8f9ed;
    color: #3a7d5a;
}

/* Pastel Yellow Spectrum (Moderate Values) */
.metric-cell.moderate {
    background: #fff9e6;
    color: #8b7635;
}

.metric-cell.fair {
    background: #fff5d9;
    color: #9d7a2f;
}

/* Pastel Orange Spectrum (Poor Values) */
.metric-cell.poor {
    background: #ffe8d1;
    color: #a85a2a;
}

.metric-cell.bad {
    background: #ffddc4;
    color: #b84e1f;
}

/* Pastel Red Spectrum (Worst Values) */
.metric-cell.very-bad {
    background: #ffd4d4;
    color: #c13838;
}

.metric-cell.worse {
    background: #ffc7c7;
    color: #d12828;
}

.metric-cell.worst {
    background: #ffbaba;
    color: #e01818;
}

/* Tooltip on Hover */
.metric-cell[data-tooltip]:not([data-tooltip=""]):hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: normal;
    z-index: 1000;
    margin-bottom: 5px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.metric-cell[data-tooltip]:not([data-tooltip=""]):hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    pointer-events: none;
}

/* First row: show tooltip below instead of above */
tbody tr:first-child .metric-cell[data-tooltip]:not([data-tooltip=""]):hover::after {
    bottom: auto;
    top: 100%;
    margin-bottom: 0;
    margin-top: 5px;
}

tbody tr:first-child .metric-cell[data-tooltip]:not([data-tooltip=""]):hover::before {
    bottom: auto;
    top: 100%;
    border-top-color: transparent;
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

.no-data {
    text-align: center;
    color: #6c757d;
    padding: 40px !important;
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

/* Hide on mobile */
@media (max-width: 767px), (hover: none) and (pointer: coarse) {
    th.hide-mobile,
    td.hide-mobile {
        display: none !important;
    }

    col.hide-mobile {
        display: none;
        visibility: collapse;
        width: 0;
    }
}

/* Date cell */
.date-cell {
    white-space: nowrap;
}

.date-desktop {
    display: inline;
}

.date-mobile {
    display: none;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        font-size: 13px;
    }

    .date-desktop {
        display: none;
    }

    .date-mobile {
        display: inline;
    }

    h1 {
        font-size: 1.5rem;
    }

    header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .login-card {
        padding: 30px 20px;
        margin: 50px auto;
    }

    table {
        font-size: 0.75rem;
    }

    th {
        font-size: 0.625rem;
        padding: 8px 6px;
    }

    td {
        font-size: 0.75rem;
        padding: 8px 6px;
    }

    .date-cell {
        font-size: 0.7rem;
    }

    .measurements-table {
        overflow-x: scroll;
    }

    .btn-link {
        font-size: 0.75rem;
        padding: 6px 10px;
    }

    .aggregation-select {
        font-size: 0.75rem;
        padding: 6px 10px;
        min-height: 32px;
    }

    .metric-cell {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 12px;
    }

    th {
        font-size: 0.55rem;
        padding: 6px 3px;
    }

    td {
        font-size: 0.7rem;
        padding: 6px 3px;
    }

    .date-cell {
        font-size: 0.65rem;
    }

    .btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .btn-link {
        font-size: 0.7rem;
        padding: 5px 8px;
    }

    .aggregation-select {
        font-size: 0.7rem;
        padding: 5px 8px;
        min-height: 30px;
    }

    .metric-cell {
        font-size: 0.7rem;
    }
}

/* Statistics Page */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 16px;
}

@media (min-width: 480px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
        margin-top: 20px;
    }
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: var(--space-8);
    text-align: center;
    transition: var(--transition-slow);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-300));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

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

.stat-card.best {
    border-top: 4px solid var(--success-color);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.stat-card h2 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-percentage {
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.stat-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.stat-details {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-details span {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    h1 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .btn {
        font-size: 14px;
        padding: 8px 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-value {
        font-size: 2rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   New compact site-header (replaces old h1 + header-controls)
   ═══════════════════════════════════════════════════════════ */

/* Skip link — accessible keyboard shortcut */
.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 9999;
    background: var(--primary-700);
    color: #fff;
    padding: 8px 16px;
    border-radius: 0 0 var(--radius) var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: top 0.15s;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid var(--primary-300);
    outline-offset: 2px;
}

/* Header bar */
header.site-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 0 var(--space-3);
    height: 52px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-5);
}

/* Brand link */
.site-brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    text-decoration: none;
    flex-shrink: 0;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}
.site-brand:hover { background: var(--primary-50); }
.site-brand:focus { outline: 2px solid var(--primary); outline-offset: 2px; }

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-400));
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--primary-100);
}
.brand-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary-700);
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Thin divider between brand and nav */
.site-header-divider {
    display: block;
    width: 1px;
    height: 24px;
    background: var(--divider);
    flex-shrink: 0;
}

/* Navigation container */
.site-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    min-width: 0;
}
.site-nav::-webkit-scrollbar { display: none; }

/* Right-side actions (logout) */
.site-header-end {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Page-level heading + optional action row */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}
.page-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
    line-height: 1.1;
}

/* Mobile adjustments for the new header */
@media (max-width: 768px) {
    header.site-header {
        padding: 0 var(--space-2);
        gap: var(--space-1);
        height: 48px;
    }
    .brand-name { display: none; }
    .page-title { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .skip-link { transition: none; }
}
