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

:root {
    /* Colors - Calm & Professional */
    --bg-main: #FAFAFA;
    --bg-card: #ffffff;
    --primary: #1E2A45;
    --primary-light: #2D4068;
    --primary-hover: #162033;
    --accent: #4A5F8C;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --border: #1E2A45;
    --border-light: #e8e8e8;

    /* Status Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f8f9fc 0%, #e8edf7 100%);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: var(--spacing-xl);
    overflow-x: hidden;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1600px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--spacing-xl);
    align-items: stretch;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== LEFT COLUMN ==================== */
.left-column {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    height: 100%;
}

/* Section Titles */
.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

/* Top Priorities Section */
.priorities-section {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease;
}

.priorities-section:hover {
    box-shadow: var(--shadow-lg);
}

.priority-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.priority-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.priority-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.priority-input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    background: var(--bg-main);
}

.priority-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.priority-input::placeholder {
    color: var(--text-light);
}

/* Brain Dump Section */
.brain-dump-section {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    transition: box-shadow 0.3s ease;
}

.brain-dump-section:hover {
    box-shadow: var(--shadow-lg);
}

.brain-dump-textarea {
    flex: 1;
    padding: 0.5rem var(--spacing-md);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    resize: none;
    line-height: 2rem;
    background-image:
        repeating-linear-gradient(transparent,
            transparent calc(2rem - 1px),
            var(--border) calc(2rem - 1px),
            var(--border) 2rem);
    background-attachment: local;
    background-position: 0 0;
    transition: all 0.2s ease;
}

.brain-dump-textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.brain-dump-textarea::placeholder {
    color: var(--text-light);
}

/* ==================== RIGHT COLUMN - SCHEDULE ==================== */
.right-column {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.schedule-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    transition: box-shadow 0.3s ease;
}

.schedule-card:hover {
    box-shadow: var(--shadow-xl);
}

.schedule-header {
    padding: var(--spacing-md);
    padding-left: calc(var(--spacing-md) + 25px);
    border-bottom: 2px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
}

.schedule-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.date-picker-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.date-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.date-input {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
}

.date-input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.schedule-content {
    padding: var(--spacing-md);
    overflow-y: auto;
    max-height: calc(100vh - 9rem);
}

.time-columns-header {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
    padding-left: 80px;
}

.time-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.schedule-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* Schedule Header Row */
.schedule-header-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: var(--spacing-sm);
    align-items: center;
    padding: 0;
    margin-bottom: 0;
}

.schedule-header {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    letter-spacing: 0.05em;
    background: transparent;
    border: none;
}

/* Header with toggle button - special positioning */
.schedule-header.header-with-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    padding-left: 2rem;
    /* Add some padding so it's not glued to the edge */
}

/* Half-hour toggle button - glossy iOS style */
.half-hour-toggle-btn {
    position: static;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 2px rgba(255, 255, 255, 0.5) inset;
    line-height: 1;
}

.half-hour-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 1px 3px rgba(255, 255, 255, 0.6) inset;
    transform: translateY(-2px);
}

.half-hour-toggle-btn:active {
    transform: translateY(0);
}

/* iOS-style glossy restore button */
.half-hour-toggle-btn.restore-btn {
    position: static;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--primary);
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 2px rgba(255, 255, 255, 0.5) inset;
}

.half-hour-toggle-btn.restore-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 1px 3px rgba(255, 255, 255, 0.6) inset;
    transform: translateY(-2px);
}



/* Time Row */
.time-row {
    display: grid;
    grid-template-columns: 80px 1fr 1fr;
    gap: var(--spacing-md);
    align-items: center;
    padding: var(--spacing-xs) 0;
    position: relative;
    transition: all 0.2s ease;
}

.hour-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: right;
    padding-right: var(--spacing-md);
}

.time-slot {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.time-input-wrapper {
    flex: 1;
    position: relative;
}

.time-input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: 2.5rem;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    background: var(--bg-main);
}

.time-input:focus {
    outline: none;
    border-color: var(--primary-light);
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.time-slot.active .time-input {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.status-icon {
    position: absolute;
    right: var(--spacing-sm);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.time-slot.completed .status-icon {
    opacity: 1;
}

.time-slot.incomplete .status-icon {
    opacity: 1;
}

/* Focus Timer Controls */
.focus-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    flex-shrink: 0;
    min-width: max-content;
}

.time-slot.active .focus-controls {
    opacity: 1;
    pointer-events: all;
}

.start-focus-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.start-focus-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.start-focus-btn:active {
    transform: translateY(0);
}

/* Timer Display - Premium Chip Style */
.timer-display {
    display: inline-block;
    vertical-align: middle;
    padding: 6px 12px;
    background: #E8EEF8;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-variant-numeric: tabular-nums;
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1.4;
}

.timer-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    vertical-align: middle;
    width: 16px;
    height: 16px;
    margin-right: 4px;
}

.timer-time {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1E2A45;
    letter-spacing: 0.02em;
    vertical-align: middle;
    margin-right: 4px;
}

.timer-stop-btn {
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    padding: 0;
    background: rgba(30, 42, 69, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    color: #1E2A45;
    cursor: pointer;
    transition: all 0.15s ease;
}

.timer-stop-btn:hover {
    background: rgba(30, 42, 69, 0.2);
    transform: scale(1.1);
}

.timer-stop-btn:active {
    transform: scale(0.95);
}

/* Timer Expand Button (Zen Mode) */
.timer-expand-btn {
    display: inline-block;
    vertical-align: middle;
    width: 18px;
    height: 18px;
    padding: 0;
    background: rgba(30, 42, 69, 0.1);
    border: none;
    border-radius: 50%;
    font-size: 9px;
    line-height: 18px;
    text-align: center;
    color: #1E2A45;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-right: 4px;
}

.timer-expand-btn:hover {
    background: rgba(30, 42, 69, 0.2);
    transform: scale(1.1);
}

.timer-expand-btn:active {
    transform: scale(0.95);
}

.timer-display.warning {
    background: #FEE2E2;
    animation: timerPulse 1s ease-in-out infinite;
}

.timer-display.warning .timer-time {
    color: var(--error);
}

.timer-display.warning .timer-stop-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

@keyframes timerPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-xl);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    text-align: center;
}

.modal-subtitle {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.modal-btn {
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
}

.modal-btn-yes {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.modal-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-btn-no {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: white;
}

.modal-btn-no:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.modal-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.25rem;
}

/* ==================== TOP HEADER ==================== */
.top-header {
    max-width: 1600px;
    margin: 0 auto var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.6s ease-out;
}

.header-left .logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.02em;
    margin: 0;
}

.header-left .logo .dot {
    color: var(--accent);
}

.header-right {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.pro-feature-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.pro-feature-btn:hover {
    border-color: var(--primary-light);
    background: var(--bg-main);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.pro-feature-btn.sync-btn {
    padding: var(--spacing-sm);
    transition: all 0.3s ease;
}

.pro-feature-btn.sync-btn.syncing {
    animation: syncGlow 1.5s ease-in-out infinite;
}

.pro-feature-btn.sync-btn.synced {
    border-color: var(--success);
    background: var(--success-light);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.pro-feature-btn.sync-btn.synced .lock-icon {
    color: var(--success);
}

@keyframes syncGlow {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(74, 95, 140, 0.3);
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 16px rgba(74, 95, 140, 0.6);
        opacity: 0.85;
    }
}

.lock-icon {
    font-size: 1rem;
    opacity: 0.6;
    display: inline-block;
}

/* ==================== USER DROPDOWN ==================== */
.user-dropdown-container {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.6rem;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.user-dropdown-container.open .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown-container.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s ease;
}

.dropdown-item:hover {
    background: var(--bg-main);
}

.dropdown-item span {
    font-size: 16px;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

.dropdown-logout {
    color: var(--error);
}

.dropdown-logout:hover {
    background: var(--error-light);
}

/* ==================== PROFILE MODAL ==================== */
.profile-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border: 3px solid var(--primary);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    text-align: center;
}

.profile-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-email {
    font-size: 14px;
    color: var(--text-secondary);
}

.profile-stats {
    display: flex;
    gap: 40px;
    margin-top: 10px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== BILLING MODAL ==================== */
.billing-content {
    padding: 20px;
}

.current-plan-section {
    text-align: center;
    padding: 30px;
    background: var(--bg-main);
    border-radius: 12px;
    margin-bottom: 20px;
}

.plan-badge {
    display: inline-block;
    padding: 6px 16px;
    background: var(--text-secondary);
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.plan-badge.pro {
    background: linear-gradient(135deg, #10b981, #059669);
}

.plan-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.plan-description {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.billing-details {
    background: var(--bg-main);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.billing-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.billing-row:last-child {
    border-bottom: none;
}

.billing-label {
    color: var(--text-secondary);
    font-size: 14px;
}

.billing-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.billing-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.billing-btn.primary {
    background: var(--primary);
    color: white;
}

.billing-btn.primary:hover {
    background: var(--primary-hover);
}

.billing-btn.danger {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
}

.billing-btn.danger:hover {
    background: var(--error-light);
}

.billing-link {
    text-align: center;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    padding: 10px;
}

.billing-link:hover {
    text-decoration: underline;
}

/* ==================== FOCUS LOCK BANNER (PRO) ==================== */
.focus-lock-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: var(--spacing-md);
    text-align: center;
    z-index: 999;
    display: none;
    box-shadow: var(--shadow-md);
}

.focus-lock-banner.active {
    display: block;
}

.focus-lock-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    font-weight: 600;
}

.focus-lock-icon {
    font-size: 1.25rem;
}

.focus-lock-timer {
    font-variant-numeric: tabular-nums;
    font-size: 1.125rem;
}

/* ==================== SIDE PANEL (HISTORY) ==================== */
.side-panel {
    position: fixed;
    top: 0;
    right: -500px;
    width: 480px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.side-panel.active {
    right: 0;
}

.panel-content {
    position: relative;
    height: 100%;
}

.panel-header {
    padding: var(--spacing-xl);
    border-bottom: 2px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 42, 69, 0.03) 0%, rgba(74, 95, 140, 0.03) 100%);
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.panel-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-main);
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 20;
}

.panel-close:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.panel-body {
    padding: var(--spacing-xl);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.history-item {
    padding: var(--spacing-lg);
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-light);
}

.history-date {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

.stat-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-bar {
    height: 8px;
    background: var(--border-light);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 999px;
    transition: width 0.3s ease;
}

/* ==================== PRO LOCK OVERLAY ==================== */
.pro-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: var(--radius-xl);
}

.pro-lock-message {
    text-align: center;
    padding: var(--spacing-2xl);
}

.lock-icon-large {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.3;
}

.pro-lock-message h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.pro-lock-message p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    font-size: 1.0625rem;
}

.upgrade-btn-small {
    padding: var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
}

.upgrade-btn-small:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== TEMPLATES MODAL ==================== */
.modal-wide {
    max-width: min(800px, 90vw);
    max-height: 85vh;
    overflow-y: auto;
}

.modal-fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    padding: var(--spacing-2xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    /* For absolute positioning of close btn */
}

/* Close button for fullscreen modal - Left side */
.modal-fullscreen .modal-close-btn {
    position: absolute;
    top: var(--spacing-md);
    /* Moved up */
    left: var(--spacing-md);
    right: auto;
    background: rgba(0, 0, 0, 0.05);
    width: 32px;
    /* Slightly smaller */
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 10;
}

.modal-fullscreen .modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(-90deg);
}

.modal-fullscreen .upgrade-modal-content {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--border-light);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 10;
}

.modal-header .modal-title {
    margin: 0;
    text-align: left;
    font-size: 1.25rem;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-main);
    color: var(--text-secondary);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
}

.modal-close-btn:hover {
    background: var(--border-light);
    color: var(--text-primary);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.template-card {
    padding: var(--spacing-md);
    background: var(--bg-main);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all 0.2s ease;
}

.template-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.template-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-xs);
}

.template-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-xs);
}

.template-description {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.5;
}

.template-apply-btn {
    width: 100%;
    padding: var(--spacing-xs) var(--spacing-sm);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-apply-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.templates-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.9375rem;
}

.template-card {
    padding: var(--spacing-md);
    background: var(--bg-main);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.template-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.template-card-custom {
    border-style: dashed;
    background: linear-gradient(135deg, rgba(74, 95, 140, 0.03) 0%, rgba(30, 42, 69, 0.03) 100%);
}

.template-card-custom:hover {
    border-style: solid;
}

.template-icon {
    font-size: 1.75rem;
    margin-bottom: 0;
}

.template-content {
    flex: 1;
}

.template-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 4px 0;
}

.template-desc {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 var(--spacing-sm) 0;
}

.template-preview {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--spacing-xs);
    background: rgba(30, 42, 69, 0.04);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.template-preview span {
    display: block;
}

/* Custom Templates Section */
.custom-templates-section {
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--border-light);
}

.custom-templates-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.custom-templates-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.custom-template-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-template-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.custom-template-chip .delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    color: inherit;
    transition: all 0.2s ease;
}

.custom-template-chip:hover .delete-btn {
    background: rgba(255, 255, 255, 0.2);
}

.custom-template-chip .delete-btn:hover {
    background: var(--error);
    color: white;
}

/* Custom Template Form */
.custom-template-form {
    padding: var(--spacing-lg) 0;
}

.custom-template-form .input-group {
    margin-bottom: var(--spacing-md);
}

.custom-template-form .helper-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xl);
}

/* ==================== EXPORT MODAL ==================== */
.export-options {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.export-option-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-xl);
    background: var(--bg-main);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.export-option-btn:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.export-icon {
    font-size: 2.5rem;
}

.export-option-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.export-option-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ==================== PRO UPGRADE MODAL ==================== */
.upgrade-modal-content {
    padding: var(--spacing-xl) 0;
}

.upgrade-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.upgrade-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.upgrade-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.upgrade-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 4rem;
    row-gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
}

.upgrade-feature {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
}

.upgrade-feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.upgrade-feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.upgrade-feature-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pricing-plans {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.pricing-plan {
    padding: 1.25rem;
    /* Reduced by ~10% from 1.5rem */
    background: var(--bg-main);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all 0.2s ease;
    position: relative;
    max-width: 400px;
    /* Limit width */
    margin: 0 auto;
    /* Center in grid cell */
    width: 100%;
}

.pricing-plan:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.pricing-plan-recommended {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(30, 42, 69, 0.05) 0%, rgba(74, 95, 140, 0.05) 100%);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-xs) var(--spacing-md);
    background: var(--primary);
    /* Changed to solid color per screenshot */
    color: white;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.plan-name {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
    margin-top: var(--spacing-md);
    /* Add top margin to push down and align both */
}

.plan-price {
    font-size: 2.25rem;
    /* Reduced from 2.5rem */
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.plan-period {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

.plan-savings {
    font-size: 0.875rem;
    color: var(--success);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.plan-btn {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.plan-btn:hover {
    background: var(--bg-main);
}

.plan-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    color: white;
}

.plan-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== PRICING FOOTER ==================== */
.pricing-footer {
    max-width: 1600px;
    margin: var(--spacing-2xl) auto 0;
    padding: var(--spacing-xl);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    animation: fadeIn 0.6s ease-out;
}

.pricing-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-xl);
}

.pricing-features {
    flex: 1;
    display: flex;
    gap: var(--spacing-2xl);
}

.feature-column {
    flex: 1;
}

.feature-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
}

.feature-list {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.upgrade-btn {
    padding: var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        max-width: 800px;
    }

    .schedule-content {
        max-height: 600px;
    }

    .upgrade-features {
        grid-template-columns: 1fr;
    }
}

/* Templates Modal - smaller screens */
@media (max-height: 900px) {
    .modal-wide {
        max-height: 80vh;
        padding: var(--spacing-md);
    }

    .templates-grid {
        gap: var(--spacing-sm);
    }

    .template-card {
        padding: var(--spacing-sm);
    }

    .template-icon {
        font-size: 1.5rem;
    }

    .template-title {
        font-size: 0.875rem;
    }

    .template-desc {
        font-size: 0.75rem;
        margin-bottom: var(--spacing-xs);
    }

    .template-preview {
        display: none;
    }

    .custom-templates-section {
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-sm);
    }
}

@media (max-width: 768px) {
    body {
        padding: var(--spacing-md);
    }

    .container {
        gap: var(--spacing-md);
    }

    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .header-right {
        width: 100%;
        justify-content: flex-end;
    }

    .schedule-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .time-row {
        grid-template-columns: 60px 1fr;
        gap: var(--spacing-sm);
    }

    .time-columns-header {
        grid-template-columns: 60px 1fr;
        padding-left: 60px;
    }

    .time-header:last-child {
        display: none;
    }

    .time-slot:last-child {
        display: none;
    }

    .side-panel {
        width: 100%;
        right: -100%;
    }

    .pricing-content {
        flex-direction: column;
    }

    .pricing-features {
        flex-direction: column;
        gap: var(--spacing-lg);
        width: 100%;
    }

    .pricing-plans {
        grid-template-columns: 1fr;
    }

    .pro-feature-btn span:not(.lock-icon) {
        display: none;
    }
}

/* ==================== NOTIFICATION ANIMATIONS ==================== */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

/* ==================== ZEN MODE FULLSCREEN ==================== */
.zen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #F6F8FC 0%, #E8EEF8 100%);
    z-index: 9999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: zenFadeIn 0.4s ease-out;
}

.zen-overlay.active {
    display: flex;
}

@keyframes zenFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Zen Minimize Button (bottom left, next to End Focus) */
.zen-minimize {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(calc(-50% - 140px));
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 2px rgba(255, 255, 255, 0.5) inset;
}

.zen-minimize:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(calc(-50% - 140px)) translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 1px 3px rgba(255, 255, 255, 0.6) inset;
}

.zen-minimize:active {
    transform: translateX(calc(-50% - 140px)) translateY(0);
}

/* Zen Content Container */
.zen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    animation: zenSlideUp 0.6s ease-out;
}

@keyframes zenSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zen Timer - Large Display */
.zen-timer {
    font-size: 140px;
    font-weight: 200;
    color: #1E2A45;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Zen Quote */
.zen-quote {
    font-size: 14px;
    font-style: italic;
    color: rgba(30, 42, 69, 0.5);
    letter-spacing: 0.02em;
    font-weight: 400;
}

/* Zen End Focus Button */
.zen-end-btn {
    position: absolute;
    bottom: 4rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 2rem;
    color: var(--primary);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset,
        0 1px 2px rgba(255, 255, 255, 0.5) inset;
}

.zen-end-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset,
        0 1px 3px rgba(255, 255, 255, 0.6) inset;
}

.zen-end-btn:active {
    transform: translateY(0);
}

.zen-end-icon {
    font-size: 14px;
}

/* ==================== CALENDAR MODAL ==================== */
.calendar-status {
    text-align: center;
    padding: var(--spacing-xl);
}

.status-icon-large {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

.calendar-status p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.calendar-connect-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    background: white;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.calendar-connect-btn:hover {
    border-color: var(--primary-light);
    background: var(--bg-main);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.calendar-connect-btn img {
    width: 18px;
    height: 18px;
}

/* Calendar Actions */
.calendar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
}

.calendar-action-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.03) 0%, rgba(99, 102, 241, 0.03) 100%);
    border: 2px solid var(--border-light);
    border-radius: var(--radius-xl);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-action-card:hover {
    border-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.08) 0%, rgba(99, 102, 241, 0.08) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.action-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.action-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.action-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Calendar Loading */
.calendar-loading {
    text-align: center;
    padding: var(--spacing-xl);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.calendar-loading p {
    color: var(--text-secondary);
}

/* Connected Status */
.calendar-status.connected {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(5, 150, 105, 0.05) 100%);
    border-radius: var(--radius-lg);
    margin: var(--spacing-md);
}

.calendar-status.connected .status-icon-large {
    color: var(--success);
}

.calendar-disconnect-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: transparent;
    border: 1px solid var(--text-light);
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-disconnect-btn:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Responsive */
@media (max-width: 600px) {
    .calendar-actions {
        grid-template-columns: 1fr;
    }
}

/* ==================== SETTINGS DRAWER ==================== */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

.settings-overlay.active {
    opacity: 1;
    visibility: visible;
}

.settings-drawer {
    position: fixed;
    top: 0;
    right: -480px;
    /* Hidden by default */
    width: 440px;
    height: 100%;
    background: var(--bg-card);
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.settings-drawer.active {
    right: 0;
}

.drawer-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

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

.drawer-view {
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.drawer-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 16px;
}

.drawer-icon {
    font-size: 32px;
}

.drawer-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.drawer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Form Inputs */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.drawer-input {
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 15px;
    background: var(--bg-main);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.drawer-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 95, 140, 0.1);
}

.drawer-input[readonly] {
    background: var(--bg-card);
    /* Lighter than main bg to signify disabled but clean */
    color: var(--text-secondary);
    border-color: transparent;
    background: #f3f4f6;
}

.helper-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.drawer-footer {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.drawer-btn {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.drawer-btn.primary {
    background: var(--primary);
    color: white;
}

.drawer-btn.primary:hover {
    background: var(--primary-hover);
}

/* Billing Cards */
.plan-card {
    background: var(--bg-main);
    border-radius: 12px;
    padding: 24px;
    border: 2px solid transparent;
}

.plan-card.active-plan {
    background: #f0fdf4;
    /* Light green bg for active */
    border-color: #10b981;
}

.plan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.plan-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plan-status {
    font-size: 12px;
    font-weight: 700;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
}

.plan-desc {
    font-size: 14px;
    color: var(--text-secondary);
}

.billing-actions-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.billing-btn.secondary {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
}

.billing-btn.secondary:hover {
    background: var(--bg-main);
    border-color: var(--text-secondary);
}

.billing-btn.danger-text {
    background: transparent;
    color: var(--error);
    font-weight: 500;
    font-size: 14px;
    padding: 10px;
    width: auto;
    align-self: flex-start;
}

.billing-btn.danger-text:hover {
    text-decoration: underline;
}

.billing-history-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

.billing-history-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.billing-history-link:hover {
    color: var(--primary);
}

/* ==================== BILLING CALM REDESIGN (Polished) ==================== */

/* Drawer: Reduce top padding, softer background */
.settings-drawer {
    background: #f8f8fa;
}

#billing-view.drawer-view {
    padding-top: 16px;
    /* Reduced from default ~24px */
}

/* Subtitle under drawer header */
.billing-subtitle {
    font-size: 13px;
    color: #999;
    margin-top: -12px;
    margin-bottom: 20px;
}

/* Container: tighter, purposeful spacing */
.billing-calm-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Remove gap, use margins for control */
}

/* Primary text block */
.billing-header-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}

.billing-explanation {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    max-width: 95%;
}

/* Calmer button: softer color, smaller height, larger radius */
.btn-calm {
    display: inline-block;
    padding: 9px 18px;
    /* ~6% smaller */
    background-color: #4a6fa5;
    /* Softer than primary (~10% lighter) */
    color: white;
    font-size: 14px;
    font-weight: 500;
    border-radius: 12px;
    /* Larger radius for calm look */
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: fit-content;
}

.btn-calm:hover {
    background-color: #5a7fb5;
    transform: translateY(-1px);
}

/* Link: closer to content, not at bottom */
.link-subtle {
    display: inline-block;
    color: #888;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.2s ease;
    margin-top: 10px;
    /* 6px closer */
}

.link-subtle:hover {
    color: var(--text-primary);
}

/* Footer: very subtle, low contrast */
.billing-footer-calm {
    margin-top: 32px;
    padding-top: 16px;
    font-size: 12px;
    color: #bbb;
    /* Even more subtle */
    letter-spacing: 0.01em;
}