/* ===========================================
   LORICAVALLO - Zen-Minimalist Design System
   Responsive CSS for Web, Android, iOS
   =========================================== */

/* CSS Variables - Design Tokens */
:root {
    /* LoricaVallo Brand Colors - Light SaaS Theme */
    --color-brand-slate: #0f172a;       /* Deep Roman Slate */
    --color-brand-gold: #B8872F;        /* Gold Accent */
    --color-brand-gold-light: #D4A84B;
    --color-brand-gold-dark: #9A7228;

    /* Primary Action Color - Blue */
    --color-primary: #2563EB;
    --color-primary-hover: #1D4ED8;
    --color-primary-light: rgba(37, 99, 235, 0.1);

    /* Colors - Light SaaS Palette */
    --color-bg: #F7F8FB;
    --color-bg-elevated: #FFFFFF;
    --color-bg-subtle: #F1F5F9;
    --color-text-primary: #0B1220;
    --color-text-secondary: #5B6475;
    --color-text-tertiary: #94a3b8;
    --color-border: #E5E7EB;
    --color-border-light: #F1F5F9;

    /* Accent Colors */
    --color-power-hour: #0f172a;
    --color-power-hour-bg: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    --color-focus: #c5a059;
    --color-focus-light: rgba(197, 160, 89, 0.1);
    --color-recovery: #81B29A;
    --color-recovery-light: rgba(129, 178, 154, 0.1);
    --color-batch-email: #E07A5F;
    --color-batch-calls: #c5a059;
    --color-meeting: #64748b;
    --color-stop: #E63946;
    --color-stop-light: rgba(230, 57, 70, 0.08);
    --color-success: #81B29A;
    --color-warning: #c5a059;
    --color-high-impact: #0f172a;

    /* Priority Colors */
    --color-priority-high: #E63946;
    --color-priority-medium: #F4A261;
    --color-priority-low: #81B29A;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

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

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout */
    --header-height: 64px;
    --nav-height: 60px;
    --sidebar-width: 280px;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: #121212;
        --color-bg-elevated: #1E1E1E;
        --color-bg-subtle: #2A2A2A;
        --color-text-primary: #FAFAFA;
        --color-text-secondary: #B0B0B0;
        --color-text-tertiary: #808080;
        --color-border: #333333;
        --color-border-light: #2A2A2A;
    }
}

/* ===========================================
   BASE STYLES
   =========================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
}

/* ===========================================
   HEADER
   =========================================== */

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-md);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: var(--space-sm);
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--color-text-primary);
    transition: var(--transition-fast);
}

.app-logo {
    font-family: var(--font-serif);
    font-size: var(--font-size-2xl);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.current-date {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

.header-divider {
    color: var(--color-border);
    font-weight: 300;
}

.current-time {
    font-size: var(--font-size-sm);
    color: var(--color-brand-gold);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}

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

.no-counter {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}

.no-counter:hover {
    background: var(--color-border);
}

.no-icon {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-stop);
}

.no-count {
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.panic-button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-stop);
    background: transparent;
    color: var(--color-stop);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.panic-button:hover {
    background: var(--color-stop);
    color: white;
}

.panic-button svg {
    width: 18px;
    height: 18px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--color-power-hour);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-md);
    transition: background 0.2s ease;
}

.user-profile-dropdown:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-chevron {
    width: 14px;
    height: 14px;
    stroke: var(--color-text-secondary);
    transition: transform 0.2s ease;
}

.user-profile-dropdown.active .dropdown-chevron {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-profile-dropdown.active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.dropdown-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--color-power-hour);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-base);
    flex-shrink: 0;
}

.dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.dropdown-name {
    font-weight: 600;
    font-size: var(--font-size-sm);
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-email {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-tier {
    font-size: var(--font-size-xs);
    color: var(--color-gold);
    font-weight: 500;
}

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

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

.dropdown-item:hover {
    background: var(--color-bg-elevated);
    color: var(--color-text);
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
    flex-shrink: 0;
}

.dropdown-item.upgrade {
    color: var(--color-gold);
}

.dropdown-item.upgrade:hover {
    background: rgba(197, 160, 89, 0.1);
}

.dropdown-item.logout {
    color: #ef4444;
}

.dropdown-item.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Hide upgrade option for pro/team users */
body[data-user-tier="pro"] .dropdown-item.upgrade,
body[data-user-tier="team"] .dropdown-item.upgrade,
body[data-user-tier="admin"] .dropdown-item.upgrade {
    display: none;
}

/* ===========================================
   NAVIGATION
   =========================================== */

.main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    z-index: 90;
}

.nav-scroll-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0 var(--space-md);
    height: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.nav-scroll-container::-webkit-scrollbar {
    display: none;
}

.nav-indicator {
    position: absolute;
    bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent-primary), var(--color-accent-secondary));
    border-radius: 3px 3px 0 0;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.nav-item {
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

.nav-item.active {
    background: var(--color-primary);
    color: white;
}

/* Teams Console Navigation Button */
.nav-item.teams-console-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-item.teams-console-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    color: white;
    transform: scale(1.02);
}

.nav-item.teams-console-btn .teams-icon {
    font-size: 1em;
}

/* Consolidated Navigation Bar */
.nav-tabs {
    display: flex;
    gap: var(--space-sm);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background: var(--color-border);
    margin: 0 var(--space-md);
    align-self: center;
}

/* Day navigation (compact) */
.day-nav-compact {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.day-nav-btn {
    padding: var(--space-xs);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-nav-btn:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

.day-nav-btn svg {
    width: 16px;
    height: 16px;
}

.day-label {
    padding: var(--space-xs) var(--space-md);
    background: #4F46E5 !important;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: white !important;
    min-width: 60px;
    text-align: center;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Day/Week/Month toggle - matches nav-item sizing */
.view-toggle {
    display: flex;
    gap: var(--space-sm);
}

.view-toggle .view-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.view-toggle .view-btn:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

.view-toggle .view-btn.active {
    background: var(--color-primary);
    color: white;
}

.week-nav-compact {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.week-nav-compact .week-nav-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.week-nav-compact .week-nav-btn:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

.week-nav-compact .week-nav-btn svg {
    width: 14px;
    height: 14px;
}

.week-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    min-width: 90px;
    text-align: center;
    color: var(--color-text-secondary);
}

/* ===========================================
   TWO-COLUMN BLUEPRINT LAYOUT
   =========================================== */

.blueprint-columns {
    display: grid;
    grid-template-columns: 60% 40%;
    gap: var(--space-lg);
    min-height: calc(100vh - 380px);
}

.blueprint-left {
    /* Timeline column */
}

.blueprint-right {
    padding: var(--space-md);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height) + var(--nav-height) + var(--space-md));
}

.promoted-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.promoted-header {
    font-family: var(--font-serif);
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.promoted-group {
    margin-bottom: var(--space-md);
}

.promoted-group-title {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.promoted-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.promoted-empty {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    text-align: center;
    padding: var(--space-lg);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
}

/* Promoted Card Styles */
.promoted-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: var(--transition-fast);
}

.promoted-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

.promoted-card .card-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.promoted-card .card-priority {
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

.promoted-card .card-priority.high { background: var(--color-priority-high); }
.promoted-card .card-priority.medium { background: var(--color-priority-medium); }
.promoted-card .card-priority.low { background: var(--color-priority-low); }

.promoted-card .card-icon {
    width: 20px;
    height: 20px;
    color: var(--color-brand-gold);
    flex-shrink: 0;
}

.promoted-card .card-icon svg {
    width: 100%;
    height: 100%;
}

.promoted-card .card-title {
    font-weight: 500;
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.promoted-card .card-meta {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.promoted-card .card-category,
.promoted-card .card-estimate {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    background: var(--color-bg-subtle);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.promoted-card .card-actions {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.promote-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.promote-btn svg {
    width: 14px;
    height: 14px;
}

.promote-btn.promote-to-strategic {
    border-color: var(--color-brand-gold);
    color: var(--color-brand-gold);
}

.promote-btn.promote-to-strategic:hover {
    background: rgba(184, 135, 47, 0.1);
}

/* Responsive Two-Column Layout */
@media (max-width: 1024px) {
    .blueprint-columns {
        grid-template-columns: 1fr;
    }

    .blueprint-right {
        position: static;
        order: -1;
        margin-bottom: var(--space-lg);
    }
}

/* ===========================================
   MAIN CONTENT
   =========================================== */

.app-main {
    margin-top: calc(var(--header-height) + var(--nav-height));
    min-height: calc(100vh - var(--header-height) - var(--nav-height));
    padding: var(--space-xs) var(--space-lg) var(--space-lg);
}

.view {
    display: none;
    animation: fadeIn var(--transition-base);
}

.view.active {
    display: block;
}

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

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

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

/* ===========================================
   SCHEDULE VIEW
   =========================================== */

/* Date Navigation */
.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.date-nav-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-subtle);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.date-nav-btn:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.date-nav-btn svg {
    width: 18px;
    height: 18px;
}

.date-display {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.calendar-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.calendar-toggle:hover {
    border-color: var(--color-focus);
    color: var(--color-focus);
}

.calendar-toggle svg {
    width: 20px;
    height: 20px;
}

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

.selected-date {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

.full-date {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.today-btn {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-power-hour);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.today-btn:hover {
    opacity: 0.9;
}

/* Calendar Popup */
.calendar-popup {
    position: absolute;
    top: calc(var(--header-height) + var(--nav-height) + 80px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    box-shadow: var(--shadow-xl);
    z-index: 50;
    display: none;
    min-width: 300px;
}

.calendar-popup.active {
    display: block;
    animation: fadeIn var(--transition-fast);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.cal-nav {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.cal-nav:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

.cal-nav svg {
    width: 16px;
    height: 16px;
}

.cal-month {
    font-weight: 600;
    font-size: var(--font-size-base);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: var(--space-sm);
}

.calendar-weekdays span {
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-tertiary);
    padding: var(--space-xs);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
}

.cal-day:hover {
    background: var(--color-bg-subtle);
}

.cal-day.other-month {
    color: var(--color-text-tertiary);
}

.cal-day.today {
    background: var(--color-focus-light);
    color: var(--color-focus);
    font-weight: 600;
}

.cal-day.selected {
    background: var(--color-power-hour);
    color: white;
}

.cal-day.has-entry::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 4px;
    height: 4px;
    background: var(--color-focus);
    border-radius: var(--radius-full);
}

.cal-day.has-journal::after {
    background: var(--color-success);
}

.calendar-footer {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.calendar-legend {
    display: flex;
    gap: var(--space-md);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.calendar-legend .dot {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
}

.calendar-legend .dot.has-entry {
    background: var(--color-focus);
}

.calendar-legend .dot.has-journal {
    background: var(--color-success);
}

/* Week Strip */
.week-strip {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    padding: var(--space-sm);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow-x: auto;
}

.week-day-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
    min-width: 60px;
}

.week-day-item:hover {
    background: var(--color-bg-subtle);
}

.week-day-item.active {
    background: var(--color-power-hour);
    color: white;
}

.week-day-name {
    font-size: var(--font-size-xs);
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0.7;
}

.week-day-num {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: var(--space-xs) 0;
}

.week-day-indicator {
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: transparent;
}

.week-day-indicator.has-data {
    background: var(--color-success);
}

.week-day-item.active .week-day-indicator.has-data {
    background: white;
}

.non-negotiables-section {
    margin-bottom: var(--space-xl);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: 500;
}

.limit-badge {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.non-negotiables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.nn-card {
    position: relative;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    transition: var(--transition-fast);
    overflow: hidden;
}

.nn-card.filled {
    border-color: var(--color-power-hour);
}

.nn-card.filled[data-priority="1"] {
    background: var(--color-power-hour-bg);
    color: white;
}

.nn-card.filled[data-priority="1"] .nn-input {
    color: white;
}

.nn-card.filled[data-priority="1"] .nn-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.nn-card.filled[data-priority="1"] .nn-time {
    color: rgba(255, 255, 255, 0.8);
}

.nn-card.filled[data-priority="1"] .nn-complete {
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
}

.nn-card.empty {
    border-style: dashed;
}

.nn-number {
    font-family: var(--font-serif);
    font-size: var(--font-size-2xl);
    font-weight: 600;
    opacity: 0.3;
    line-height: 1;
}

.nn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.nn-input {
    background: transparent;
    border: none;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--color-text-primary);
    width: 100%;
    outline: none;
}

.nn-input::placeholder {
    color: var(--color-text-tertiary);
}

/* Title and Description specific styles */
.nn-title {
    font-weight: 600;
    font-size: var(--font-size-base);
}

.nn-description {
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--color-text-secondary);
}

.nn-card.filled[data-priority="1"] .nn-description {
    color: rgba(255, 255, 255, 0.8);
}

/* Completed state */
.nn-card.completed .nn-title,
.nn-card.completed .nn-description {
    text-decoration: line-through;
    opacity: 0.6;
}

.nn-card.completed {
    background: var(--color-bg-subtle);
    border-color: var(--color-border-light);
}

.nn-card.completed .nn-complete {
    border-color: var(--color-success);
    color: var(--color-success);
    background: var(--color-recovery-light);
}

/* Carried over state */
.nn-card.carried-over {
    border-color: var(--color-warning);
}

.nn-carried-badge {
    font-size: var(--font-size-xs);
    color: var(--color-warning);
    padding: 2px 8px;
    background: rgba(197, 160, 89, 0.15);
    border-radius: var(--radius-sm);
    margin-top: var(--space-xs);
}

/* Non-Negotiable Status Colors */
.nn-card.status-pending {
    border-color: var(--color-stop);
    border-left-width: 4px;
}

.nn-card.status-pending .nn-number {
    color: var(--color-stop);
    opacity: 1;
}

.nn-card.status-in-progress {
    border-color: var(--color-success);
    border-left-width: 4px;
    background: rgba(129, 178, 154, 0.08);
}

.nn-card.status-in-progress .nn-number {
    color: var(--color-success);
    opacity: 1;
}

.nn-card.status-in-progress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-success);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.nn-card.status-completed {
    border-color: #3b82f6;
    border-left-width: 4px;
    background: rgba(59, 130, 246, 0.08);
}

.nn-card.status-completed .nn-number {
    color: #3b82f6;
    opacity: 1;
}

.nn-card.status-completed .nn-title,
.nn-card.status-completed .nn-description {
    text-decoration: line-through;
    opacity: 0.6;
}

.nn-card.status-completed .nn-complete {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

/* Start button for pending items */
.nn-start {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-success);
    background: transparent;
    color: var(--color-success);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.nn-start:hover {
    background: var(--color-success);
    color: white;
}

.nn-start svg {
    width: 14px;
    height: 14px;
}

/* Status badge */
.nn-status-badge {
    font-size: var(--font-size-xs);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.nn-status-badge.pending {
    color: var(--color-stop);
    background: rgba(232, 107, 106, 0.15);
}

.nn-status-badge.in-progress {
    color: var(--color-success);
    background: rgba(129, 178, 154, 0.15);
}

.nn-status-badge.completed {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
}

.nn-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nn-complete, .nn-add {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-border);
    background: transparent;
    color: var(--color-text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.nn-complete:hover, .nn-add:hover {
    border-color: var(--color-success);
    color: var(--color-success);
    background: var(--color-recovery-light);
}

.nn-complete svg, .nn-add svg {
    width: 16px;
    height: 16px;
}

/* Edit button on NN cards */
.nn-edit-btn {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 24px;
    height: 24px;
    border: none;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
    opacity: 0;
    transition: var(--transition-fast);
}

.nn-card:hover .nn-edit-btn,
.nn-card:focus-within .nn-edit-btn {
    opacity: 1;
}

.nn-edit-btn:hover {
    background: var(--color-focus);
    color: white;
}

.nn-edit-btn svg {
    width: 14px;
    height: 14px;
}

.nn-content {
    position: relative;
}

/* Schedule Timeline */
.schedule-container {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
}

/* ========================================
   Daily Calendar Grid (15-minute slots)
   ======================================== */

.daily-calendar {
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

/* Calendar Header */
.calendar-header-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.calendar-header-row .time-col-header,
.calendar-header-row .appointment-col-header {
    padding: var(--space-sm) var(--space-md);
    border-right: 1px solid rgba(255,255,255,0.2);
}

.calendar-header-row .appointment-col-header {
    border-right: none;
}

/* Calendar Body */
.calendar-body {
    display: flex;
    flex-direction: column;
    max-height: 600px;
    overflow-y: auto;
}

/* Time Row (15-minute slot) */
.time-row {
    display: grid;
    grid-template-columns: 70px 1fr;
    min-height: 28px;
    border-bottom: 1px solid var(--color-border-subtle);
}

/* Hour markers get stronger border */
.time-row.hour-start {
    border-bottom: 1px solid var(--color-border);
}

/* Time Cell (left column) */
.time-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 var(--space-sm);
    font-size: 11px;
    color: var(--color-text-tertiary);
    background: var(--color-bg-subtle);
    border-right: 1px solid var(--color-border);
}

/* Show all 15-minute time labels */
.time-row .time-cell {
    font-size: 11px;
    color: var(--color-text-secondary);
}

/* Hour markers slightly bolder */
.time-row.hour-start .time-cell {
    font-weight: 500;
    color: var(--color-text-primary);
}

/* Appointment Cell (right column) */
.appointment-cell {
    position: relative;
    padding: 2px var(--space-sm);
    background: var(--color-bg);
    cursor: pointer;
    transition: background 0.15s ease;
}

.appointment-cell:hover {
    background: var(--color-bg-subtle);
}

/* Scheduled block styling */
.appointment-cell.has-block {
    background: var(--color-primary-light, #f0f4ff);
}

.appointment-cell .block-content {
    font-size: var(--font-size-xs);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Multi-slot blocks span multiple rows */
.appointment-cell.block-start {
    border-left: 3px solid var(--color-primary);
    background: var(--color-primary-light, #e8f0fe);
}

.appointment-cell.block-continue {
    background: var(--color-primary-light, #e8f0fe);
    border-left: 3px solid var(--color-primary);
}

.appointment-cell.block-end {
    background: var(--color-primary-light, #e8f0fe);
    border-left: 3px solid var(--color-primary);
}

/* Current time indicator */
.time-row.current-time {
    position: relative;
}

.time-row.current-time::after {
    content: '';
    position: absolute;
    left: 70px;
    right: 0;
    top: 50%;
    height: 2px;
    background: #ef4444;
    z-index: 10;
}

.time-row.current-time .time-cell {
    color: #ef4444;
    font-weight: 600;
}

/* Category colors for blocks */
.appointment-cell.category-focus {
    border-left-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.appointment-cell.category-meeting {
    border-left-color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.appointment-cell.category-break {
    border-left-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.appointment-cell.category-admin {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Drag and Drop States - Daily Calendar */
.appointment-cell.drag-over {
    background: var(--color-primary-light, #e0e7ff);
    outline: 2px dashed var(--color-primary);
    outline-offset: -2px;
}

.appointment-cell.has-block[draggable="true"] {
    cursor: grab;
}

.appointment-cell.has-block[draggable="true"]:active {
    cursor: grabbing;
}

.appointment-cell.has-block.dragging {
    opacity: 0.5;
}

.appointment-cell .block-content {
    pointer-events: none;
}

/* Draggable block wrapper in calendar */
.calendar-block-draggable {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    width: 100%;
    height: 100%;
    cursor: grab;
}

.calendar-block-draggable:active {
    cursor: grabbing;
}

.calendar-block-draggable .drag-handle {
    color: var(--color-text-tertiary);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.appointment-cell.has-block:hover .drag-handle {
    opacity: 1;
}

.calendar-block-draggable .block-text {
    flex: 1;
    font-size: var(--font-size-xs);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Empty state for calendar */
.calendar-empty-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
    pointer-events: none;
}

/* Legacy support - hide old timeline if present */
.timeline-with-scale {
    display: none;
}

.schedule-timeline {
    display: none;
}

.time-block {
    position: relative;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    border-left: 4px solid var(--color-border);
    transition: var(--transition-fast);
}

.time-block:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.time-block.power-hour {
    background: var(--color-power-hour-bg);
    color: white;
    border-left-color: transparent;
}

.time-block.focus-block {
    border-left-color: var(--color-focus);
    background: var(--color-focus-light);
}

.time-block.recovery {
    border-left-color: var(--color-recovery);
    background: var(--color-recovery-light);
}

.time-block.email-batch {
    border-left-color: var(--color-batch-email);
}

.time-block.calls-batch {
    border-left-color: var(--color-batch-calls);
}

.time-block.meeting {
    border-left-color: var(--color-meeting);
}

/* Strategic card time blocks (due today from Kanban) */
.time-block.strategic {
    border-left-color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.time-block.strategic .block-label {
    color: #8b5cf6;
}

.time-block.strategic::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #8b5cf6;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Time Block Status Colors */
.time-block.past-due {
    border-left-color: var(--color-stop);
    border-left-width: 4px;
    background: rgba(232, 107, 106, 0.08);
    opacity: 0.8;
}

.time-block.past-due .block-label,
.time-block.past-due .block-time {
    color: var(--color-stop);
}

.time-block.current-block {
    border-left-color: var(--color-success);
    border-left-width: 4px;
    background: rgba(129, 178, 154, 0.15);
    box-shadow: 0 0 0 2px rgba(129, 178, 154, 0.3);
}

.time-block.current-block .block-label {
    color: var(--color-success);
}

.time-block.block-completed {
    border-left-color: #3b82f6;
    border-left-width: 4px;
    background: rgba(59, 130, 246, 0.08);
    opacity: 0.7;
}

.time-block.block-completed .block-label,
.time-block.block-completed .block-time {
    color: #3b82f6;
    text-decoration: line-through;
}

.time-block.block-completed .task-title {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Complete block button */
.complete-block-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-border);
    background: transparent;
    color: var(--color-text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.complete-block-btn:hover:not(:disabled) {
    border-color: var(--color-success);
    color: var(--color-success);
    background: var(--color-recovery-light);
}

.complete-block-btn:disabled {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.15);
    cursor: default;
}

.complete-block-btn svg {
    width: 14px;
    height: 14px;
}

.block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.block-label {
    font-size: var(--font-size-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.power-hour .block-label {
    color: rgba(255, 255, 255, 0.9);
}

.batch-label {
    color: var(--color-batch-email);
}

.calls-batch .batch-label {
    color: var(--color-batch-calls);
}

.block-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.power-hour .block-time {
    color: rgba(255, 255, 255, 0.7);
}

.block-task {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.task-title {
    font-weight: 500;
    flex: 1;
}

.task-tag {
    font-size: var(--font-size-xs);
    padding: 2px 8px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
}

.task-location {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.recovery-note {
    font-size: var(--font-size-xs);
    color: var(--color-recovery);
    font-style: italic;
}

.task-actions {
    display: flex;
    gap: var(--space-sm);
}

.start-timer {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: inherit;
    cursor: pointer;
    transition: var(--transition-fast);
}

.power-hour .start-timer:hover {
    background: rgba(255, 255, 255, 0.3);
}

.focus-block .start-timer {
    background: var(--color-focus);
    color: white;
}

.start-timer svg {
    width: 12px;
    height: 12px;
}

/* Time Block Edit/Delete Buttons */
.edit-block-btn,
.delete-block-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--color-text-secondary);
}

.edit-block-btn svg,
.delete-block-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

.edit-block-btn:hover {
    opacity: 1;
    background: var(--color-focus);
    color: white;
}

.delete-block-btn:hover {
    opacity: 1;
    background: var(--color-error);
    color: white;
}

/* Better visibility on focus-block */
.focus-block .edit-block-btn,
.focus-block .delete-block-btn {
    background: white;
    border-color: var(--color-focus);
    color: var(--color-focus);
}

.focus-block .edit-block-btn:hover {
    background: var(--color-focus);
    color: white;
}

.focus-block .delete-block-btn:hover {
    background: var(--color-error);
    border-color: var(--color-error);
    color: white;
}

.add-block-btn {
    width: 100%;
    padding: var(--space-md);
    margin-top: var(--space-md);
    background: transparent;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: var(--transition-fast);
}

.add-block-btn:hover {
    border-color: var(--color-focus);
    color: var(--color-focus);
    background: var(--color-focus-light);
}

.add-block-btn svg {
    width: 16px;
    height: 16px;
}

/* Architecture Warning */
.architecture-warning {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    margin-top: var(--space-lg);
    background: rgba(244, 162, 97, 0.1);
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-md);
    color: var(--color-warning);
}

.architecture-warning svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.architecture-warning span {
    flex: 1;
    font-size: var(--font-size-sm);
}

.fix-btn {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-warning);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.fix-btn:hover {
    opacity: 0.9;
}

/* ===========================================
   KANBAN VIEW
   =========================================== */

.quick-wins-tray {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.tray-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.tray-header h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
}

.tray-count {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.quick-wins-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.quick-win-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
}

.quick-win-item span {
    color: var(--color-text-secondary);
}

.crush-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-focus);
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.crush-btn:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.crush-btn svg {
    width: 12px;
    height: 12px;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    min-height: 500px;
}

.kanban-column {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
}

.kanban-column.focus-column {
    background: var(--color-focus-light);
    border: 2px solid var(--color-focus);
}

.kanban-column.stop-doing-column {
    background: var(--color-stop-light);
    border: 2px solid var(--color-stop);
}

.column-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.column-header h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    flex: 1;
}

.column-count {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.pareto-badge, .stop-badge {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
}

.pareto-badge {
    background: var(--color-focus);
    color: white;
}

.stop-badge {
    background: var(--color-stop);
    color: white;
}

.column-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    overflow-y: auto;
}

.kanban-card {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    cursor: grab;
    user-select: none;
    transition: var(--transition-fast);
}

.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.dragging {
    opacity: 0.5;
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
    cursor: grabbing;
}

.kanban-card.high-impact {
    border-left: 3px solid var(--color-high-impact);
}

.kanban-card.in-progress {
    border-left: 3px solid var(--color-focus);
}

.kanban-card.stopped {
    opacity: 0.7;
    border-left: 3px solid var(--color-stop);
}

.card-priority {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.card-priority.high {
    background: rgba(230, 57, 70, 0.1);
    color: var(--color-priority-high);
}

.card-priority.medium {
    background: rgba(244, 162, 97, 0.1);
    color: var(--color-priority-medium);
}

.card-priority.low {
    background: rgba(129, 178, 154, 0.1);
    color: var(--color-priority-low);
}

.kanban-card h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.card-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.card-tag {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.card-due {
    font-size: var(--font-size-xs);
    color: var(--color-warning);
    font-weight: 500;
}

.card-progress {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    display: block;
    width: var(--progress);
    height: 100%;
    background: var(--color-focus);
    border-radius: var(--radius-full);
}

.card-progress span {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.card-status {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-xs);
    color: var(--color-focus);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--color-focus);
    border-radius: var(--radius-full);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

.card-timer {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    font-weight: 600;
    font-family: monospace;
    color: var(--color-focus);
    margin-top: var(--space-sm);
}

.card-timer svg {
    width: 14px;
    height: 14px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

/* Kanban Card Edit/Delete Buttons */
.edit-card-btn,
.delete-card-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    opacity: 0.7;
}

.edit-card-btn svg,
.delete-card-btn svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.edit-card-btn:hover {
    opacity: 1;
    background: var(--color-focus);
    border-color: var(--color-focus);
}

.edit-card-btn:hover svg {
    stroke: white;
}

.delete-card-btn:hover {
    opacity: 1;
    background: var(--color-error);
    border-color: var(--color-error);
}

.delete-card-btn:hover svg {
    stroke: white;
}

/* Show buttons on card hover */
.kanban-card .card-actions {
    justify-content: flex-end;
}

.two-min-btn {
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.two-min-btn:hover {
    border-color: var(--color-focus);
    color: var(--color-focus);
}

.friction-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-warning);
    cursor: pointer;
    transition: var(--transition-fast);
}

.friction-btn:hover {
    background: rgba(244, 162, 97, 0.1);
    border-color: var(--color-warning);
}

.friction-btn svg {
    width: 14px;
    height: 14px;
}

.complete-btn {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-success);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.complete-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* Done button - more prominent styling */
.done-btn {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-success);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.done-btn:hover {
    background: #22c55e;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.stopped-reason {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-xs);
    color: var(--color-stop);
    margin-top: var(--space-sm);
}

.stopped-reason svg {
    width: 14px;
    height: 14px;
}

.add-card-btn {
    width: 100%;
    padding: var(--space-sm);
    margin-top: var(--space-sm);
    background: transparent;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.add-card-btn:hover {
    border-color: var(--color-focus);
    color: var(--color-focus);
}

.add-card-btn.stop-add:hover {
    border-color: var(--color-stop);
    color: var(--color-stop);
}

/* ===========================================
   JOURNAL VIEW
   =========================================== */

.journal-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
    padding: var(--space-xs);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    overflow-x: auto;
}

.journal-tab {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.journal-tab:hover {
    color: var(--color-text-primary);
}

.journal-tab.active {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

.journal-panel {
    display: none;
    animation: fadeIn var(--transition-base);
}

.journal-panel.active {
    display: block;
}

.journal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.journal-header h2 {
    font-family: var(--font-serif);
    font-size: var(--font-size-2xl);
    font-weight: 500;
}

.journal-time {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.wins-streak {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-success);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
}

.journal-prompts {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.prompt-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.prompt-card.gratitude {
    background: linear-gradient(135deg, rgba(129, 178, 154, 0.1) 0%, rgba(244, 162, 97, 0.1) 100%);
    border-color: var(--color-success);
}

.prompt-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.prompt-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-md);
}

.prompt-input {
    width: 100%;
    min-height: 100px;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    resize: vertical;
    transition: var(--transition-fast);
}

.prompt-input:focus {
    outline: none;
    border-color: var(--color-focus);
}

.celebration-input {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
}

.celebration-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-warning);
    border-radius: var(--radius-full);
    color: white;
}

.celebration-icon svg {
    width: 20px;
    height: 20px;
}

.celebration-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    outline: none;
}

.add-friction-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--color-warning);
    cursor: pointer;
    transition: var(--transition-fast);
}

.add-friction-btn:hover {
    background: rgba(244, 162, 97, 0.1);
}

.add-friction-btn svg {
    width: 12px;
    height: 12px;
}

.save-entry-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    margin-top: var(--space-lg);
    background: var(--color-power-hour);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.save-entry-btn:hover {
    opacity: 0.9;
}

.save-entry-btn svg {
    width: 18px;
    height: 18px;
}

/* Wins Carousel */
.wins-carousel {
    position: relative;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--color-border);
    min-height: 200px;
}

.win-slide {
    display: none;
    text-align: center;
    animation: fadeIn var(--transition-base);
}

.win-slide.active {
    display: block;
}

.win-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.win-slide h3 {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: 500;
    margin: var(--space-md) 0;
}

.win-impact {
    font-size: var(--font-size-sm);
    color: var(--color-success);
    font-weight: 500;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.carousel-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-subtle);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.carousel-btn svg {
    width: 18px;
    height: 18px;
}

.carousel-dots {
    display: flex;
    gap: var(--space-sm);
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--color-border);
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.dot.active {
    background: var(--color-power-hour);
    width: 24px;
}

/* Wins Summary */
.wins-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.summary-stat {
    text-align: center;
    padding: var(--space-lg);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.stat-number {
    display: block;
    font-family: var(--font-serif);
    font-size: var(--font-size-3xl);
    font-weight: 600;
    color: var(--color-power-hour);
}

.stat-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Friction Heatmap */
.friction-heatmap {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.friction-heatmap h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.heatmap-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.heatmap-day {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.day-label {
    width: 40px;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.heat-blocks {
    display: flex;
    gap: 4px;
    flex: 1;
}

.heat-block {
    flex: 1;
    height: 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.heat-block:hover {
    transform: scale(1.1);
}

.heat-block.low {
    background: var(--color-recovery);
}

.heat-block.medium {
    background: var(--color-warning);
}

.heat-block.high {
    background: var(--color-stop);
}

.heatmap-legend {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.heatmap-legend span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.legend-block {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.legend-block.low { background: var(--color-recovery); }
.legend-block.medium { background: var(--color-warning); }
.legend-block.high { background: var(--color-stop); }

/* Task Audit */
.task-audit {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.task-audit h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.audit-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.audit-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

.audit-task {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.audit-rank {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-power-hour);
    color: white;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.audit-name {
    flex: 1;
    font-weight: 500;
}

.audit-time {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.audit-actions {
    display: flex;
    gap: var(--space-sm);
}

.audit-btn {
    flex: 1;
    padding: var(--space-sm);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.audit-btn:hover {
    background: var(--color-bg-subtle);
}

.audit-btn.keep:hover, .audit-btn.keep.active {
    border-color: var(--color-success);
    color: var(--color-success);
    background: var(--color-recovery-light);
}

.audit-btn.delegate:hover, .audit-btn.delegate.active {
    border-color: var(--color-warning);
    color: var(--color-warning);
    background: rgba(244, 162, 97, 0.1);
}

.audit-btn.delete:hover, .audit-btn.delete.active {
    border-color: var(--color-stop);
    color: var(--color-stop);
    background: var(--color-stop-light);
}

/* Architecture Canvas */
.architecture-canvas {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.architecture-canvas h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.canvas-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-lg);
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-md);
}

.week-day {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.week-day-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.week-nn {
    padding: var(--space-sm);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    transition: var(--transition-fast);
}

.week-nn:focus {
    outline: none;
    border-color: var(--color-focus);
}

.complete-review-btn {
    width: 100%;
    padding: var(--space-md);
    background: var(--color-success);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.complete-review-btn:hover {
    opacity: 0.9;
}

/* Playbook Panel */
.playbook-count {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.playbook-search {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
}

.playbook-search svg {
    width: 18px;
    height: 18px;
    color: var(--color-text-tertiary);
}

.playbook-search input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    outline: none;
}

.playbook-entries {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.playbook-entry {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    transition: var(--transition-fast);
}

.playbook-entry:hover {
    border-color: var(--color-focus);
    box-shadow: var(--shadow-md);
}

.entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.entry-header h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
}

.entry-tag {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.entry-tag.strategy {
    background: var(--color-focus-light);
    color: var(--color-focus);
}

.entry-origin {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-md);
}

.entry-content {
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.entry-content p {
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.entry-meta {
    display: flex;
    gap: var(--space-lg);
}

.friction-reduced, .time-saved {
    font-size: var(--font-size-xs);
    color: var(--color-success);
    font-weight: 500;
}

.add-playbook-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    margin-top: var(--space-lg);
    background: transparent;
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.add-playbook-btn:hover {
    border-color: var(--color-focus);
    color: var(--color-focus);
}

.add-playbook-btn svg {
    width: 16px;
    height: 16px;
}

/* ===========================================
   ARCHIVE & SEARCH PANEL
   =========================================== */

.archive-count {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.archive-search {
    margin-bottom: var(--space-lg);
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-md);
    transition: var(--transition-fast);
}

.search-input-wrapper:focus-within {
    border-color: var(--color-focus);
}

.search-input-wrapper svg {
    width: 20px;
    height: 20px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    outline: none;
}

.clear-search {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-subtle);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.clear-search:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.clear-search svg {
    width: 14px;
    height: 14px;
}

.search-filters {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.filter-btn {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    border-color: var(--color-focus);
    color: var(--color-focus);
}

.filter-btn.active {
    background: var(--color-focus);
    border-color: var(--color-focus);
    color: white;
}

.date-range-filter {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
}

.date-range-filter label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
}

.date-range-filter select {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    cursor: pointer;
}

.custom-date-range {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.custom-date-range input {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
}

.custom-date-range span {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.search-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-focus-light);
    border: 1px solid var(--color-focus);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.results-count {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.results-count strong {
    color: var(--color-focus);
}

.export-results-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-focus);
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.export-results-btn:hover {
    opacity: 0.9;
}

.export-results-btn svg {
    width: 14px;
    height: 14px;
}

/* Journal Timeline */
.journal-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.timeline-group {
    position: relative;
}

.timeline-date {
    display: flex;
    align-items: baseline;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border);
}

.timeline-day {
    font-family: var(--font-serif);
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.timeline-full {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.timeline-entries {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding-left: var(--space-md);
    border-left: 2px solid var(--color-border);
    margin-left: var(--space-sm);
}

.archive-entry {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    position: relative;
    transition: var(--transition-fast);
}

.archive-entry:hover {
    border-color: var(--color-focus);
    box-shadow: var(--shadow-sm);
}

.archive-entry::before {
    content: '';
    position: absolute;
    left: calc(-1 * var(--space-md) - 7px);
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-full);
}

.archive-entry[data-type="wins"]::before {
    border-color: var(--color-success);
    background: var(--color-recovery-light);
}

.archive-entry[data-type="friction"]::before {
    border-color: var(--color-warning);
    background: rgba(244, 162, 97, 0.1);
}

.archive-entry[data-type="reflection"]::before {
    border-color: var(--color-focus);
    background: var(--color-focus-light);
}

.archive-entry[data-type="tasks"]::before {
    border-color: var(--color-power-hour);
    background: var(--color-bg-subtle);
}

.entry-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    min-width: 60px;
    flex-shrink: 0;
}

.entry-body {
    flex: 1;
}

.entry-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.entry-type-badge.wins {
    background: var(--color-recovery-light);
    color: var(--color-success);
}

.entry-type-badge.friction {
    background: rgba(244, 162, 97, 0.1);
    color: var(--color-warning);
}

.entry-type-badge.reflection {
    background: var(--color-focus-light);
    color: var(--color-focus);
}

.entry-type-badge.tasks {
    background: var(--color-bg-subtle);
    color: var(--color-power-hour);
}

.entry-question {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    font-style: italic;
    margin-bottom: var(--space-xs);
}

.entry-text {
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin-bottom: var(--space-sm);
}

.entry-text.highlight {
    font-weight: 600;
    color: var(--color-text-primary);
}

.entry-impact {
    font-size: var(--font-size-xs);
    color: var(--color-success);
    font-weight: 500;
}

.entry-tags {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.entry-tag {
    font-size: var(--font-size-xs);
    color: var(--color-focus);
    background: var(--color-focus-light);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.entry-meta-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.time-spent {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.friction-level {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

.friction-level.low {
    color: var(--color-success);
}

.friction-level.medium {
    color: var(--color-warning);
}

.friction-level.high {
    color: var(--color-stop);
}

.friction-score {
    font-size: var(--font-size-xs);
    color: var(--color-warning);
    font-weight: 500;
}

.convert-to-sop-btn {
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    border: 1px solid var(--color-focus);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    color: var(--color-focus);
    cursor: pointer;
    transition: var(--transition-fast);
}

.convert-to-sop-btn:hover {
    background: var(--color-focus);
    color: white;
}

.entry-menu-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.entry-menu-btn:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

.entry-menu-btn svg {
    width: 16px;
    height: 16px;
}

.load-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.load-more-btn:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.load-more-btn svg {
    width: 16px;
    height: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--color-text-tertiary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: var(--font-size-lg);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.empty-state p {
    font-size: var(--font-size-sm);
}

/* Search Highlighting */
.search-highlight {
    background: rgba(244, 162, 97, 0.3);
    padding: 0 2px;
    border-radius: 2px;
}

/* ===========================================
   IDEAS VIEW
   =========================================== */

.ideas-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.ideas-title-section {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.ideas-title-section h2 {
    font-family: var(--font-serif);
    font-size: var(--font-size-2xl);
    font-weight: 500;
}

.ideas-count {
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.ideas-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.add-idea-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-weight: 500;
}

.add-idea-btn svg {
    width: 16px;
    height: 16px;
}

.ideas-search {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
}

.ideas-search svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-tertiary);
}

.ideas-search input {
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    outline: none;
    width: 150px;
}

.ideas-view-toggle {
    display: flex;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    padding: 2px;
}

.view-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.view-btn.active {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
    box-shadow: var(--shadow-sm);
}

.view-btn svg {
    width: 18px;
    height: 18px;
}

/* Quick Capture */
.quick-capture {
    margin-bottom: var(--space-lg);
}

.capture-input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.capture-input-wrapper:focus-within {
    border-color: var(--color-warning);
    box-shadow: 0 0 0 4px rgba(244, 162, 97, 0.1);
}

.capture-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-warning) 0%, #E07A5F 100%);
    border-radius: var(--radius-full);
    color: white;
    flex-shrink: 0;
}

.capture-icon svg {
    width: 20px;
    height: 20px;
}

.capture-input-wrapper input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    outline: none;
}

.capture-input-wrapper select {
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    cursor: pointer;
}

.capture-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-power-hour);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.capture-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.capture-btn svg {
    width: 20px;
    height: 20px;
}

/* Idea Filters */
.idea-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    padding-bottom: var(--space-xs);
}

.idea-filter-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.idea-filter-btn:hover {
    border-color: var(--color-text-tertiary);
}

.idea-filter-btn.active {
    background: var(--color-power-hour);
    border-color: var(--color-power-hour);
    color: white;
}

.idea-filter-btn svg {
    width: 14px;
    height: 14px;
}

.filter-icon {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-full);
}

.filter-icon.all { background: var(--color-text-tertiary); }
.filter-icon.project { background: var(--color-brand-slate); }
.filter-icon.feature { background: #10B981; }
.filter-icon.improvement { background: #F59E0B; }
.filter-icon.someday { background: var(--color-brand-gold); }

/* Ideas Grid */
.ideas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-md);
}

.ideas-grid.list-view {
    grid-template-columns: 1fr;
}

.ideas-grid.list-view .idea-card {
    flex-direction: row;
    gap: var(--space-lg);
}

.ideas-grid.list-view .idea-card-header {
    flex-direction: column;
    align-items: flex-start;
}

/* Idea Card */
.idea-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
    position: relative;
}

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

.idea-card.starred {
    border-color: var(--color-warning);
    background: linear-gradient(135deg, rgba(244, 162, 97, 0.05) 0%, transparent 100%);
}

.idea-card.starred::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-warning) 0%, #E07A5F 100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.idea-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.idea-category {
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.idea-category.general {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
}

.idea-category.project {
    background: rgba(15, 23, 42, 0.1);
    color: var(--color-brand-slate);
}

.idea-category.feature {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.idea-category.improvement {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.idea-category.someday {
    background: rgba(197, 160, 89, 0.1);
    color: var(--color-brand-gold);
}

.star-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
}

.star-btn:hover {
    color: var(--color-warning);
    background: rgba(244, 162, 97, 0.1);
}

.star-btn.active {
    color: var(--color-warning);
}

.star-btn.active svg {
    fill: var(--color-warning);
}

.star-btn svg {
    width: 16px;
    height: 16px;
}

.idea-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.idea-description {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    flex: 1;
}

.idea-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    margin-bottom: var(--space-md);
}

.idea-tag {
    font-size: var(--font-size-xs);
    color: var(--color-focus);
    background: var(--color-focus-light);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.idea-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
}

.idea-date {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.idea-actions {
    display: flex;
    gap: var(--space-xs);
}

.idea-action-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.idea-action-btn:hover {
    border-color: var(--color-focus);
    color: var(--color-focus);
    background: var(--color-focus-light);
}

.idea-action-btn.delete:hover {
    border-color: var(--color-stop);
    color: var(--color-stop);
    background: var(--color-stop-light);
}

.idea-action-btn svg {
    width: 14px;
    height: 14px;
}

/* Ideas Empty State */
.ideas-empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--color-text-tertiary);
}

.ideas-empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-md);
    opacity: 0.3;
    color: var(--color-warning);
}

.ideas-empty-state h3 {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.ideas-empty-state p {
    font-size: var(--font-size-sm);
}

/* ===========================================
   MODALS
   =========================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    z-index: 1000;
    animation: fadeIn var(--transition-fast);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 400px;
    width: 100%;
    position: relative;
    animation: slideUp var(--transition-base);
}

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

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: var(--font-size-xl);
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: fadeIn var(--transition-fast);
}

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

/* Quick Modal (Add as Win prompt) */
.quick-modal {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    max-width: 380px;
    width: 90%;
    animation: slideUp var(--transition-base);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.quick-modal-content {
    padding: var(--space-xl);
    text-align: center;
}

.quick-modal-content h3 {
    margin: 0 0 var(--space-md) 0;
    font-size: var(--font-size-lg);
    color: var(--color-text-primary);
}

.win-preview {
    font-style: italic;
    color: var(--color-text-secondary);
    margin: var(--space-md) 0 var(--space-lg) 0;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
}

.quick-modal-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

.quick-modal-actions .btn {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
}

.quick-modal-actions .btn-secondary {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.quick-modal-actions .btn-secondary:hover {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}

.quick-modal-actions .btn-primary {
    background: var(--color-success);
    color: white;
    border: none;
}

.quick-modal-actions .btn-primary:hover {
    background: var(--color-success-dark, #059669);
}

/* Edit Modals (NN, Card, Idea) */
.edit-modal {
    background: var(--color-bg-elevated, #FFFFFF);
    border-radius: var(--radius-xl, 16px);
    max-width: 480px;
    width: 90%;
    min-width: 300px;
    min-height: 200px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    opacity: 1 !important;
    transform: translateY(0) !important;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Dark mode specific */
[data-theme="dark"] .edit-modal,
.dark .edit-modal {
    background: #1E1E1E;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
}

.modal-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.form-input,
.form-select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-base);
    color: var(--color-text-primary);
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-focus);
    box-shadow: 0 0 0 3px rgba(var(--color-focus-rgb, 100, 149, 237), 0.2);
}

.form-input::placeholder {
    color: var(--color-text-tertiary);
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border-light);
    gap: var(--space-md);
}

.modal-actions-right {
    display: flex;
    gap: var(--space-sm);
    margin-left: auto;
}

.btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    border: none;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-elevated);
}

.btn-danger {
    background: var(--color-stop);
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

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

.btn-warning:hover {
    background: #b8860b;
}

.btn-accent {
    background: var(--color-success);
    color: white;
}

.btn-accent:hover {
    background: var(--color-success-dark, #059669);
}

.btn svg {
    width: 16px;
    height: 16px;
}

/* Status indicator in modal */
.nn-status-display {
    padding-top: var(--space-sm);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.status-dot.pending { background: var(--color-stop); }
.status-dot.in-progress { background: var(--color-success); }
.status-dot.completed { background: #3b82f6; }

.status-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* Idea promote section */
.idea-promote-section {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: rgba(129, 178, 154, 0.1);
    border-radius: var(--radius-md);
    text-align: center;
}

.promote-hint {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

/* Timer Modal */
.timer-display {
    text-align: center;
    padding: var(--space-xl) 0;
}

.timer-display span {
    font-family: var(--font-serif);
    font-size: 4rem;
    font-weight: 600;
    color: var(--color-power-hour);
}

.timer-separator {
    animation: blink 1s infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.timer-message {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

.timer-controls {
    display: flex;
    gap: var(--space-sm);
}

.timer-btn {
    flex: 1;
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.timer-btn.start {
    background: var(--color-success);
    color: white;
}

.timer-btn.pause {
    background: var(--color-warning);
    color: white;
}

.timer-btn.quit {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
}

.timer-btn:hover {
    opacity: 0.9;
}

/* Warning Modal */
.warning-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-stop-light);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-lg);
}

.warning-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-stop);
}

.warning-modal h3 {
    text-align: center;
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.warning-modal p {
    text-align: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.warning-question {
    margin-top: var(--space-md);
    font-weight: 500;
    color: var(--color-text-primary) !important;
}

.warning-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
}

.warning-btn {
    flex: 1;
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.warning-btn.proceed {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
}

.warning-btn.protect {
    background: var(--color-success);
    color: white;
}

/* Two Minute Modal */
.two-min-display {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto var(--space-lg);
}

.progress-ring {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring-bg {
    fill: none;
    stroke: var(--color-border);
    stroke-width: 4;
}

.progress-ring-fill {
    fill: none;
    stroke: var(--color-focus);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.two-min-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-size: var(--font-size-2xl);
    font-weight: 600;
}

.two-min-task {
    text-align: center;
    font-size: var(--font-size-base);
    margin-bottom: var(--space-lg);
}

.two-min-controls {
    display: flex;
    gap: var(--space-sm);
}

.two-min-btn-action {
    flex: 1;
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.two-min-btn-action.done {
    background: var(--color-success);
    color: white;
}

.two-min-btn-action.not-done {
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
}

/* Focus Overlay (Circuit Breaker) */
.focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-power-hour);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn var(--transition-base);
}

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

.focus-content {
    text-align: center;
    color: white;
    padding: var(--space-xl);
    max-width: 500px;
}

.focus-content h2 {
    font-family: var(--font-serif);
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-sm);
}

.focus-subtitle {
    font-size: var(--font-size-base);
    opacity: 0.7;
    margin-bottom: var(--space-2xl);
}

.focus-task {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.focus-label {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.7;
}

.focus-task h3 {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    margin-top: var(--space-sm);
}

.focus-timer {
    margin-bottom: var(--space-xl);
}

.focus-timer span {
    font-family: monospace;
    font-size: var(--font-size-3xl);
    opacity: 0.5;
}

.exit-focus {
    padding: var(--space-md) var(--space-xl);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.exit-focus:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===========================================
   RESPONSIVE - TABLET
   =========================================== */

@media (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .week-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .non-negotiables-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nn-card[data-priority="3"] {
        grid-column: span 2;
    }
}

/* ===========================================
   RESPONSIVE - MOBILE
   =========================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --nav-height: 56px;
    }

    .app-header {
        padding: 0 var(--space-sm);
    }

    .menu-toggle {
        display: flex;
    }

    .header-center {
        display: none;
    }

    .no-counter {
        display: none;
    }

    .main-nav {
        position: fixed;
        bottom: 0;
        top: auto;
        height: var(--nav-height);
        border-top: 1px solid var(--color-border);
        border-bottom: none;
        padding: 0;
        background: var(--color-bg-elevated);
    }

    .nav-scroll-container {
        justify-content: space-around;
        padding: 0 var(--space-xs);
    }

    .nav-indicator {
        display: none;
    }

    .app-main {
        margin-top: var(--header-height);
        margin-bottom: var(--nav-height);
        padding: var(--space-xs) var(--space-md) var(--space-md);
    }

    body[data-user-tier="free"] .app-main {
        margin-top: calc(var(--header-height) + 40px);
    }

    .nav-item {
        flex: 1;
        padding: var(--space-sm);
        border-radius: var(--radius-md);
        font-size: var(--font-size-xs);
    }

    .day-nav-compact {
        gap: 2px;
    }

    .day-label {
        min-width: 50px;
        padding: var(--space-xs) var(--space-sm);
        font-size: 10px;
    }

    .day-nav-btn svg {
        width: 14px;
        height: 14px;
    }

    /* Promotional Banner Mobile */
    .promo-content {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
        text-align: center;
    }

    .promo-left {
        align-items: center;
    }

    .promo-headline {
        font-size: var(--font-size-base);
    }

    .promo-subtext {
        font-size: 10px;
        display: none;
    }

    .promo-center {
        display: none;
    }

    .promo-right {
        justify-content: center;
    }

    .promo-cta-content {
        align-items: center;
        flex-direction: row;
        gap: var(--space-md);
    }

    .promo-tagline {
        display: none;
    }

    .promo-cta-btn {
        padding: 8px 16px;
    }

    .cta-main {
        font-size: var(--font-size-xs);
    }

    .cta-sub {
        display: none;
    }

    .promo-close {
        top: var(--space-xs);
        right: var(--space-xs);
        transform: none;
    }

    /* Schedule View Mobile */
    .non-negotiables-grid {
        grid-template-columns: 1fr;
    }

    .nn-card[data-priority="3"] {
        grid-column: auto;
    }

    .nn-card {
        padding: var(--space-md);
    }

    .nn-number {
        font-size: var(--font-size-xl);
    }

    /* Kanban Mobile */
    .quick-wins-list {
        flex-direction: column;
    }

    .quick-win-item {
        justify-content: space-between;
    }

    .kanban-board {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .kanban-column {
        min-height: auto;
    }

    /* Journal Mobile */
    .journal-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .journal-tab {
        padding: var(--space-sm) var(--space-md);
    }

    .wins-summary {
        grid-template-columns: 1fr;
    }

    .week-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .heatmap-legend {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    .audit-actions {
        flex-wrap: wrap;
    }

    .audit-btn {
        flex: none;
        width: calc(33.333% - var(--space-xs));
    }

    /* Modals Mobile */
    .modal-content {
        margin: var(--space-md);
        padding: var(--space-lg);
    }

    .timer-display span {
        font-size: 3rem;
    }

    .warning-actions, .timer-controls, .two-min-controls {
        flex-direction: column;
    }
}

/* ===========================================
   RESPONSIVE - SMALL MOBILE
   =========================================== */

@media (max-width: 375px) {
    .app-logo {
        font-size: var(--font-size-lg);
    }

    .panic-button {
        width: 32px;
        height: 32px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: var(--font-size-xs);
    }

    .section-header h2 {
        font-size: var(--font-size-lg);
    }

    .journal-header h2 {
        font-size: var(--font-size-xl);
    }

    .entry-meta {
        flex-direction: column;
        gap: var(--space-xs);
    }
}

/* ===========================================
   PRINT STYLES
   =========================================== */

@media print {
    .app-header,
    .main-nav,
    .panic-button,
    .add-block-btn,
    .add-card-btn,
    .add-playbook-btn,
    .timer-controls,
    .modal {
        display: none !important;
    }

    .app-main {
        margin: 0;
        padding: var(--space-md);
    }

    .view {
        display: block !important;
        page-break-after: always;
    }
}

/* ===========================================
   ACCESSIBILITY
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-focus);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-power-hour);
    color: white;
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --color-border: #000;
        --color-text-secondary: #333;
        --color-text-tertiary: #666;
    }
}

/* ===========================================
   FREEMIUM & ADSENSE STYLES
   =========================================== */

/* Hide ads for premium users */
body[data-user-tier="premium"] .ad-container,
body[data-user-tier="premium"] .ad-sidebar,
body[data-user-tier="premium"] .upgrade-banner {
    display: none !important;
}

/* Upgrade Banner - Fixed at bottom */
.upgrade-banner {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark, #1a1a2e) 100%);
    color: white;
    padding: var(--space-sm) var(--space-md);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1001;
}

/* Add body padding to prevent content from being hidden behind bottom banner */
body[data-user-tier="free"] {
    padding-bottom: 50px;
}

/* Header no longer needs offset since banner is at bottom */
body[data-user-tier="free"] .app-header {
    top: 0;
}

/* Main nav no longer needs offset since banner is at bottom */
body[data-user-tier="free"] .main-nav {
    top: var(--header-height);
}

/* App main no longer needs extra offset since banner is at bottom */
body[data-user-tier="free"] .app-main {
    padding-top: var(--space-xs);
    margin-top: calc(var(--header-height) + var(--nav-height));
}

.upgrade-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.upgrade-text {
    font-size: var(--font-size-sm);
}

.upgrade-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.upgrade-btn {
    background: white;
    color: var(--color-primary);
    border: none;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.upgrade-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.upgrade-dismiss {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: 0 var(--space-xs);
    line-height: 1;
}

.upgrade-dismiss:hover {
    color: white;
}

/* Ad Containers */
.ad-container {
    background: var(--color-bg-secondary);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: var(--space-md) auto;
    max-width: 100%;
}

.ad-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-tertiary);
    text-align: center;
}

.ad-unit {
    position: relative;
    min-height: 90px;
}

/* Hide actual AdSense unit in demo, show placeholder */
.ad-unit .adsbygoogle {
    display: none;
}

/* Ad Placeholders (for demo) */
.ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 90px;
    gap: var(--space-xs);
}

.ad-placeholder-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.ad-placeholder-cta {
    font-size: var(--font-size-xs);
    color: var(--color-power-hour);
    cursor: pointer;
}

.ad-placeholder-cta:hover {
    text-decoration: underline;
}

/* Banner Ad (Leaderboard) */
.ad-banner {
    max-width: 728px;
}

.ad-leaderboard {
    min-height: 90px;
}

/* Premium Promotional Banner - Below Navigation */
.ad-top-banner {
    position: fixed;
    top: calc(var(--header-height) + var(--nav-height));
    left: 0;
    right: 0;
    z-index: 85;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f0f1a 100%);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding: 0;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

.promo-banner {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-lg);
}

.promo-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(197, 160, 89, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.promo-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: var(--space-lg);
    align-items: center;
    position: relative;
    z-index: 1;
}

.promo-left {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.promo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.15em;
    color: #fbbf24;
    text-transform: uppercase;
}

.promo-badge::before {
    content: '★';
    font-size: 10px;
}

.promo-headline {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.promo-subtext {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
}

.promo-subtext strong {
    color: #f87171;
    font-weight: 600;
}

.promo-center {
    display: flex;
    justify-content: center;
}

.promo-solution {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.promo-solution-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: #34d399;
    text-transform: uppercase;
    background: rgba(52, 211, 153, 0.1);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.promo-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
}

.promo-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

.feature-icon {
    font-size: 12px;
}

.promo-right {
    display: flex;
    justify-content: flex-end;
}

.promo-cta-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-xs);
}

.promo-tagline {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.promo-cta-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #c5a059 0%, #d4b76a 50%, #e5c97a 100%);
    color: var(--color-brand-slate);
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(197, 160, 89, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    font-weight: 600;
}

.promo-cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.promo-cta-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow:
        0 6px 20px rgba(197, 160, 89, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.cta-main {
    font-size: var(--font-size-sm);
    font-weight: 700;
}

.cta-sub {
    font-size: 9px;
    opacity: 0.8;
    font-weight: 500;
}

.promo-close {
    position: absolute;
    top: 50%;
    right: var(--space-sm);
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.promo-close svg {
    width: 12px;
    height: 12px;
    stroke: rgba(255, 255, 255, 0.5);
}

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

.promo-close:hover svg {
    stroke: white;
}

/* Inline Promo Banner (In-Feed Upsell) */
.promo-banner-inline {
    background: linear-gradient(135deg, var(--color-brand-slate) 0%, #1e293b 100%);
    border: 1px solid var(--color-brand-gold);
    border-radius: var(--radius-lg);
    margin: var(--space-lg) 0;
    overflow: hidden;
    position: relative;
}

.promo-banner-inline::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(197, 160, 89, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(197, 160, 89, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.promo-banner-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    position: relative;
    z-index: 1;
}

.promo-banner-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, #d4b76a 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.promo-banner-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-brand-slate);
    stroke-width: 2.5;
}

.promo-banner-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.promo-banner-text strong {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: white;
}

.promo-banner-text span {
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

.promo-banner-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.promo-code-badge {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    background: rgba(197, 160, 89, 0.15);
    border: 1px solid rgba(197, 160, 89, 0.3);
    padding: 6px 12px;
    border-radius: var(--radius-full);
}

.promo-code-badge strong {
    color: var(--color-brand-gold);
    font-weight: 700;
}

.promo-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, #d4b76a 100%);
    color: var(--color-brand-slate);
    font-size: var(--font-size-sm);
    font-weight: 700;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
    position: relative;
    overflow: hidden;
}

.promo-upgrade-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

.promo-upgrade-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(197, 160, 89, 0.4);
}

/* Hide inline promo for premium users */
body[data-user-tier="premium"] .promo-banner-inline {
    display: none !important;
}

/* Responsive inline promo */
@media (max-width: 768px) {
    .promo-banner-content {
        flex-direction: column;
        text-align: center;
        padding: var(--space-md);
    }

    .promo-banner-text {
        align-items: center;
    }

    .promo-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .promo-upgrade-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Hide ad banner for premium users */
body[data-user-tier="premium"] .ad-top-banner {
    display: none !important;
}

/* Native In-Feed Ad */
.ad-native {
    background: transparent;
    border: none;
    margin: var(--space-lg) 0;
}

.ad-native-card {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-fast);
}

.ad-native-card:hover {
    box-shadow: var(--shadow-md);
}

.ad-native-badge {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-tertiary);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-tertiary);
}

.ad-native-content {
    padding: 0;
}

.ad-placeholder.native {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.05) 0%, rgba(212, 183, 106, 0.05) 100%);
}

.ad-native-placeholder-content {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.ad-native-icon {
    font-size: 2rem;
}

.ad-native-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.ad-native-text strong {
    color: var(--color-text-primary);
}

.ad-native-text span {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.ad-native-cta {
    background: var(--color-power-hour);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ad-native-cta:hover {
    background: var(--color-brand-gold);
}

/* Sidebar Ad */
.ad-sidebar {
    position: fixed;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    z-index: 100;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ad-sidebar .ad-label {
    font-size: 9px;
}

.ad-rectangle {
    min-height: 250px;
}

.ad-placeholder.sidebar {
    min-height: 250px;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

.ad-upgrade-btn {
    margin-top: var(--space-sm);
    background: var(--color-power-hour);
    color: white;
    border: none;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.ad-upgrade-btn:hover {
    background: var(--color-brand-gold);
    transform: scale(1.05);
}

/* Premium Modal */
.premium-modal .modal-content {
    max-width: 480px;
}

.premium-content {
    padding: 0 !important;
    overflow: hidden;
}

.premium-header {
    background: linear-gradient(135deg, var(--color-power-hour) 0%, var(--color-brand-gold) 100%);
    color: white;
    padding: var(--space-xl);
    text-align: center;
}

.premium-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-md);
}

.premium-header h2 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-xs);
}

.premium-header p {
    opacity: 0.9;
    font-size: var(--font-size-sm);
}

.premium-features {
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.premium-feature {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
}

.premium-feature .feature-icon {
    color: var(--color-success);
    font-weight: 700;
}

.premium-feature span {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.premium-feature strong {
    color: var(--color-text-primary);
}

.premium-pricing {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
    padding: 0 var(--space-lg);
    margin-bottom: var(--space-lg);
}

.price-option {
    position: relative;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.price-option:hover {
    border-color: var(--color-power-hour);
}

.price-option.selected {
    border-color: var(--color-power-hour);
    background: rgba(197, 160, 89, 0.05);
}

.price-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-success);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.price-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xs);
}

.price-amount {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-text-primary);
}

.price-amount span {
    font-size: var(--font-size-sm);
    font-weight: 400;
    color: var(--color-text-secondary);
}

.price-billed {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-xs);
}

.premium-cta {
    display: block;
    width: calc(100% - var(--space-xl) * 2);
    margin: 0 auto var(--space-md);
    background: linear-gradient(135deg, var(--color-power-hour) 0%, var(--color-brand-gold) 100%);
    color: white;
    border: none;
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.premium-cta:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(197, 160, 89, 0.3);
}

.premium-guarantee {
    text-align: center;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    padding-bottom: var(--space-lg);
}

/* ========================================
   Founder Window Modal
   ======================================== */
.founder-window-modal .modal-content {
    max-width: 440px;
}

.founder-window-content {
    padding: 0 !important;
    overflow: hidden;
    text-align: center;
}

.founder-badge-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.founder-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--color-text-primary);
    margin: var(--space-lg) 0 var(--space-sm);
    padding: 0 var(--space-lg);
}

.founder-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-lg);
    padding: 0 var(--space-lg);
}

.founder-countdown {
    background: rgba(139, 92, 246, 0.05);
    padding: var(--space-lg);
    margin: 0 var(--space-lg) var(--space-lg);
    border-radius: var(--radius-lg);
    border: 2px solid rgba(139, 92, 246, 0.2);
}

.countdown-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.countdown-value {
    font-size: 48px;
    font-weight: 800;
    color: #8b5cf6;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.countdown-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    margin-top: 4px;
}

.countdown-separator {
    font-size: 36px;
    font-weight: 700;
    color: #8b5cf6;
    margin-bottom: 16px;
}

.countdown-message {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: var(--space-sm);
}

.founder-offer-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    margin: 0 var(--space-lg) var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
}

.offer-header {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-bottom: var(--space-sm);
}

.offer-pricing {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xs);
}

.offer-original {
    font-size: var(--font-size-xl);
    text-decoration: line-through;
    opacity: 0.5;
}

.offer-price {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #d4af37, #f5d87a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.offer-terms {
    display: block;
    font-size: var(--font-size-sm);
    opacity: 0.7;
    margin-bottom: var(--space-md);
}

.offer-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.offer-features li {
    font-size: var(--font-size-sm);
    padding: var(--space-xs) 0;
    padding-left: 24px;
    position: relative;
    opacity: 0.9;
}

.offer-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #81B29A;
    font-weight: 700;
}

.founder-actions {
    padding: 0 var(--space-lg) var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.founder-cta-primary {
    width: 100%;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
    color: white;
    border: none;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-base);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-fast);
}

.founder-cta-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.4);
}

.founder-cta-secondary {
    width: 100%;
    background: transparent;
    color: var(--color-text-secondary);
    border: none;
    padding: var(--space-sm);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.founder-cta-secondary:hover {
    color: var(--color-text-primary);
}

.founder-note {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    padding-bottom: var(--space-lg);
}

/* Founder countdown urgency animation */
.founder-countdown.urgent .countdown-value {
    animation: pulse-urgent 1s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); color: #ef4444; }
}

/* Responsive Ads */
@media (max-width: 768px) {
    .upgrade-content {
        flex-direction: column;
        text-align: center;
        padding: var(--space-xs) 0;
    }

    .ad-banner {
        max-width: 320px;
    }

    .ad-leaderboard {
        min-height: 50px;
    }

    .ad-placeholder-text {
        font-size: var(--font-size-xs);
    }

    .ad-sidebar {
        display: none;
    }

    .ad-placeholder.native {
        flex-direction: column;
        text-align: center;
    }

    .ad-native-placeholder-content {
        flex-direction: column;
    }

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

@media (max-width: 1200px) {
    .ad-sidebar {
        right: var(--space-sm);
        width: 160px;
    }

    .ad-rectangle {
        min-height: 600px;
    }

    .ad-placeholder.sidebar {
        min-height: 600px;
    }
}

@media (max-width: 1024px) {
    .ad-sidebar {
        display: none;
    }
}

/* ===========================================
   SHARE WIN FEATURE
   =========================================== */

/* Share Win Button */
.share-win-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    margin-top: var(--space-md);
}

.share-win-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.share-win-btn svg {
    width: 16px;
    height: 16px;
}

/* Share Modal Overlay */
.share-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

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

/* Share Modal */
.share-modal {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    max-width: 420px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: all var(--transition-base);
}

.share-modal-overlay.active .share-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.share-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
}

.share-modal-header h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.share-modal-close {
    background: none;
    border: none;
    padding: var(--space-sm);
    cursor: pointer;
    color: var(--color-text-tertiary);
    transition: color var(--transition-fast);
    border-radius: var(--radius-md);
}

.share-modal-close:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-subtle);
}

.share-modal-close svg {
    width: 20px;
    height: 20px;
}

/* Preview Card */
.share-preview-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--color-border-light);
}

@media (prefers-color-scheme: dark) {
    .share-preview-card {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    }
}

.share-preview-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.share-preview-text {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.5;
    margin-bottom: var(--space-md);
}

.share-preview-hashtag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Share Buttons Grid */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.share-btn svg {
    width: 24px;
    height: 24px;
}

.share-btn span {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Platform-specific button styles */
.share-btn.twitter {
    background: #1DA1F2;
    border-color: #1DA1F2;
}

.share-btn.twitter:hover {
    background: #0d8bd9;
}

.share-btn.twitter svg,
.share-btn.twitter span {
    color: white;
}

.share-btn.linkedin {
    background: #0A66C2;
    border-color: #0A66C2;
}

.share-btn.linkedin:hover {
    background: #084d94;
}

.share-btn.linkedin svg,
.share-btn.linkedin span {
    color: white;
}

.share-btn.copy {
    background: var(--color-bg-subtle);
}

.share-btn.copy:hover {
    background: var(--color-bg);
    border-color: var(--color-text-tertiary);
}

.share-btn.copy svg {
    color: var(--color-text-secondary);
}

/* Copy Success State */
.share-btn.copy.copied {
    background: var(--color-success);
    border-color: var(--color-success);
}

.share-btn.copy.copied svg,
.share-btn.copy.copied span {
    color: white;
}

/* Share Modal Header */
.share-modal-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.share-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    margin-bottom: var(--space-md);
}

.share-icon-badge svg {
    width: 24px;
    height: 24px;
    color: white;
}

.share-modal-header h3 {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-xs) 0;
}

.share-modal-header p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* Share Preview Card */
.share-preview {
    margin-bottom: var(--space-lg);
}

.share-preview-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border-light);
    text-align: center;
}

@media (prefers-color-scheme: dark) {
    .share-preview-card {
        background: linear-gradient(135deg, #2a2a2a 0%, #1e1e1e 100%);
    }
}

.preview-badge {
    display: inline-block;
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.preview-text {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.5;
    margin: 0 0 var(--space-md) 0;
}

.preview-tag {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Share Footer */
.share-footer {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border-light);
}

.share-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    font-style: italic;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .share-modal {
        padding: var(--space-lg);
        margin: var(--space-md);
    }

    .share-buttons {
        grid-template-columns: 1fr;
    }

    .share-btn {
        flex-direction: row;
        justify-content: center;
    }
}

/* ===========================================
   LORICA AI ASSISTANT
   =========================================== */

/* Orb Container */
.lorica-container {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    z-index: 500;
}

/* Floating Orb Button */
.lorica-orb {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, #b8943f 100%);
    border: none;
    box-shadow:
        0 4px 20px rgba(197, 160, 89, 0.4),
        0 0 0 0 rgba(197, 160, 89, 0.2);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lorica-orb:hover {
    transform: scale(1.08);
    box-shadow:
        0 6px 25px rgba(197, 160, 89, 0.5),
        0 0 0 8px rgba(197, 160, 89, 0.1);
}

.lorica-orb:active {
    transform: scale(1.02);
}

/* Orb Icon */
.orb-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orb-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-brand-slate);
    stroke-width: 2;
}

.orb-icon .icon-shield {
    display: block;
}

.orb-icon .icon-mic {
    position: absolute;
    width: 14px;
    height: 14px;
    bottom: -2px;
    right: -4px;
    opacity: 0.8;
}

.orb-icon .icon-lock {
    display: none;
}

/* Orb Pulse Animation */
.orb-pulse {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-full);
    background: transparent;
    pointer-events: none;
}

.lorica-orb.listening .orb-pulse {
    animation: loricaPulse 1.5s ease-in-out infinite;
}

@keyframes loricaPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(197, 160, 89, 0);
    }
}

/* Trial Badge */
.orb-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: var(--color-stop);
    border-radius: var(--radius-full);
    color: white;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg-primary);
}

/* Hide badge for premium users */
body[data-user-tier="premium"] .orb-badge,
body[data-user-tier="pro"] .orb-badge,
body[data-user-tier="team"] .orb-badge {
    display: none;
}

/* Locked State (Trial Expired) */
body[data-lorica-trial-expired="true"] .lorica-orb {
    background: var(--color-bg-subtle);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: not-allowed;
}

body[data-lorica-trial-expired="true"] .orb-icon .icon-shield,
body[data-lorica-trial-expired="true"] .orb-icon .icon-mic {
    display: none;
}

body[data-lorica-trial-expired="true"] .orb-icon .icon-lock {
    display: block;
    stroke: var(--color-text-tertiary);
}

body[data-lorica-trial-expired="true"] .orb-badge {
    display: none;
}

/* Voice Feedback (Orb Expands In-Place) */
.lorica-voice-feedback {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.lorica-voice-feedback.active {
    display: flex;
}

.voice-rings {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.voice-rings .ring {
    position: absolute;
    border-radius: var(--radius-full);
    border: 2px solid var(--color-brand-gold);
    opacity: 0;
}

.voice-rings .ring-1 {
    width: 40px;
    height: 40px;
    animation: voiceRing 1.5s ease-out infinite;
}

.voice-rings .ring-2 {
    width: 60px;
    height: 60px;
    animation: voiceRing 1.5s ease-out 0.3s infinite;
}

.voice-rings .ring-3 {
    width: 80px;
    height: 80px;
    animation: voiceRing 1.5s ease-out 0.6s infinite;
}

@keyframes voiceRing {
    0% {
        opacity: 0.6;
        transform: scale(0.8);
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}

.voice-transcript {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    max-width: 280px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.voice-transcript:empty {
    display: none;
}

/* Side Panel */
.lorica-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: var(--color-bg-elevated);
    border-left: 1px solid var(--color-border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 600;
    display: flex;
    flex-direction: column;
    transition: right var(--transition-base);
}

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

/* Panel Header */
.lorica-header {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, var(--color-brand-slate) 0%, #1e293b 100%);
    gap: var(--space-md);
}

.lorica-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lorica-close svg {
    width: 16px;
    height: 16px;
    stroke: rgba(255, 255, 255, 0.7);
}

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

.lorica-close:hover svg {
    stroke: white;
}

.lorica-title {
    flex: 1;
}

.lorica-title h2 {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--color-brand-gold);
    margin: 0;
    line-height: 1.2;
}

.lorica-subtitle {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.lorica-settings {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.lorica-settings svg {
    width: 18px;
    height: 18px;
    stroke: rgba(255, 255, 255, 0.5);
}

.lorica-settings:hover {
    background: rgba(255, 255, 255, 0.1);
}

.lorica-settings:hover svg {
    stroke: rgba(255, 255, 255, 0.8);
}

/* Context Bar */
.lorica-context-bar {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.context-view {
    color: var(--color-brand-gold);
    font-weight: 600;
}

.context-separator {
    opacity: 0.5;
}

/* Messages Area */
.lorica-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.lorica-message {
    display: flex;
    gap: var(--space-sm);
    max-width: 90%;
    animation: messageSlideIn 0.3s ease;
}

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

.lorica-message.assistant {
    align-self: flex-start;
}

.lorica-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, #b8943f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-brand-slate);
    fill: none;
}

.message-content {
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
}

.message-content p {
    margin: 0;
    font-size: var(--font-size-sm);
    line-height: 1.5;
    color: var(--color-text-primary);
}

.lorica-message.user .message-content {
    background: var(--color-brand-slate);
    border-color: var(--color-brand-slate);
}

.lorica-message.user .message-content p {
    color: white;
}

/* Typing Indicator */
.lorica-message.typing .message-content {
    padding: var(--space-md);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: var(--color-text-tertiary);
    border-radius: var(--radius-full);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-6px);
    }
}

/* Quick Actions */
.lorica-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.quick-action-btn svg {
    width: 14px;
    height: 14px;
    stroke: var(--color-text-tertiary);
    flex-shrink: 0;
}

.quick-action-btn:hover {
    border-color: var(--color-brand-gold);
    color: var(--color-brand-gold);
    background: rgba(197, 160, 89, 0.05);
}

.quick-action-btn:hover svg {
    stroke: var(--color-brand-gold);
}

/* Input Area */
.lorica-input-area {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
}

.lorica-input {
    flex: 1;
    resize: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
    max-height: 120px;
    transition: var(--transition-fast);
}

.lorica-input:focus {
    outline: none;
    border-color: var(--color-brand-gold);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.1);
}

.lorica-input::placeholder {
    color: var(--color-text-tertiary);
}

.lorica-send,
.lorica-mic {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.lorica-send {
    background: var(--color-brand-slate);
}

.lorica-send svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.lorica-send:hover {
    background: var(--color-brand-gold);
}

.lorica-send:hover svg {
    stroke: var(--color-brand-slate);
}

.lorica-mic {
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, #b8943f 100%);
}

.lorica-mic svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-brand-slate);
}

.lorica-mic .mic-active {
    display: none;
}

.lorica-mic.active {
    background: var(--color-stop);
    animation: micPulse 1s ease-in-out infinite;
}

.lorica-mic.active .mic-idle {
    display: none;
}

.lorica-mic.active .mic-active {
    display: block;
    stroke: white;
}

@keyframes micPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
}

.lorica-mic:hover {
    transform: scale(1.05);
}

/* Trial Banner */
.lorica-trial-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: linear-gradient(90deg, var(--color-brand-slate) 0%, #1e293b 100%);
    border-top: 1px solid var(--color-border);
}

.trial-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trial-days {
    font-size: var(--font-size-sm);
    color: white;
}

.trial-days strong {
    color: var(--color-brand-gold);
}

.trial-text {
    font-size: var(--font-size-xs);
    color: rgba(255, 255, 255, 0.5);
}

.trial-upgrade-btn {
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, #b8943f 100%);
    color: var(--color-brand-slate);
    font-size: var(--font-size-xs);
    font-weight: 700;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: var(--transition-fast);
}

.trial-upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

/* Hide trial banner for premium users */
body[data-user-tier="premium"] .lorica-trial-banner,
body[data-user-tier="pro"] .lorica-trial-banner,
body[data-user-tier="team"] .lorica-trial-banner {
    display: none;
}

/* Panel Backdrop */
.lorica-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 550;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

.lorica-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .lorica-container {
        bottom: calc(var(--nav-height) + var(--space-md));
        right: var(--space-md);
    }

    .lorica-orb {
        width: 48px;
        height: 48px;
    }

    .orb-icon svg {
        width: 20px;
        height: 20px;
    }

    .orb-icon .icon-mic {
        width: 12px;
        height: 12px;
    }

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

    .lorica-quick-actions {
        grid-template-columns: 1fr 1fr;
    }

    .quick-action-btn {
        font-size: 11px;
        padding: var(--space-xs) var(--space-sm);
    }
}

/* Responsive - Small Mobile */
@media (max-width: 375px) {
    .lorica-quick-actions {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   PROFILE MODAL
   =========================================== */

.profile-modal .modal-content {
    max-width: 480px;
}

.profile-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: white;
    font-size: 28px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.profile-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.profile-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.profile-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.profile-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.profile-form label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.profile-form input {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.profile-form input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15);
}

.readonly-section {
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

.form-group.readonly .readonly-value {
    font-size: 1rem;
    color: var(--color-text-primary);
}

.tier-badge {
    display: inline-block;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.profile-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

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

.btn-primary:hover {
    background: var(--color-accent-dark);
}

.btn-secondary {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-elevated);
}

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

.btn-danger:hover {
    background: #c0392b;
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-error {
    color: var(--color-danger);
    font-size: 0.875rem;
    display: none;
}

.form-error.visible {
    display: block;
}

.form-success {
    color: var(--color-success);
    font-size: 0.875rem;
    display: none;
}

.form-success.visible {
    display: block;
}

/* ===========================================
   SETTINGS MODAL
   =========================================== */

.settings-modal .modal-content {
    max-width: 520px;
}

.settings-header {
    margin-bottom: var(--space-lg);
}

.settings-header h2 {
    font-size: 1.5rem;
    margin: 0;
}

.settings-tabs {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--color-border);
    padding-bottom: var(--space-xs);
}

.settings-tab {
    padding: var(--space-sm) var(--space-md);
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all 0.2s;
}

.settings-tab:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-subtle);
}

.settings-tab.active {
    color: var(--color-accent);
    background: var(--color-bg-subtle);
    border-bottom: 2px solid var(--color-accent);
}

.settings-panel {
    display: none;
}

.settings-panel.active {
    display: block;
}

.settings-panel h3 {
    font-size: 1rem;
    margin: 0 0 var(--space-lg);
    color: var(--color-text-secondary);
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.settings-form .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.settings-form label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.settings-form input {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
}

.settings-form input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15);
}

.password-requirements {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-xs);
}

.password-requirements .req {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    padding: 2px 8px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-sm);
}

.password-requirements .req.valid {
    color: var(--color-success);
    background: rgba(46, 204, 113, 0.1);
}

/* Preferences Tab */
.preference-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.preference-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preference-label {
    font-weight: 500;
    color: var(--color-text-primary);
}

.preference-desc {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

.preference-select {
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

/* Data Tab */
.data-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

.data-action.danger {
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.data-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.data-label {
    font-weight: 500;
    color: var(--color-text-primary);
}

.data-desc {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
}

/* AI Settings Tab */
.byok-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.byok-status .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.byok-status .status-indicator.active {
    background: var(--color-success);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

.byok-status .status-indicator.inactive {
    background: var(--color-text-tertiary);
}

.byok-status .status-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.byok-intro {
    margin-bottom: var(--space-lg);
}

.byok-intro p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

#settingsAI .form-group {
    margin-bottom: var(--space-md);
}

#settingsAI .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.api-key-input {
    display: flex;
    gap: var(--space-sm);
}

.api-key-input input {
    flex: 1;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: monospace;
}

.api-key-input input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), 0.15);
}

.api-key-input .toggle-visibility {
    padding: var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.api-key-input .toggle-visibility:hover {
    background: var(--color-bg);
    color: var(--color-text-primary);
}

.api-key-input .toggle-visibility svg {
    width: 18px;
    height: 18px;
}

.masked-key {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    margin-top: var(--space-xs);
}

.provider-instructions {
    background: rgba(var(--color-accent-rgb), 0.05);
    border: 1px solid rgba(var(--color-accent-rgb), 0.2);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
}

.provider-instructions h4 {
    font-size: 0.875rem;
    color: var(--color-accent);
    margin: 0 0 var(--space-sm);
}

.provider-instructions ol {
    margin: 0 0 var(--space-md);
    padding-left: var(--space-lg);
}

.provider-instructions li {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.ai-settings-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-lg);
    margin-bottom: var(--space-md);
}

.ai-settings-actions button {
    flex: 1;
}

.form-status {
    font-size: 0.875rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    text-align: center;
    min-height: 36px;
}

.form-status.success {
    background: rgba(46, 204, 113, 0.1);
    color: var(--color-success);
}

.form-status.error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--color-danger);
}

.remove-byok {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.remove-byok .remove-hint {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.provider-help {
    margin-top: var(--space-xl);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.provider-help h4 {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-md);
}

.provider-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.provider-links li {
    font-size: 0.875rem;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
}

.provider-links a {
    color: var(--color-accent);
    text-decoration: none;
}

.provider-links a:hover {
    text-decoration: underline;
}

.btn-small {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.875rem;
}

/* Feature Gating (Tier-locked features) */
.feature-locked {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.feature-locked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.05);
    border-radius: inherit;
    z-index: 1;
}

.upgrade-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
    z-index: 10;
    pointer-events: auto;
}

.upgrade-overlay h4 {
    font-size: 0.875rem;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-xs);
}

.upgrade-overlay p {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-sm);
}

.upgrade-overlay .upgrade-btn {
    padding: var(--space-xs) var(--space-md);
    font-size: 0.75rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.upgrade-overlay .upgrade-btn:hover {
    background: var(--color-accent-dark);
}

.upgrade-overlay .byok-link {
    display: block;
    margin-top: var(--space-xs);
    font-size: 0.7rem;
    color: var(--color-accent);
    text-decoration: none;
}

.upgrade-overlay .byok-link:hover {
    text-decoration: underline;
}

/* Pro badge for locked features */
.pro-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: var(--radius-sm);
    margin-left: var(--space-xs);
}

/* Freemium indicator for Lorica */
.freemium-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) var(--space-sm);
    background: rgba(var(--color-accent-rgb), 0.1);
    border-bottom: 1px solid rgba(var(--color-accent-rgb), 0.2);
    font-size: 0.75rem;
}

.freemium-indicator span {
    color: var(--color-text-secondary);
}

.freemium-indicator a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

.freemium-indicator a:hover {
    text-decoration: underline;
}

/* ===========================================
   CONFIRM MODAL
   =========================================== */

.confirm-modal .modal-content {
    max-width: 400px;
    text-align: center;
}

.confirm-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.confirm-icon.danger {
    background: rgba(231, 76, 60, 0.1);
    color: var(--color-danger);
}

.confirm-icon svg {
    width: 32px;
    height: 32px;
}

.confirm-modal h3 {
    font-size: 1.25rem;
    margin: 0 0 var(--space-sm);
}

.confirm-modal p {
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-lg);
}

.confirm-modal .form-group {
    text-align: left;
    margin-bottom: var(--space-lg);
}

.confirm-modal .form-group label {
    display: block;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.confirm-modal .form-group input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.confirm-actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
}

/* ===========================================
   BLUEPRINT VIEW TOGGLE & MULTI-VIEW STYLES
   =========================================== */

/* View Toggle Buttons */
.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--color-bg-subtle);
    padding: 4px;
    border-radius: var(--radius-md);
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.view-btn svg {
    width: 16px;
    height: 16px;
}

.view-btn:hover {
    background: var(--color-bg-elevated);
    color: var(--color-text-primary);
}

.view-btn.active {
    background: var(--color-bg-elevated);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* Day View Container */
.schedule-day-view {
    display: block;
}

/* ===========================================
   WEEK VIEW STYLES
   =========================================== */

.schedule-week-view {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.week-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
}

.week-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.week-nav-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.week-nav-btn svg {
    width: 16px;
    height: 16px;
}

.week-range {
    font-weight: 600;
    font-size: var(--font-size-md);
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 600px;
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.week-day-column {
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    min-height: 600px;
}

.week-day-column.today {
    background: rgba(59, 130, 246, 0.03);
}

.week-day-column.today .week-day-header {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
}

.week-day-column.drag-over {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

/* Week Day Header */
.week-day-header {
    padding: var(--space-sm);
    text-align: center;
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition-fast);
}

.week-day-header:hover {
    background: var(--color-bg-elevated);
}

.week-day-name {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: inherit;
}

.week-day-number {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 700;
}

/* Week Non-Negotiables Section */
.week-nns-section {
    padding: var(--space-xs);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

.week-nns-header {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xs);
}

.week-nns-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.week-nn-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 2px 0;
}

.week-nn-item.completed .nn-text {
    text-decoration: line-through;
    color: var(--color-text-tertiary);
}

.week-nn-item.empty {
    opacity: 0.4;
}

.nn-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
}

.nn-dot.empty {
    background: var(--color-border);
}

.nn-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-text-secondary);
}

/* Week Calendar Section (24-hour) */
.week-calendar-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.week-cal-header {
    display: grid;
    grid-template-columns: 50px 1fr;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.week-cal-header span {
    padding: 4px;
    text-align: center;
}

.week-cal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.week-cal-row {
    display: grid;
    grid-template-columns: 50px 1fr;
    min-height: 20px;
    border-bottom: 1px solid var(--color-border-subtle);
}

.week-cal-row.hour-start {
    border-bottom: 1px solid var(--color-border);
}

.week-cal-row.current-time {
    position: relative;
}

.week-cal-row.current-time::after {
    content: '';
    position: absolute;
    left: 50px;
    right: 0;
    top: 50%;
    height: 2px;
    background: #ef4444;
    z-index: 5;
}

.week-time-cell {
    font-size: 9px;
    color: var(--color-text-tertiary);
    padding: 2px 4px;
    background: var(--color-bg-subtle);
    border-right: 1px solid var(--color-border);
    display: flex;
    align-items: center;
}

.week-task-cell {
    padding: 1px 4px;
    background: var(--color-bg);
    font-size: 9px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.week-task-cell.has-block {
    background: rgba(59, 130, 246, 0.1);
    border-left: 2px solid #3b82f6;
}

.week-task-cell .block-title {
    color: var(--color-text-primary);
}

/* Drag and Drop States - Weekly View */
.week-nn-item[draggable="true"] {
    cursor: grab;
    transition: all 0.15s ease;
}

.week-nn-item[draggable="true"]:hover {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
}

.week-nn-item[draggable="true"]:active {
    cursor: grabbing;
}

.week-nn-item.dragging {
    opacity: 0.5;
}

.week-nns-list.drag-over {
    background: var(--color-primary-light, #e0e7ff);
    outline: 2px dashed var(--color-primary);
    outline-offset: -2px;
    border-radius: var(--radius-sm);
}

.week-task-cell[draggable="true"] {
    cursor: grab;
}

.week-task-cell[draggable="true"]:active {
    cursor: grabbing;
}

.week-task-cell.dragging {
    opacity: 0.5;
}

.week-task-cell.drag-over {
    background: var(--color-primary-light, #e0e7ff);
    outline: 2px dashed var(--color-primary);
    outline-offset: -2px;
}

.week-cal-body.drag-over-calendar {
    background: rgba(59, 130, 246, 0.05);
}

.week-column-header {
    padding: var(--space-sm) var(--space-md);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    cursor: pointer;
    transition: var(--transition-fast);
}

.week-column-header:hover {
    background: var(--color-bg-elevated);
}

.week-column-header .day-name {
    display: block;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

.week-column-header .day-date {
    display: block;
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-top: 2px;
}

.week-day-column.today .week-column-header .day-date {
    color: var(--color-primary);
}

.week-column-content {
    flex: 1;
    padding: var(--space-sm);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

/* Task preview cards for week view */
.task-preview {
    background: var(--color-bg-elevated);
    border-left: 3px solid var(--color-border);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    cursor: grab;
    transition: var(--transition-fast);
}

.task-preview:hover {
    transform: translateX(2px);
    box-shadow: var(--shadow-sm);
}

.task-preview.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.task-preview.nn-task {
    border-left-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.05);
}

.task-preview.nn-task.completed {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-preview.time-block-task {
    border-left-color: var(--color-focus);
}

.task-preview.time-block-task.completed {
    border-left-color: #3b82f6;
    opacity: 0.6;
}

.task-preview .preview-title {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-preview .preview-time {
    color: var(--color-text-tertiary);
    font-size: 10px;
    margin-top: 2px;
}

.week-empty-day {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-xs);
    opacity: 0.6;
}

/* ===========================================
   MONTH VIEW STYLES
   =========================================== */

.schedule-month-view {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
}

.month-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
}

.month-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.month-nav-btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.month-nav-btn svg {
    width: 16px;
    height: 16px;
}

.month-title {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.month-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
}

.month-weekdays span {
    padding: var(--space-sm);
    text-align: center;
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    letter-spacing: 0.05em;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.month-day-cell {
    min-height: 100px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-xs);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition-fast);
}

.month-day-cell:nth-child(7n) {
    border-right: none;
}

.month-day-cell:hover {
    background: var(--color-bg-subtle);
}

.month-day-cell.today {
    background: rgba(99, 102, 241, 0.05);
}

.month-day-cell.other-month {
    opacity: 0.4;
    background: var(--color-bg-subtle);
}

.month-day-cell.drag-over {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: inset 0 0 0 2px var(--color-primary);
}

.month-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-xs);
}

.month-day-number {
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.month-day-cell.today .month-day-number {
    background: var(--color-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-task-count {
    font-size: 10px;
    background: var(--color-bg-subtle);
    padding: 2px 6px;
    border-radius: 10px;
    color: var(--color-text-secondary);
}

.month-day-tasks {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.month-task-item {
    font-size: 10px;
    padding: 2px 4px;
    background: var(--color-bg-subtle);
    border-left: 2px solid var(--color-border);
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: grab;
    transition: var(--transition-fast);
}

.month-task-item:hover {
    background: var(--color-bg-elevated);
}

.month-task-item.nn {
    border-left-color: var(--color-primary);
}

.month-task-item.time-block {
    border-left-color: var(--task-color, var(--color-focus));
}

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

.month-task-item.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.month-task-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.month-task-more {
    font-size: 10px;
    color: var(--color-text-tertiary);
    padding: 2px 4px;
    cursor: pointer;
}

.month-task-more:hover {
    color: var(--color-primary);
}

/* Legacy preview styles (can be removed if not used) */
.month-task-preview {
    font-size: 10px;
    padding: 2px 4px;
    background: var(--color-bg-subtle);
    border-left: 2px solid var(--color-border);
    border-radius: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: grab;
}

.month-task-preview.nn-task {
    border-left-color: var(--color-primary);
}

.month-task-preview.time-block-task {
    border-left-color: var(--color-focus);
}

.month-task-preview.dragging {
    opacity: 0.5;
}

.month-more-tasks {
    font-size: 10px;
    color: var(--color-text-tertiary);
    text-align: center;
    padding-top: 2px;
}

/* Responsive adjustments for week/month views */
@media (max-width: 768px) {
    .view-toggle {
        margin-top: var(--space-sm);
        width: 100%;
        justify-content: center;
    }

    .date-navigation {
        flex-wrap: wrap;
    }

    .week-grid {
        grid-template-columns: repeat(3, 1fr);
        min-height: auto;
    }

    .week-day-column:nth-child(n+4) {
        display: none;
    }

    .month-day-cell {
        min-height: 60px;
    }

    .month-task-preview {
        display: none;
    }

    .month-task-count {
        display: block;
    }
}

/* ==========================================================================
   Tier-based element visibility
   Ensures upgrade UI and ads are hidden for paid users (pro, team, admin)
   ========================================================================== */

body.tier-pro .upgrade-banner,
body.tier-team .upgrade-banner,
body.tier-admin .upgrade-banner,
body.tier-pro .lorica-trial-banner,
body.tier-team .lorica-trial-banner,
body.tier-admin .lorica-trial-banner,
body.tier-pro .profile-upgrade-btn,
body.tier-team .profile-upgrade-btn,
body.tier-admin .profile-upgrade-btn {
    display: none !important;
}

body.tier-pro .ad-banner,
body.tier-pro .ad-container,
body.tier-team .ad-banner,
body.tier-team .ad-container,
body.tier-admin .ad-banner,
body.tier-admin .ad-container {
    display: none !important;
}
