:root {
    /* ... other variables ... */
    --momentum-color: #A855F7; /* Electric Violet */
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-circle {
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.1s ease, background-color 0.2s;
    will-change: transform;
    z-index: 2;
}
.btn-circle:active { transform: scale(0.92); }

.primary { width: 80px; height: 80px; background: var(--btn-bg); color: #FFF; }
.primary:hover { background: var(--btn-hover); }

.secondary { width: 56px; height: 56px; background: transparent; border: 1px solid var(--border-color);; color: var(--text-dim); }
.secondary:hover { border-color: var(--text-dim);; color: var(--text-main); }


/* =========================================
   PROGRESS RING
   ========================================= */
.progress-container {
    position: relative;
    width: 92px;
    height: 92px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* CONTAINER FIX */
.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    pointer-events: none;
    
    /* FIX FOR SQUARISH CLIPPING */
    overflow: visible !important; 
}

/* SHARED RING STYLES */
.progress-ring-fill {
    transition: stroke-dashoffset 0.5s ease, filter 0.3s ease;
    stroke-dasharray: 276.46; /* 2 * PI * 44 */
    stroke-dashoffset: 276.46; /* Start Empty */
}

/* COLORS & GLOWS */
.ring-green {
    stroke: var(--accent-color); /* Your Green */
}
/* Only glow when fully complete */
.ring-green.glowing {
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.ring-purple {
    stroke: #9D50FF; /* Momentum Purple */
}
.ring-purple.glowing {
    filter: drop-shadow(0 0 8px #9D50FF);
}

.ring-gold {
    stroke: #FFD700; /* Double Goal Gold */
}
.ring-gold.glowing {
    filter: drop-shadow(0 0 10px #FFD700);
}


/* =========================================
   PRESETS MENU
   ========================================= */
.presets-wrapper {
    width: fit-content;
    max-width: 100%;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    margin: 0 auto 50px auto;
    padding-bottom: 0;
    overflow: hidden;
}

.presets-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    margin-bottom: -20px;
    scrollbar-width: none;
    
    /* ADD THIS: So the floating line knows where to anchor */
    position: relative; 
}
.presets-scroll::-webkit-scrollbar { display: none; }

.preset-pill {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    padding: 10px 0;
    transition: color 0.3s;
}
.preset-pill.active { color: var(--text-main); font-weight: 700; }

/* 1. DISABLE THE OLD STATIC LINE */
.preset-pill.active::after {
    display: none; 
}

/* 2. ADD THE NEW FLOATING APPLE-STYLE LINE */
.preset-highlight-line {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    background: var(--accent-color);
    border-radius: 2px;
    pointer-events: none;
    opacity: 0; /* Hidden until first preset is selected */
    
    /* The Apple Spring Curve for sliding and resizing */
    transition: transform 0.25s cubic-bezier(0.19, 1, 0.22, 1), 
                width 0.25s cubic-bezier(0.19, 1, 0.22, 1),
                opacity 0.2s ease;
    will-change: transform, width;
}


/* =========================================
   LAPS
   ========================================= */
.lap-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 13px; color: var(--text-dim); }


/* =========================================
   MODALS (UNIVERSAL PREMIUM ANIMATION)
   ========================================= */

/* 1. BACKDROP */
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 100;
    
    /* FORCE FLEX: Keeps the modal centered even during the exit animation */
    display: flex !important;
    justify-content: center;
    align-items: center;
    
    background: rgba(0, 0, 0, 0.95);
    
    /* Base State: Visible */
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    
    /* Transition: Opacity fades over 0.5s. Visibility flips instantly on open. */
    transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                visibility 0s linear 0s;
}

@supports (backdrop-filter: blur(10px)) {
    .modal-backdrop { background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px); }
}

/* 2. BACKDROP EXIT STATE (Triggered by .hidden) */
.modal-backdrop.hidden {
    opacity: 0;
    
    /* THE TRICK: Wait 0.5s for the fade to finish before hiding from the DOM */
    visibility: hidden;
    pointer-events: none;
    
    transition: opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                visibility 0s linear 0.5s;
}

/* 3. MODAL CARD */
.modal {
    background: var(--surface-color); 
    border: 1px solid var(--border-color);; 
    width: 90%; 
    max-width: 380px;
    border-radius: 24px; padding: 30px; text-align: center;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
    
    /* OPTIMIZATION: Puts the modal on its own GPU layer to prevent jitter */
    will-change: transform, opacity;
    
    /* Base State: Centered & Full Size */
    transform: scale(1) translateY(0);
    opacity: 1;
    
    /* Apple-Style Physics Curve (Matches Momentum Toast) */
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), 
                opacity 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    max-height: 85dvh;
    overflow-y: auto;
    scrollbar-width: none;
}
/* Gives the Data/Insights modal more horizontal breathing room */
.stats-modal-box {
    max-width: 440px;
}
.modal::-webkit-scrollbar {
    display: none;
}

/* 4. MODAL CARD EXIT STATE (The 80px Slide) */
.modal-backdrop.hidden .modal {
    opacity: 0;
    /* Slide down 80px and shrink slightly for that "dropping away" feel */
    transform: scale(0.95) translateY(80px);
}

/* Inner Content Styles */
.modal-header {
    color: var(--text-dim); font-size: 12px; letter-spacing: 2px; margin-bottom: 20px;
    font-family: var(--font-ui); text-transform: uppercase;
}

.modal-close-icon {
    position: absolute; top: 15px; right: 15px;
    background: none; border: none; color: var(--text-dim);
    font-size: 24px; line-height: 1; cursor: pointer;
    padding: 5px; transition: color 0.2s;
}
.modal-close-icon:hover { color: var(--text-main); }

.picker-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 30px; }
.picker-col input {
    width: 60px; height: 70px; background: var(--btn-bg); border: 1px solid var(--border-color);;
    border-radius: 12px; color: var(--text-main); font-family: var(--font-mono); font-size: 28px;
    text-align: center; outline: none;
}
.picker-col input:focus { border-color: var(--accent-color); }
.picker-sep { font-size: 20px; color: var(--text-dim); margin-top: 10px; }

.modal-actions { display: flex; gap: 15px; }
.btn-modal {
    flex: 1; padding: 14px; border-radius: 12px; border: none;
    cursor: pointer; font-family: var(--font-ui); font-weight: 700; font-size: 14px;
}
.cancel { background: var(--btn-bg); color: var(--text-main); }
.cancel:hover {
    border: var(--border-color);
}
.start { background: var(--accent-color); color: #000; }


/* =========================================
   GOAL SETTER
   ========================================= */
.goal-wrapper {
    margin-top: 25px; padding-top: 20px; border-top: 1px solid #222;
}
.goal-label {
    display: block; color: #555; font-size: 10px; letter-spacing: 1px;
    font-family: var(--font-ui); text-transform: uppercase; margin-bottom: 10px;
}
.goal-input-row {
    display: flex; justify-content: center; align-items: center; gap: 20px;
}
.btn-goal {
    width: 40px; height: 40px; border-radius: 50%;
    background: #1A1A1A; border: none; color: #FFF;
    font-size: 20px; cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    padding: 0;
}
#btnGoalDec {
    padding-bottom: 4px !important; 
}
#btnGoalInc {
    /* Usually fine, but sometimes needs a 1px lift */
    padding-bottom: 1px !important; 
}
.btn-goal:hover { background: #333; }
#goalValue {
    font-size: 24px; color: #FFF; font-family: var(--font-mono); width: 40px;
}


/* =========================================
   CHART
   ========================================= */
.chart-wrapper {
    display: flex; align-items: flex-end; justify-content: space-between;
    height: 140px; padding: 10px 10px 0; border-bottom: 1px solid var(--border-color);
}
.chart-col { 
    display: flex; flex-direction: column; align-items: center; 
    width: 28px; height: 100%; justify-content: flex-end; 
}
.chart-value {
    font-size: 11px; color: var(--text-main); font-family: var(--font-mono);
    font-weight: 500; letter-spacing: 0.5px; margin-bottom: 4px;
    min-height: 14px; text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.chart-bar {
    width: 8px; background: var(--border-color); border-radius: 4px;
    min-height: 4px; transition: height 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.chart-bar.today { background: var(--accent-color); box-shadow: 0 0 12px rgba(76, 175, 80, 0.3); }
.chart-label { 
    font-size: 10px; color: var(--text-dim); font-family: var(--font-ui); 
    text-transform: uppercase; margin-top: 6px; font-weight: 600;
}


/* =========================================
   V9.3 MOMENTUM EXTENSIONS & TOAST
   ========================================= */
#btnMomentum.active {
    color: var(--momentum-color); 
    border-color: var(--momentum-color);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.3);
}

.digit-group.momentum {
    color: var(--momentum-color);
    text-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
    display: inline-flex;
    align-items: center;
}

.digit-group.momentum::before {
    content: '+';
    font-size: 0.5em;
    vertical-align: middle;
    margin-right: 20px;
    opacity: 0.8;
}

/* TOAST (Apple-Style Popup) */
.toast {
    position: fixed;
    bottom: 180px;
    left: 50%;
    
    /* Visible State */
    transform: translateX(-50%) translateY(0) scale(1);
    opacity: 1;
    
    background: rgba(20, 20, 20, 0.90);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 50px;
    color: #FFF;
    font-family: var(--font-ui);
    font-size: 13px;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 200;
    width: max-content;
    max-width: 90vw;
    text-align: center;
    
    /* Same Physics Curve */
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Hidden State (Shrink & Slide Down) */
.toast.hidden {
    display: block !important; /* Keep in layout */
    opacity: 0;
    transform: translateX(-50%) translateY(20px) scale(0.95);
}
/* Update Toast Special Styling */
.toast-update {
    cursor: pointer;
    border-color: var(--accent-color);
    color: var(--accent-color);
    font-weight: 600;
    pointer-events: auto;
}

/* =========================================
   v8.5.1 REFLECTION MODAL COMPONENTS
   ========================================= */

/* 1. The Modal Layout */
.reflection-modal {
    padding-top: 40px; /* More space for the checkmark */
    padding-bottom: 35px;
}

.modal-text {
    color: #888;
    font-size: 14px;
    margin-bottom: 30px;
    font-family: var(--font-ui);
    line-height: 1.5;
}

/* 2. The Reflection Grid (3 Pills) */
.reflection-grid {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reflection-pill {
    background: #1A1A1A;
    border: 1px solid var(--border-color);;
    color: #FFF;
    padding: 12px 16px;
    border-radius: 50px; /* Fully rounded */
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.pill-icon { font-size: 14px; }

/* Interaction States */
.reflection-pill:hover {
    background: #222;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}
.reflection-pill:active {
    transform: scale(0.95);
}

/* 3. The Animated Checkmark (Success State) */
.checkmark-wrapper {
    width: 60px; height: 60px;
    margin: 0 auto 25px auto;
}

.checkmark {
    width: 56px; height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: var(--accent-color);
    stroke-miterlimit: 10;
    box-shadow: inset 0 0 0 var(--accent-color);
    /* The animation triggers when the modal opens */
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--accent-color);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

/* Keyframes for the Checkmark */
@keyframes stroke { 100% { stroke-dashoffset: 0; } }
@keyframes scale { 0%, 100% { transform: none; } 50% { transform: scale3d(1.1, 1.1, 1); } }
@keyframes fill { 
    100% { box-shadow: inset 0 0 0 30px transparent; } 
}

/* =========================================
   v8.5.2 REFINED MODAL ACTIONS
   ========================================= */

/* The Container for the Discard Button */
#momentumActions {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    width: 100%;
    /* Ensure it works even if hidden was removed */
    opacity: 1; 
    transition: opacity 0.3s;
}

#momentumActions.hidden {
    display: none !important;
}

/* The Ghost Button (Discard) */
.btn-ghost {
    background: transparent;
    border: none;
    color: #666; /* Visible Grey */
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: var(--font-mono); /* Use Mono font for numbers */
    font-size: 11px; /* Slightly smaller to fit longer text */
    letter-spacing: 0px;
    opacity: 0.7;
}

/* Hover State - Red warning */
.btn-ghost:hover {
    color: #FF5252;
    background: rgba(255, 82, 82, 0.1);
    opacity: 1;
}

.text-momentum {
    color: var(--momentum-color, #A855F7); /* Fallback to hex if var missing */
    font-weight: 700;
    margin-left: 6px;
    font-family: var(--font-mono); /* Ensures numbers line up nicely */
    letter-spacing: -0.5px;
}

/* =========================================
   SETTINGS MODAL COMPONENTS
   ========================================= */

/* Settings Modal Adjustments */
.settings-modal-box {
    position: relative;
    padding-top: 40px;
}

#btnCloseSettings {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: color 0.2s ease;
}

.btn-close-top:hover {
    color: #FFF; /* Nice hover effect for PC users */
}
/* The Row Container */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color); /* Subtle divider */
}
.setting-row:last-of-type { border-bottom: none; } /* Remove line from last item */
/* =========================================
   SETTINGS GROUPING (Auto Flow & Break)
   ========================================= */
#autoFlowRow {
    border-bottom: none;
    padding-bottom: 8px;
}

#breakRow {
    padding-top: 8px;
}

/* Text Labels */
.setting-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.setting-title {
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 500;
}
/* =========================================
   DANGER ZONE (Clear Data)
   ========================================= */
#btnResetData {
    color: var(--text-dim) !important;
    font-family: var(--font-ui);
    font-size: 11px !important;
    letter-spacing: 1px;
    text-transform: none;
    font-weight: 600;
    opacity: 0.5;
    transition: all 0.2s ease;
}

#btnResetData:hover {
    opacity: 1;
    color: #FF453A !important; /* Apple Warning Red */
}

/* =========================================
   SEGMENTED CONTROL (Theme Selector)
   ========================================= */
.segmented-control {
    background: var(--btn-bg); /* Clean, flat matte background */
    border-radius: 8px;
    padding: 3px;
    display: flex;
    gap: 2px;
    box-shadow: none; /* Stripped away the messy inner shadows */
}

.seg-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-family: var(--font-ui);
    font-weight: 500;
    transition: all 0.2s ease;
}

.seg-btn.active {
    background: var(--border-color); /* Crisp, solid highlight */
    color: var(--text-main);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Simple, clean drop shadow */
}

/* =========================================
   TOGGLE SWITCH (iOS Style)
   ========================================= */
.toggle-switch {
    width: 44px;
    height: 24px;
    background: var(--btn-bg); /* Matches the segmented track */
    border-radius: 12px;
    border: none;
    position: relative;
    cursor: pointer;
    transition: background 0.3s ease;
    box-shadow: none; /* Stripped away the messy inner shadows */
}

.toggle-knob {
    width: 20px;
    height: 20px;
    background: var(--text-dim);
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3); /* Simple drop shadow */
}

/* Active (ON) State */
.toggle-switch.active {
    background: var(--accent-color);
}
.toggle-switch.active .toggle-knob {
    background: #000000;
    transform: translateX(20px);
}

/* =========================================
   BREAK MODE (v10.0 AUTOFLOW) FIX
   ========================================= */
body.mode-break #clockGroup span {
    color: var(--break-color, #5EEAD4) !important;
    text-shadow: 0 0 20px rgba(94, 234, 212, 0.4) !important;
}

body.mode-break .ring-green {
    stroke: var(--break-color, #5EEAD4) !important;
}

/* NEW: Keep the text quiet and light grey */
body.mode-break .task-intent {
    color: #888 !important; 
    text-shadow: none !important;
    opacity: 0.8 !important;
}

/* Do not grayscale the break color during deep focus */
body.mode-break.is-deep-focus .controls-section .progress-container {
    filter: grayscale(0%) !important;
}

/* =========================================
   INSIGHTS TAB (v12.0)
   ========================================= */
.segmented-wrapper { 
    display: flex; justify-content: center; margin-bottom: 25px; 
}

/* Sub-Navigation Typography */
.insights-subnav {
    display: flex; justify-content: center; align-items: center; gap: 10px;
    margin-bottom: 30px; font-family: var(--font-ui); font-size: 13px; font-weight: 500;
}
.subnav-item { color: #555; cursor: pointer; transition: color 0.2s; }
.subnav-item.active { color: #FFF; }
.subnav-sep { color: #333; }

/* Hero Metrics */
.insights-hero { text-align: center; margin-bottom: 20px; }
.hero-time { font-family: var(--font-ui); font-weight: 500; font-size: 36px; color: var(--text-main); margin-bottom: 8px; }
.hero-delta { font-family: var(--font-ui); font-size: 13px; color: var(--accent-color); }
.hero-delta.negative { color: var(--text-dim); } /* Dim/grey for negative as per your design */

/* .insights-summary {
    text-align: center; font-family: var(--font-ui); font-size: 13px; color: #888;
    margin-bottom: 35px; line-height: 1.6;
} */

/* ==========================================
   PREMIUM INSIGHT CARDS
   ========================================== */
/* ==========================================
   PREMIUM INSIGHT CARDS (MINIMALIST)
   ========================================== */
.insights-summary-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-card {
    background: rgba(255, 255, 255, 0.03); /* Gentle float effect */
    border: none; /* 🛑 Removed the harsh border */
    border-radius: 12px;
    padding: 16px 20px; /* Slightly wider padding to let it breathe */
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    transition: background 0.2s ease;
}

.insight-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Slightly smaller footprint */
    height: 32px;
    background: transparent; /* 🛑 Removed the boxy circle background */
    flex-shrink: 0;
}

.card-data {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.card-label {
    font-size: 9px; /* 🛑 Shaved off 1px for elegance */
    color: var(--text-dim); /* 🛑 Softer grey so the numbers pop harder */
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: var(--font-ui);
    font-weight: 600;
}

.card-value {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 500;
    font-family: var(--font-mono); /* Ensures numbers stay perfectly aligned */
}

/* Goal Progress Bar */
.card-progress-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.08); /* Darkened slightly */
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.card-progress-fill {
    height: 100%;
    background: var(--accent-color, #4CAF50);
    border-radius: 2px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Quality Badge */
.card-badge {
    padding: 4px 10px;
    border-radius: 8px; /* 🛑 Changed from pill to a sleeker soft-square */
    font-size: 10px;
    font-weight: 600;
    border: none; /* 🛑 Removed the border */
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* ==========================================
   INSIGHTS TAB: FINAL POLISH
   ========================================== */

/* 1. Make the bar graph numbers match the crisp monospace card numbers */
.insight-row span:last-child {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-dim); /* Slightly dimmed so the white labels stand out */
    letter-spacing: 0.5px;
}

/* 2. Upgrade the "Most time spent" text into a Smart Insight badge */
.insight-highlight {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 20px;
    font-size: 12px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Add a subtle visual cue to the insight */
.insight-highlight::before {
    content: "✨"; /* Adds a little spark icon automatically */
    font-size: 14px;
    opacity: 0.8;
}

.insight-highlight strong {
    color: var(--text-main);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Sections */

/* ==========================================
   INSIGHT SECTIONS (Grouped Card Look)
   ========================================== */
.insight-section {
    background: rgba(255, 255, 255, 0.02); /* Very faint card background */
    border-radius: 16px;
    padding: 16px 20px;
    margin-bottom: 16px; /* Spacing between cards */
    border: none; /* Removes the old faint dividing lines */
}

/* Push the section title a bit to make it feel like a header */
.insight-title {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-family: var(--font-ui);
    font-weight: 600;
    margin-bottom: 15px; /* Space between title and first bar */
}

/* Premium Linear Progress Bars */
.insight-row {
    display: flex; justify-content: space-between; align-items: flex-end;
    font-family: var(--font-ui); font-size: 13px; color: #999; margin-bottom: 8px;
}
.row-label { font-weight: 500; color: var(--text-main); }
.insight-bar-bg {
    width: 100%; height: 6px; background: var(--btn-bg); border-radius: 3px; overflow: hidden; margin-bottom: 16px;
}
.insight-bar-fill {
    height: 100%; background: var(--text-dim); border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}
.insight-bar-fill.accent { background: var(--accent-color); }

.insight-highlight {
    font-family: var(--font-ui); font-size: 13px; color: #888; margin-top: 15px;
}

/* Bulletproof Journal List */
.journal-item {
    display: flex; align-items: center; font-family: var(--font-ui);
    font-size: 13px; margin-bottom: 14px; color: var(--text-main); line-height: 1.4;
}
.journal-item:last-child { margin-bottom: 0; }
.journal-meta {
    font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
    min-width: 95px; flex-shrink: 0;
}
.journal-task {
    flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 10px;
}
/* =========================================
   DESKTOP OPTIMIZATIONS (v12.0)
   ========================================= */
@media (min-width: 768px) {
    .modal {
        /* Makes the modal a perfectly sized floating widget on PC */
        max-height: 650px; 
    }
}

/* =========================================
   SYNC TAB STYLING (v12.2)
   ========================================= */
.sync-row {
    padding-bottom: 15px;
    display: flex; gap: 10px; align-items: center; justify-content: space-between; align-items: stretch;
}
.sync-dropdown {
    background: var(--btn-bg); border: 1px solid var(--border-color);; color: var(--text-main);
    font-family: var(--font-ui); font-size: 13px; font-weight: 500;
    padding: 12px 15px; border-radius: 12px; cursor: pointer;
    flex: 1; outline: none; appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat; background-position: right 15px center; background-size: 14px;
}
.sync-dropdown:focus { border-color: var(--text-dim); }

.btn-sync {
    background: var(--btn-bg); border: 1px solid var(--border-color); color: var(--text-main);
    font-family: var(--font-ui); font-size: 13px; font-weight: 500;
    padding: 14px 20px; border-radius: 12px; cursor: pointer;
    transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; box-sizing: border-box;
}
.btn-sync:hover { background: var(--btn-hover); color: var(--text-main); border-color: var(--text-dim); }
.sync-icon { font-size: 15px; color: var(--accent-color); opacity: 0.9; }

/* ==========================================
   📦 SYNC DROP ZONE UI
   ========================================== */
.drop-zone-box {
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 4px 0;
    margin-top: 5px;
    transition: all 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
    background: rgba(255, 255, 255, 0.01);
    position: relative;
}

.drop-zone-box.drag-active {
    border-color: var(--accent-color);
    background: rgba(76, 175, 80, 0.05); 
    transform: scale(1.02);
}

.drop-zone-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0 16px;
    opacity: 0.4;
}

.drop-zone-hint {
    font-size: 11px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 4px;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    opacity: 0.5;
    pointer-events: none;
}

.btn-sync-ghost {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}
.btn-sync-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
}