/*
 * ds.css — StudySync Design System  v1.0
 * ═══════════════════════════════════════════════════════════════════
 * Loaded AFTER style.css / focus.css on every page.
 * Strategy: enhance existing class names — no HTML renames needed.
 *
 * What lives here:
 *   1. Token overrides  — warmer purple-tinted borders, better glows
 *   2. Body / header    — richer background, refined glass header
 *   3. Shine sweep      — .shine-btn + primary buttons
 *   4. Button tiers     — primary / secondary / ghost / danger
 *   5. Tabs             — tracker-tab, range-btn, mode-btn
 *   6. Inputs           — unified focus ring across all fields
 *   7. Cards / panels   — subtle surface gradient + glow on hover
 *   8. Auth modal       — gradient border, surface gloss
 *   9. Misc elements    — chart tooltip, drop zone, leaderboard rows
 * ═══════════════════════════════════════════════════════════════════
 */

/* ════════════════════════════════════════════════════════════════
   1. DESIGN TOKENS
   Override / extend base variables from style.css / focus.css.
   ════════════════════════════════════════════════════════════════ */
:root {
    /* Border: warmer purple-tinted instead of cold blue-gray #2e3250 */
    --border:         rgba(124, 92, 252, 0.18);
    --border-hover:   rgba(124, 92, 252, 0.35);
    --border-focus:   rgba(124, 92, 252, 0.58);

    /* Glow helpers */
    --accent-glow:    rgba(124, 92, 252, 0.28);
    --accent-dim:     rgba(124, 92, 252, 0.10);
    --accent-mid-dim: rgba(124, 92, 252, 0.16);

    /* Surface micro-gloss (top edge highlight on cards) */
    --surface-gloss:  rgba(255, 255, 255, 0.030);

    /* Radius tokens */
    --r-btn:  10px;
    --r-card: 14px;
    --r-sm:   8px;

    /* Transition helpers */
    --t:      0.18s ease;
    --t-slow: 0.30s ease;
}


/* ════════════════════════════════════════════════════════════════
   2. BODY / PAGE BACKGROUND
   Richer ambient glow anchored at the top.
   ════════════════════════════════════════════════════════════════ */
body {
    background:
        radial-gradient(ellipse 100% 42% at 50% -2%,
            rgba(124,92,252,0.090) 0%, transparent 68%),
        radial-gradient(ellipse 60% 38% at -5% 85%,
            rgba(124,92,252,0.038) 0%, transparent 62%),
        #0c0d14;
    background-attachment: fixed;
}


/* ════════════════════════════════════════════════════════════════
   3. HEADER
   Deeper glass blur, warmer border.
   ════════════════════════════════════════════════════════════════ */
header {
    background: rgba(11, 12, 19, 0.84);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--border);
}

/* Nav links — pill with soft hover glow */
.header-nav-link {
    border-radius: var(--r-btn);
    border: 1px solid var(--border);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.84rem;
    padding: 7px 18px;
    transition: border-color var(--t), color var(--t), background var(--t), box-shadow var(--t);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.header-nav-link:hover {
    border-color: var(--border-hover);
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 10px rgba(124,92,252,0.12);
}


/* ════════════════════════════════════════════════════════════════
   4. SHINE SWEEP
   Light diagonal wipe from left to right on hover.
   Applied to primary buttons and the standalone .shine-btn class.
   ════════════════════════════════════════════════════════════════ */

/* Base setup — overflow hidden to contain the pseudo-element */
.shine-btn,
.save-btn,
.ctrl-btn.start {
    position: relative;
    overflow: hidden;
}

/* The sweep stripe */
.shine-btn::after,
.save-btn::after,
.ctrl-btn.start::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -80%;
    width: 45%;
    height: 220%;
    background: linear-gradient(
        105deg,
        rgba(255,255,255,0)    0%,
        rgba(255,255,255,0.07) 38%,
        rgba(255,255,255,0.12) 50%,
        rgba(255,255,255,0.07) 62%,
        rgba(255,255,255,0)   100%
    );
    transform: skewX(-10deg);
    transition: left 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    z-index: 0;
}
.shine-btn:hover::after,
.save-btn:hover::after,
.ctrl-btn.start:hover::after { left: 130%; }

/* Children float above the sweep */
.shine-btn > *,
.save-btn > *,
.ctrl-btn.start > * { position: relative; z-index: 1; }

/* auth-link-btn.accent gets shine too — has no nested children  */
.auth-link-btn.accent {
    position: relative;
    overflow: hidden;
}
.auth-link-btn.accent::after {
    content: '';
    position: absolute;
    top: -60%; left: -80%;
    width: 45%; height: 220%;
    background: linear-gradient(
        105deg,
        rgba(255,255,255,0) 0%, rgba(255,255,255,0.10) 50%, rgba(255,255,255,0) 100%
    );
    transform: skewX(-10deg);
    transition: left 0.60s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none; z-index: 0;
}
.auth-link-btn.accent:hover::after { left: 130%; }


/* ════════════════════════════════════════════════════════════════
   5. BUTTON TIERS

   Tier 1 — Primary   (.save-btn, .ctrl-btn.start, .auth-link-btn.accent)
   Tier 2 — Secondary (.apply-btn, .add-subject-btn)
   Tier 3 — Ghost     (.clear-btn, .auth-link-btn plain, .chart-edit-btn)
   Tier 4 — Compact   (period-nav-btn, small utility)
   ════════════════════════════════════════════════════════════════ */

/* ── Tier 1: Primary ── */
.save-btn {
    border-radius: var(--r-btn);
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    box-shadow: 0 3px 18px var(--accent-glow);
    transition: background var(--t), box-shadow var(--t), transform 0.1s;
}
.save-btn:hover:not(:disabled) {
    background: #8b6ffd;
    box-shadow: 0 5px 30px rgba(124,92,252,0.50);
    transform: translateY(-1px);
}
.save-btn:active:not(:disabled) {
    transform: scale(0.96);
    box-shadow: 0 2px 10px var(--accent-glow);
}

.ctrl-btn.start {
    border-radius: var(--r-btn);
    box-shadow: 0 3px 18px var(--accent-glow);
    transition: background var(--t), box-shadow var(--t), transform 0.1s;
}
.ctrl-btn.start:hover:not(:disabled) {
    background: #8b6ffd;
    box-shadow: 0 5px 30px rgba(124,92,252,0.50);
}

.auth-link-btn.accent {
    border-radius: var(--r-btn);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 3px 14px var(--accent-glow);
    transition: background var(--t), box-shadow var(--t);
}
.auth-link-btn.accent:hover {
    opacity: 1;
    background: #8b6ffd;
    border-color: #8b6ffd;
    box-shadow: 0 5px 24px rgba(124,92,252,0.50);
}

/* ── Tier 2: Secondary ── */
.apply-btn,
.add-subject-btn {
    border-radius: var(--r-btn);
    border: 1px solid var(--border-hover);
    color: var(--accent);
    background: var(--accent-dim);
    font-weight: 600;
    transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t), transform 0.1s;
}
.apply-btn:hover,
.add-subject-btn:hover {
    background: var(--accent-mid-dim);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 2px 14px rgba(124,92,252,0.20);
    transform: translateY(-1px);
}
.apply-btn:active,
.add-subject-btn:active {
    transform: scale(0.97);
}

/* ── Tier 3: Ghost ── */
.clear-btn {
    border-radius: var(--r-btn);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    transition: border-color var(--t), color var(--t), background var(--t);
}
.clear-btn:hover {
    border-color: rgba(255,107,107,0.45);
    color: var(--accent2);
    background: rgba(255,107,107,0.07);
}

/* Plain (non-accent) auth-link-btn */
.auth-link-btn:not(.accent) {
    border-radius: var(--r-btn);
    border: 1px solid var(--border);
    transition: border-color var(--t), color var(--t), background var(--t);
}
.auth-link-btn:not(.accent):hover {
    border-color: var(--border-hover);
    color: var(--accent);
    background: var(--accent-dim);
}

.chart-edit-btn {
    border-radius: var(--r-btn);
    border: 1px solid var(--border);
    transition: border-color var(--t), color var(--t), background var(--t);
}
.chart-edit-btn:hover {
    background: var(--accent-dim);
    border-color: var(--border-hover);
}

/* ── Tier 4: Compact ── */
.period-nav-btn {
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    transition: border-color var(--t), color var(--t), background var(--t), transform 0.12s;
}
.period-nav-btn:hover:not(:disabled) {
    border-color: var(--border-hover);
    background: var(--accent-dim);
    color: var(--accent);
}

/* ── subject-remove-btn hover ── */
.subject-remove-btn {
    border-radius: 6px;
    transition: color var(--t), background var(--t);
}


/* ════════════════════════════════════════════════════════════════
   6. TABS

   Unified tab language across:
     · tracker-tab-bar / tracker-tab
     · range-toggle / range-btn
     · mode-toggle / mode-btn   (dashboard)
     · focus-phase-tabs / focus-tab  (focus page)
   ════════════════════════════════════════════════════════════════ */

/* Tracker tab bar container */
.tracker-tab-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    padding: 5px;
    gap: 4px;
}
.tracker-tab {
    border-radius: 9px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: background var(--t), color var(--t), box-shadow var(--t);
}
.tracker-tab.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 12px var(--accent-glow);
}
.tracker-tab:hover:not(.active) {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

/* Range toggle (week / month) */
.range-toggle {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}
.range-btn {
    border-radius: 7px;
    font-weight: 500;
    transition: background var(--t), color var(--t), box-shadow var(--t);
}
.range-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 10px var(--accent-glow);
}
.range-btn:hover:not(.active):not(:disabled) {
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

/* Dashboard mode toggle */
.mode-toggle {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 4px;
}
.mode-btn {
    border-radius: 8px;
    border: none;
    font-weight: 500;
    transition: background var(--t), color var(--t), box-shadow var(--t);
}
.mode-btn.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px var(--accent-glow);
}
.mode-btn:hover:not(.active) {
    background: rgba(255,255,255,0.05);
}

/* Focus page tabs (focus.css owns most styles; just boost the active glow) */
.focus-tab.active {
    box-shadow: 0 2px 14px rgba(124,92,252,0.38);
}
.focus-phase-tabs {
    border-color: var(--border);
}

/* Focus mode control buttons */
.focus-btn-primary {
    border-radius: var(--r-btn);
    box-shadow: 0 3px 20px var(--accent-glow);
    transition: background var(--t), box-shadow var(--t), transform 0.1s;
}
.focus-btn-primary:hover {
    box-shadow: 0 6px 32px rgba(124,92,252,0.52);
    transform: translateY(-1px);
}
.focus-btn-secondary {
    border-radius: var(--r-btn);
    border: 1px solid var(--border);
    transition: border-color var(--t), background var(--t), color var(--t);
}
.focus-btn-secondary:hover {
    border-color: var(--border-hover);
    background: rgba(124,92,252,0.07);
    color: var(--text);
}


/* ════════════════════════════════════════════════════════════════
   7. INPUTS
   Unified focus ring and border treatment across every field.
   ════════════════════════════════════════════════════════════════ */
.field-input,
.subject-input,
.session-search-input,
.doc-file-input,
.duration-input input[type="number"],
.custom-time-input,
textarea.subject-notes,
.syllabus-card textarea {
    border: 1px solid var(--border);
    border-radius: 9px;
    transition: border-color var(--t), box-shadow var(--t);
}

.field-input:focus,
.subject-input:focus,
.session-search-input:focus,
.duration-input input[type="number"]:focus,
.custom-time-input:focus,
textarea.subject-notes:focus,
.syllabus-card textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(124,92,252,0.13);
}

/* Invalid state */
.field-input.field-invalid,
.field-input:user-invalid {
    border-color: rgba(255,107,107,0.55) !important;
    box-shadow: 0 0 0 3px rgba(255,107,107,0.10);
}

/* Search input — preserve the icon background */
.session-search-input {
    border-radius: 9px;
}


/* ════════════════════════════════════════════════════════════════
   8. CARDS & PANELS
   Subtle top-gloss gradient + purple-tinted border.
   Interactive cards get a soft glow on hover.
   ════════════════════════════════════════════════════════════════ */

/* Main dashboard cards */
.timer-card,
.syllabus-card,
.results-card,
.study-plan-card,
.estimation-card {
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background:
        linear-gradient(158deg, var(--surface-gloss) 0%, transparent 42%),
        var(--surface);
    transition: border-color var(--t-slow), box-shadow var(--t-slow);
}
.timer-card:hover,
.syllabus-card:hover,
.results-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 36px rgba(124,92,252,0.09), var(--shadow);
}

/* Tracker cards */
.tracker-card {
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background:
        linear-gradient(158deg, var(--surface-gloss) 0%, transparent 42%),
        var(--surface);
    transition: border-color var(--t-slow), box-shadow var(--t-slow);
}
.tracker-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 28px rgba(124,92,252,0.08);
}

/* Stat cards */
.tracker-stat-card {
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background:
        linear-gradient(158deg, var(--surface-gloss) 0%, transparent 50%),
        var(--surface);
    transition: border-color var(--t-slow), box-shadow var(--t-slow);
}
.tracker-stat-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 0 20px rgba(124,92,252,0.10);
}

/* Guest banner — tracker */
.tracker-guest-banner {
    border: 1px solid var(--border);
    border-radius: var(--r-card);
    background:
        linear-gradient(158deg, var(--surface-gloss) 0%, transparent 40%),
        var(--surface);
}

/* Study plan items */
.plan-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    background:
        linear-gradient(158deg, var(--surface-gloss) 0%, transparent 50%),
        var(--surface2);
    transition: border-color var(--t), box-shadow var(--t);
}
.plan-item:hover {
    border-color: rgba(124,92,252,0.40);
    box-shadow: 0 2px 16px rgba(124,92,252,0.10);
}

/* Estimation option cards */
.estimation-option {
    border: 1.5px solid var(--border);
    border-radius: 11px;
    background:
        linear-gradient(158deg, var(--surface-gloss) 0%, transparent 50%),
        var(--surface2);
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.estimation-option:hover {
    border-color: var(--border-hover);
    box-shadow: 0 2px 18px rgba(124,92,252,0.10);
}
.estimation-option.selected {
    border-color: var(--accent);
    background: rgba(124,92,252,0.10);
    box-shadow: 0 0 20px rgba(124,92,252,0.14);
}

/* Custom time card */
.custom-time-card {
    border: 1.5px solid var(--border);
    border-radius: 11px;
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.custom-time-card.selected {
    border-color: var(--accent);
    background: rgba(124,92,252,0.10);
    box-shadow: 0 0 20px rgba(124,92,252,0.12);
}

/* Subject cards */
.subject-card {
    border: 1px solid var(--border);
    border-radius: 11px;
    transition: border-color var(--t), box-shadow var(--t);
}
.subject-card:focus-within {
    border-color: var(--border-hover);
    box-shadow: 0 0 16px rgba(124,92,252,0.10);
}

/* Stat icon wrappers — inner ring */
.stat-icon-hours  { box-shadow: inset 0 0 0 1px rgba(124,92,252,0.22); }
.stat-icon-days   { box-shadow: inset 0 0 0 1px rgba(94,190,120,0.22); }
.stat-icon-streak { box-shadow: inset 0 0 0 1px rgba(255,107,107,0.22); }


/* ════════════════════════════════════════════════════════════════
   9. AUTH MODAL
   ════════════════════════════════════════════════════════════════ */

/* Gradient border wrapper */
.auth-modal-border {
    background: linear-gradient(
        140deg,
        rgba(124,92,252,0.72) 0%,
        rgba(255,107,107,0.45) 100%
    );
    padding: 1.5px;
    border-radius: calc(var(--r-card) + 2px);
}

/* Modal box — gloss surface */
.auth-modal-box {
    background:
        linear-gradient(160deg, rgba(255,255,255,0.028) 0%, transparent 38%),
        var(--surface);
}

/* Google button — refined */
.google-btn {
    border: 1px solid var(--border);
    border-radius: var(--r-btn);
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.google-btn:hover {
    border-color: rgba(66,133,244,0.55);
    background: rgba(66,133,244,0.07);
    box-shadow: 0 2px 14px rgba(66,133,244,0.14);
    color: var(--text);
    text-decoration: none;
}


/* ════════════════════════════════════════════════════════════════
   10. MISCELLANEOUS
   ════════════════════════════════════════════════════════════════ */

/* Chart tooltip */
.chart-tooltip {
    border: 1px solid var(--border);
    border-radius: 9px;
    background:
        linear-gradient(160deg, var(--surface-gloss) 0%, transparent 50%),
        var(--surface2);
    box-shadow: 0 4px 20px rgba(0,0,0,0.52);
}

/* Drop zone */
.drop-zone {
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    transition: border-color var(--t), background var(--t);
}
.drop-zone:hover {
    border-color: var(--border-hover);
    background: rgba(124,92,252,0.04);
}

/* Tables */
.results-table th,
.results-table td {
    border-bottom: 1px solid var(--border);
}
#sessions-table th,
#sessions-table td {
    border-bottom: 1px solid var(--border);
}

/* Plan stale notice */
.plan-stale-notice {
    border-radius: 9px;
}

/* Leaderboard rows */
.lb-row {
    border: 1px solid var(--border);
    border-radius: 10px;
}
.lb-row.lb-you {
    border-color: rgba(124,92,252,0.48);
    background: rgba(124,92,252,0.10);
    box-shadow: 0 0 18px rgba(124,92,252,0.12);
}

/* Auth / tracker banners */
.auth-banner.success {
    border-radius: 10px;
}
.auth-banner.error {
    border-radius: 10px;
    border: 1px solid rgba(255,107,107,0.30);
}

/* Toast */
.cs-toast {
    border: 1px solid var(--border);
    border-radius: 10px;
    background:
        linear-gradient(160deg, var(--surface-gloss) 0%, transparent 50%),
        var(--surface2);
}

/* Range btn year-wrap tooltip */
.year-lock-tip {
    border: 1px solid var(--border);
    border-radius: 7px;
    background: var(--surface2);
}


/* ════════════════════════════════════════════════════════════════
   11. TRACKER PAGE SPACING
   ════════════════════════════════════════════════════════════════ */

/* Breathe between sticky header and first tracker element */
.tracker-main {
    padding-top: 32px;
}

/* ── Tab bar ── give it more visual separation from page top */
.tracker-tab-bar {
    margin-bottom: 4px;
}


/* ════════════════════════════════════════════════════════════════
   12. TODAY GOAL BUTTONS
   Polished inline Set / Clear buttons.
   ════════════════════════════════════════════════════════════════ */

.today-goal-btn {
    border-radius: var(--r-btn);
    border: 1px solid var(--border-hover);
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 600;
    transition: background var(--t), border-color var(--t), color var(--t), box-shadow var(--t);
}
.today-goal-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 2px 12px var(--accent-glow);
}

.today-goal-clear {
    border-radius: var(--r-btn);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    transition: border-color var(--t), color var(--t);
}
.today-goal-clear:hover {
    border-color: rgba(255,107,107,0.45);
    color: var(--accent2);
}


/* ════════════════════════════════════════════════════════════════
   13. ADD DEADLINE BUTTON
   dl-add-trigger-btn already has .shine-btn sweep.
   Enhance the base style to match primary tier.
   ════════════════════════════════════════════════════════════════ */

.dl-add-trigger-btn {
    border-radius: var(--r-btn);
    box-shadow: 0 2px 14px var(--accent-glow);
    transition: background var(--t), box-shadow var(--t), transform 0.1s, opacity var(--t);
}
.dl-add-trigger-btn:hover {
    opacity: 1;
    background: #8b6ffd;
    box-shadow: 0 4px 24px rgba(124,92,252,0.50);
    transform: translateY(-1px);
}


/* ════════════════════════════════════════════════════════════════
   14. DEADLINE FILTER BAR
   Clean pill-style filter buttons.
   ════════════════════════════════════════════════════════════════ */

.dl-filter-bar {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    gap: 8px;
}

.dl-filter-btn {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    font-size: 0.80rem;
    font-weight: 500;
    padding: 5px 16px;
    transition: border-color var(--t), color var(--t), background var(--t), box-shadow var(--t);
}
.dl-filter-btn:hover {
    border-color: var(--border-hover);
    color: var(--accent);
    background: var(--accent-dim);
}
.dl-filter-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 1px 8px var(--accent-glow);
}


/* ════════════════════════════════════════════════════════════════
   15. DEADLINE ITEM — SIMPLIFIED DISPLAY
   ════════════════════════════════════════════════════════════════ */

/* Date line under the title */
.dl-item-date {
    font-size: 0.78rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

/* State badges: Past (red) / Still (purple) */
.dl-state-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    flex-shrink: 0;
}
.dl-state-past {
    background: rgba(255,107,107,0.12);
    color: #FF6B6B;
}
.dl-state-still {
    background: var(--accent-dim);
    color: var(--accent);
}


/* ════════════════════════════════════════════════════════════════
   16. FOCUS PAGE BUTTON POLISH
   ════════════════════════════════════════════════════════════════ */

/* Skip button — polished amber ghost */
.focus-btn-secondary {
    border-radius: var(--r-btn);
    border: 1px solid rgba(255,210,126,0.28);
    background: rgba(255,210,126,0.06);
    color: #c9a44e;
    transition: border-color var(--t), background var(--t), color var(--t), box-shadow var(--t);
}
.focus-btn-secondary:hover {
    border-color: rgba(255,210,126,0.55);
    background: rgba(255,210,126,0.12);
    color: #ffd27e;
    box-shadow: 0 2px 12px rgba(255,210,126,0.15);
}

/* Back link — subtle hover glow */
.focus-back-btn {
    border-radius: var(--r-sm);
    padding: 4px 6px;
    transition: color var(--t), background var(--t);
}
.focus-back-btn:hover {
    background: rgba(255,255,255,0.05);
}


/* ════════════════════════════════════════════════════════════════
   17. TRACKER BACK BUTTON POLISH
   ════════════════════════════════════════════════════════════════ */

/* Back to App button on tracker */
.tracker-back-btn {
    font-size: 0.83rem;
}


/* ════════════════════════════════════════════════════════════════
   18. GENERAL CONSISTENCY PASS
   ════════════════════════════════════════════════════════════════ */

/* Chart edit btn — inherit ghost tier cleanly */
.chart-edit-btn {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted);
    gap: 5px;
}
.chart-edit-btn:hover {
    color: var(--accent);
}

/* Session search — consistent with input tier */
.session-search-input {
    font-size: 0.875rem;
}

/* Stat cards — tighter value spacing */
.stat-value {
    letter-spacing: -0.02em;
}

/* Period nav buttons — consistent compact size */
.period-nav-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--muted);
}

/* dl-item actions alignment with badge */
.dl-item-actions {
    align-items: center;
    gap: 6px;
}

/* dl-item body padding tighter */
.dl-item-body {
    padding: 14px 18px 14px 14px;
}

/* remove .site-footer if it slips in anywhere */
.site-footer { display: none !important; }


/* ════════════════════════════════════════════════════════════════
   19. ACCOUNTABILITY STATE BANNERS
   Prominent, colour-coded inline banners inside the goal card.
   ════════════════════════════════════════════════════════════════ */

/* Email input + button side-by-side */
.acct-email-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.acct-email-input {
    flex: 1 1 0;
    min-width: 0;
}

/* "Leave blank to remove" hint */
.acct-remove-hint {
    font-size: 0.75rem !important;
    opacity: 0.58;
    margin-top: 4px !important;
}

/* Base banner */
.acct-state-banner {
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 0.875rem;
    line-height: 1.55;
    word-break: break-word;
}

/* Info state — goal = 0 (purple-tinted) */
.acct-banner-info {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: rgba(124, 92, 252, 0.08);
    border: 1px solid rgba(124, 92, 252, 0.26);
    color: #c4b5fd;
}

/* Warning state — no email saved (amber) */
.acct-banner-warn {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.30);
    color: #fbbf24;
}

/* Active state — all conditions met (green) */
.acct-banner-active {
    display: block;
    background: rgba(34, 197, 94, 0.07);
    border: 1px solid rgba(34, 197, 94, 0.28);
}

/* Icon inside info / warn banners */
.acct-banner-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Active banner typography */
.acct-confirm-primary {
    font-size: 0.915rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 9px;
    line-height: 1.6;
}
.acct-email-display {
    color: #4ade80;
    font-weight: 700;
    word-break: break-all;
}
.acct-confirm-secondary {
    font-size: 0.815rem;
    color: #86efac;
    margin: 0 0 7px;
}
.acct-confirm-tz {
    font-size: 0.795rem;
    color: var(--muted);
    margin: 0 0 6px;
}
.acct-confirm-status {
    font-size: 0.815rem;
    color: #86efac;
    margin: 0;
}
.acct-confirm-status strong {
    color: #4ade80;
}

/* Status badge tweaks — bump readability */
.accountability-status-badge {
    font-size: 0.84rem;
    font-weight: 600;
}
.badge-success {
    color: #4ade80;
}
.badge-failure {
    color: #fbbf24;
}


/* ════════════════════════════════════════════════════════════════
   20. PREMIUM REDESIGN LAYER v2
   A comprehensive pass on the dashboard + focus mode for a bolder,
   more polished, more hero-like feel.  Strategy: re-use existing
   class names, raise specificity only where needed so existing
   tests & plumbing don't break.
   ════════════════════════════════════════════════════════════════ */

/* ── Richer page background: deeper gradient + vignette ────────── */
body {
    background:
        radial-gradient(ellipse 120% 55% at 50% -5%,
            rgba(124, 92, 252, 0.14) 0%, transparent 62%),
        radial-gradient(ellipse 70% 40% at 100% 20%,
            rgba(99, 102, 241, 0.055) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 0% 100%,
            rgba(124, 92, 252, 0.045) 0%, transparent 60%),
        #0a0b12;
    background-attachment: fixed;
}

/* Tiny grain texture over the whole viewport for tactile premium feel */
body::before {
    content: '';
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255,255,255,0.018) 1px, transparent 0);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
    opacity: 0.55;
}
header,
main,
.tracker-main,
.auth-modal-backdrop {
    position: relative;
    z-index: 1;
}

/* ── Nav header: thicker, glassier, brand pop ──────────────────── */
header {
    background: linear-gradient(180deg,
        rgba(12, 13, 22, 0.92) 0%,
        rgba(12, 13, 22, 0.80) 100%);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.025) inset,
        0 6px 34px rgba(0, 0, 0, 0.30);
}

/* Logo pop — gradient text */
.hero-tagline,
.header-brand,
.brand {
    background: linear-gradient(120deg, #e8eaf0 0%, #c4b5fd 55%, #a78bfa 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.01em;
}

/* Header nav pill refinement */
.header-nav-link {
    font-size: 0.82rem;
    padding: 8px 18px;
    border-color: rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.015);
}
.header-nav-link:hover {
    background:
        linear-gradient(180deg, rgba(124, 92, 252, 0.14) 0%, rgba(124, 92, 252, 0.06) 100%);
    border-color: rgba(124, 92, 252, 0.42);
    box-shadow:
        0 0 0 1px rgba(124, 92, 252, 0.10),
        0 6px 22px rgba(124, 92, 252, 0.20);
}


/* ════════════════════════════════════════════════════════════════
   20.1  HERO TIMER CARD
   The dashboard timer is the headline of the product — give it
   depth, a subtle accent ring, and a richer base gradient.
   ════════════════════════════════════════════════════════════════ */

.timer-card {
    position: relative;
    border: 1px solid rgba(124, 92, 252, 0.22);
    border-radius: 20px;
    background:
        radial-gradient(ellipse 120% 70% at 50% 0%,
            rgba(124, 92, 252, 0.10) 0%, transparent 55%),
        linear-gradient(170deg,
            rgba(255, 255, 255, 0.035) 0%,
            rgba(255, 255, 255, 0.005) 30%,
            transparent 60%),
        linear-gradient(180deg, #15131f 0%, #110f1b 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.050),
        0 1px 0 rgba(255, 255, 255, 0.015),
        0 30px 80px -24px rgba(0, 0, 0, 0.70),
        0 0 60px -20px rgba(124, 92, 252, 0.22);
    overflow: hidden;
    transition: border-color var(--t-slow), box-shadow var(--t-slow), transform var(--t-slow);
}

/* Ambient animated glow behind the ring */
.timer-card::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle at center,
        rgba(124, 92, 252, 0.18) 0%,
        rgba(124, 92, 252, 0.06) 22%,
        transparent 48%);
    pointer-events: none;
    z-index: 0;
    animation: ds-hero-pulse 8s ease-in-out infinite;
}

/* Thin top highlight line to hint at a glass edge */
.timer-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(124, 92, 252, 0.50) 50%,
        transparent 100%);
    pointer-events: none;
}

@keyframes ds-hero-pulse {
    0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(1);   }
    50%      { opacity: 0.80; transform: translateX(-50%) scale(1.05); }
}

.timer-card:hover {
    border-color: rgba(124, 92, 252, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.055),
        0 1px 0 rgba(255, 255, 255, 0.020),
        0 34px 90px -24px rgba(0, 0, 0, 0.72),
        0 0 90px -22px rgba(124, 92, 252, 0.35);
}

.timer-card > * {
    position: relative;
    z-index: 1;
}

/* Timer display — hero-sized numerals */
.timer-display {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-shadow: 0 4px 28px rgba(124, 92, 252, 0.30);
}

.timer-display.running {
    color: #f3efff;
    text-shadow:
        0 0 24px rgba(124, 92, 252, 0.55),
        0 0 48px rgba(124, 92, 252, 0.22);
}
.timer-display.paused {
    color: #bbb9c8;
    text-shadow: 0 0 18px rgba(139, 143, 168, 0.18);
    animation: ds-timer-breathe 2.2s ease-in-out infinite;
}
.timer-display.done {
    color: #ffd27e;
    text-shadow: 0 0 28px rgba(255, 210, 126, 0.45);
}
@keyframes ds-timer-breathe {
    0%, 100% { opacity: 1;    }
    50%      { opacity: 0.55; }
}

/* Progress ring — richer stroke + glow while running */
.timer-ring-track {
    stroke: rgba(255, 255, 255, 0.04);
    stroke-width: 6;
}
.timer-ring-progress {
    stroke: #a78bfa;
    stroke-linecap: round;
    stroke-width: 7;
    filter: drop-shadow(0 0 14px rgba(124, 92, 252, 0.55));
    transition: stroke-dashoffset 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
.timer-ring-wrap.timer-running .timer-ring-progress {
    stroke: #c4b5fd;
    filter: drop-shadow(0 0 22px rgba(124, 92, 252, 0.75));
}

/* Start / Pause button — hero primary */
#btn-start-pause {
    min-width: 148px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: 12px;
    padding: 13px 28px;
    background: linear-gradient(180deg, #8b6ffd 0%, #6f50e8 100%);
    border: 1px solid rgba(167, 139, 250, 0.45);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 1px 0 rgba(255, 255, 255, 0.06),
        0 8px 28px rgba(124, 92, 252, 0.40);
    transition: transform var(--t), box-shadow var(--t), background var(--t);
}
#btn-start-pause:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 1px 0 rgba(255, 255, 255, 0.08),
        0 12px 40px rgba(124, 92, 252, 0.56);
}
#btn-start-pause.is-pausing {
    background: linear-gradient(180deg, #2a2438 0%, #1d1a2a 100%);
    border-color: rgba(167, 139, 250, 0.32);
    box-shadow:
        inset 0 0 0 1px rgba(124, 92, 252, 0.20),
        0 6px 22px rgba(0, 0, 0, 0.40);
}

/* Phase tab bar — richer surface */
.timer-phase-tabs {
    background:
        linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 100%),
        rgba(22, 19, 33, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}


/* ════════════════════════════════════════════════════════════════
   20.2  MAIN DASHBOARD CARDS
   Add consistent depth + hover lift.
   ════════════════════════════════════════════════════════════════ */

.goal-card-main,
.syllabus-card,
.results-card,
.study-plan-card,
.estimation-card {
    border-radius: 18px;
    background:
        linear-gradient(170deg,
            rgba(255, 255, 255, 0.030) 0%,
            rgba(255, 255, 255, 0.005) 30%,
            transparent 60%),
        linear-gradient(180deg, #14121e 0%, #100e19 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 20px 60px -24px rgba(0, 0, 0, 0.60);
}

.goal-card-main:hover,
.syllabus-card:hover,
.results-card:hover,
.study-plan-card:hover {
    transform: translateY(-1px);
    border-color: rgba(124, 92, 252, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.045),
        0 26px 70px -24px rgba(0, 0, 0, 0.65),
        0 0 64px -20px rgba(124, 92, 252, 0.22);
}


/* ════════════════════════════════════════════════════════════════
   20.3  GOAL CARD — prominent progress bar & typography
   ════════════════════════════════════════════════════════════════ */

.goal-card-title {
    font-size: 1.08rem;
    letter-spacing: -0.01em;
    background: linear-gradient(120deg, #ffffff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Progress bar container used in the goal card (if rendered) */
.goal-progress-track,
.goal-bar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.40);
}
.goal-progress-fill,
.goal-bar-fill {
    background: linear-gradient(90deg, #7c5cfc 0%, #a78bfa 100%);
    border-radius: 999px;
    box-shadow: 0 0 18px rgba(124, 92, 252, 0.55);
    transition: width 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}


/* ════════════════════════════════════════════════════════════════
   20.4  SYLLABUS / UPLOAD CARD polish
   ════════════════════════════════════════════════════════════════ */

.drop-zone {
    border: 1.5px dashed rgba(124, 92, 252, 0.28);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(124, 92, 252, 0.04) 0%, transparent 100%);
    transition: border-color var(--t), background var(--t), box-shadow var(--t);
}
.drop-zone:hover {
    border-color: rgba(124, 92, 252, 0.58);
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.08) 0%, transparent 100%);
    box-shadow: 0 0 32px rgba(124, 92, 252, 0.16);
}


/* ════════════════════════════════════════════════════════════════
   20.5  BUTTON TIER REFINEMENT
   Consistent primary / secondary / ghost treatments.
   ════════════════════════════════════════════════════════════════ */

/* All primary-tier buttons (Save / Start / Apply / Set Goal / Add Deadline) */
.save-btn,
.shine-btn,
.today-goal-btn,
.dl-add-trigger-btn {
    border-radius: 12px;
    padding: 11px 22px;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: linear-gradient(180deg, #8b6ffd 0%, #6f50e8 100%);
    border: 1px solid rgba(167, 139, 250, 0.35);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        0 1px 0 rgba(255, 255, 255, 0.05),
        0 6px 22px rgba(124, 92, 252, 0.32);
    transition: transform var(--t), box-shadow var(--t);
}
.save-btn:hover,
.shine-btn:hover,
.today-goal-btn:hover,
.dl-add-trigger-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.25),
        0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 34px rgba(124, 92, 252, 0.50);
}


/* ════════════════════════════════════════════════════════════════
   20.6  RESULTS TABLE — more premium row treatment
   ════════════════════════════════════════════════════════════════ */

.results-table th {
    background: rgba(255, 255, 255, 0.025);
    color: rgba(139, 143, 168, 0.85);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.73rem;
    padding-top: 14px;
    padding-bottom: 14px;
}
.results-table tbody tr {
    transition: background 0.12s;
}
.results-table tbody tr:hover {
    background: rgba(124, 92, 252, 0.05);
}

/* Empty results state — centered + spacious */
.results-empty {
    padding: 40px 20px;
    color: var(--muted);
    text-align: center;
    font-size: 0.92rem;
}


/* ════════════════════════════════════════════════════════════════
   20.7  SCROLL BAR (webkit) — thin purple-tinted
   ════════════════════════════════════════════════════════════════ */

::-webkit-scrollbar           { width: 10px; height: 10px; }
::-webkit-scrollbar-track     { background: transparent; }
::-webkit-scrollbar-thumb     {
    background: rgba(124, 92, 252, 0.22);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 92, 252, 0.40);
    background-clip: content-box;
}


/* ════════════════════════════════════════════════════════════════
   20.8  TIMER RING GRADIENT DEFINITION
   Injected as <defs> inside the existing ring SVG via JS would be
   cleaner, but a linearGradient stop chain is portable as a fallback
   stroke color.  The real gradient is defined in the timer SVG
   directly — see index.html.
   ════════════════════════════════════════════════════════════════ */

/* Fallback when the SVG gradient isn't present */
@supports not (stroke: url(#ds-ring-grad)) {
    .timer-ring-progress {
        stroke: var(--accent);
    }
}


/* ════════════════════════════════════════════════════════════════
   20.9  SECTION HEADINGS — consistent bold style
   ════════════════════════════════════════════════════════════════ */

.goal-card-title,
.syllabus-card h2,
.results-card h2,
.study-plan-card h2 {
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Subtle kicker before section titles on cards */
.card-hint {
    color: var(--muted);
    font-size: 0.83rem;
}


/* ════════════════════════════════════════════════════════════════
   20.10  INLINE FORMS (set goal / durations) — refined
   ════════════════════════════════════════════════════════════════ */

.goal-set-row input[type="number"],
.timer-settings-panel input[type="number"] {
    background: rgba(255, 255, 255, 0.020);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    color: #f3efff;
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-weight: 600;
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.goal-set-row input[type="number"]:focus,
.timer-settings-panel input[type="number"]:focus {
    border-color: rgba(124, 92, 252, 0.65);
    background: rgba(124, 92, 252, 0.06);
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.14);
}


/* ════════════════════════════════════════════════════════════════
   20.11  RESPONSIVE TWEAKS
   Keep the hero feel on narrow screens without cramping.
   ════════════════════════════════════════════════════════════════ */

@media (max-width: 820px) {
    .timer-card {
        border-radius: 16px;
    }
    #btn-start-pause {
        min-width: 124px;
        padding: 11px 22px;
    }
}


/* ════════════════════════════════════════════════════════════════
   ██  SECTION 21 — AGGRESSIVE POLISH LAYER v3  ███████████████████
   Goal: turn the dashboard into a cohesive, premium, intentional
   product surface.  Works by overriding earlier ds.css + style.css
   rules without any HTML rename.
   ════════════════════════════════════════════════════════════════ */


/* ── 21.0  Design token refresh ───────────────────────────────── */
:root {
    --accent-1:         #a78bfa;
    --accent-2:         #7c5cfc;
    --accent-3:         #5b3fd4;
    --accent-grad:      linear-gradient(135deg, #a78bfa 0%, #7c5cfc 52%, #6842ee 100%);
    --accent-grad-soft: linear-gradient(135deg, rgba(167, 139, 250, 0.16) 0%, rgba(124, 92, 252, 0.10) 100%);

    --bg-deep:        #070810;
    --bg-raised:      #10111d;
    --bg-card:        linear-gradient(180deg, #161827 0%, #101120 100%);
    --bg-card-hover:  linear-gradient(180deg, #1a1c2f 0%, #131426 100%);

    --hairline:       rgba(255, 255, 255, 0.055);
    --hairline-soft:  rgba(255, 255, 255, 0.028);

    --shadow-card:    0 1px 0 rgba(255, 255, 255, 0.035) inset,
                      0 24px 56px -32px rgba(0, 0, 0, 0.70),
                      0 8px 18px -10px rgba(0, 0, 0, 0.45);
    --shadow-hero:    0 1px 0 rgba(255, 255, 255, 0.06) inset,
                      0 34px 96px -40px rgba(83, 56, 214, 0.58),
                      0 14px 36px -12px rgba(0, 0, 0, 0.55);
    --shadow-press:   0 2px 8px -2px rgba(124, 92, 252, 0.35);

    --r-card: 18px;
    --r-btn:  12px;
    --r-pill: 999px;
    --t:      0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


/* ── 21.1  Root surface — deeper, richer, single atmospheric stage ── */
html, body {
    background: var(--bg-deep);
}

body {
    background:
        radial-gradient(ellipse 92% 48% at 50% -8%,
            rgba(124, 92, 252, 0.20) 0%, transparent 58%),
        radial-gradient(ellipse 48% 42% at 100% 6%,
            rgba(99, 102, 241, 0.09) 0%, transparent 62%),
        radial-gradient(ellipse 56% 46% at 0% 42%,
            rgba(124, 92, 252, 0.07) 0%, transparent 62%),
        #070810;
    background-attachment: fixed;
    color: #e9eaf5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Fine paper-grain for tactile premium feel */
body::before {
    content: '';
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image:
        radial-gradient(circle at 1px 1px,
            rgba(255, 255, 255, 0.022) 1px, transparent 0);
    background-size: 3px 3px;
    mix-blend-mode: overlay;
    opacity: 0.55;
}

/* Custom native selection color */
::selection {
    background: rgba(167, 139, 250, 0.34);
    color: #fff;
}

/* Refined scrollbar */
::-webkit-scrollbar           { width: 11px; height: 11px; }
::-webkit-scrollbar-track     { background: transparent; }
::-webkit-scrollbar-thumb     {
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.28), rgba(124, 92, 252, 0.14));
    border-radius: 99px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(124, 92, 252, 0.48), rgba(124, 92, 252, 0.22));
    background-clip: padding-box;
}


/* ── 21.2  Header — glassier, refined wordmark ─────────────────── */
header {
    background: linear-gradient(180deg,
        rgba(10, 11, 20, 0.88) 0%,
        rgba(10, 11, 20, 0.60) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid rgba(124, 92, 252, 0.12);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    position: relative;
    z-index: 10;
}

/* Wordmark — crisp dual-tone gradient */
.logo-study,
.logo-sync {
    font-weight: 800;
    letter-spacing: -0.025em;
}
.logo-study {
    color: #f5f3ff;
    text-shadow: 0 0 24px rgba(167, 139, 250, 0.18);
}
.logo-sync {
    background: var(--accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 28px rgba(167, 139, 250, 0.35);
}

/* Hero tagline under the header */
.hero-tagline {
    font-size: 0.94rem;
    color: rgba(200, 197, 228, 0.66);
    letter-spacing: 0.015em;
    font-weight: 500;
}


/* ── 21.3  Card system — unified premium surface ───────────────── */
.timer-card,
.syllabus-card,
.results-card,
.goal-card-main,
.study-plan-card,
.priority-widget-section,
.estimation-card,
.custom-time-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--hairline);
    border-radius: var(--r-card);
    box-shadow: var(--shadow-card);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t), background var(--t);
    z-index: 1;
}

/* Top edge micro-gloss on every card */
.timer-card::before,
.syllabus-card::before,
.results-card::before,
.goal-card-main::before,
.study-plan-card::before,
.priority-widget-section::before,
.estimation-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.12) 50%,
        transparent 100%);
    border-radius: var(--r-card) var(--r-card) 0 0;
    pointer-events: none;
}

.syllabus-card:hover,
.results-card:hover,
.goal-card-main:hover,
.study-plan-card:hover {
    border-color: rgba(124, 92, 252, 0.26);
}


/* ── 21.4  Hero timer — the visual anchor ──────────────────────── */
.timer-card {
    background:
        radial-gradient(ellipse 80% 58% at 50% -10%,
            rgba(124, 92, 252, 0.13) 0%, transparent 60%),
        linear-gradient(180deg, #181a2e 0%, #0f1020 100%);
    border: 1px solid rgba(124, 92, 252, 0.22);
    box-shadow: var(--shadow-hero);
    overflow: hidden;
}
.timer-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.40) 0%,
        rgba(124, 92, 252, 0.12) 40%,
        transparent 70%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

/* Timer display — monospaced hero type */
.timer-display {
    font-family: 'JetBrains Mono', ui-monospace, monospace !important;
    font-weight: 700 !important;
    letter-spacing: -0.012em !important;
    background: linear-gradient(180deg, #fbfaff 0%, #d5c9ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 48px rgba(167, 139, 250, 0.32);
}
.timer-display.running {
    animation: tc-pulse 3.2s ease-in-out infinite;
}
@keyframes tc-pulse {
    0%, 100% { filter: brightness(1);    }
    50%      { filter: brightness(1.14); }
}

/* Start/Pause — primary action gets the full hero treatment */
#btn-start-pause {
    background: var(--accent-grad);
    border: 1px solid rgba(167, 139, 250, 0.50);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.015em;
    padding: 13px 40px;
    min-width: 138px;
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 10px 28px -6px rgba(124, 92, 252, 0.48),
        0 3px 10px rgba(0, 0, 0, 0.32);
    transition: transform 0.12s ease, box-shadow var(--t), filter var(--t);
}
#btn-start-pause:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.30),
        0 14px 36px -6px rgba(124, 92, 252, 0.62),
        0 4px 12px rgba(0, 0, 0, 0.38);
}
#btn-start-pause:active {
    transform: translateY(0);
    box-shadow: var(--shadow-press);
}
#btn-start-pause.is-pausing {
    background: linear-gradient(135deg, #ffb3a0 0%, #ff8a73 60%, #ff6f5a 100%);
    border-color: rgba(255, 180, 160, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 10px 28px -6px rgba(255, 125, 100, 0.46);
}

/* Skip button — ghost tier */
.ctrl-btn.skip {
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid var(--hairline);
    color: rgba(200, 197, 228, 0.80);
    font-weight: 500;
    border-radius: var(--r-btn);
    transition: var(--t);
}
.ctrl-btn.skip:hover {
    background: rgba(124, 92, 252, 0.10);
    border-color: rgba(124, 92, 252, 0.32);
    color: #f0edff;
}

/* Phase tabs — lifted, richer active pill */
.timer-phase-tabs,
.phase-tabs {
    background: rgba(255, 255, 255, 0.022);
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
    padding: 5px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 8px 28px -14px rgba(0, 0, 0, 0.55);
}
.phase-tab {
    border-radius: var(--r-pill);
    font-weight: 600;
    letter-spacing: 0.012em;
    color: rgba(200, 197, 228, 0.62);
    transition: var(--t);
}
.phase-tab.active {
    background: var(--accent-grad) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 4px 18px -2px rgba(124, 92, 252, 0.48) !important;
}

/* Session dots — bigger, glowier */
.session-dot {
    width: 9px;
    height: 9px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.10);
    transition: var(--t);
}
.session-dot.filled {
    background: var(--accent-grad);
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.65);
}


/* ── 21.5  Goal card — premium progress display ───────────────── */
.goal-card-main {
    padding: 22px 24px;
}
.goal-card-title {
    font-size: 1.14rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    background: linear-gradient(120deg, #f5f3ff 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.today-goal-bar-track {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--hairline);
    border-radius: var(--r-pill);
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
    height: 10px;
}
.today-goal-bar-fill {
    background: var(--accent-grad);
    border-radius: var(--r-pill);
    box-shadow:
        0 0 16px rgba(167, 139, 250, 0.56),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    position: relative;
    overflow: hidden;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.today-goal-bar-fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.30) 50%,
        transparent 100%);
    animation: goal-shimmer 2.8s linear infinite;
}
@keyframes goal-shimmer {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%);  }
}

/* Goal number input — bigger, more confident */
.today-goal-input {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 1.42rem;
    font-weight: 700;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--hairline);
    border-radius: var(--r-btn);
    color: #f5f3ff;
    transition: var(--t);
    text-align: center;
}
.today-goal-input:focus {
    border-color: rgba(167, 139, 250, 0.60);
    background: rgba(124, 92, 252, 0.08);
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.14);
    outline: none;
}
.today-goal-unit {
    font-size: 0.84rem;
    color: rgba(200, 197, 228, 0.58);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}


/* ── 21.6  Forms & inputs — unified focus ring ─────────────────── */
.field-input,
.subject-field input,
.syllabus-card textarea {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--hairline);
    border-radius: var(--r-btn);
    color: #f1eeff;
    font-family: inherit;
    transition: var(--t);
}
.field-input::placeholder,
.syllabus-card textarea::placeholder {
    color: rgba(200, 197, 228, 0.38);
}
.field-input:hover,
.syllabus-card textarea:hover {
    border-color: rgba(124, 92, 252, 0.24);
    background: rgba(255, 255, 255, 0.033);
}
.field-input:focus,
.syllabus-card textarea:focus {
    outline: none;
    border-color: rgba(167, 139, 250, 0.60);
    background: rgba(124, 92, 252, 0.06);
    box-shadow: 0 0 0 4px rgba(124, 92, 252, 0.15);
}

/* Drop zone — more deliberate */
.drop-zone {
    background: rgba(124, 92, 252, 0.035);
    border: 1px dashed rgba(124, 92, 252, 0.28);
    border-radius: var(--r-card);
    transition: var(--t);
}
.drop-zone:hover {
    background: rgba(124, 92, 252, 0.07);
    border-color: rgba(167, 139, 250, 0.52);
}


/* ── 21.7  Buttons — unified tier system ───────────────────────── */
.save-btn,
.apply-btn,
.today-goal-btn,
.set-email-btn,
.acct-confirm-primary {
    background: var(--accent-grad);
    color: #fff;
    border: 1px solid rgba(167, 139, 250, 0.50);
    border-radius: var(--r-btn);
    font-weight: 600;
    letter-spacing: 0.012em;
    padding: 10px 22px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 6px 20px -6px rgba(124, 92, 252, 0.42);
    transition: transform 0.12s ease, box-shadow var(--t), filter var(--t);
}
.save-btn:hover,
.apply-btn:hover,
.today-goal-btn:hover,
.set-email-btn:hover,
.acct-confirm-primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 10px 28px -6px rgba(124, 92, 252, 0.56);
}
.save-btn:active,
.apply-btn:active,
.today-goal-btn:active,
.set-email-btn:active,
.acct-confirm-primary:active {
    transform: translateY(0);
}

.clear-btn,
.acct-confirm-secondary {
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid var(--hairline);
    color: rgba(200, 197, 228, 0.82);
    border-radius: var(--r-btn);
    font-weight: 500;
    transition: var(--t);
}
.clear-btn:hover,
.acct-confirm-secondary:hover {
    background: rgba(124, 92, 252, 0.10);
    border-color: rgba(124, 92, 252, 0.32);
    color: #f3f0ff;
}


/* ── 21.8  Results table — cleaner rows ────────────────────────── */
.results-table {
    border-collapse: separate;
    border-spacing: 0;
}
.results-table th {
    color: rgba(200, 197, 228, 0.52);
    font-weight: 600;
    font-size: 0.74rem;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    padding: 14px 16px;
    border-bottom: 1px solid var(--hairline);
}
.results-table td {
    padding: 14px 16px;
    color: #e6e3f7;
    border-bottom: 1px solid var(--hairline-soft);
    font-size: 0.9rem;
}
.results-table tr:last-child td {
    border-bottom: none;
}
.results-table tr {
    transition: background var(--t);
}
.results-table tr:hover {
    background: rgba(124, 92, 252, 0.05);
}

.tracker-status-done {
    color: #7dd8a8;
    font-weight: 600;
}
.tracker-status-partial {
    color: #f4b678;
    font-weight: 600;
}


/* ── 21.9  Section headings — tighter, more confident ─────────── */
.syllabus-header h2,
.study-plan-header h2,
.results-card h2,
.goal-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.014em;
    color: #f5f3ff;
}
.card-hint {
    font-size: 0.82rem;
    color: rgba(200, 197, 228, 0.50);
    letter-spacing: 0.010em;
}


/* ── 21.10  Study plan items — richer rows ─────────────────────── */
.study-plan-items > * {
    border-radius: var(--r-btn);
    transition: var(--t);
}
.study-plan-items > *:hover {
    background: rgba(124, 92, 252, 0.07);
}


/* ── 21.11  Auth modal polish ──────────────────────────────────── */
.auth-modal-box {
    background: linear-gradient(180deg, #141627 0%, #0d0e1c 100%);
    border: 1px solid rgba(124, 92, 252, 0.28);
    border-radius: 20px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 40px 96px -24px rgba(0, 0, 0, 0.75),
        0 0 0 1px rgba(124, 92, 252, 0.05);
    position: relative;
    overflow: hidden;
}
.auth-modal-box::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg,
        rgba(167, 139, 250, 0.55) 0%,
        rgba(124, 92, 252, 0.10) 40%,
        transparent 75%);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
.auth-modal-logo { font-weight: 800; letter-spacing: -0.02em; }


/* ── 21.12  Settings panel polish ──────────────────────────────── */
.timer-settings-panel {
    background: rgba(15, 16, 32, 0.72);
    border: 1px solid rgba(124, 92, 252, 0.16);
    border-radius: 14px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}


/* ── 21.13  Settle position of top-layer content above grain ──── */
header,
.top-panel,
main,
.syllabus-card,
.results-card,
.study-plan-card,
.priority-widget-section,
.timer-card,
.goal-card-main,
.auth-modal {
    position: relative;
    z-index: 1;
}


/* ── 21.14  Responsive — keep hero feel on narrow screens ─────── */
@media (max-width: 900px) {
    .timer-card     { padding: 22px; }
    .goal-card-main { padding: 18px 20px; }
}
@media (max-width: 600px) {
    .timer-display { font-size: 3.2rem !important; }
    #btn-start-pause {
        padding: 12px 32px;
        min-width: 118px;
    }
}

