/* ==========================================================================
   LLM LIMIT TRACKER DESIGN SYSTEM
   Theme: Premium Dark-Mode Glassmorphism
   ========================================================================== */

:root {
    --bg-dark: #0a0e17;
    --card-bg: rgba(17, 24, 39, 0.55);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    
    /* Brand Colors */
    --color-claude: hsl(30, 80%, 60%);
    --color-claude-rgb: 242, 140, 40;
    --color-chatgpt: hsl(160, 85%, 45%);
    --color-chatgpt-rgb: 16, 185, 129;
    --color-gemini: hsl(245, 90%, 65%);
    --color-gemini-rgb: 99, 102, 241;
    --color-zai: hsl(190, 84%, 56%);
    --color-zai-rgb: 34, 211, 238;
    --color-codex: hsl(258, 90%, 76%);
    --color-codex-rgb: 167, 139, 250;
    
    /* Functional Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-green: #10b981;
    
    /* Layout & Shadow constants */
    --transition-speed: 0.3s;
    --glow-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Reset and Globals */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.5;
}

h1, h2, h3, h4, .pct {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   AMBIENT BACKGROUND BLOBS
   ========================================================================== */
.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.25;
    animation: float 25s infinite alternate ease-in-out;
}

.blob-purple {
    background: var(--color-gemini);
    width: 600px;
    height: 600px;
    top: -150px;
    left: -150px;
}

.blob-cyan {
    background: var(--color-chatgpt);
    width: 500px;
    height: 500px;
    bottom: -100px;
    right: -100px;
    animation-delay: -5s;
}

.blob-bronze {
    background: var(--color-claude);
    width: 450px;
    height: 450px;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    50% {
        transform: translate(60px, -40px) scale(1.1) rotate(180deg);
    }
    100% {
        transform: translate(-40px, 80px) scale(0.9) rotate(360deg);
    }
}

/* ==========================================================================
   GLASSMORPHISM PANEL SYSTEM
   ========================================================================== */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    box-shadow: var(--glow-shadow);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.glass-panel:hover {
    border-color: var(--border-hover);
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.auth-view #dashboard-container {
    display: none !important;
}

body.dashboard-view #login-container {
    display: none !important;
}

body.auth-view .app-container {
    justify-content: center;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.36rem 1.25rem;
    margin: 1.25rem auto 2.1rem auto;
    width: 100%;
    max-width: 100%;
    min-height: 50px;
    gap: 0.42rem;
    position: relative;
    z-index: 100;
    background:
        radial-gradient(circle at 8% 50%, rgba(0, 242, 254, 0.12), transparent 28%),
        linear-gradient(135deg, rgba(8, 14, 25, 0.86), rgba(9, 13, 24, 0.74)) !important;
    backdrop-filter: blur(24px) saturate(185%);
    -webkit-backdrop-filter: blur(24px) saturate(185%);
    border-radius: 9999px;
    border: 1px solid rgba(91, 147, 255, 0.38) !important;
    box-shadow:
        0 14px 36px rgba(0, 0, 0, 0.46),
        0 0 0 1px rgba(12, 241, 255, 0.08),
        0 0 24px rgba(59, 130, 246, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.parallel-status {
    display: none !important;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    min-width: 0;
    padding-right: 0.16rem;
}

.logo-icon-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
}

.logo-badge-img {
    width: 34px;
    height: 34px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    filter: drop-shadow(0 0 9px rgba(0, 242, 254, 0.58));
    animation: slow-glow 4s ease-in-out infinite alternate;
}

@keyframes slow-glow {
    0% {
        filter: drop-shadow(0 0 6px rgba(0, 242, 254, 0.5));
    }
    100% {
        filter: drop-shadow(0 0 12px rgba(0, 242, 254, 0.9));
    }
}

.app-logo h1 {
    font-size: 0.94rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0;
    margin: 0;
    line-height: 1;
    white-space: nowrap;
}

.sub-logo {
    display: none; /* Hidden to match clean mockup style perfectly */
}

/* Header Live Scraper Status */
.header-sync-status {
    display: flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.24rem 0.54rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.26);
    border-radius: 9999px;
    font-size: 0.58rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: #10b981;
    text-transform: capitalize;
    letter-spacing: 0.02em;
    margin-left: 0.1rem;
    white-space: nowrap;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Version label in the header; turns into the update button when GitHub has a newer release */
.version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.24rem 0.54rem;
    border-radius: 9999px;
    font-size: 0.58rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--text-muted);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.version-badge:hover {
    background: rgba(255, 255, 255, 0.1);
}

.version-badge[data-state="update"] {
    background: rgba(249, 115, 22, 0.16);
    border-color: rgba(249, 115, 22, 0.6);
    color: #fb923c;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.2);
}

.version-badge[data-state="behind"] {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.4);
    color: var(--accent-yellow);
}

.version-badge[data-state="updated"] {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.5);
    color: var(--accent-green);
}

.version-badge[data-state="busy"] {
    cursor: progress;
    color: #fff;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.16);
}

.self-update-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.6);
}

.self-update-box {
    width: min(480px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 20px 22px;
    border-radius: 12px;
    background: #12121a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.self-update-box h3 {
    margin: 0 0 12px;
    font-size: 1rem;
}

.self-update-body {
    font-size: 0.85rem;
    line-height: 1.5;
}

.self-update-body ol,
.self-update-body ul {
    padding-left: 1.2rem;
    margin: 0.5rem 0;
}

.self-update-body code {
    font-size: 0.8rem;
    word-break: break-all;
}

.self-update-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.self-update-actions .btn-small.primary {
    background: rgba(99, 102, 241, 0.85);
    border-color: rgba(99, 102, 241, 1);
    color: #fff;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
    animation: pulse-ring 2s infinite ease-in-out;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* Header Action Toolbar */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.34rem;
    flex: 0 0 auto;
}

.header-sync-actions {
    display: flex;
    align-items: center;
    gap: 0.24rem;
    background: transparent;
    padding: 0;
    border-radius: 9999px;
    border: 0;
    box-shadow: none;
}

.btn-sync-header {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-sync-header:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.btn-sync-header:active {
    transform: translateY(1px) scale(0.95);
}

.btn-sync-header i {
    font-size: 0.95rem;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-sync-header:hover i {
    transform: rotate(360deg);
}

.sync-shortcut-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: visible;
}

.sync-shortcut-icon img {
    width: 34px;
    height: 34px;
    display: block;
    border-radius: 50%;
    object-fit: cover;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.sync-shortcut-icon.claude {
    background: transparent;
    border-color: rgba(0, 242, 254, 0.48);
    box-shadow:
        0 0 12px rgba(0, 242, 254, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.sync-shortcut-icon.claude:hover {
    border-color: #00f2fe;
    box-shadow:
        0 0 16px rgba(0, 242, 254, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.sync-shortcut-icon.chatgpt {
    background: transparent;
    border-color: rgba(52, 211, 153, 0.58);
    box-shadow:
        0 0 12px rgba(16, 185, 129, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.sync-shortcut-icon.chatgpt:hover {
    border-color: #34d399;
    box-shadow:
        0 0 16px rgba(16, 185, 129, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
}

.sync-shortcut-icon:hover img {
    filter: saturate(1.08) brightness(1.08);
    transform: scale(1.03);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 0.08rem;
    background: rgba(3, 8, 18, 0.34);
    padding: 0.18rem;
    border-radius: 9999px;
    border: 1px solid rgba(91, 147, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    flex: 0 0 auto;
    min-width: 0;
}

.nav-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.58);
    padding: 0.42rem 0.66rem;
    font-size: 0.66rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: 9999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
    white-space: nowrap;
}

.environment-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.24rem 0.54rem;
    border-radius: 9999px;
    border: 1px solid rgba(99, 102, 241, 0.28);
    background: rgba(99, 102, 241, 0.08);
    color: var(--color-gemini);
    font-size: 0.58rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: help;
}

.environment-indicator i {
    font-size: 0.62rem;
}

.environment-indicator[data-env="pwa"] {
    color: var(--accent-yellow);
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.environment-indicator[data-env="extension"] {
    color: var(--color-gemini);
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.28);
}

.deploy-sync-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.24rem 0.54rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: help;
}

.deploy-sync-dot {
    width: 7px;
    height: 7px;
    border-radius: 9999px;
    background: var(--text-muted);
    box-shadow: 0 0 8px rgba(148, 163, 184, 0.45);
}

.deploy-sync-indicator[data-status="ok"] {
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.26);
}

.deploy-sync-indicator[data-status="ok"] .deploy-sync-dot {
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.65);
}

.deploy-sync-indicator[data-status="warning"] {
    color: var(--accent-yellow);
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.32);
}

.deploy-sync-indicator[data-status="warning"] .deploy-sync-dot {
    background: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.75);
}

.deploy-sync-indicator[data-status="unknown"] {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

.deploy-sync-indicator[data-status="unknown"] .deploy-sync-dot {
    background: var(--accent-red);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.65);
}

.nav-tab.placeholder-tab {
    opacity: 0.55;
}

.nav-tab.placeholder-tab:hover {
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.03);
}

.nav-tab i {
    font-size: 0.9rem;
    opacity: 0.7;
}

.nav-tab:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.055);
}

.nav-tab.active {
    color: #ffffff;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035));
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    border-radius: 7px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35), 0 0 12px rgba(96, 165, 250, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    position: relative;
}

.nav-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 10%;
    width: 80%;
    height: 2px;
    background: #ffffff;
    box-shadow: 0 0 12px #ffffff, 0 0 20px #ffffff;
    border-radius: 9999px;
}

/* Profile Dropdown Section */
.profile-dropdown-wrapper {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.26rem;
    cursor: pointer;
    padding: 0.1rem 0.34rem 0.1rem 0.1rem;
    border-radius: 9999px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.profile-trigger:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.profile-avatar-wrapper {
    position: relative;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    outline: none;
    filter: drop-shadow(0 0 9px rgba(16, 185, 129, 0.48));
    transition: all 0.3s ease;
}

.profile-trigger:hover .profile-avatar-img {
    filter: drop-shadow(0 0 13px rgba(16, 185, 129, 0.68)) saturate(1.08) brightness(1.05);
}

.profile-status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 7px;
    height: 7px;
    background: #10b981;
    border: 1.5px solid #071222;
    border-radius: 50%;
    box-shadow: 0 0 6px #10b981;
}

.profile-arrow {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease;
}

.profile-trigger:hover .profile-arrow {
    color: #ffffff;
}

/* Dropdown Menu Styles */
.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: rgba(11, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.6rem;
    min-width: 170px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: none;
    z-index: 1000;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-dropdown-menu.show {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.dropdown-user-info {
    padding: 0.4rem 0.6rem;
}

.dropdown-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.15rem;
}

.dropdown-username {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.dropdown-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.5rem 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
    text-align: left;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* Buttons */
.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.btn-icon:hover {
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   TAB PANES MANAGEMENT
   ========================================================================== */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

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

/* ==========================================================================
   1. DASHBOARD VIEW STYLING
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}



/* Provider Cards */
.provider-card {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.provider-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.claude-card::before { background: var(--color-claude); }
.chatgpt-card::before { background: var(--color-chatgpt); }
.gemini-card::before { background: var(--color-gemini); }
.zai-card::before { background: var(--color-zai); }

.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.provider-title {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.brand-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.brand-icon-wrapper.claude {
    background: rgba(var(--color-claude-rgb), 0.12);
    color: var(--color-claude);
    border: 1px solid rgba(var(--color-claude-rgb), 0.2);
}

.brand-icon-wrapper.chatgpt {
    background: rgba(var(--color-chatgpt-rgb), 0.12);
    color: var(--color-chatgpt);
    border: 1px solid rgba(var(--color-chatgpt-rgb), 0.2);
}

.brand-icon-wrapper.gemini {
    background: rgba(var(--color-gemini-rgb), 0.12);
    color: var(--color-gemini);
    border: 1px solid rgba(var(--color-gemini-rgb), 0.2);
}

.brand-icon-wrapper.zai {
    background: rgba(var(--color-zai-rgb), 0.12);
    color: var(--color-zai);
    border: 1px solid rgba(var(--color-zai-rgb), 0.2);
}

.brand-icon-wrapper.codex {
    background: rgba(var(--color-codex-rgb), 0.12);
    color: var(--color-codex);
    border: 1px solid rgba(var(--color-codex-rgb), 0.2);
}

.provider-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: block;
}

/* Progress Visualization */
.progress-visualization {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 1.5rem 0;
}

.progress-ring-container {
    position: relative;
    width: 160px;
    height: 160px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
    transform-origin: 50% 50%;
}

.progress-ring__circle-bg {
    transition: stroke 0.3s;
}

.claude-stroke {
    stroke: var(--color-claude);
    filter: drop-shadow(0 0 6px rgba(var(--color-claude-rgb), 0.4));
}

.chatgpt-stroke {
    stroke: var(--color-chatgpt);
    filter: drop-shadow(0 0 6px rgba(var(--color-chatgpt-rgb), 0.4));
}

.gemini-stroke {
    stroke: var(--color-gemini);
    filter: drop-shadow(0 0 6px rgba(var(--color-gemini-rgb), 0.4));
}

.zai-stroke {
    stroke: var(--color-zai);
    filter: drop-shadow(0 0 6px rgba(var(--color-zai-rgb), 0.4));
}

.codex-stroke {
    stroke: var(--color-codex);
    filter: drop-shadow(0 0 6px rgba(var(--color-codex-rgb), 0.4));
}

.progress-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
}

.progress-value .pct {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.progress-value .lbl {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
}

/* Stats inside Card */
.card-stats {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.85rem;
}

.sync-status-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 0.5rem;
}

.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row span:first-child {
    color: var(--text-muted);
}

.stat-row.highlight {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.5rem;
    margin-top: 0.25rem;
}

.reset-timer {
    font-weight: 600;
    color: var(--accent-yellow);
}

/* Card Action Buttons */
.card-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
}

.btn-provider, .btn-provider-outline {
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.btn-provider {
    color: #000;
}

.btn-provider-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.btn-provider-outline:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Claude button styles */
.btn-claude {
    background: var(--color-claude);
}
.btn-claude:hover {
    background: hsl(30, 80%, 50%);
    box-shadow: 0 0 15px rgba(var(--color-claude-rgb), 0.45);
}
.btn-claude-outline {
    border-color: rgba(var(--color-claude-rgb), 0.3);
    color: var(--color-claude);
}
.btn-claude-outline:hover {
    border-color: var(--color-claude);
    color: var(--color-claude);
    background: rgba(var(--color-claude-rgb), 0.05);
}

/* ChatGPT button styles */
.btn-chatgpt {
    background: var(--color-chatgpt);
}
.btn-chatgpt:hover {
    background: hsl(160, 85%, 38%);
    box-shadow: 0 0 15px rgba(var(--color-chatgpt-rgb), 0.45);
}
.btn-chatgpt-outline {
    border-color: rgba(var(--color-chatgpt-rgb), 0.3);
    color: var(--color-chatgpt);
}
.btn-chatgpt-outline:hover {
    border-color: var(--color-chatgpt);
    color: var(--color-chatgpt);
    background: rgba(var(--color-chatgpt-rgb), 0.05);
}

/* Gemini button styles */
.btn-gemini {
    background: var(--color-gemini);
    color: #fff;
}
.btn-gemini:hover {
    background: hsl(245, 90%, 58%);
    box-shadow: 0 0 15px rgba(var(--color-gemini-rgb), 0.45);
}
.btn-gemini-outline:hover {
    border-color: var(--color-gemini);
    color: var(--color-gemini);
    background: rgba(var(--color-gemini-rgb), 0.05);
}

/* ==========================================================================
   SECONDARY DASHBOARD ROW (Threads and Recent Log Feed)
   ========================================================================== */
.dashboard-secondary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.detail-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

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

.card-header-with-actions h3 {
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* Thread details box */
.active-thread-details-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 1rem;
}

.thread-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.thread-detail-header h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.thread-stats-row {
    display: flex;
    gap: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 0.75rem;
}

.thread-stat {
    display: flex;
    flex-direction: column;
}

.thread-stat .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.thread-stat .val {
    font-size: 0.9rem;
    font-weight: 600;
    font-family: monospace;
}

.thread-stat .val.warning {
    color: var(--accent-yellow);
}

.thread-info-alert {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid rgba(59, 130, 246, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
}

.thread-info-alert i {
    color: var(--color-gemini);
}

/* Activity Log Feed */
.log-feed-container {
    flex: 1;
    overflow-y: auto;
    max-height: 250px;
}

.feed-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    color: var(--text-muted);
    text-align: center;
    gap: 0.5rem;
}

.feed-empty-state i {
    font-size: 2rem;
    opacity: 0.5;
}

.log-feed-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.log-item-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.model-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.indicator-claude { background: var(--color-claude); box-shadow: 0 0 6px var(--color-claude); }
.indicator-chatgpt { background: var(--color-chatgpt); box-shadow: 0 0 6px var(--color-chatgpt); }
.indicator-gemini { background: var(--color-gemini); box-shadow: 0 0 6px var(--color-gemini); }
.indicator-zai { background: var(--color-zai); box-shadow: 0 0 6px var(--color-zai); }

.log-item-meta {
    display: flex;
    flex-direction: column;
}

.log-item-meta .model-name {
    font-weight: 600;
}

.log-item-meta .thread-name {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.log-item-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.log-item-tokens {
    font-family: monospace;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.log-item-time {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* ==========================================================================
   2. THREADS VIEW STYLING
   ========================================================================== */
.panel-hero {
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(16, 185, 129, 0.05));
    position: relative;
    overflow: hidden;
}

.panel-hero::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, rgba(0,0,0,0) 70%);
    top: -50px;
    right: -50px;
    border-radius: 50%;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-content h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

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

.thread-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 220px;
    position: relative;
}

.thread-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.thread-card-header h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.thread-card-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.4rem;
}

.thread-card-stats {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
    padding: 0.75rem;
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.thread-card-stats span:first-child {
    color: var(--text-muted);
}

.thread-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 0.75rem;
}

/* ==========================================================================
   3. ANALYTICS VIEW STYLING
   ========================================================================== */
.chart-container {
    position: relative;
    height: 350px;
    width: 100%;
}

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-box {
    position: relative;
    width: 250px;
}

.search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: all var(--transition-speed);
}

.search-box input:focus {
    border-color: var(--color-gemini);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

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

.data-table th, .data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: rgba(0,0,0,0.25);
    color: var(--text-muted);
    font-weight: 500;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.table-empty {
    text-align: center;
    padding: 2.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==========================================================================
   4. SETTINGS VIEW STYLING
   ========================================================================== */
.settings-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.5rem;
}

.settings-layout .glass-panel:first-child {
    grid-row: span 2;
}

.settings-section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.data-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Scraper status boxes */
.status-item-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    padding: 1rem;
    border-radius: 12px;
}

.status-item-box .label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.status-item-box .desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.status-item-box a {
    color: var(--color-gemini);
    text-decoration: none;
    font-weight: 500;
}

.status-item-box a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   LOGIN / AUTHENTICATION VIEW
   ========================================================================== */
.auth-panel {
    position: relative;
    z-index: 500;
    max-width: 420px;
    margin: 6vh auto;
    padding: 2.5rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 242, 254, 0.1), transparent 34%),
        linear-gradient(145deg, rgba(10, 16, 30, 0.96), rgba(8, 11, 22, 0.94));
    border-color: rgba(91, 147, 255, 0.24);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.58),
        0 0 28px rgba(59, 130, 246, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .app-logo {
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    flex-direction: column;
    gap: 0.7rem;
    padding-right: 0;
}

.auth-header .app-logo::before {
    content: "";
    width: 56px;
    height: 56px;
    display: block;
    border-radius: 50%;
    background: url("assets/usage-dashboard-logo.svg") center / cover no-repeat;
    filter: drop-shadow(0 0 14px rgba(0, 242, 254, 0.58));
}

.auth-header .app-logo i {
    display: none;
}

.auth-header h2 {
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.auth-message {
    margin-top: 1rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    text-align: center;
}

.auth-message.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--accent-red);
}

.auth-message.success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--accent-green);
}

.auth-message.invite-install-message {
    text-align: left;
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(34, 211, 238, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-message.invite-install-message p {
    margin: 0.45rem 0 0.85rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.auth-message.invite-install-message a {
    color: var(--color-gemini);
}

.invite-install-options {
    display: grid;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.invite-install-option {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.invite-install-option span {
    color: var(--text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   FORM CONTROLS
   ========================================================================== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-select {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-speed);
}

.form-group input:focus,
.form-select:focus {
    border-color: var(--color-gemini);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    font-size: 0.8rem;
}

/* Utility buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-secondary-outline {
    border: none;
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gemini), hsl(245, 90%, 55%));
    color: #fff;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-secondary-outline {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}
.btn-secondary-outline:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: var(--accent-red);
    color: #fff;
}
.btn-danger:hover {
    background: hsl(0, 84%, 48%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    cursor: pointer;
    font-weight: 550;
    transition: all var(--transition-speed);
    text-decoration: none;
}

.btn-small:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
}
.btn-text:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* ==========================================================================
   MODAL DIALOG POPUPS
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-box {
    width: 100%;
    max-width: 520px;
    padding: 2rem;
    position: relative;
    animation: scaleUpModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleUpModal {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header h3 {
    font-size: 1.25rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
}
.btn-close-modal:hover {
    color: var(--text-main);
}

/* Message Presets Box inside modal */
.size-presets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.size-presets input[type="radio"] {
    display: none;
}

.preset-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.preset-box .title {
    font-weight: 600;
    font-size: 0.85rem;
}

.preset-box .desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.size-presets input[type="radio"]:checked + .preset-box {
    border-color: var(--color-gemini);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.15);
}

/* Badges */
.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-claude { background: rgba(var(--color-claude-rgb), 0.15); color: var(--color-claude); border: 1px solid rgba(var(--color-claude-rgb), 0.2); }
.badge-chatgpt { background: rgba(var(--color-chatgpt-rgb), 0.15); color: var(--color-chatgpt); border: 1px solid rgba(var(--color-chatgpt-rgb), 0.2); }
.badge-gemini { background: rgba(var(--color-gemini-rgb), 0.15); color: var(--color-gemini); border: 1px solid rgba(var(--color-gemini-rgb), 0.2); }
.badge-zai { background: rgba(var(--color-zai-rgb), 0.15); color: var(--color-zai); border: 1px solid rgba(var(--color-zai-rgb), 0.2); }
.badge-codex { background: rgba(var(--color-codex-rgb), 0.15); color: var(--color-codex); border: 1px solid rgba(var(--color-codex-rgb), 0.2); }

/* Utilities */
.font-mono { font-family: monospace; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.w-100 { width: 100%; }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-secondary-grid, .settings-layout {
        grid-template-columns: 1fr;
    }
    
    .settings-layout .glass-panel:first-child {
        grid-row: auto;
    }
}

@media (max-width: 1024px) {
    .app-header {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.42rem;
        padding: 0.55rem;
        width: fit-content;
        max-width: calc(100% - 1rem);
        border-radius: 24px;
    }

    .app-logo {
        flex: 0 0 auto;
        justify-content: center;
        padding-right: 0;
    }

    .nav-tabs {
        order: 0;
        width: auto;
        justify-content: center;
    }

    .header-right {
        flex: 0 0 auto;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .app-container {
        padding: 1rem;
    }

    .app-header {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        width: 100%;
        padding: 0.85rem;
    }
    
    .app-logo {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .header-sync-status {
        margin-left: 0;
    }
    
    .nav-tabs {
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        scrollbar-width: none;
    }

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

    .nav-tab {
        padding: 0.46rem 0.72rem;
        font-size: 0.7rem;
    }
    
    .header-right {
        flex-direction: row;
        width: 100%;
        gap: 0.5rem;
        align-items: center;
        justify-content: center;
    }
    
    .header-sync-actions {
        width: auto;
        justify-content: center;
    }
    
    .profile-section {
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }
}

/* ==========================================================================
   WEEKLY PROGRESS STRIP & PACE (BURN RATE) INDICATORS
   ========================================================================== */

/* Weekly Limit Strip */
.weekly-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 4px;
}
/* Parallel Progress Bars (Resterende Capaciteit vs Resterende Tijd) */
.parallel-pace-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 10px;
    margin-top: 8px;
}
.section-subtitle-small {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 8px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
    padding-bottom: 4px;
}
.parallel-bar-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.parallel-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.parallel-bar-label .pct-val {
    font-weight: 600;
}
.parallel-bar-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}
.parallel-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.4s ease;
}
.time-track {
    background: rgba(255, 255, 255, 0.03);
}
.time-bg {
    background-color: #4b5563 !important; /* Neutral dark gray/blue */
}
.parallel-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}
.parallel-status.safe {
    background: rgba(16, 185, 129, 0.08);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.15);
}
.parallel-status.warning {
    background: rgba(245, 158, 11, 0.08);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.15);
}
.parallel-status.danger {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

/* Color Helpers */
.claude-bg {
    background-color: var(--color-claude) !important;
    color: var(--color-claude);
}
.claude-bg-trans {
    background-color: rgba(var(--color-claude-rgb), 0.15) !important;
}
.chatgpt-bg {
    background-color: var(--color-chatgpt) !important;
    color: var(--color-chatgpt);
}
.chatgpt-bg-trans {
    background-color: rgba(var(--color-chatgpt-rgb), 0.15) !important;
}
.gemini-bg {
    background-color: var(--color-gemini) !important;
    color: var(--color-gemini);
}
.gemini-bg-trans {
    background-color: rgba(var(--color-gemini-rgb), 0.15) !important;
}
.zai-bg {
    background-color: var(--color-zai) !important;
    color: var(--color-zai);
}
.zai-bg-trans {
    background-color: rgba(var(--color-zai-rgb), 0.15) !important;
}
.codex-bg {
    background-color: var(--color-codex) !important;
    color: var(--color-codex);
}
.codex-bg-trans {
    background-color: rgba(var(--color-codex-rgb), 0.15) !important;
}
.info-tooltip {
    cursor: help;
    opacity: 0.6;
    margin-left: 4px;
}
.info-tooltip:hover {
    opacity: 1;
}

/* Sync Now Button */
.btn-sync-now {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.78rem;
    transition: color var(--transition-speed), transform 0.2s;
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-sync-now:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}
.btn-sync-now:active {
    transform: scale(0.9) rotate(30deg);
}

/* Analytics Summary Statistics Panel */
.analytics-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.summary-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.summary-card.border-claude::before { background: var(--color-claude); }
.summary-card.border-chatgpt::before { background: var(--color-chatgpt); }
.summary-card.border-gemini::before { background: var(--color-gemini); }
.summary-card.border-zai::before { background: var(--color-zai); }
.summary-card.border-accent::before { background: #3b82f6; } /* standard accent blue */

.summary-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.summary-value {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0.4rem 0;
    font-family: var(--font-mono);
}

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

/* Dynamic Status Badges */
.badge-success { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-danger { background: rgba(239, 68, 68, 0.2); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }

/* Enforce text selection for sync logs */
#sync-debug-logs, #sync-debug-logs * {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    pointer-events: auto !important;
}

/* ── Profile chips (multi-profile combined view) ── */
.profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
}
.profile-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 0.68rem;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    cursor: default;
    letter-spacing: 0.3px;
}
.chip-green  { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #4ade80; }
.chip-yellow { background: rgba(245,158,11,0.12);  border-color: rgba(245,158,11,0.3);  color: #fbbf24; }
.chip-red    { background: rgba(239,68,68,0.12);   border-color: rgba(239,68,68,0.3);   color: #f87171; }
.chip-grey   { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); color: var(--text-muted); }
.chip-dot    { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.chip-green  .chip-dot { background: #4ade80; }
.chip-yellow .chip-dot { background: #fbbf24; }
.chip-red    .chip-dot { background: #f87171; }
.chip-grey   .chip-dot { background: rgba(255,255,255,0.25); }

/* ── Active profiles list in Settings ── */
.profile-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    margin-bottom: 6px;
    font-size: 0.8rem;
}
.profile-list-item .profile-name { font-weight: 600; color: #fff; }
.profile-list-item .profile-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }
.profile-list-item.this-device { border-color: rgba(99,102,241,0.35); background: rgba(99,102,241,0.07); }

/* ── Profile bar (dashboard top) ── */
.profile-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.profile-bar-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 0;
}
.profile-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.profile-tab:hover { background: rgba(255,255,255,0.09); color: #fff; }
.profile-tab.active { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.45); color: #fff; }
.profile-tab .ptab-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block;
}
.profile-tab .ptab-delete {
    margin-left: 2px;
    font-size: 0.85rem;
    line-height: 1;
    opacity: 0;
    color: rgba(255,255,255,0.5);
    transition: opacity 0.15s, color 0.15s;
    cursor: pointer;
    padding: 0 1px;
}
.profile-tab:hover .ptab-delete { opacity: 1; }
.profile-tab .ptab-delete:hover { color: #f87171; }
/* "Blok toevoegen" knop + chooser */
.btn-add-block {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.04); border: 1px dashed rgba(255,255,255,0.18);
    color: var(--text-muted); padding: 9px 16px; border-radius: 9px;
    cursor: pointer; font-size: 0.82rem; transition: all 0.15s;
}
.btn-add-block:hover { color: #fff; border-color: var(--color-gemini); background: rgba(99,102,241,0.08); }
.add-block-panel {
    margin-top: 10px; max-width: 360px;
    background: rgba(18,18,26,0.96); border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px; padding: 6px; box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}
.add-block-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    background: transparent; border: none; color: var(--text-light, #e5e7eb);
    padding: 10px 12px; border-radius: 7px; cursor: pointer; font-size: 0.85rem;
    transition: background 0.15s;
}
.add-block-item:hover { background: rgba(255,255,255,0.06); }

/* Verwijder-knop (✕) op statische provider-cards */
.provider-card { position: relative; }
.block-hide-btn {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.35); width: 28px; height: 28px; border-radius: 7px;
    cursor: pointer; font-size: 0.75rem; margin-left: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.provider-card:hover .block-hide-btn { color: rgba(255,255,255,0.6); }
.block-hide-btn:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #f87171; }

/* Multi-profile snapshot cards */
.mp-card { position: relative; }
.mp-card .mp-hide {
    position: absolute; top: 12px; right: 12px;
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.4); width: 26px; height: 26px; border-radius: 6px;
    cursor: pointer; font-size: 0.72rem; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
}
.mp-card:hover .mp-hide { color: rgba(255,255,255,0.7); }
.mp-card .mp-hide:hover { background: rgba(239,68,68,0.15); border-color: rgba(239,68,68,0.4); color: #f87171; }
.mp-stats { display: flex; flex-direction: column; gap: 4px; }
.mp-line { font-size: 0.82rem; color: var(--text-light, #d1d5db); }
.mp-line b { color: #fff; }
.mp-line.mp-sub { font-size: 0.72rem; color: var(--text-muted); }
.mp-restore-bar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 8px 4px; margin-bottom: 4px;
}
.mp-restore-chip {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.65); padding: 4px 10px; border-radius: 999px;
    font-size: 0.74rem; cursor: pointer; transition: all 0.15s;
}
.mp-restore-chip:hover { background: rgba(99,102,241,0.18); border-color: rgba(99,102,241,0.4); color: #fff; }
/* ── Card label edit (✎) ─────────────────────────────────────────────── */
.card-label-edit-btn {
    background: none; border: none; cursor: pointer; padding: 0 0 0 4px;
    color: rgba(255,255,255,0.25); font-size: 0.62rem; vertical-align: middle;
    transition: color 0.15s; line-height: 1;
}
.card-label-edit-btn:hover { color: rgba(255,255,255,0.7); }
.card-account-sub {
    display: block; font-size: 0.68rem; color: var(--text-muted, rgba(255,255,255,0.4));
    margin-top: 1px; word-break: break-all;
}
/* ── Refresh-status balk ─────────────────────────────────────────────── */
.refresh-status-bar {
    display: none; align-items: center; gap: 8px;
    padding: 6px 12px; border-radius: 8px; font-size: 0.78rem;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.7);
    max-width: 420px; margin: 4px 0;
}
.refresh-status-bar::before {
    content: ""; display: inline-block; width: 8px; height: 8px;
    border-radius: 50%; flex-shrink: 0;
    background: rgba(255,255,255,0.3);
}
.refresh-status-bar.rsb-pending { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); color: #fbbf24; }
.refresh-status-bar.rsb-pending::before { background: #fbbf24; animation: pulse-dot 1.2s infinite; }
.refresh-status-bar.rsb-active  { border-color: rgba(99,102,241,0.35); background: rgba(99,102,241,0.07); color: #a5b4fc; }
.refresh-status-bar.rsb-active::before  { background: #818cf8; animation: pulse-dot 0.8s infinite; }
.refresh-status-bar.rsb-done   { border-color: rgba(74,222,128,0.3); background: rgba(74,222,128,0.06); color: #4ade80; }
.refresh-status-bar.rsb-done::before   { background: #4ade80; }
.refresh-status-bar.rsb-warn   { border-color: rgba(251,146,60,0.3); background: rgba(251,146,60,0.06); color: #fb923c; }
.refresh-status-bar.rsb-warn::before   { background: #fb923c; animation: pulse-dot 1.8s infinite; }
.refresh-status-bar.rsb-error  { border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.06); color: #f87171; }
.refresh-status-bar.rsb-error::before  { background: #f87171; }

.visible-blocks-list {
    display: flex; flex-direction: column; gap: 10px;
}
.block-toggle {
    display: flex; align-items: center; gap: 9px;
    font-size: 0.85rem; color: var(--text-light, #e5e7eb);
    cursor: pointer; user-select: none;
}
.block-toggle input[type="checkbox"] {
    width: 16px; height: 16px; accent-color: var(--color-gemini); cursor: pointer;
}
.block-toggle-dot {
    width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}
.btn-add-profile-tab {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px dashed rgba(255,255,255,0.2);
    background: transparent; color: var(--text-muted);
    cursor: pointer; font-size: 0.85rem;
    transition: all 0.15s; flex-shrink: 0;
}
.btn-add-profile-tab:hover { border-color: rgba(99,102,241,0.55); color: var(--color-gemini); background: rgba(99,102,241,0.1); }

/* ── Header Profile Switcher ────────────────────────────────────────── */
.header-profile-switcher {
    position: relative;
}
.profile-switcher-btn {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.85);
    border-radius: 20px; padding: 5px 10px 5px 8px;
    cursor: pointer; font-size: 0.82rem; font-weight: 500;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap; max-width: 160px;
}
.profile-switcher-btn:hover { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.4); }
.ps-status-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
}
#ps-label {
    overflow: hidden; text-overflow: ellipsis; max-width: 100px;
}
.ps-chevron { font-size: 0.6rem; opacity: 0.5; flex-shrink: 0; }

.profile-switcher-menu {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 200px; background: rgba(18,18,28,0.98);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    z-index: 500; overflow: hidden;
}
#psm-profile-list { padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.psm-profile-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; border-radius: 7px;
    background: none; border: none; color: rgba(255,255,255,0.75);
    cursor: pointer; font-size: 0.82rem; text-align: left; width: 100%;
    transition: background 0.12s;
}
.psm-profile-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.psm-profile-item.active { background: rgba(99,102,241,0.18); color: #fff; }
.psm-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.psm-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psm-divider { height: 1px; background: rgba(255,255,255,0.07); margin: 0; }
.psm-manage-btn {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 10px 16px;
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 0.78rem; text-align: left;
    transition: color 0.12s, background 0.12s;
}
.psm-manage-btn:hover { color: #fff; background: rgba(255,255,255,0.04); }

/* ── Profiles Sidebar ────────────────────────────────────────────────── */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.55); z-index: 1100;
    backdrop-filter: blur(2px);
    transition: opacity 0.2s;
}
.sidebar-overlay.open { display: block; }

.profiles-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 320px; max-width: 92vw;
    background: rgba(18,18,28,0.97);
    border-left: 1px solid rgba(255,255,255,0.08);
    z-index: 1101;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.profiles-sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
}
.sidebar-title {
    font-size: 0.95rem; font-weight: 600; color: #fff;
    display: flex; align-items: center; gap: 10px;
}
.sidebar-title i { color: var(--color-gemini); }
.sidebar-close-btn {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1rem; padding: 4px;
    border-radius: 6px; transition: color 0.15s, background 0.15s;
}
.sidebar-close-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.sidebar-body {
    flex: 1; overflow-y: auto; padding: 16px 20px;
    display: flex; flex-direction: column; gap: 12px;
}

/* Profile list inside sidebar — vertical stack instead of horizontal tabs */
.sidebar-profile-list {
    flex-direction: column !important;
    gap: 4px !important;
    flex-wrap: nowrap !important;
}
.sidebar-profile-list .profile-bar-tabs {
    flex-direction: column; gap: 4px;
    display: flex;
}
.sidebar-profile-list .profile-tab {
    width: 100%; justify-content: flex-start;
    padding: 9px 12px; border-radius: 8px;
    font-size: 0.85rem;
}

.sidebar-add-profile-btn {
    width: 100%; justify-content: flex-start !important;
    padding: 9px 12px !important; border-radius: 8px !important;
    border-style: dashed !important;
    font-size: 0.82rem !important;
    gap: 8px !important;
}

.sidebar-add-profile-panel {
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px; padding: 14px;
}

/* Onboarding wizard */
.onboarding-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(3, 7, 18, 0.72);
    backdrop-filter: blur(12px);
}

.onboarding-dialog {
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    border-radius: 14px;
    border: 1px solid rgba(34, 211, 238, 0.22);
    background: linear-gradient(145deg, rgba(10, 16, 30, 0.98), rgba(8, 11, 22, 0.98));
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55), 0 0 32px rgba(34, 211, 238, 0.12);
    padding: 22px;
}

.onboarding-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.onboarding-kicker {
    color: var(--color-gemini);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.onboarding-header h2 {
    margin: 4px 0 0;
    font-size: 1.3rem;
    color: #fff;
}

.onboarding-close {
    border: 0;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
}

.onboarding-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.onboarding-step {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    font-weight: 700;
}

.onboarding-step.active {
    color: #fff;
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(99, 102, 241, 0.18);
}

.onboarding-step i {
    margin-right: 6px;
}

.onboarding-panel {
    display: none;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.035);
}

.onboarding-panel.active {
    display: block;
}

.onboarding-panel h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1rem;
}

.onboarding-panel p,
.onboarding-note {
    margin: 0 0 14px;
    color: var(--text-muted);
    line-height: 1.45;
    font-size: 0.84rem;
}

.onboarding-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.onboarding-panel label {
    display: grid;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 700;
}

.onboarding-panel input,
.onboarding-panel select {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.28);
    color: #fff;
    padding: 10px 11px;
    font-size: 0.86rem;
}

.onboarding-full-label {
    margin-bottom: 14px;
}

.onboarding-primary {
    width: 100%;
    justify-content: center;
}

.onboarding-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.onboarding-doc-link {
    text-decoration: none;
}

.onboarding-result {
    margin-top: 14px;
    border: 1px solid rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.08);
    color: rgba(236, 253, 245, 0.92);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.82rem;
    line-height: 1.45;
}

.onboarding-result code {
    color: var(--color-gemini);
    word-break: break-all;
}

.onboarding-result ol {
    margin: 8px 0 0;
    padding-left: 20px;
}

.onboarding-result li {
    margin: 4px 0;
}

@media (max-width: 720px) {
    .onboarding-steps,
    .onboarding-form-grid {
        grid-template-columns: 1fr;
    }
}

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex; gap: 8px; flex-wrap: wrap;
    flex-shrink: 0;
}

/* Hamburger / profiles trigger in header */
.sidebar-hamburger-btn {
    position: relative;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
    border-radius: 8px; padding: 6px 10px;
    cursor: pointer; font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    display: flex; align-items: center; gap: 6px;
}
.sidebar-hamburger-btn:hover { background: rgba(99,102,241,0.15); color: #fff; border-color: rgba(99,102,241,0.4); }

.sidebar-badge {
    position: absolute; top: -5px; right: -5px;
    background: var(--color-gemini); color: #fff;
    border-radius: 50%; width: 17px; height: 17px;
    font-size: 0.62rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}

/* ── Block FAB (+ button above cards grid) ───────────────────────────── */
.block-fab-wrapper {
    position: relative; display: flex; justify-content: flex-end;
    margin-bottom: 10px;
}
.block-fab-btn {
    position: relative;
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 20px;
    background: rgba(99,102,241,0.12);
    border: 1px dashed rgba(99,102,241,0.35);
    color: var(--text-muted); font-size: 0.82rem;
    cursor: pointer; transition: all 0.15s;
}
.block-fab-btn:hover { background: rgba(99,102,241,0.2); border-color: rgba(99,102,241,0.6); color: #fff; }
.block-fab-btn i { font-size: 0.78rem; }

.block-fab-badge {
    background: var(--color-claude); color: #fff;
    border-radius: 50%; width: 17px; height: 17px;
    font-size: 0.62rem; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: auto; flex-shrink: 0;
}

/* Inside the dropdown the menu flows inline — no absolute positioning */
.psm-block-menu {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    border-top: 1px solid rgba(255,255,255,0.07) !important;
    border-radius: 0 !important;
    padding: 4px 0 !important;
    background: transparent !important;
}
/* ── Profiel-context + FAB op één regel ─────────────────────────────── */
.profile-fab-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 10px; min-height: 32px;
}
.profile-fab-row .block-fab-wrapper {
    margin-bottom: 0; flex-shrink: 0;
}

.profile-context-bar {
    display: flex; align-items: center; gap: 8px;
    padding: 0; margin-bottom: 0;
    font-size: 0.8rem; color: var(--text-muted);
}
.profile-context-bar .pcb-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.profile-context-bar .pcb-name {
    font-weight: 500; color: rgba(255,255,255,0.75);
}
.profile-context-bar .pcb-sep { opacity: 0.3; }

.fab-menu-section-title {
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.5px;
    color: var(--text-muted); padding: 6px 10px 4px;
    text-transform: uppercase;
}

/* Add-profile panel (inline, below profile bar) */
#add-profile-panel {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    animation: slideDown 0.2s ease;
}
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* ===== ChatGPT-resets (v0.28.0): knop naast "Last seen" + uitklaplijst ===== */
.mp-card .card-stats { position: relative; }
.reset-credits-btn {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 9999px;
    font-size: 0.7rem; font-weight: 600; white-space: nowrap; cursor: pointer;
    color: var(--color-chatgpt);
    background: rgba(var(--color-chatgpt-rgb), 0.1);
    border: 1px solid rgba(var(--color-chatgpt-rgb), 0.35);
    transition: background 0.15s;
}
.reset-credits-btn:hover { background: rgba(var(--color-chatgpt-rgb), 0.2); }
.reset-credits-btn.soon { color: var(--accent-yellow); background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.4); }
.reset-credits-pop {
    position: absolute; top: 34px; left: 0; right: 0; z-index: 30;
    background: #111827; border: 1px solid var(--border-hover); border-radius: 10px;
    box-shadow: var(--glow-shadow); padding: 10px 12px;
}
.reset-credits-pop[hidden] { display: none; }
.reset-credits-pop .rc-title { font-size: 0.78rem; font-weight: 600; color: var(--text-main); margin-bottom: 6px; }
.reset-credits-pop ul { list-style: none; margin: 0; padding: 0; }
.reset-credits-pop li {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px;
    padding: 6px 0; border-top: 1px solid var(--border-color); font-size: 0.74rem;
}
.reset-credits-pop .rc-name { color: var(--text-main); }
.reset-credits-pop .rc-when { color: var(--text-muted); white-space: nowrap; }
.reset-credits-pop .rc-days { opacity: 0.75; }
.reset-credits-pop .rc-note { font-size: 0.68rem; color: var(--text-muted); margin-top: 6px; }

/* ===== Tegels schikken (v0.28.0) ===== */
/* Usage by model: scoped mockup styling, inside the existing glass card/grid. */
.usage-model {
    --um-fg:#f3f4f6; --um-muted:#9ca3af; --um-faint:#6b7280;
    --um-line:rgba(255,255,255,.08); --um-line2:rgba(255,255,255,.16);
    --um-opus:hsl(24,85%,58%); --um-sonnet:hsl(38,80%,66%);
    --um-haiku:hsl(48,70%,78%); --um-fable:hsl(330,55%,68%);
    --um-sol:hsl(160,75%,45%); --um-astra:hsl(190,70%,60%); --um-luna:hsl(210,70%,70%);
    --um-acc1:hsl(160,60%,40%); --um-acc2:hsl(150,70%,58%); --um-acc3:hsl(175,55%,70%);
    --um-main:hsl(24,85%,58%); --um-sub:hsl(48,70%,78%); --um-other:#9ca3af;
    --um-ok:#10b981; --um-warn:#f59e0b;
    padding:18px 20px; display:grid; gap:16px; position:relative; grid-column:1/-1;
    border:1px solid var(--um-line); border-radius:18px; background:rgba(17,24,39,.72);
    color:var(--um-fg); font:14px/1.5 'Inter',system-ui,sans-serif; min-width:0;
}
.um-thead {display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between}
.um-thead h2 {font:600 17px 'Outfit',system-ui,sans-serif;margin:0}
.um-ctrls {display:flex;gap:8px;flex-wrap:wrap}
.um-seg {display:inline-flex;background:rgba(0,0,0,.3);border:1px solid var(--um-line);border-radius:20px;padding:2px}
.um-seg button {all:unset;cursor:pointer;font-size:12.5px;padding:4px 12px;border-radius:16px;color:var(--um-muted)}
.um-seg button[aria-pressed="true"] {background:rgba(255,255,255,.1);color:var(--um-fg)}
.um-seg button:focus-visible,.um-stack div:focus-visible {outline:2px solid var(--um-line2);outline-offset:-2px}
.um-rows {display:grid;gap:18px}
.um-row {display:grid;grid-template-columns:110px 1fr auto;gap:8px 14px;align-items:center}
.um-who {display:flex;gap:8px;align-items:center;font-family:'Outfit',system-ui,sans-serif;font-weight:600}
.um-dot {width:9px;height:9px;border-radius:50%}
.um-claude {background:hsl(30,80%,60%)}
.um-gpt {background:hsl(160,85%,45%)}
.um-stack {display:flex;height:26px;border-radius:7px;overflow:hidden;background:rgba(255,255,255,.04);min-width:0}
.um-stack div {display:flex;align-items:center;justify-content:center;font-size:11.5px;font-weight:600;color:#14100a;white-space:nowrap;overflow:hidden;cursor:default;transition:filter .15s}
.um-stack div:hover {filter:brightness(1.15)}
.um-tot {font-size:12px;color:var(--um-muted);font-variant-numeric:tabular-nums;text-align:right;min-width:72px}
.um-legend {grid-column:2/4;display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12px;color:var(--um-muted)}
.um-legend span {display:inline-flex;gap:5px;align-items:center;font-variant-numeric:tabular-nums}
.um-legend i {width:8px;height:8px;border-radius:2px;display:inline-block}
.um-cache {display:grid;gap:8px;border-top:1px solid var(--um-line);padding-top:14px}
.um-crow {display:grid;grid-template-columns:110px 1fr 72px;gap:14px;align-items:center;font-size:13px}
.um-nm {color:var(--um-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.um-ctrack {height:8px;border-radius:4px;background:rgba(255,255,255,.05);overflow:hidden}
.um-ctrack div {height:100%;border-radius:4px;background:var(--um-ok);transition:width .4s}
.um-ctrack div.um-low {background:var(--um-warn)}
.um-cst {font-size:12px;text-align:right;white-space:nowrap;color:var(--um-ok);font-variant-numeric:tabular-nums}
.um-cst.um-cold {color:var(--um-faint)}
.um-cst.um-low {color:var(--um-warn)}
.um-chip {grid-column:2/4;justify-self:start;font-size:12.5px;border-radius:8px;padding:4px 10px}
.um-chip.um-warn {color:var(--um-warn);background:rgba(245,158,11,.1)}
.um-chip.um-ok {color:var(--um-ok);background:rgba(16,185,129,.1)}
.um-cold-count {grid-column:1/-1}
.um-foot {font-size:12px;color:var(--um-faint);border-top:1px solid var(--um-line);padding-top:10px;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap}
.um-note {font-size:12.5px;color:var(--um-muted)}
.usage-model [hidden] {display:none}
.usage-model.tile-arranging {padding-top:48px}
@media (max-width:560px) {
    .um-crow {grid-template-columns:1fr 70px}
    .um-crow .um-ctrack {grid-column:1/3;grid-row:2}
    .um-row {grid-template-columns:1fr auto}
    .um-stack {grid-column:1/3;grid-row:2}
    .um-legend,.um-chip {grid-column:1/3}
}
@media (prefers-reduced-motion:reduce) {.usage-model * {transition:none!important}}

.tile-arrange-bar {
    grid-column: 1 / -1;
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 10px 14px; border-radius: 10px; font-size: 0.8rem; color: var(--text-main);
    background: rgba(var(--color-gemini-rgb), 0.1); border: 1px dashed rgba(var(--color-gemini-rgb), 0.5);
}
.tile-arrange-bar span { flex: 1 1 220px; }
.tile-arrange-bar button {
    padding: 4px 12px; border-radius: 6px; cursor: pointer; font-size: 0.78rem;
    color: var(--text-main); background: rgba(255,255,255,0.06); border: 1px solid var(--border-hover);
}
.tile-arrange-bar .tile-arrange-done { background: rgba(var(--color-gemini-rgb), 0.35); border-color: rgba(var(--color-gemini-rgb), 0.7); font-weight: 600; }
.mp-card.tile-arranging { cursor: grab; outline: 1px dashed rgba(var(--color-gemini-rgb), 0.45); outline-offset: -1px; }
.mp-card.tile-arranging .provider-header .badge { visibility: hidden; }
.mp-card.tile-dragging { opacity: 0.4; }
.mp-card.tile-drop-target { outline: 2px solid rgba(var(--color-gemini-rgb), 0.9); }
.tile-move {
    position: absolute; top: 12px; right: 46px; display: flex; gap: 4px; z-index: 5;
}
.tile-move button {
    width: 30px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 0.75rem;
    color: var(--text-main); background: rgba(var(--color-gemini-rgb), 0.25); border: 1px solid rgba(var(--color-gemini-rgb), 0.6);
}
.tile-move button:disabled { opacity: 0.25; cursor: default; }
/* Telefoon: tegels staan onder elkaar, dus pijlen omhoog/omlaag. */
@media (max-width: 700px) {
    .tile-move i { transform: rotate(90deg); }
}
