/* ── Custom scrollbar ───────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.25); }

/* ── Code Rain canvas ─────────────────────────────── */
#oat-particle-canvas {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* ── Sticky frosted header ──────────────────────────── */
.oat-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
}
.oat-header-inner {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.oat-brand {
    text-align: center;
    flex: 1;
}
.oat-brand-text h1 {
    font-size: 1.45rem;
    margin-bottom: 0;
    text-align: center;
}
/* spacer no longer needed */
.oat-header-left-spacer {
    min-width: 160px;
}
.oat-header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: 160px;
    position: fixed;
    right: 20px;
    top: 16px;
    z-index: 201;
}
.oat-brand-text .user-greeting {
    justify-content: center;
    margin-top: 4px;
    font-size: 0.95rem;
}
/* badge now lives in header-right — remove old centred override */
.oat-brand-text .setup-status-badge { display: none !important; }
.hero-typewriter { display: none; }
.typewriter-row  { display: none; }
.tw-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: #80a4c2;
    margin-left: 2px;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

/* green when typewriter shows active status */
.tw-text.tw-active {
    color: #ADDB67;
}
.tw-active ~ .tw-cursor {
    background: #ADDB67;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ── Stats pill ribbon ───────────────────────────────── */
.stats-ribbon {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 10px 0 0;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 8px 8px 7px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(12px);
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255,255,255,0.15);
}

.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
    color: #82AAFF;
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 0.60rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #637777;
    margin-top: 2px;
}

/* Per-card accent colors */
.stat-card--green .stat-value  { color: #ADDB67; }
.stat-card--green { border-color: rgba(173,219,103,0.15); }
.stat-card--green:hover { border-color: rgba(173,219,103,0.4); box-shadow: 0 0 20px rgba(173,219,103,0.1); }

.stat-card--amber .stat-value  { color: #ECC48D; }
.stat-card--amber { border-color: rgba(236,196,141,0.15); }
.stat-card--amber:hover { border-color: rgba(236,196,141,0.4); box-shadow: 0 0 20px rgba(236,196,141,0.1); }

.stat-card--rose .stat-value   { color: #FF6363; }
.stat-card--rose { border-color: rgba(255,99,99,0.15); }
.stat-card--rose:hover { border-color: rgba(255,99,99,0.4); box-shadow: 0 0 20px rgba(255,99,99,0.1); }

.stat-card--blue .stat-value { color: #82AAFF; }
.stat-card--blue { border-color: rgba(130,170,255,0.15); }
.stat-card--blue:hover { border-color: rgba(130,170,255,0.4); box-shadow: 0 0 20px rgba(130,170,255,0.1); }

/* default (blue) hover */
.stat-card:not([class*='--']):hover { border-color: rgba(130,170,255,0.4); box-shadow: 0 0 20px rgba(130,170,255,0.1); }

@media (max-width: 480px) {
    .stats-ribbon { grid-template-columns: repeat(3, 1fr); }
}

/* ── Reset & base ─────────────────────────────────── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ---- Onboarding Modal ---- */
.onboard-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.4s ease;
}

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

.onboard-modal {
    background: rgba(8, 8, 22, 0.88);
    border: 1px solid rgba(33, 199, 168, 0.25);
    border-radius: 20px;
    padding: 30px;
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.onboard-icon {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 10px;
}

.onboard-modal h2 {
    text-align: center;
    color: #7fdbca;
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.onboard-modal p {
    text-align: center;
    color: #dfe6e9;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

.onboard-wifi-note {
    background: rgba(225, 112, 85, 0.15);
    border: 1px solid rgba(225, 112, 85, 0.3);
    border-radius: 10px;
    padding: 12px;
    font-size: 0.82rem;
    color: #fab1a0;
    text-align: center;
    margin: 12px 0;
    line-height: 1.5;
}

.onboard-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.onboard-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.onboard-btn.primary {
    background: linear-gradient(135deg, #ADDB67, #7FDBCA);
    color: white;
}

.onboard-btn.primary:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(173, 219, 103, 0.4);
}

.onboard-btn.secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #b2bec3;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.onboard-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.onboard-btn.download {
    background: rgba(130, 170, 255, 0.2);
    border: 1px solid rgba(130, 170, 255, 0.4);
    color: #82AAFF;
    padding: 10px 16px;
    font-size: 0.9rem;
    width: 100%;
}

.onboard-btn.download:hover {
    background: rgba(130, 170, 255, 0.35);
}

.onboard-btn.copy {
    background: rgba(33, 199, 168, 0.15);
    border: 1px solid rgba(33, 199, 168, 0.35);
    color: #7fdbca;
    padding: 8px 16px;
    font-size: 0.85rem;
    width: 100%;
    margin-top: 8px;
}

.onboard-btn.copy:hover {
    background: rgba(33, 199, 168, 0.28);
}

.onboard-download-box, .onboard-cmd-box {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin: 12px 0;
}

.onboard-download-box p, .onboard-cmd-box p {
    font-size: 0.85rem;
    color: #7fdbca;
    margin-bottom: 10px;
    font-weight: 600;
}

.onboard-download-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-status, .copy-status {
    display: block;
    text-align: center;
    font-size: 0.8rem;
    color: #637777;
    margin-top: 6px;
}

.onboard-cmds {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.onboard-cmds code {
    display: block;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    color: #ADDB67;
    word-break: break-all;
    font-family: monospace;
    line-height: 1.4;
}

/* Setup Option Tabs */
.setup-option-tabs {
    display: flex;
    gap: 6px;
    margin: 14px 0 10px;
}

.setup-option-tab {
    flex: 1;
    padding: 10px 8px;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    color: #637777;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.setup-option-tab.active {
    background: rgba(173, 219, 103, 0.15);
    border-color: #ADDB67;
    color: #ADDB67;
}

.setup-option-tab:hover:not(.active) {
    background: rgba(255,255,255,0.08);
    color: #b2bec3;
}

/* One-Click Box */
.oneclick-box {
    background: rgba(173, 219, 103, 0.08);
    border: 2px solid rgba(173, 219, 103, 0.25);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
}

.oneclick-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.oneclick-box p {
    font-size: 0.95rem;
    margin-bottom: 14px;
}

/* Terminal command box (Mac one-click) */
.terminal-cmd-box {
    display: flex;
    align-items: center;
    background: #0d1117;
    border: 1px solid rgba(173, 219, 103, 0.4);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    gap: 10px;
}

.terminal-cmd-box code {
    flex: 1;
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 0.78rem;
    color: #ADDB67;
    word-break: break-all;
    text-align: left;
    line-height: 1.4;
    background: none;
    padding: 0;
}

.copy-cmd-btn {
    background: rgba(173, 219, 103, 0.2);
    border: 1px solid rgba(173, 219, 103, 0.4);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.1rem;
    color: white;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.copy-cmd-btn:hover {
    background: rgba(173, 219, 103, 0.4);
    transform: scale(1.05);
}

/* Setup Verified Banner */
.setup-verified-banner {
    background: rgba(173, 219, 103, 0.15);
    border: 2px solid rgba(173, 219, 103, 0.5);
    border-radius: 12px;
    padding: 16px;
    margin-top: 14px;
    text-align: center;
    animation: fadeIn 0.4s ease;
}

.setup-verified-banner .verified-icon {
    font-size: 2rem;
    margin-bottom: 6px;
}

.setup-verified-banner strong {
    color: #ADDB67;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 4px;
}

.setup-verified-banner p {
    color: #b2bec3;
    font-size: 0.85rem;
    margin: 0;
}

.onboard-btn.oneclick {
    background: linear-gradient(135deg, #ADDB67, #7FDBCA);
    color: white;
    padding: 14px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 12px;
    width: 100%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 8px;
}

.onboard-btn.oneclick:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 20px rgba(173, 219, 103, 0.4);
}

.oneclick-steps {
    margin-top: 14px;
    text-align: left;
}

.oneclick-step {
    padding: 6px 10px;
    font-size: 0.8rem;
    color: #b2bec3;
    border-left: 2px solid rgba(173, 219, 103, 0.3);
    margin-bottom: 4px;
    padding-left: 12px;
}

/* Setup Detected / Already Active */
.setup-detected-box {
    background: rgba(173, 219, 103, 0.12);
    border: 2px solid rgba(173, 219, 103, 0.35);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    margin: 12px 0;
}

.setup-detected-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.setup-detected-box p {
    font-size: 1rem;
    color: #ADDB67;
}

.setup-detected-detail {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #b2bec3;
    font-style: italic;
}

/* Setup Status Badge (on main page) */
.setup-status-badge {
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    display: none;
    align-items: center;
    font-weight: 600;
    white-space: nowrap;
}

.setup-status-badge.active {
    background: rgba(173, 219, 103, 0.15);
    border: 1px solid rgba(173, 219, 103, 0.4);
    color: #00e6b3;
}

.setup-status-badge.paused {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    cursor: pointer;
}

/* Center the badge below h1 */
h1 + .setup-status-badge {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.setup-status-badge.stale {
    background: rgba(225, 112, 85, 0.15);
    border: 1px solid rgba(225, 112, 85, 0.4);
    color: #fab1a0;
    cursor: pointer;
}

/* Update Required Banner */
.update-banner {
    margin: 8px auto 12px;
    max-width: 620px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(225, 112, 85, 0.15), rgba(253, 203, 110, 0.1));
    border: 1px solid rgba(225, 112, 85, 0.3);
    padding: 14px 18px;
    animation: bannerPulse 2s ease-in-out infinite;
}

@keyframes bannerPulse {
    0%, 100% { border-color: rgba(225, 112, 85, 0.3); }
    50% { border-color: rgba(225, 112, 85, 0.6); }
}

/* ---- Update Popup Modal ---- */
.update-popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    animation: fadeIn 0.4s ease;
}

.update-popup-modal {
    background: rgba(8, 8, 22, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(225, 112, 85, 0.4);
    border-radius: 20px;
    padding: 24px 28px 28px;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
    text-align: center;
}

.update-popup-icon {
    font-size: 2.6rem;
    margin-bottom: 6px;
    animation: spin 2s ease-in-out infinite;
}

@keyframes spin {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    75% { transform: rotate(-15deg); }
}

.update-popup-modal h2 {
    color: #fab1a0;
    margin-bottom: 8px;
    font-size: 1.4rem;
}

.update-popup-desc {
    color: #dfe6e9;
    font-size: 0.88rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.update-popup-features {
    list-style: none;
    text-align: left;
    margin: 0 auto 10px;
    max-width: 360px;
}

.update-popup-features li {
    color: #b2bec3;
    font-size: 0.83rem;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    line-height: 1.4;
}

.update-popup-features li:last-child {
    border-bottom: none;
}

.update-popup-note {
    color: #ADDB67;
    font-size: 0.8rem;
    margin-bottom: 16px;
    opacity: 0.85;
}

.update-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.update-popup-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 0.9rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.update-popup-btn.primary {
    background: linear-gradient(135deg, #F78C6C, #d63031);
    color: white;
}

.update-popup-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(225, 112, 85, 0.4);
}

.update-popup-btn.secondary {
    background: rgba(255,255,255,0.08);
    color: #b2bec3;
}

.update-popup-btn.secondary:hover {
    background: rgba(255,255,255,0.15);
}

/* Update popup command state (after clicking Update Now) */
.update-popup-modal .patch-cmd-box {
    text-align: left;
    overflow-x: auto;
    word-break: break-all;
}

.update-popup-modal .patch-cmd-box code {
    white-space: pre-wrap;
    word-break: break-all;
}

.update-popup-modal .patch-instructions {
    text-align: left;
    margin-top: 8px;
}

.update-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.update-banner-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.update-banner-text {
    flex: 1;
    min-width: 180px;
}

.update-banner-text strong {
    display: block;
    color: #fab1a0;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.update-banner-text span {
    font-size: 0.8rem;
    color: #b2bec3;
}

.update-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.update-banner-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.update-banner-btn.primary {
    background: linear-gradient(135deg, #F78C6C, #d63031);
    color: white;
}

.update-banner-btn.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(225, 112, 85, 0.4);
}

.update-banner-btn.dismiss {
    background: rgba(255,255,255,0.08);
    color: #b2bec3;
}

.update-banner-btn.dismiss:hover {
    background: rgba(255,255,255,0.15);
}

.patch-cmd-box {
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(85, 239, 196, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    margin: 8px 0;
    overflow-x: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.patch-cmd-box code {
    font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
    font-size: 0.82rem;
    color: #ADDB67;
    white-space: nowrap;
    flex: 1;
    user-select: all;
}

/* Banner switches to stacked layout when showing command */
.update-banner-content.has-command {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
}

.update-banner-content.has-command .update-banner-icon {
    font-size: 1.5rem;
}

.update-banner-content.has-command .update-banner-text {
    min-width: unset;
}

.update-banner-content.has-command .update-banner-text strong {
    font-size: 1rem;
    margin-bottom: 6px;
}

.update-banner-content.has-command .update-banner-actions {
    justify-content: center;
    margin-top: 4px;
}

.patch-instructions {
    font-size: 0.82rem;
    color: #dfe6e9;
    margin-top: 4px;
    line-height: 1.5;
}

.patch-instructions strong {
    color: #82AAFF;
}

.patch-instructions .keys {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.75rem;
    font-family: 'SF Mono', 'Menlo', monospace;
    color: #dfe6e9;
}

/* Manual WiFi Run Box (Windows settings) */
.manual-run-box {
    margin-top: 14px;
    padding: 12px 14px;
    background: rgba(130, 170, 255, 0.08);
    border: 1px solid rgba(130, 170, 255, 0.25);
    border-radius: 10px;
}

.manual-run-box p {
    font-size: 0.8rem;
    color: #b2bec3;
    margin-bottom: 8px;
}

.manual-run-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.manual-run-btn {
    background: linear-gradient(135deg, rgba(130, 170, 255, 0.2), rgba(130, 170, 255, 0.1));
    border: 1px solid rgba(130, 170, 255, 0.4);
    border-radius: 8px;
    color: #82AAFF;
    padding: 8px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.manual-run-btn.scan-btn {
    background: linear-gradient(135deg, rgba(33,199,168,0.2), rgba(33,199,168,0.1));
    border-color: rgba(33,199,168,0.4);
    color: #7fdbca;
}

.manual-run-btn.scan-btn:hover {
    background: rgba(33,199,168,0.3);
    transform: scale(1.03);
}

.scan-note {
    font-size: 0.76rem;
    color: #82AAFF;
    margin-top: 8px;
    opacity: 0.8;
    line-height: 1.4;
}

.auto-track-status-box {
    margin: 12px 0;
    padding: 10px 12px;
    border-radius: 6px;
    background: rgba(173, 219, 103, 0.08);
    border-left: 3px solid rgba(173, 219, 103, 0.5);
    font-size: 0.85rem;
}

.status-indicator {
    display: block;
    font-weight: 500;
}

.status-indicator.active {
    color: #ADDB67;
}

.status-indicator.manual {
    color: #ECC48D;
}

.check-log-btn {
    background: none;
    border: none;
    color: #82AAFF;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 1px 5px;
    margin-left: 6px;
    border-radius: 4px;
    opacity: 0.78;
    transition: opacity 0.15s;
    vertical-align: middle;
}
.check-log-btn:hover {
    opacity: 1;
    background: rgba(130, 170, 255, 0.12);
}

.clear-log-btn {
    background: none;
    border: none;
    color: #FF6363;
    font-size: 0.72rem;
    cursor: pointer;
    padding: 1px 5px;
    margin-left: 6px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.15s;
    vertical-align: middle;
}
.clear-log-btn:hover {
    opacity: 1;
    background: rgba(255, 99, 99, 0.12);
}

.manual-run-btn:hover {
    background: rgba(130, 170, 255, 0.25);
    transform: scale(1.03);
}

.manual-run-status {
    display: block;
    font-size: 0.78rem;
    margin-top: 6px;
    min-height: 18px;
}

/* Onboarding Name Input */
.onboard-name-group {
    margin: 14px 0;
    text-align: center;
}

.onboard-name-group label {
    display: block;
    font-size: 0.85rem;
    color: #7fdbca;
    margin-bottom: 6px;
    font-weight: 600;
}

.onboard-name-group input {
    width: 70%;
    max-width: 260px;
    padding: 10px 14px;
    border: 2px solid rgba(33, 199, 168, 0.4);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: white;
    font-size: 1.05rem;
    text-align: center;
    transition: border-color 0.3s;
}

.onboard-name-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.onboard-name-group input:focus {
    outline: none;
    border-color: #7fdbca;
    background: rgba(255, 255, 255, 0.1);
}

/* User Greeting */
.app-header {
    text-align: center;
    margin-bottom: 14px;
    animation: fadeUp 0.7s ease both;
}

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

.app-header h1 {
    font-size: 1.7rem;
    margin-bottom: 6px;
}

.header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #b2bec3;
    opacity: 0.85;
}

.header-date {
    font-size: 0.82rem;
    opacity: 0.7;
}

.header-sep {
    opacity: 0.35;
}

.user-greeting {
    font-size: 1.15rem;
    color: #ECC48D;
    margin: 6px 0 0;
    animation: fadeIn 0.5s ease;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.user-icon {
    width: 18px;
    height: 18px;
    fill: #ECC48D;
    flex-shrink: 0;
}

body.light-mode .user-icon { fill: #d97706; }

.user-greeting strong {
    color: #ECC48D;
    font-size: 1.25rem;
    font-weight: 700;
}

.edit-name-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    opacity: 0.5;
    transition: opacity 0.3s;
    vertical-align: middle;
}

.edit-name-btn:hover {
    opacity: 1;
}

html {
    background: linear-gradient(135deg, #011627 0%, #0d2137 40%, #01111d 70%, #011627 100%);
    background-attachment: fixed;
}

::selection {
    background: #1d3b53;
    color: #d6deeb;
}
body {
    font-family: 'Inter', 'Arial', system-ui, sans-serif;
    background: transparent;
    color: #d6deeb;
    min-height: 100vh;
    padding: 80px 20px 20px;
    overflow-x: hidden;
}

h1 .h1-emoji {
    -webkit-text-fill-color: initial;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 4px;
    font-weight: 800;
    background: linear-gradient(to right, #c792ea 0%, #82aaff 45%, #7fdbca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.summary-bar {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.04);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.summary-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.summary-row span {
    font-size: 1.1rem;
}

.total-days { color: #82AAFF; }
.office-days { color: #ADDB67; }
.target-days { color: #ECC48D; }
.remaining-days { color: #F78C6C; }

.progress-container {
    width: 80%;
    max-width: 500px;
    margin: 12px auto 0;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    height: 28px;
    overflow: hidden;
    position: relative;
}

.progress-label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    z-index: 1;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ADDB67, #7FDBCA);
    border-radius: 20px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

/* shimmer sweep on the fill */
.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0)   0%,
        rgba(255,255,255,0.28) 50%,
        rgba(255,255,255,0)   100%
    );
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
}

@keyframes progressShimmer {
    from { background-position: -200% 0; }
    to   { background-position:  200% 0; }
}

.progress-bar.complete {
    background: linear-gradient(90deg, #ADDB67, #ADDB67);
}

.target-status {
    text-align: center;
    margin-top: 8px;
    font-size: 1rem;
}

/* Flip Counter */
.flip-counter-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin: 4px auto 0;
}

.flip-number {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
}

.flip-inline-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
    margin-left: 6px;
}

.flip-digit {
    width: 36px;
    height: 48px;
    background: linear-gradient(180deg, #011627 0%, #0d2137 100%);
    border: 1.5px solid rgba(33, 199, 168, 0.4);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    color: #7fdbca;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(33,199,168,0.15), inset 0 1px 0 rgba(255,255,255,0.06);
}

.flip-digit::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 1px;
    background: rgba(33,199,168,0.2);
}

.flip-digit.flip-animate {
    animation: digitFlip 0.45s ease;
}

@keyframes digitFlip {
    0%   { transform: rotateX(0deg); opacity: 1; }
    40%  { transform: rotateX(-90deg); opacity: 0; }
    60%  { transform: rotateX(90deg); opacity: 0; }
    100% { transform: rotateX(0deg); opacity: 1; }
}

.flip-label {
    font-size: 0.70rem;
    color: #7fdbca;
    opacity: 0.8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
}

.flip-subtext {
    font-size: 0.78rem;
    color: #b2bec3;
    margin-top: 1px;
}

.flip-subtext strong { color: #82AAFF; }

body.light-mode .flip-digit {
    background: linear-gradient(180deg, #e8e3d8 0%, #ddd8cc 100%);
    border-color: rgba(0,100,180,0.2);
    color: #1a5fa8;
    box-shadow: 0 4px 16px rgba(0,100,180,0.08);
}
body.light-mode .flip-label { color: #1a5fa8; }
body.light-mode .flip-subtext { color: #5a5550; }
body.light-mode .flip-subtext strong { color: #1a5fa8; }

.calendars {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.month-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 16px;
    width: 330px;
    flex-shrink: 0;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    transition: border-color 0.32s ease, box-shadow 0.32s ease;
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeUp 0.55s cubic-bezier(0.22,1,0.36,1) forwards;
    display: flex;
    flex-direction: column;
}

/* Shimmer sweep on hover */
.month-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0)   20%,
        rgba(255,255,255,0.05) 50%,
        rgba(255,255,255,0)   80%
    );
    background-size: 250% 250%;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.month-card:hover::after { opacity: 1; animation: shimmer 1.6s linear infinite; }

@keyframes shimmer {
    0%   { background-position: 200% 200%; }
    100% { background-position: -200% -200%; }
}

/* Stagger by card index */
.month-card:nth-child(1) { animation-delay: 0.10s; }
.month-card:nth-child(2) { animation-delay: 0.22s; }
.month-card:nth-child(3) { animation-delay: 0.34s; }
.month-card:nth-child(4) { animation-delay: 0.46s; }

/* Per-month accent colors on hover (slot-indexed, quarter-agnostic) */
.month-card[data-month-slot="0"]:hover { border-color: rgba(130,170,255,0.5); box-shadow: 0 0 40px rgba(130,170,255,0.18); }
.month-card[data-month-slot="1"]:hover { border-color: rgba(199,146,234,0.5); box-shadow: 0 0 40px rgba(199,146,234,0.18); }
.month-card[data-month-slot="2"]:hover { border-color: rgba(127,219,202,0.5); box-shadow: 0 0 40px rgba(127,219,202,0.18); }
.month-card[data-month-slot="3"]:hover { border-color: rgba(227,209,138,0.5); box-shadow: 0 0 40px rgba(227,209,138,0.18); }

/* Per-month title colors */
.month-card[data-month-slot="0"] .month-title { color: #82aaff; }
.month-card[data-month-slot="1"] .month-title { color: #c792ea; }
.month-card[data-month-slot="2"] .month-title { color: #7fdbca; }
.month-card[data-month-slot="3"] .month-title { color: #ECC48D; }

.month-title {
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #7fdbca;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.day-headers {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 5px;
}

.day-headers span {
    font-size: 0.8rem;
    color: #637777;
    padding: 5px;
}

.day-headers span.weekend-header {
    color: #FF6363;
    font-weight: bold;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    flex: 1;
    align-content: start;
    min-height: 218px; /* 6 rows × 33px cell + 5 gaps × 4px = 218 */
}

.day-cell {
    text-align: center;
    padding: 4px 2px;
    border-radius: 6px;
    font-size: 0.82rem;
    position: relative;
    min-height: 33px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Today cell pulse ring */
.day-cell.today-cell {
    box-shadow: 0 0 0 2px rgba(127,219,202,0.9), 0 0 0 4px rgba(127,219,202,0.25);
    animation: todayPulse 2.2s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes todayPulse {
    0%, 100% { box-shadow: 0 0 0 2px rgba(127,219,202,0.9), 0 0 0 4px rgba(127,219,202,0.15); }
    50%       { box-shadow: 0 0 0 2px rgba(127,219,202,1.0), 0 0 0 8px rgba(127,219,202,0.0); }
}

.day-cell.empty { background: none; }

.day-cell.saturday {
    background: rgba(33, 199, 168, 0.15);
    color: #7fdbca;
    cursor: not-allowed;
    border: 1px solid rgba(33, 199, 168, 0.3);
}

.day-cell.sunday {
    background: rgba(255, 99, 99, 0.25);
    color: #FF6363;
    cursor: not-allowed;
    border: 1px solid rgba(255, 99, 99, 0.3);
}

.day-cell.weekday {
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.day-cell.weekday:hover {
    background: rgba(33, 199, 168, 0.18);
    transform: scale(1.1);
}

.day-cell.checked {
    background: rgba(173, 219, 103, 0.4) !important;
    border: 2px solid #ADDB67;
}

.day-cell.checked::after {
    content: "✅";
    position: absolute;
    top: -2px;
    right: 0px;
    font-size: 0.6rem;
}

.day-cell.holiday {
    background: rgba(225, 112, 85, 0.4) !important;
    border: 2px solid #F78C6C;
    cursor: default;
}

.day-cell.holiday:hover {
    transform: scale(1.1);
}

.day-cell.holiday::after {
    content: "🎉";
    position: absolute;
    top: -2px;
    right: 0px;
    font-size: 0.6rem;
}

.day-cell.before-range,
.day-cell.after-range {
    opacity: 0.2;
    cursor: not-allowed;
}

.day-cell.weekday.future {
    opacity: 0.4;
    cursor: not-allowed;
}

.day-cell.weekday.future:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: none;
}

/* Custom tooltip for day cells */
.day-cell[data-tip] {
    position: relative;
}

.day-cell[data-tip]:hover::before {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(8, 8, 22, 0.95);
    color: #d6deeb;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    border: 1px solid rgba(33, 199, 168, 0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    animation: tipFade 0.15s ease;
}

.day-cell[data-tip]:hover::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(33, 199, 168, 0.4);
    z-index: 100;
    pointer-events: none;
}

@keyframes tipFade {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.month-summary {
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    text-align: center;
    font-size: 0.82rem;
}

.month-summary div {
    margin: 3px 0;
}

.summary-holidays { color: #F78C6C; }
.summary-holidays--none { color: rgba(255,255,255,0.25); }
body.light-mode .summary-holidays--none { color: rgba(0,0,0,0.25); }

.legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 28px auto 8px;
    flex-wrap: wrap;
    opacity: 0.75;
    font-size: 0.82rem;
}

.legend-date {
    width: 100%;
    text-align: center;
    font-size: 0.78rem;
    opacity: 0.5;
    margin-top: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
}

.legend-box {
    width: 18px;
    height: 18px;
    border-radius: 4px;
}

.legend-box.office { background: rgba(173, 219, 103, 0.4); border: 2px solid #ADDB67; }
.legend-box.auto-marked { background: rgba(173, 219, 103, 0.4); border: 2px solid #ADDB67; position: relative; }
.legend-box.auto-marked::after { content: "🤖"; position: absolute; top: -4px; right: -4px; font-size: 0.5rem; }
.legend-box.saturday { background: rgba(33, 199, 168, 0.15); border: 1px solid rgba(33, 199, 168, 0.3); }
.legend-box.sunday { background: rgba(255, 99, 99, 0.25); border: 1px solid rgba(255, 99, 99, 0.3); }
.legend-box.holiday { background: rgba(225, 112, 85, 0.4); border: 2px solid #F78C6C; }
.legend-box.workday { background: rgba(255, 255, 255, 0.08); }

/* Auto-marked day cell */
.day-cell.auto-checked {
    background: rgba(173, 219, 103, 0.4) !important;
    border: 2px solid #ADDB67;
}

.day-cell.auto-checked::after {
    content: "🤖";
    position: absolute;
    top: -2px;
    right: 0px;
    font-size: 0.6rem;
}

/* WiFi Notification Bar */
.wifi-notification {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    margin: 10px auto 15px;
    max-width: 600px;
    border-radius: 10px;
    font-size: 0.95rem;
    animation: slideDown 0.5s ease;
}

.wifi-notification.success {
    background: rgba(173, 219, 103, 0.3);
    border: 1px solid #ADDB67;
    color: #ADDB67;
}

.wifi-notification.info {
    background: rgba(130, 170, 255, 0.3);
    border: 1px solid #82AAFF;
    color: #82AAFF;
}

.wifi-notification.already {
    background: rgba(253, 203, 110, 0.3);
    border: 1px solid #ECC48D;
    color: #ECC48D;
}

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

/* Settings Panel */
.feedback-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(173,219,103,0.25);
    border: 2px solid rgba(173,219,103,0.5);
    color: #ADDB67;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(130, 170, 255, 0.24);
    border: 2px solid rgba(130, 170, 255, 0.5);
    color: #82AAFF;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-fab:hover {
    background: rgba(130, 170, 255, 0.42);
    transform: scale(1.1);
}
.feedback-fab:hover {
    background: rgba(173,219,103,0.45);
    transform: scale(1.1);
}
body.light-mode .feedback-fab {
    background: rgba(0,150,120,0.12);
    border-color: rgba(0,150,120,0.35);
    color: #1a7a6e;
}

.settings-toggle-wrap {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.settings-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(33, 199, 168, 0.2);
    border: 2px solid rgba(33, 199, 168, 0.6);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-toggle:hover {
    background: rgba(33, 199, 168, 0.38);
    transform: rotate(90deg) scale(1.1);
}

/* Theme Toggle Button */
/* Top-right action bar: theme + feedback */
.topright-actions {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.18);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-btn:hover {
    background: rgba(255,255,255,0.22);
    transform: scale(1.1);
}

body.light-mode .theme-btn {
    background: rgba(0,0,0,0.06);
    border-color: rgba(100,80,50,0.2);
    color: #3a3530;
}

body.light-mode .theme-btn:hover { background: rgba(0,0,0,0.12); }


.settings-btn-wrap {
    position: relative;
    display: inline-flex;
}

.settings-update-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: #ff6363;
    border-radius: 99px;
    border: 2px solid #011627;
    font-size: 0.65rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: dotPulse 1.5s ease-in-out infinite;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

@keyframes dotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}

.settings-update-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(135deg, rgba(225,112,85,0.18), rgba(253,203,110,0.1));
    border: 1px solid rgba(225, 112, 85, 0.35);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: #fab1a0;
    font-weight: 600;
}

.settings-update-card-btn {
    background: linear-gradient(135deg, #F78C6C, #d63031);
    border: none;
    border-radius: 7px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.settings-update-card-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 10px rgba(225,112,85,0.4);
}

.settings-setup-reminder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(135deg, rgba(253,203,110,0.18), rgba(253,203,110,0.06));
    border: 1px solid rgba(253,203,110,0.45);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 0.82rem;
    color: #ECC48D;
    font-weight: 600;
}

.settings-setup-reminder-btn {
    background: linear-gradient(135deg, #ECC48D, #F78C6C);
    border: none;
    border-radius: 7px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.settings-setup-reminder-btn:hover {
    transform: scale(1.04);
    box-shadow: 0 2px 10px rgba(253,203,110,0.35);
}

.settings-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 380px;
    max-height: 80vh;
    overflow-y: auto;
    background: rgba(8, 8, 22, 0.9);
    border: 1px solid rgba(33, 199, 168, 0.25);
    border-radius: 15px;
    padding: 20px;
    z-index: 99;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    animation: slideUp 0.3s ease;
}

.info-mini-panel {
    position: fixed;
    bottom: 86px;
    right: 80px;
    width: 300px;
    background: rgba(8, 8, 22, 0.9);
    border: 1px solid rgba(33, 199, 168, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    z-index: 101;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.2s ease;
}

.info-mini-panel h4 {
    margin: 0 0 8px 0;
    color: #82AAFF;
    font-size: 0.9rem;
}

.info-mini-panel ul {
    margin: 0;
    padding-left: 18px;
}

.info-mini-panel li {
    margin: 0 0 6px 0;
    color: #dfe6e9;
    font-size: 0.8rem;
    line-height: 1.35;
}

.developer-credit {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(130, 170, 255, 0.22);
    font-size: 0.76rem;
    color: rgba(223, 230, 233, 0.78);
}

.home-credit {
    margin: 24px auto 12px;
    max-width: 380px;
    perspective: 600px;
}

.credit-card {
    position: relative;
    border-radius: 14px;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.15s ease;
}
.credit-card:hover { transform: rotateY(4deg) rotateX(-3deg) scale(1.02); }
.credit-card:active { transform: rotateY(8deg) rotateX(-5deg) scale(0.98); }

.credit-card-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg,
        rgba(199,146,234,0.12) 0%,
        rgba(130,170,255,0.08) 40%,
        rgba(127,219,202,0.12) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.07),
        0 4px 24px rgba(130,170,255,0.1),
        0 0 0 1px rgba(130,170,255,0.18);
    overflow: hidden;
}

/* Animated rainbow border on hover */
.credit-card-inner::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(270deg, #c792ea, #82aaff, #7fdbca, #addb67, #ecc48d, #c792ea);
    background-size: 300% 300%;
    animation: creditBorderSpin 4s linear infinite;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s;
}
.credit-card-inner::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(1,22,39,0.97) 0%, rgba(13,33,55,0.97) 100%);
    z-index: 0;
}
.credit-card:hover .credit-card-inner::before { opacity: 1; }

/* Holographic shimmer sweep */
.credit-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        transparent 40%,
        rgba(255,255,255,0.08) 50%,
        transparent 60%);
    background-size: 200% 100%;
    animation: creditShimmer 3s ease-in-out infinite;
    border-radius: 14px;
    z-index: 2;
    pointer-events: none;
}

/* CRT scanline effect */
.credit-scanline {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.06) 3px,
        rgba(0,0,0,0.06) 4px
    );
    border-radius: 14px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.6;
}

.credit-avatar {
    position: relative;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c792ea 0%, #82aaff 60%, #7fdbca 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #011627;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(130,170,255,0.5), 0 0 24px rgba(199,146,234,0.3);
    animation: creditAvatarPulse 3s ease-in-out infinite;
}

.credit-text {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1px;
}
.credit-label {
    font-size: 0.63rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #637777;
}
.credit-name {
    font-size: 0.88rem;
    font-weight: 700;
    background: linear-gradient(90deg, #c792ea 0%, #82aaff 50%, #7fdbca 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: creditNameShift 5s ease-in-out infinite;
}

.credit-badges {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-end;
}
.credit-badge {
    font-size: 0.6rem;
    font-family: 'JetBrains Mono', monospace;
    color: rgba(127,219,202,0.7);
    background: rgba(127,219,202,0.08);
    border: 1px solid rgba(127,219,202,0.2);
    border-radius: 4px;
    padding: 1px 5px;
    white-space: nowrap;
}

@keyframes creditBorderSpin {
    0%   { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
@keyframes creditShimmer {
    0%   { background-position: -100% 0; }
    60%  { background-position: 200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes creditAvatarPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(130,170,255,0.5), 0 0 24px rgba(199,146,234,0.3); }
    50%       { box-shadow: 0 0 18px rgba(127,219,202,0.7), 0 0 32px rgba(130,170,255,0.4); }
}
@keyframes creditNameShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Diagnostic Panel ───────────────────────────────── */
.diag-section {
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(127,219,202,0.15);
    padding-bottom: 12px;
}
.diag-toggle-btn {
    width: 100%;
    padding: 8px 14px;
    background: rgba(127,219,202,0.1);
    border: 1px solid rgba(127,219,202,0.3);
    border-radius: 8px;
    color: #7fdbca;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.diag-toggle-btn:hover { background: rgba(127,219,202,0.2); }
.diag-panel {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.diag-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.diag-row {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: center;
    gap: 8px;
    font-size: 0.79rem;
    padding: 4px 6px;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
}
.diag-icon { text-align: center; }
.diag-key  { color: #d6deeb; opacity: 0.75; }
.diag-val  { font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; text-align: right; }
.diag-reinstall { display: flex; flex-direction: column; gap: 5px; }
.diag-label { font-size: 0.78rem; color: #d6deeb; opacity: 0.7; margin: 0; }
.diag-cmd-row {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(127,219,202,0.25);
    border-radius: 8px;
    padding: 8px 10px;
}
.diag-cmd {
    flex: 1;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: #7fdbca;
    word-break: break-all;
    background: none;
    border: none;
    outline: none;
    user-select: all;
}
.diag-copy-btn {
    flex-shrink: 0;
    padding: 4px 10px;
    background: rgba(127,219,202,0.15);
    border: 1px solid rgba(127,219,202,0.4);
    border-radius: 6px;
    color: #7fdbca;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.diag-copy-btn:hover { background: rgba(127,219,202,0.28); }
.diag-hint {
    font-size: 0.73rem;
    color: #637777;
    margin: 0;
}

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

.settings-panel h3 {
    text-align: center;
    margin-bottom: 15px;
    color: #7fdbca;
}

.settings-group {
    margin-bottom: 15px;
}

.settings-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #dfe6e9;
}

.settings-group input[type="text"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    font-size: 0.95rem;
}

.settings-group input[type="text"]::placeholder {
    color: rgba(255,255,255,0.3);
}

.settings-group input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

.auto-mark-log {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.8rem;
    max-height: 100px;
    overflow-y: auto;
    color: #b2bec3;
    font-family: monospace;
}

.settings-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.save-settings-btn {
    flex: 1;
    padding: 8px;
    background: #ADDB67;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.save-settings-btn:hover { background: #7FDBCA; }

.close-settings-btn {
    flex: 1;
    padding: 8px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.close-settings-btn:hover { background: rgba(255,255,255,0.2); }

.setup-instructions {
    margin-top: 15px;
    padding: 12px;
    background: rgba(130, 170, 255, 0.1);
    border: 1px solid rgba(130, 170, 255, 0.3);
    border-radius: 10px;
    font-size: 0.8rem;
}

.setup-instructions h4 {
    color: #82AAFF;
    margin-bottom: 8px;
}

.setup-instructions ol {
    padding-left: 20px;
    line-height: 1.8;
    color: #b2bec3;
}

.setup-instructions code {
    background: rgba(0,0,0,0.4);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #ADDB67;
    word-break: break-all;
}

/* OS Tab Switcher */
.os-tabs {
    display: flex;
    gap: 8px;
    margin: 10px 0;
}

.os-tab {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #b2bec3;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.3s;
}

.os-tab.active {
    background: rgba(130, 170, 255, 0.25);
    border-color: #82AAFF;
    color: #82AAFF;
    font-weight: bold;
}

.os-tab:hover {
    background: rgba(130, 170, 255, 0.15);
}

.os-content {
    margin-top: 8px;
}

.os-content ol {
    padding-left: 20px;
    line-height: 1.8;
    color: #b2bec3;
    font-size: 0.8rem;
}

.os-content a {
    color: #82AAFF;
    text-decoration: none;
}

.os-content a:hover {
    text-decoration: underline;
}

.setup-dropdown {
    margin: 8px 0;
    border: 1px solid rgba(33, 199, 168, 0.2);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.02);
}

.setup-dropdown summary {
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #dfe6e9;
    outline: none;
}

.setup-dropdown p {
    margin: 8px 0 0 0;
}

.uninstall-dropdown {
    margin-top: 14px;
    border-color: rgba(255, 99, 99, 0.35);
    background: rgba(255, 99, 99, 0.05);
    padding: 10px 12px;
}

.uninstall-step {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 99, 99, 0.18);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
}

.uninstall-step p {
    margin: 0 0 10px 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

.uninstall-copy-btn {
    margin-top: 0;
    width: 100%;
    justify-content: center;
    padding: 10px 12px;
    font-size: 0.83rem;
}

#uninstallStatus {
    margin-top: 8px;
}

.danger-action-btn {
    margin-top: 0;
    width: 100%;
    background: rgba(214, 48, 49, 0.22);
    border: 1px solid rgba(214, 48, 49, 0.5);
    color: #ffb8b8;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.83rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.danger-action-btn:hover {
    background: rgba(214, 48, 49, 0.34);
    transform: scale(1.02);
}

/* Action Buttons Row */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px auto;
}

.rescan-btn {
    padding: 10px 24px;
    background: linear-gradient(135deg, #82AAFF, #7FDBCA);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    animation: markTodayPulse 3s ease-in-out infinite;
}

@keyframes markTodayPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(9,132,227,0); }
    50%       { box-shadow: 0 0 0 8px rgba(9,132,227,0.25); }
}

.rescan-btn:hover {
    background: linear-gradient(135deg, #7FDBCA, #82AAFF);
    transform: scale(1.05);
    animation: none;
}

.reset-btn {
    padding: 10px 24px;
    background: #F78C6C;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.reset-btn:hover {
    background: #d63031;
    transform: scale(1.05);
}

.confetti {
    display: none;
    text-align: center;
    font-size: 2rem;
    animation: celebrate 1s ease-in-out;
}

@keyframes celebrate {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ── Quarter badge & dropdown ────────────────────────── */
.quarter-badge-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.quarter-badge {
    display: inline-block;
    font-size: 0.55em;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(33,199,168,0.15);
    border: 1px solid rgba(33,199,168,0.4);
    color: #7fdbca;
    vertical-align: middle;
    margin-left: 6px;
    -webkit-text-fill-color: #7fdbca;
    line-height: 1.6;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.quarter-badge:hover {
    background: rgba(33,199,168,0.28);
    border-color: rgba(33,199,168,0.65);
}

.quarter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(1,22,39,0.96);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(33,199,168,0.3);
    border-radius: 12px;
    padding: 6px;
    min-width: 220px;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.quarter-dropdown.open { display: block; }

.q-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    color: #c7d2fe;
    -webkit-text-fill-color: #c7d2fe;
    background-clip: initial;
    -webkit-background-clip: initial;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    text-align: left;
    white-space: nowrap;
}

.q-option:hover { background: rgba(33,199,168,0.18); }
.q-option.active { background: rgba(33,199,168,0.28); color: #7fdbca; -webkit-text-fill-color: #7fdbca; }

.q-display {
    font-weight: 400;
    font-size: 0.88em;
    opacity: 0.7;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-mode .quarter-dropdown {
    background: rgba(245,246,255,0.97);
    border-color: rgba(99,102,241,0.3);
    box-shadow: 0 8px 32px rgba(67,56,202,0.15);
}

body.light-mode .q-option { color: #3730a3; -webkit-text-fill-color: #3730a3; }
body.light-mode .q-option:hover { background: rgba(99,102,241,0.1); }
body.light-mode .q-option.active { background: rgba(99,102,241,0.18); color: #4338ca; -webkit-text-fill-color: #4338ca; }

/* ============================================================
   LIGHT MODE — Sky Blue
   Soft sky-cyan gradient, deep slate text, sky accent palette
   ============================================================ */

body.light-mode {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 40%, #e0f7fa 100%);
    color: #0c2a4a;
}

body.light-mode h1 {
    background: linear-gradient(to right, #0369a1 0%, #0ea5e9 50%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.light-mode .quarter-badge {
    background: rgba(14,165,233,0.15);
    border-color: rgba(14,165,233,0.4);
    color: #0369a1;
    -webkit-text-fill-color: #0369a1;
}

body.light-mode .quarter-badge:hover {
    background: rgba(14,165,233,0.28);
}

body.light-mode .h1-emoji { -webkit-text-fill-color: initial; }

body.light-mode .user-greeting { color: #0369a1; }
body.light-mode .user-greeting strong { color: #d97706; }
body.light-mode p { color: #075985; }

/* Glow orbs */
body.light-mode .ambient-glow { opacity: 0.05; }

/* Summary bar */
body.light-mode .summary-bar {
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(14,165,233,0.18);
    box-shadow: 0 2px 20px rgba(14,165,233,0.1);
    backdrop-filter: blur(12px);
}
body.light-mode .progress-container { background: rgba(14,165,233,0.12); }
body.light-mode .target-status { color: #0369a1; }

/* Stat cards */
body.light-mode .stat-card {
    background: rgba(255,255,255,0.70);
    border-color: rgba(14,165,233,0.15);
}
body.light-mode .stat-card .stat-value { color: #0369a1; }
body.light-mode .stat-card--green .stat-value { color: #059669; }
body.light-mode .stat-card--amber .stat-value { color: #d97706; }
body.light-mode .stat-card--rose  .stat-value  { color: #e11d48; }
body.light-mode .stat-label { color: #0ea5e9; }

/* Calendar cards */
body.light-mode .month-card {
    background: rgba(255,255,255,0.65);
    border: 1px solid rgba(14,165,233,0.18);
    box-shadow: 0 3px 20px rgba(14,165,233,0.1);
}
body.light-mode .month-card[data-month-slot="0"] .month-title { color: #0369a1; }
body.light-mode .month-card[data-month-slot="1"] .month-title { color: #7c3aed; }
body.light-mode .month-card[data-month-slot="2"] .month-title { color: #0d9488; }
body.light-mode .month-card[data-month-slot="3"] .month-title { color: #b45309; }
body.light-mode .day-headers span { color: #0ea5e9; }
body.light-mode .day-headers span.weekend-header { color: #e11d48; }
body.light-mode .day-cell.weekday {
    background: rgba(14,165,233,0.07);
    color: #0c2a4a;
}
body.light-mode .day-cell.weekday:hover { background: rgba(14,165,233,0.18); }
body.light-mode .day-cell.saturday {
    background: rgba(14,165,233,0.13);
    color: #0369a1;
    border-color: rgba(14,165,233,0.25);
}
body.light-mode .day-cell.sunday {
    background: rgba(225,29,72,0.08);
    color: #be123c;
    border-color: rgba(225,29,72,0.15);
}
body.light-mode .day-cell[data-tip]:hover::before {
    background: rgba(224,242,254,0.98);
    color: #0c2a4a;
    border-color: rgba(14,165,233,0.35);
    box-shadow: 0 4px 12px rgba(14,165,233,0.15);
}
body.light-mode .month-summary { background: rgba(14,165,233,0.07); }
body.light-mode .summary-holidays--none { color: rgba(0,0,0,0.25); }

/* Legend */
body.light-mode .legend { color: #075985; }
body.light-mode .legend-box.workday { background: rgba(14,165,233,0.1); }

/* Flip counter */
body.light-mode .flip-digit {
    background: linear-gradient(180deg, #fff 0%, #e0f2fe 100%);
    border-color: rgba(14,165,233,0.3);
    color: #0369a1;
    box-shadow: 0 4px 16px rgba(14,165,233,0.12);
}
body.light-mode .flip-label { color: #0ea5e9; }
body.light-mode .flip-subtext { color: #0369a1; }
body.light-mode .flip-subtext strong { color: #0369a1; }

/* Quarter dropdown */
body.light-mode .quarter-dropdown {
    background: rgba(224,242,254,0.97);
    border-color: rgba(14,165,233,0.3);
    box-shadow: 0 8px 32px rgba(14,165,233,0.18);
}
body.light-mode .q-option { color: #075985; -webkit-text-fill-color: #075985; }
body.light-mode .q-option:hover { background: rgba(14,165,233,0.12); }
body.light-mode .q-option.active { background: rgba(14,165,233,0.22); color: #0369a1; -webkit-text-fill-color: #0369a1; }

/* Settings panel */
body.light-mode .settings-panel {
    background: rgba(224,242,254,0.97);
    border-color: rgba(14,165,233,0.28);
    color: #0c2a4a;
    box-shadow: 0 8px 32px rgba(14,165,233,0.14);
}
body.light-mode .settings-panel h3 { color: #0369a1; }
body.light-mode .settings-group label { color: #075985; }
body.light-mode .settings-group input[type="text"] {
    background: rgba(255,255,255,0.65);
    border-color: rgba(14,165,233,0.25);
    color: #0c2a4a;
}
body.light-mode .settings-group input[type="text"]::placeholder { color: rgba(12,42,74,0.35); }
body.light-mode .auto-mark-log { background: rgba(255,255,255,0.5); color: #075985; }
body.light-mode .setup-instructions { border-color: rgba(14,165,233,0.2); background: rgba(255,255,255,0.45); }
body.light-mode .setup-instructions h4 { color: #0369a1; }
body.light-mode .setup-instructions p,
body.light-mode .setup-instructions ol li { color: #075985; }
body.light-mode .setup-instructions code { background: rgba(14,165,233,0.1); color: #0369a1; }
body.light-mode .os-tab { background: rgba(255,255,255,0.55); border-color: rgba(14,165,233,0.18); color: #075985; }
body.light-mode .os-tab.active { background: rgba(14,165,233,0.15); border-color: #0ea5e9; color: #0369a1; }
body.light-mode .setup-dropdown { border-color: rgba(14,165,233,0.2); background: rgba(255,255,255,0.35); }
body.light-mode .setup-dropdown summary { color: #3730a3; }
body.light-mode .uninstall-dropdown { border-color: rgba(225,29,72,0.22); background: rgba(225,29,72,0.04); }
body.light-mode .uninstall-step { border-color: rgba(225,29,72,0.15); background: rgba(255,255,255,0.5); }
body.light-mode .danger-action-btn { background: rgba(225,29,72,0.08); border-color: rgba(225,29,72,0.28); color: #be123c; }
body.light-mode .settings-update-card { background: linear-gradient(135deg, rgba(225,112,85,0.1), rgba(253,203,110,0.07)); }

/* FABs */
body.light-mode .settings-toggle { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.35); color: #4338ca; }
body.light-mode .settings-toggle:hover { background: rgba(99,102,241,0.2); }
body.light-mode .info-fab { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.3); color: #4338ca; }
body.light-mode .info-fab:hover { background: rgba(99,102,241,0.2); }
body.light-mode .feedback-fab { background: rgba(173,219,103,0.1); border-color: rgba(173,219,103,0.3); color: #059669; }
body.light-mode .theme-btn { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.25); color: #4338ca; }
body.light-mode .theme-btn:hover { background: rgba(99,102,241,0.18); }

/* Info panel */
body.light-mode .info-mini-panel { background: rgba(238,240,255,0.97); border-color: rgba(99,102,241,0.3); box-shadow: 0 8px 22px rgba(99,102,241,0.12); }
body.light-mode .info-mini-panel h4 { color: #4338ca; }
body.light-mode .info-mini-panel li { color: #3730a3; }
body.light-mode .developer-credit { color: #6366f1; border-top-color: rgba(99,102,241,0.15); }
body.light-mode .settings-credit { color: #6366f1; }

/* Onboarding modal */
body.light-mode .onboard-overlay { background: rgba(30,27,75,0.45); }
body.light-mode .onboard-modal { background: rgba(238,240,255,0.97); border-color: rgba(99,102,241,0.3); backdrop-filter: blur(24px); }
body.light-mode .onboard-modal h2 { color: #4338ca; }
body.light-mode .onboard-modal p { color: #3730a3; }
body.light-mode .onboard-name-group label { color: #4338ca; }
body.light-mode .onboard-name-group input { background: rgba(255,255,255,0.6); border-color: rgba(99,102,241,0.3); color: #1e1b4b; }
body.light-mode .onboard-download-box, body.light-mode .onboard-cmd-box { background: rgba(255,255,255,0.45); }
body.light-mode .onboard-cmds code { background: rgba(99,102,241,0.08); color: #4338ca; }
body.light-mode .setup-detected-box { background: rgba(173,219,103,0.08); border-color: rgba(173,219,103,0.25); }
body.light-mode .terminal-cmd-box { background: rgba(255,255,255,0.7); border-color: rgba(99,102,241,0.3); }
body.light-mode .terminal-cmd-box code { color: #4338ca; }
body.light-mode .oneclick-box { background: rgba(173,219,103,0.06); border-color: rgba(173,219,103,0.2); }
body.light-mode .oneclick-step { color: #3730a3; }

/* Update popup */
body.light-mode .update-popup-overlay { background: rgba(30,27,75,0.45); }
body.light-mode .update-popup-modal { background: rgba(238,240,255,0.97); border-color: rgba(225,112,85,0.25); backdrop-filter: blur(24px); }
body.light-mode .update-popup-modal h2 { color: #c2410c; }
body.light-mode .update-popup-desc { color: #3730a3; }
body.light-mode .update-popup-features li { color: #1e1b4b; border-bottom-color: rgba(99,102,241,0.08); }
body.light-mode .update-popup-note { color: #059669; }
body.light-mode .update-popup-btn.secondary { background: rgba(99,102,241,0.08); color: #3730a3; }
body.light-mode .patch-cmd-box { background: rgba(255,255,255,0.6); border-color: rgba(99,102,241,0.2); }
body.light-mode .patch-cmd-box code { color: #4338ca; }
body.light-mode .patch-instructions { color: #1e1b4b; }
body.light-mode .patch-instructions strong { color: #4338ca; }
body.light-mode .patch-instructions .keys { background: rgba(99,102,241,0.08); border-color: rgba(99,102,241,0.18); color: #1e1b4b; }

/* WiFi notification */
body.light-mode .wifi-notification.success { background: rgba(173,219,103,0.2); border-color: rgba(173,219,103,0.5); color: #065f46; }
body.light-mode .wifi-notification.info    { background: rgba(14,165,233,0.15); border-color: rgba(14,165,233,0.4); color: #075985; }
body.light-mode .wifi-notification.already { background: rgba(217,119,6,0.15); border-color: rgba(217,119,6,0.4); color: #92400e; }

body.light-mode .settings-toggle {
    background: rgba(108,92,231,0.12);
    border-color: rgba(108,92,231,0.35);
}
body.light-mode .settings-toggle:hover { background: rgba(108,92,231,0.22); }

body.light-mode .info-fab {
    background: rgba(130, 170, 255, 0.16);
    border-color: rgba(130, 170, 255, 0.35);
    color: #82AAFF;
}

body.light-mode .info-fab:hover {
    background: rgba(130, 170, 255, 0.28);
}

body.light-mode .info-mini-panel {
    background: rgba(250,247,241,0.98);
    border-color: rgba(130, 170, 255, 0.35);
    box-shadow: 0 8px 22px rgba(100,80,50,0.14);
}

body.light-mode .info-mini-panel h4 { color: #82AAFF; }
body.light-mode .info-mini-panel li { color: #4a4540; }
body.light-mode .developer-credit {
    border-top-color: rgba(130, 170, 255, 0.25);
    color: rgba(74, 69, 64, 0.82);
}
body.light-mode .settings-credit { color: rgba(74, 69, 64, 0.72); }

/* Status badge */
body.light-mode .setup-status-badge.active {
    background: rgba(173,219,103,0.12);
    color: #047857;
    border-color: rgba(173,219,103,0.35);
}
body.light-mode .setup-status-badge.paused {
    background: rgba(239,68,68,0.1);
    color: #b91c1c;
    border-color: rgba(239,68,68,0.3);
}
body.light-mode .setup-status-badge.stale {
    background: rgba(225,112,85,0.1);
    color: #c0392b;
}

/* Scrollbars in light mode */
body.light-mode ::-webkit-scrollbar-track { background: rgba(0,0,0,0.04); }
body.light-mode ::-webkit-scrollbar-thumb { background: rgba(100,80,50,0.2); }
