/* ===== VARIABLES Y ROOT ===== */
:root {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.70);
    /* Glassmorphism */
    --glass-bg: rgba(15, 20, 30, 0.35);
    --glass-bg-heavy: rgba(10, 15, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.10);
    --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    /* Accents */
    --accent-color: #ffffff;
    --health-color: #10b981;
    --wealth-color: #f59e0b;
    --love-color: #ef4444;
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --shadow-text: 0 2px 10px rgba(0, 0, 0, 0.8);
    /* Layout */
    --radius-lg: 16px;
    --radius-md: 10px;
    --transition-fast: 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    --drawer-width: 360px;
}

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

body,
html {
    width: 100%;
    height: 100%;
    font-family: var(--font-family);
    color: var(--text-primary);
    overflow: hidden;
}

/* ===== BACKGROUND ===== */
.background-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0B101E;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    transition: background-image 1.5s ease, background-color 1.5s ease;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.5) 100%);
    z-index: 1;
}

/* ===== APP LAYOUT (MINIMALISTA — sin grid) ===== */
.app-layout {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ===== CENTER STAGE (full screen) ===== */
.center-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0 40px;
}

/* ===== TOP NAV ===== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 20px;
    width: 100%;
    position: relative;
    /* Needed for z-index */
    z-index: 10;
    /* Put above clock-pomodoro-wrapper */
}

.top-nav-left,
.top-nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-separator {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
}

/* ===== GLASS BUTTONS ===== */
.glass-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: var(--text-primary);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Icon-only glass button (for drawer toggles) */
.glass-btn-icon {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.7);
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.glass-btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    border-color: var(--glass-border);
    transform: scale(1.1);
}

.lang-label {
    font-size: 9px;
    font-weight: 700;
    position: absolute;
    bottom: 2px;
    right: 2px;
    letter-spacing: 0.5px;
}

/* ===== GLASS PANELS ===== */
.glass-panel-minimal {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 8px 16px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.glass-panel-heavy {
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--glass-shadow);
}

/* ===== WEATHER ===== */
.weather-widget {
    font-weight: 500;
    font-size: 14px;
}

.weather-icon {
    font-size: 18px;
    color: #fcd34d;
    text-shadow: 0 0 10px rgba(252, 211, 77, 0.5);
}

.weather-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

#weather-temp {
    font-weight: 700;
    font-size: 15px;
}

#weather-loc {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== FOCUS STAT ===== */
.focus-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    text-shadow: var(--shadow-text);
    padding: 5px 10px;
    border-radius: var(--radius-md);
    transition: background-color var(--transition-fast);
}

.focus-stat.stat-updated {
    background-color: rgba(16, 185, 129, 0.3);
    animation: flashStat 1.5s ease-out;
}

@keyframes flashStat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        color: #10b981;
    }

    100% {
        transform: scale(1);
    }
}

/* ===== CLOCK / POMODORO ===== */
.clock-pomodoro-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    margin-top: -30px;
}

.view-container {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeScale 0.5s cubic-bezier(0.19, 1, 0.22, 1);
}

.view-container.active {
    display: flex;
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.massive-text {
    font-size: clamp(80px, 12vw, 150px);
    font-weight: 600;
    letter-spacing: -3px;
    text-shadow: var(--shadow-text);
    line-height: 1;
}

.dashboard-view {
    justify-content: center;
    margin-top: -50px;
    width: 100%;
    /* Allow intention banner to span full width */
}

/* ===== GREETING & MANTRA SWAP WRAPPER ===== */
.greeting-mantra-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: -20px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 800px;
}

.switch-btn-small {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    font-size: 12px;
    opacity: 0.6;
}

.switch-btn-small:hover {
    opacity: 1;
}

.text-swap-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px; /* To prevent jumping when height differs */
    flex-grow: 1;
}

.swap-item {
    position: absolute;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: translateY(10px);
    text-align: center;
}

.swap-item.active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
}

.swap-item.hidden {
    display: none;
}

.greeting-text {
    font-size: clamp(30px, 4vw, 50px);
    font-weight: 400;
    text-shadow: var(--shadow-text);
}

#user-name-display {
    font-weight: 700;
    outline: none;
    border-bottom: 2px dashed transparent;
    transition: border-color var(--transition-fast);
}

#user-name-display:focus,
#user-name-display:hover {
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

.mantra-text {
    font-size: clamp(22px, 3.5vw, 42px);
    font-weight: 500;
    font-style: italic;
    text-shadow: var(--shadow-text);
    opacity: 0.9;
    line-height: 1.4;
    color: var(--accent-color);
}

/* ===== INTENTION BANNER ===== */
.intention-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.intention-today-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 6px;
}

.main-intention {
    background: transparent;
    /* Invisible base border but keeps space */
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-primary);
    font-family: var(--font-family);
    /* Adapts to screen width, stays on one line */
    font-size: clamp(18px, 2.5vw, 36px);
    font-weight: 500;
    text-align: center;
    /* Default to full width so text doesn't cut off */
    width: 100%;
    max-width: 100%;
    outline: none;
    text-shadow: var(--shadow-text);
    transition: all var(--transition-fast);
    padding: 4px 16px 10px;
    line-height: 1.3;
    /* Force single line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Only show the underline when the input is empty (using placeholder-shown) or focused */
.main-intention:placeholder-shown {
    border-bottom-color: rgba(255, 255, 255, 0.2);
    /* Reduced width to act as a proper sized guide line when empty */
    width: 90%;
    max-width: 700px;
}

.main-intention::placeholder {
    color: rgba(255, 255, 255, 0.35);
    text-shadow: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(18px, 2.5vw, 36px);
}

.main-intention:focus {
    border-bottom-color: rgba(255, 255, 255, 0.8);
    /* Show full text while editing */
    overflow: visible;
    white-space: nowrap;
    width: 100%;
    max-width: 100%;
}

.main-intention:not(:placeholder-shown):not(:focus) {
    border-bottom-color: transparent;
    width: 100%;
    max-width: 100%;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 20px;
    width: 100%;
    margin-top: auto;
}

.bg-selector-btn {
    border-radius: var(--radius-lg);
    font-size: 12px;
}

/* ===== POMODORO ===== */
.pomodoro-wrapper {
    position: relative;
    width: 450px;
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
}

.ring-bg {
    stroke: rgba(255, 255, 255, 0.15);
}

.ring-fg {
    stroke: var(--accent-color);
    stroke-linecap: round;
    stroke-dasharray: 1350.88;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.pomodoro-inner {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pomodoro-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.pomodoro-tabs .tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 700;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.pomodoro-tabs .tab.active {
    color: var(--text-primary);
}

.pomodoro-time {
    font-size: 110px;
    margin-bottom: -5px;
    letter-spacing: -2px;
}

.pomodoro-task-label {
    font-size: 16px;
    margin-bottom: 5px;
    text-shadow: var(--shadow-text);
}

.pomo-intention-label {
    font-size: 14px;
    font-style: italic;
    color: var(--text-secondary);
    max-width: 350px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 5px;
}

.session-count-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 12px;
}

.pomodoro-controls-time {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.time-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    border-radius: 5px;
    color: white;
    width: 25px;
    height: 25px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition-fast);
}

.time-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

#pomo-duration-label {
    font-size: 14px;
    font-weight: 600;
}

.play-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: all var(--transition-fast);
}

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

/* Completion message */
.pomo-completion-msg {
    margin-top: 20px;
    font-size: 18px;
    font-style: italic;
    text-align: center;
    max-width: 400px;
    text-shadow: var(--shadow-text);
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.pomo-completion-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

.pomo-completio.notes-saved-msg.visible {
    opacity: 1;
}

/* ================================== */
/* CUSTOM TOOLTIPS                    */
/* ================================== */

[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    z-index: 1000;
    pointer-events: none;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: white;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--font-family);
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
}

[data-tooltip]::after {
    content: '';
    border-style: solid;
    border-width: 0 5px 6px 5px;
    border-color: transparent transparent var(--glass-border) transparent;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
}

/* Tooltip on right config (for certain buttons if needed, mostly top uses bottom tooltip) */
.tooltip-right[data-tooltip]::before {
    top: 50%;
    left: calc(100% + 10px);
    transform: translateY(-50%) translateX(-5px);
}
.tooltip-right[data-tooltip]::after {
    border-width: 5px 6px 5px 0;
    border-color: transparent var(--glass-border) transparent transparent;
    top: 50%;
    left: calc(100% + 4px);
    transform: translateY(-50%) translateX(-5px);
}

/* Tooltip on top config (for bottom nav) */
.tooltip-top[data-tooltip]::before {
    top: -webkit-max-content; /* fallback */
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(5px);
}
.tooltip-top[data-tooltip]::after {
    border-width: 6px 5px 0 5px;
    border-color: var(--glass-border) transparent transparent transparent;
    bottom: calc(100% + 4px);
    top: auto;
    left: 50%;
    transform: translateX(-50%) translateY(5px);
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.tooltip-right[data-tooltip]:hover::before,
.tooltip-right[data-tooltip]:hover::after {
    transform: translateY(-50%) translateX(0);
}

/* ================================== */
/* DRAWER SYSTEM                      */
/* ================================== */

.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.35);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--drawer-width);
    height: 100%;
    background: var(--glass-bg-heavy);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-left: 1px solid var(--glass-border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.4);
    z-index: 600;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.15);
}

.drawer-header h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 5px;
}

.drawer-close-btn:hover {
    color: var(--text-primary);
}

.drawer-body {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}

.drawer-body::-webkit-scrollbar {
    width: 4px;
}

.drawer-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.drawer-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 5px;
}

.text-icon {
    opacity: 0.7;
}

/* ===== GOALS inside drawer ===== */
.goal-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 12px;
}

.goal-group label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.goal-group.health label i {
    color: var(--health-color);
}

.goal-group.wealth label i {
    color: var(--wealth-color);
}

.goal-group.love label i {
    color: var(--love-color);
}

.borderless-input {
    flex: 1;
    background: transparent;
    border: none;
    resize: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    min-height: 60px;
}

.borderless-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* ===== REFLECTION inside drawer ===== */
.ref-col {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 15px;
}

.ref-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.no-resize {
    flex: 1;
    background: transparent;
    border: none;
    resize: none;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1.5;
    outline: none;
    min-height: 60px;
}

.no-resize::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* ===== DAILY NOTES ===== */
.notes-section {
    margin-bottom: 10px;
}

.notes-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: block;
}

/* Rating emojis row */
.rating-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.rating-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 24px;
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.rating-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.12);
}

.rating-btn.selected {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.12);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15);
}

/* Radio options */
.why-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.why-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background var(--transition-fast);
}

.why-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.why-option input[type="radio"] {
    accent-color: var(--accent-color);
    width: 14px;
    height: 14px;
}

/* Notes textarea */
.daily-notes-textarea {
    width: 100%;
    min-height: 100px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 13px;
    line-height: 1.6;
    padding: 12px;
    resize: vertical;
    outline: none;
    transition: border-color var(--transition-fast);
}

.daily-notes-textarea:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.daily-notes-textarea::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Save button + feedback */
.save-notes-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-top: 5px;
}

.save-notes-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.notes-saved-msg {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--health-color);
    margin-top: 8px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* ===== TASK WIDGET (pinned bottom-right) ===== */
.task-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 280px;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header.compact {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header.compact h2 {
    font-size: 13px;
    font-weight: 600;
}

.task-count {
    margin-left: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
}

.icon-toggle-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.task-body-expandable {
    display: flex;
    flex-direction: column;
    max-height: 300px;
    transition: max-height 0.3s ease;
}

.task-body-expandable.collapsed {
    max-height: 0;
    overflow: hidden;
    border-top: none;
}

.task-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 15px;
    max-height: 200px;
}

.small-scroll::-webkit-scrollbar {
    width: 3px;
}

.small-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.task-list {
    list-style: none;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-size: 12px;
    line-height: 1.4;
    transition: opacity var(--transition-fast);
}

.task-item.completed span {
    text-decoration: line-through;
    opacity: 0.5;
}

.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    min-width: 14px;
    height: 14px;
    margin-top: 2px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-content: center;
}

.custom-checkbox:checked {
    background: rgba(255, 255, 255, 0.8);
    border-color: transparent;
}

.custom-checkbox::before {
    content: "";
    width: 8px;
    height: 8px;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    background-color: #000;
    transition: transform 0.1s ease-in-out;
}

.custom-checkbox:checked::before {
    transform: scale(1);
}

.task-input-wrapper {
    padding: 10px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.task-input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    color: white;
    font-family: var(--font-family);
    font-size: 12px;
    outline: none;
}

.task-input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    display: flex !important;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.modal-compact {
    max-width: 400px;
}

.blur-xl {
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    background: rgba(15, 20, 30, 0.7);
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body-compact {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-body-compact p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.modal-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 15px;
    outline: none;
    transition: border-color var(--transition-fast);
}

.modal-input:focus {
    border-color: rgba(255, 255, 255, 0.4);
}

.modal-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.modal-save-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-save-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== MANTRA MODAL LIST ===== */
.mantra-list {
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mantra-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-style: italic;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.mantra-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mantra-delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: color var(--transition-fast);
}

.mantra-delete-btn:hover {
    color: var(--love-color);
}

.mantra-empty-msg {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* ===== BACKGROUND SELECTOR MODAL ===== */
.bg-options-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    overflow-y: auto;
}

.bg-option {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.bg-option:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.bg-option.active {
    border-color: var(--accent-color);
}

.bg-option-label {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 10px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.color-option {
    background-color: var(--bg-color, #1a1a1a);
}

/* ===== UTILITY ===== */
.hidden {
    display: none !important;
}