/* ===========================================
   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;

    /* Analytics Chart Colors */
    --chart-primary: #6366F1;
    --chart-secondary: #8B5CF6;
    --chart-success: #10B981;
    --chart-warning: #F59E0B;
    --chart-danger: #EF4444;
    --chart-info: #3B82F6;

    /* Gradient Backgrounds */
    --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-green: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-orange: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-gold: linear-gradient(135deg, #f5af19 0%, #f12711 100%);
    --gradient-indigo: linear-gradient(135deg, #667eea 0%, #6366F1 100%);

    /* 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
   =========================================== */

/* ============================================
   POLISHED APP HEADER
   ============================================ */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-lg);
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

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

.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);
}

/* Header Search Button */
.header-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    border: none;
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.header-search-btn:hover {
    background: var(--color-primary-light, rgba(139, 92, 246, 0.15));
    color: var(--color-primary);
}

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

.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
   =========================================== */

/* ============================================
   POLISHED NAVIGATION BAR
   ============================================ */
.main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    z-index: 90;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.nav-scroll-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: 0 var(--space-lg);
    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, #3B82F6, #8B5CF6);
    border-radius: 3px 3px 0 0;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    pointer-events: none;
}

.nav-item {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-radius: 12px;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #3B82F6;
    transform: translateY(-1px);
}

.nav-item.active {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.nav-item.active:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    color: white;
    transform: translateY(-1px);
}

/* 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) */
/* Polished Day Navigation */
.day-nav-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 10px;
}

.day-nav-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #64748B;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-nav-btn:hover {
    background: white;
    color: #3B82F6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.day-label {
    padding: 6px 14px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.25);
}

/* Day/Week/Month toggle - polished styling */
.view-toggle {
    display: flex;
    gap: 4px;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 10px;
}

.view-toggle .view-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #64748B;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle .view-btn:hover {
    background: white;
    color: #3B82F6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.view-toggle .view-btn.active {
    background: white;
    color: #3B82F6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Polished Week Navigation */
.week-nav-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.03);
    padding: 4px;
    border-radius: 10px;
}

.week-nav-compact .week-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748B;
    cursor: pointer;
    transition: var(--transition-fast);
}

.week-nav-compact .week-nav-btn:hover {
    background: white;
    color: #3B82F6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.week-label {
    font-size: 13px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
    color: #1E293B;
    padding: 0 8px;
}

/* ===========================================
   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 cards - using unified .lorica-card system */
.promoted-card.lorica-card {
    border: none;
}

.promoted-card.lorica-card:hover {
    transform: translateY(-2px);
}

.promoted-card.lorica-card[draggable="true"] {
    cursor: grab;
}

.promoted-card.dragging {
    opacity: 0.5;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    cursor: grabbing;
}

.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 .scheduled-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    background: var(--color-primary-light);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.promoted-card .scheduled-indicator svg {
    width: 12px;
    height: 12px;
}

.promoted-card .project-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.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);
}

/* Promoted Card Action Buttons */
.promoted-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.promoted-complete-btn,
.promoted-edit-btn,
.promoted-delete-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--color-text-secondary);
}

.promoted-complete-btn svg,
.promoted-edit-btn svg,
.promoted-delete-btn svg {
    width: 16px;
    height: 16px;
}

.promoted-complete-btn:hover {
    border-color: var(--color-success, #22c55e);
    color: var(--color-success, #22c55e);
    background: rgba(34, 197, 94, 0.1);
}

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

.promoted-delete-btn:hover {
    border-color: var(--color-error, #ef4444);
    color: var(--color-error, #ef4444);
    background: rgba(239, 68, 68, 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); }
}

/* Lorica Action - Highlight newly created items */
@keyframes loricaHighlightPulse {
    0% {
        background: rgba(184, 135, 47, 0.25);
        box-shadow: 0 0 0 2px rgba(184, 135, 47, 0.4);
    }
    50% {
        background: rgba(184, 135, 47, 0.15);
        box-shadow: 0 0 0 4px rgba(184, 135, 47, 0.2);
    }
    100% {
        background: transparent;
        box-shadow: none;
    }
}

.lorica-just-created {
    animation: loricaHighlightPulse 2.5s ease-out forwards;
    border-left: 3px solid var(--color-brand-gold) !important;
    position: relative;
}

.lorica-just-created::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -12px;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--color-brand-gold);
    border-radius: 50%;
    animation: fadeIn 0.3s ease-out;
}

/* ===========================================
   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);
}

/* Polished Today Button */
.today-btn {
    padding: 8px 18px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
}

.today-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

/* 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-header-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
    min-height: 18px;
}

.nn-project-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nn-card.filled[data-priority="1"] .nn-project-badge {
    background: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

.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);
}

.nn-date-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 500;
}

.nn-time-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    background: rgba(139, 92, 246, 0.1);
    color: var(--color-brand-gold);
    font-weight: 500;
}

/* 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);
}

/* Show + indicator on empty slot hover */
.appointment-cell:not(.has-block):hover::after {
    content: '+';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    opacity: 0.7;
}

/* Stronger hover for empty slots */
.appointment-cell:not(.has-block):hover {
    background: var(--color-primary-light, rgba(37, 99, 235, 0.08));
    border-left: 2px solid var(--color-primary);
}

/* 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;
}

/* Time Block Completion Toggle */
.appointment-cell .block-complete-btn {
    background: rgba(255, 255, 255, 0.8);
    border: 1.5px solid var(--color-text-tertiary);
    border-radius: 4px;
    width: 18px;
    height: 18px;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    vertical-align: middle;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.appointment-cell .block-complete-btn svg {
    opacity: 0;
    color: var(--color-text-tertiary);
    transition: opacity 0.15s ease;
}

.appointment-cell .block-complete-btn:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.appointment-cell .block-complete-btn:hover svg {
    opacity: 0.5;
    color: var(--color-primary);
}

.appointment-cell .block-complete-btn.completed {
    background: var(--color-success, #10b981);
    border-color: var(--color-success, #10b981);
}

.appointment-cell .block-complete-btn.completed svg {
    opacity: 1;
    color: white;
}

/* Completed time block styling */
.appointment-cell.block-completed {
    opacity: 0.7;
}

.appointment-cell.block-completed .block-content {
    text-decoration: line-through;
    color: var(--color-text-tertiary);
}

.appointment-cell.block-completed.block-start {
    border-left-color: var(--color-success, #10b981);
    background: rgba(16, 185, 129, 0.1);
}

.appointment-cell.block-completed.block-continue,
.appointment-cell.block-completed.block-end {
    border-left-color: var(--color-success, #10b981);
    background: rgba(16, 185, 129, 0.1);
}

.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;
}

/* Done badge for completed time blocks */
.time-block .done-badge {
    font-size: 10px;
    font-weight: 600;
    color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: auto;
    flex-shrink: 0;
}

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

/* 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 {
    border-color: var(--color-success);
    color: var(--color-success);
    background: var(--color-recovery-light);
}

.complete-block-btn.active {
    border-color: var(--color-success);
    color: white;
    background: var(--color-success);
}

.complete-block-btn.active:hover {
    background: #059669;
    border-color: #059669;
}

.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(5, 1fr);
    gap: var(--space-sm);
    min-height: 500px;
    width: 100%;
}

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

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

.kanban-column.review-column {
    background: rgba(249, 115, 22, 0.08);
    border: 2px solid #F97316;
}

.kanban-column.done-column {
    background: rgba(16, 185, 129, 0.08);
    border: 2px solid var(--color-success);
}

.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;
}

/* ============================================
   WIP (Work-In-Progress) Limit Styles
   ============================================ */

/* WIP limit display in column count */
.column-count.has-limit {
    min-width: 40px;
    width: auto;
    padding: 0 8px;
}

/* Column at WIP limit - yellow/orange warning */
.kanban-column.column-at-limit {
    border: 2px solid #F59E0B;
    background: rgba(245, 158, 11, 0.08);
}

.kanban-column.column-at-limit .column-header {
    border-bottom-color: #F59E0B;
}

.kanban-column.column-at-limit .column-count {
    background: #F59E0B;
    color: white;
    font-weight: 700;
}

/* Column over WIP limit - red warning */
.kanban-column.column-over-limit {
    border: 2px solid var(--color-stop);
    background: rgba(230, 57, 70, 0.08);
    animation: overLimitPulse 2s ease-in-out infinite;
}

.kanban-column.column-over-limit .column-header {
    border-bottom-color: var(--color-stop);
}

.kanban-column.column-over-limit .column-count {
    background: var(--color-stop);
    color: white;
    font-weight: 700;
}

@keyframes overLimitPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0);
    }
    50% {
        box-shadow: 0 0 8px 2px rgba(230, 57, 70, 0.25);
    }
}

/* WIP limit warning indicator */
.wip-limit-warning {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.wip-limit-warning.at-limit {
    background: rgba(245, 158, 11, 0.15);
    color: #D97706;
}

.wip-limit-warning.over-limit {
    background: rgba(230, 57, 70, 0.15);
    color: var(--color-stop);
}

/* WIP Settings Button */
.wip-settings-btn {
    width: 24px;
    height: 24px;
    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);
    opacity: 0;
}

.column-header:hover .wip-settings-btn {
    opacity: 1;
}

.wip-settings-btn:hover {
    background: var(--color-bg-elevated);
    color: var(--color-primary);
}

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

/* WIP Settings Modal */
.wip-settings-modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.wip-settings-content {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.wip-settings-content h3 {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-md);
}

.wip-settings-content p {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

.wip-column-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.wip-column-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

.wip-column-name {
    font-weight: 500;
}

.wip-limit-input {
    width: 80px;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    text-align: center;
}

.wip-limit-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

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

.wip-settings-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
}

.wip-settings-actions button {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.wip-cancel-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
}

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

.wip-save-btn {
    background: var(--color-primary);
    border: none;
    color: white;
}

.wip-save-btn:hover {
    background: var(--color-primary-hover);
}

/* ============================================
   KANBAN TOOLBAR
   ============================================ */

.kanban-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-md);
}

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

.kanban-board-title {
    font-family: var(--font-serif);
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.kanban-toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.kanban-action-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    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);
}

.kanban-action-btn:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
    border-color: var(--color-primary);
}

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

.kanban-action-btn.archive-completed-btn:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.kanban-action-btn.view-archive-btn:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* ============================================
   ARCHIVE MODAL
   ============================================ */

.archive-modal .modal-content {
    max-width: 640px;
}

.archive-modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    max-width: 640px;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.archive-modal .modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.archive-modal .modal-header h3 {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: 600;
    margin: 0;
}

.archive-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-xs);
}

.archive-modal .modal-body {
    padding: var(--space-lg);
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Archive Search Section */
.archive-search-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.archive-search-row {
    display: flex;
    gap: var(--space-sm);
}

.archive-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    transition: var(--transition-fast);
}

.archive-search-input-wrap:focus-within {
    border-color: var(--color-primary);
    background: var(--color-bg-elevated);
}

.archive-search-input-wrap .search-icon {
    width: 18px;
    height: 18px;
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}

#archiveSearchInput {
    flex: 1;
    border: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    outline: none;
}

#archiveSearchInput::placeholder {
    color: var(--color-text-tertiary);
}

/* Archive Filters */
.archive-filters-row {
    display: flex;
    align-items: flex-end;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.archive-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.archive-filter-group label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.archive-filter-group input[type="date"],
.archive-filter-group select {
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-elevated);
    font-family: var(--font-sans);
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    min-width: 120px;
}

.archive-filter-group input[type="date"]:focus,
.archive-filter-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}

.archive-clear-btn {
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    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-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Archive Results Info */
.archive-results-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

/* Archive Cards List */
.archive-cards-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    min-height: 200px;
    max-height: 400px;
}

.archive-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--color-text-tertiary);
    gap: var(--space-md);
}

.archive-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.archive-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    text-align: center;
    color: var(--color-text-tertiary);
}

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

.archive-empty p {
    font-size: var(--font-size-base);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xs);
}

.archive-empty span {
    font-size: var(--font-size-sm);
}

/* Archive Card */
.archive-card {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: var(--transition-fast);
    opacity: 0.85;
}

.archive-card:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary);
    opacity: 1;
}

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

.archive-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.archive-card-priority {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: capitalize;
}

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

.archive-card-priority.priority-medium {
    background: rgba(245, 158, 11, 0.12);
    color: #D97706;
}

.archive-card-priority.priority-low {
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
}

.archive-card-column {
    padding: 2px 8px;
    background: var(--color-bg-elevated);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

.archive-project-badge {
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 500;
}

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

.archive-card-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 var(--space-xs);
    line-height: 1.4;
}

.archive-card-desc {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin: 0 0 var(--space-md);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.restore-column-select {
    flex: 1;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg-elevated);
    font-family: var(--font-sans);
    font-size: var(--font-size-xs);
    color: var(--color-text-primary);
}

.restore-card-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.restore-card-btn:hover {
    background: var(--color-primary-hover);
}

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

/* Archive Load More */
.archive-load-more {
    display: flex;
    justify-content: center;
    padding: var(--space-md) 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .kanban-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: var(--space-sm);
    }

    .kanban-toolbar-left,
    .kanban-toolbar-right {
        justify-content: center;
    }

    .archive-modal-content {
        max-height: 90vh;
        border-radius: var(--radius-lg);
    }

    .archive-filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .archive-filter-group {
        width: 100%;
    }

    .archive-filter-group input[type="date"],
    .archive-filter-group select {
        width: 100%;
    }

    .archive-card-actions {
        flex-direction: column;
    }

    .restore-column-select {
        width: 100%;
    }
}

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

/* ============================================
   VIRTUAL SCROLLING FOR KANBAN COLUMNS
   Improves performance for large card lists
   ============================================ */

.kanban-column-body {
    overflow-y: auto;
    max-height: 70vh;
    will-change: scroll-position;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.kanban-column-body .column-cards {
    overflow-y: visible;
}

.virtual-spacer {
    width: 100%;
    pointer-events: none;
    flex-shrink: 0;
}

/* ============================================
   UNIFIED CARD SYSTEM
   All cards across views use this base class
   ============================================ */

.lorica-card {
    --card-color: #FEF3C7; /* Default yellow */
    position: relative;
    background: linear-gradient(135deg, var(--card-color) 0%, color-mix(in srgb, var(--card-color) 90%, #000) 100%);
    border-radius: 4px;
    padding: 12px;
    padding-top: 28px; /* Space for priority + group row */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
    min-height: 80px;
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Unified Color Classes */
.lorica-card.color-yellow { --card-color: #FEF3C7; }
.lorica-card.color-pink { --card-color: #FECDD3; }
.lorica-card.color-blue { --card-color: #BFDBFE; }
.lorica-card.color-green { --card-color: #BBF7D0; }
.lorica-card.color-purple { --card-color: #DDD6FE; }
.lorica-card.color-orange { --card-color: #FED7AA; }
.lorica-card.color-white { --card-color: #FFFFFF; }
.lorica-card.color-coral { --card-color: #FECACA; }

/* Folded corner effect for all cards */
.lorica-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.08) 50%);
    border-radius: 0 4px 0 0;
    pointer-events: none;
    z-index: 1;
}

/* Tape effect at top for all cards */
.lorica-card::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 1;
}

.lorica-card:hover {
    box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.2), 0 0 2px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Standard top row: priority left, group right */
.lorica-card .card-top-row {
    position: absolute;
    top: 6px;
    left: 8px;
    right: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 5;
}

.lorica-card .card-top-row .card-priority {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

.lorica-card .card-top-row .card-priority.high { background: rgba(220,38,38,0.25); color: #991B1B; }
.lorica-card .card-top-row .card-priority.medium { background: rgba(217,119,6,0.25); color: #92400E; }
.lorica-card .card-top-row .card-priority.low { background: rgba(22,163,74,0.25); color: #166534; }
.lorica-card .card-top-row .card-priority.critical { background: rgba(127,29,29,0.3); color: #7F1D1D; }

.lorica-card .card-top-row .card-group-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: rgba(0, 0, 0, 0.45);
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: opacity 0.15s ease;
}

/* Color picker (appears on hover, replaces group badge) */
.lorica-card .card-color-picker {
    position: absolute;
    top: 6px;
    right: 8px;
    display: flex;
    gap: 3px;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 30;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 6px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    pointer-events: auto;
}

.lorica-card:hover .card-color-picker {
    opacity: 1;
}

.lorica-card:hover .card-top-row .card-group-badge {
    opacity: 0;
}

/* Edit button in card top row */
.lorica-card .card-top-row .edit-card-btn {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease, background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.lorica-card:hover .card-top-row .edit-card-btn {
    opacity: 1;
}

.lorica-card .card-top-row .edit-card-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.lorica-card .card-top-row .edit-card-btn svg {
    color: var(--color-text-secondary);
}

.lorica-card .card-color-picker .color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    transition: transform 0.1s ease;
    pointer-events: auto;
    position: relative;
    z-index: 25;
}

.lorica-card .card-color-picker .color-dot:hover {
    transform: scale(1.2);
}

.lorica-card .card-color-picker .color-dot.yellow { background: #FEF3C7; }
.lorica-card .card-color-picker .color-dot.pink { background: #FECDD3; }
.lorica-card .card-color-picker .color-dot.blue { background: #BFDBFE; }
.lorica-card .card-color-picker .color-dot.green { background: #BBF7D0; }
.lorica-card .card-color-picker .color-dot.purple { background: #DDD6FE; }
.lorica-card .card-color-picker .color-dot.orange { background: #FED7AA; }

/* Card content styling */
.lorica-card .card-title,
.lorica-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.85);
    margin: 0 0 4px 0;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.lorica-card .card-desc,
.lorica-card p {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Card actions at bottom */
.lorica-card .card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* ============================================
   END UNIFIED CARD SYSTEM
   ============================================ */

/* Post-it Note Card Styling (Kanban specific overrides) */
/* Uses unified .lorica-card system - only add kanban-specific styles */
.kanban-card.lorica-card {
    border-radius: 2px;
    cursor: grab;
    user-select: none;
    min-height: 120px;
    padding: 16px;
    padding-top: 32px; /* Space for priority + group row */
    padding-bottom: 50px; /* Space for action buttons */
    overflow: visible; /* Override base overflow:hidden to show buttons */
}

/* Ensure top row is above card content */
.kanban-card.lorica-card .card-top-row {
    z-index: 10;
}

/* Title stays below top row */
.kanban-card.lorica-card h4 {
    position: relative;
    z-index: 1;
    margin-top: 4px;
}

/* Card top-left container for project + priority */
.kanban-card.lorica-card .card-top-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

/* Project badge in top row */
.kanban-card.lorica-card .card-top-row .project-badge {
    font-size: 8px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Kanban uses lorica-card pseudo-elements, just override border-radius */
.kanban-card.lorica-card::before {
    border-radius: 0 2px 0 0;
}

.kanban-card:hover {
    box-shadow:
        4px 4px 10px rgba(0, 0, 0, 0.2),
        0 0 2px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px) rotate(-0.5deg);
}

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

.kanban-card.dragging {
    opacity: 0.7;
    transform: scale(1.03) rotate(2deg);
    box-shadow:
        8px 8px 20px rgba(0, 0, 0, 0.25),
        0 0 3px rgba(0, 0, 0, 0.15);
    cursor: grabbing;
    z-index: 100;
}

/* Post-it Color Options */
.kanban-card.color-yellow { --card-color: #FEF3C7; }
.kanban-card.color-pink { --card-color: #FECDD3; }
.kanban-card.color-blue { --card-color: #BFDBFE; }
.kanban-card.color-green { --card-color: #BBF7D0; }
.kanban-card.color-purple { --card-color: #DDD6FE; }
.kanban-card.color-orange { --card-color: #FED7AA; }
.kanban-card.color-white { --card-color: #FFFFFF; }
.kanban-card.color-coral { --card-color: #FECACA; }

/* Column/Group Badge */
.card-column-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(0, 0, 0, 0.4);
    max-width: calc(100% - 36px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Color picker in card */
.card-color-picker {
    position: absolute;
    top: 6px;
    right: 24px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 8px;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
}

.kanban-card:hover .card-color-picker {
    opacity: 1;
}

.color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    pointer-events: auto;
    position: relative;
    z-index: 15;
}

.color-dot:hover {
    transform: scale(1.25);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    border-color: rgba(0, 0, 0, 0.3);
}

.color-dot:active {
    transform: scale(1.1);
}

.color-dot.yellow { background: #FEF3C7; }
.color-dot.pink { background: #FECDD3; }
.color-dot.blue { background: #BFDBFE; }
.color-dot.green { background: #BBF7D0; }
.color-dot.purple { background: #DDD6FE; }
.color-dot.orange { background: #FED7AA; }

.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-xs);
    margin-top: var(--space-sm);
}

.card-priority.high {
    background: rgba(220, 38, 38, 0.2);
    color: #991B1B;
}

.card-priority.medium {
    background: rgba(217, 119, 6, 0.2);
    color: #92400E;
}

.card-priority.low {
    background: rgba(22, 163, 74, 0.2);
    color: #166534;
}

.card-priority.critical {
    background: rgba(127, 29, 29, 0.3);
    color: #7F1D1D;
}

.kanban-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: rgba(0, 0, 0, 0.85);
    line-height: 1.4;
    min-height: 1.4em;
    cursor: pointer;
}

.card-desc,
.card-description {
    font-size: var(--font-size-sm);
    color: rgba(0, 0, 0, 0.65);
    margin-bottom: var(--space-sm);
    line-height: 1.5;
}

.scheduled-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    margin-bottom: var(--space-sm);
}

.scheduled-time-badge svg {
    flex-shrink: 0;
}

.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 - always visible */
.kanban-card .card-actions {
    justify-content: flex-end;
    position: absolute;
    bottom: 12px;
    right: 12px;
    left: 12px;
}

.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);
}

/* Idea completion button in actions */
.idea-actions .complete-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--text-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.idea-actions .complete-btn svg {
    width: 14px;
    height: 14px;
    stroke-width: 3;
}

.idea-actions .complete-btn:hover {
    border-color: var(--color-success);
    color: var(--color-success);
    background: rgba(34, 197, 94, 0.1);
}

.idea-actions .complete-btn.active {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

/* Completed idea card styling */
.idea-card.idea-completed {
    opacity: 0.7;
    position: relative;
}

.idea-card.idea-completed::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 2px;
    background: var(--color-success);
    opacity: 0.5;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

.idea-card.idea-completed .idea-title {
    text-decoration: line-through;
    color: var(--text-secondary);
}

/* 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);
}

/* Kanban complete button - checkmark icon */
.kanban-complete-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    background: var(--color-success);
    border: 2px solid var(--color-success);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kanban-complete-btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 3;
}

.kanban-complete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.4);
}

/* Kanban completed badge */
.kanban-completed-badge {
    padding: var(--space-xs) var(--space-sm);
    background: rgba(34, 197, 94, 0.15);
    color: var(--color-success);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: 600;
}

.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
   =========================================== */

/* Growth Date Navigation */
.growth-date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-lg);
    flex-wrap: wrap;
}

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

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

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

.growth-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

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

.growth-day-label,
.growth-week-label {
    font-size: var(--font-size-sm);
    font-weight: 500;
    min-width: 70px;
    text-align: center;
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
}

.growth-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: 500;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.growth-today-btn.active {
    background: var(--color-primary);
}

.growth-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--color-bg-elevated);
    padding: 4px;
    border-radius: var(--radius-md);
}

.growth-view-btn {
    padding: var(--space-xs) var(--space-sm);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

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

.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);
}

/* Date Navigation for Daily Entry */
.date-navigation {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.date-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.date-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.date-nav-btn svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary);
}

.current-date {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    min-width: 100px;
    text-align: center;
}

.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 Timeline */
.wins-timeline {
    position: relative;
    padding: var(--space-md) 0;
    margin-bottom: var(--space-lg);
    max-height: 400px;
    overflow-y: auto;
}

.wins-timeline::-webkit-scrollbar {
    width: 4px;
}

.wins-timeline::-webkit-scrollbar-track {
    background: var(--color-bg-subtle);
    border-radius: 4px;
}

.wins-timeline::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 4px;
}

.wins-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-brand-gold), var(--color-brand-gold-light));
    border-radius: 2px;
}

/* Win cards - using unified card system */
.win-card.lorica-card {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    margin-left: 32px;
    animation: slideInLeft 0.3s ease;
    border: none;
}

.win-card.lorica-card:hover {
    transform: translateY(-2px);
}

/* Win card timeline dot - using separate element since ::before is for corner */
.win-card.lorica-card .win-timeline-dot {
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--card-color);
    border: 2px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    z-index: 5;
}

.win-card.lorica-card .win-trophy {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.08);
    border-radius: var(--radius-sm);
    font-size: 20px;
    margin-top: 4px;
}

.win-card.lorica-card .win-card-content {
    flex: 1;
    min-width: 0;
    margin-top: 4px;
}

.win-card.lorica-card .win-content {
    font-size: var(--font-size-sm);
    color: rgba(0,0,0,0.8);
    font-weight: 500;
    line-height: 1.4;
    word-break: break-word;
}

.win-card.lorica-card .win-date {
    font-size: var(--font-size-xs);
    color: rgba(0,0,0,0.45);
    margin-top: 6px;
}

/* Journal entries - using unified card system */
.journal-entry.lorica-card {
    margin-bottom: var(--space-md);
    border: none;
}

.journal-entry.lorica-card:hover {
    transform: translateY(-2px);
}

.journal-entry.lorica-card .entry-content {
    font-size: var(--font-size-sm);
    color: rgba(0,0,0,0.8);
    line-height: 1.5;
}

.journal-entry.lorica-card .entry-content strong {
    color: rgba(0,0,0,0.9);
    font-weight: 600;
}

.journal-entry.lorica-card .entry-mood {
    font-size: var(--font-size-xs);
    color: rgba(0,0,0,0.5);
    margin-top: 8px;
}

.journal-entry.lorica-card .entry-date {
    font-size: var(--font-size-xs);
    color: rgba(0,0,0,0.45);
    margin-top: 8px;
}

.wins-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-tertiary);
}

.wins-empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

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

/* Legacy carousel support */
.wins-carousel {
    display: none;
}

.win-slide {
    display: none;
}

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

.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); }

/* Heatmap Loading & Empty States */
.heatmap-loading,
.heatmap-empty,
.heatmap-empty-note {
    padding: var(--space-lg);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
}

.heatmap-empty-note {
    padding: var(--space-md);
    margin-top: var(--space-sm);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    color: var(--color-success);
}

/* 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-loading,
.audit-empty {
    padding: var(--space-lg);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
}

.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 entries - using unified card system */
.playbook-entry.lorica-card {
    margin-bottom: var(--space-md);
    border: none;
}

.playbook-entry.lorica-card:hover {
    transform: translateY(-2px);
}

.playbook-entry.lorica-card .playbook-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: rgba(0,0,0,0.85);
    margin-bottom: 6px;
}

.playbook-entry.lorica-card .entry-content p {
    font-size: var(--font-size-sm);
    color: rgba(0,0,0,0.7);
    line-height: 1.4;
    margin: 0;
}

.playbook-entry.lorica-card .entry-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.playbook-entry.lorica-card:hover .entry-actions {
    opacity: 1;
}

.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 action buttons */
.entry-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.archive-entry:hover .entry-actions {
    opacity: 1;
}

.entry-edit-btn,
.entry-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.entry-edit-btn:hover {
    background: var(--color-focus-light);
    color: var(--color-focus);
}

.entry-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
}

.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;
}

/* ===========================================
   FORTRESS VIEW (Email & SMS Unified Inbox)
   =========================================== */

/* Fortress view only displays when active - inherits display:none from .view */
.fortress-view.active {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

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

.fortress-title-section h2 {
    font-family: var(--font-serif);
    font-size: var(--font-size-2xl);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.fortress-subtitle {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

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

.fortress-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);
}

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

.fortress-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: 200px;
}

/* Fortress KPI Cards */
.fortress-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.fortress-kpi-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

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

.fortress-kpi-card .kpi-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.fortress-kpi-card .kpi-icon svg {
    width: 24px;
    height: 24px;
}

.fortress-kpi-card .kpi-icon.blue {
    background: rgba(78, 205, 196, 0.15);
    color: var(--color-accent);
}

.fortress-kpi-card .kpi-icon.gold {
    background: rgba(244, 162, 97, 0.15);
    color: var(--color-warning);
}

.fortress-kpi-card .kpi-icon.red {
    background: rgba(229, 62, 62, 0.15);
    color: var(--color-error);
}

.fortress-kpi-card .kpi-icon.green {
    background: rgba(72, 187, 120, 0.15);
    color: var(--color-success);
}

.fortress-kpi-card .kpi-content {
    display: flex;
    flex-direction: column;
}

.fortress-kpi-card .kpi-value {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--color-text-primary);
}

.fortress-kpi-card .kpi-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

/* Fortress Filters */
.fortress-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
    gap: var(--space-md);
    flex-wrap: wrap;
}

.fortress-filter-tabs {
    display: flex;
    gap: var(--space-xs);
    background: var(--color-bg-subtle);
    padding: 4px;
    border-radius: var(--radius-md);
}

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

.filter-tab svg {
    width: 16px;
    height: 16px;
}

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

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

.filter-tab[data-filter="black-hole"].active {
    background: var(--color-error);
    color: white;
}

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

.type-btn {
    padding: var(--space-xs) var(--space-md);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-tertiary);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

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

/* Fortress Content */
.fortress-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: var(--space-md);
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.fortress-message-list {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow-y: auto;
}

.fortress-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: var(--space-2xl);
    text-align: center;
    color: var(--color-text-tertiary);
}

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

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

.fortress-empty-state p {
    margin-bottom: var(--space-lg);
}

/* Message Item */
.fortress-message-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: var(--transition-fast);
}

.fortress-message-item:hover {
    background: var(--color-bg-subtle);
}

.fortress-message-item.active {
    background: rgba(78, 205, 196, 0.1);
    border-left: 3px solid var(--color-accent);
}

.fortress-message-item.unread {
    background: var(--color-bg-elevated);
}

.fortress-message-item.unread .message-sender {
    font-weight: 600;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--color-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--color-text-secondary);
    flex-shrink: 0;
}

.message-avatar.email {
    background: rgba(78, 205, 196, 0.15);
    color: var(--color-accent);
}

.message-avatar.sms {
    background: rgba(244, 162, 97, 0.15);
    color: var(--color-warning);
}

.message-content {
    flex: 1;
    min-width: 0;
}

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

.message-sender {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    flex-shrink: 0;
}

.message-subject {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: var(--space-xs);
}

.message-preview {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-badges {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-xs);
}

.message-badge {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
}

.message-badge.focus {
    background: rgba(244, 162, 97, 0.15);
    color: var(--color-warning);
}

.message-badge.attachment {
    background: var(--color-bg-subtle);
    color: var(--color-text-tertiary);
}

.message-badge svg {
    width: 12px;
    height: 12px;
}

/* Detail Panel */
.fortress-detail-panel {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.detail-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-text-tertiary);
}

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

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

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

.detail-sender-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.detail-sender-info h3 {
    font-size: var(--font-size-md);
    font-weight: 600;
    margin-bottom: 2px;
}

.detail-sender-email {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

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

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

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

.action-btn.focus-btn:hover {
    background: rgba(244, 162, 97, 0.15);
    color: var(--color-warning);
}

.action-btn.black-hole-btn:hover {
    background: rgba(229, 62, 62, 0.15);
    color: var(--color-error);
}

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

.detail-subject {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.detail-subject h2 {
    font-size: var(--font-size-lg);
    font-weight: 500;
}

.detail-meta {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
}

.detail-body {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
}

.detail-body-content {
    font-size: var(--font-size-md);
    line-height: 1.7;
    color: var(--color-text-primary);
}

.detail-attachments {
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
}

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

.attachment-item {
    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-md);
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: var(--transition-fast);
}

.attachment-item:hover {
    border-color: var(--color-accent);
}

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

.detail-quick-actions {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-elevated);
}

.quick-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.quick-action-btn:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

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

.quick-action-btn.focus:hover {
    background: var(--color-warning);
    color: white;
}

.quick-action-btn.black-hole {
    background: rgba(229, 62, 62, 0.1);
    border-color: var(--color-error);
    color: var(--color-error);
}

.quick-action-btn.black-hole:hover {
    background: var(--color-error);
    color: white;
}

.quick-action-btn.block-sender {
    background: rgba(139, 92, 246, 0.1);
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.quick-action-btn.block-sender:hover {
    background: #8b5cf6;
    color: white;
}

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

/* Responsive */
@media (max-width: 1024px) {
    .fortress-content {
        grid-template-columns: 1fr;
    }

    .fortress-detail-panel {
        display: none;
    }

    .fortress-detail-panel.active {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100;
        border-radius: 0;
    }

    .fortress-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .fortress-kpi-row {
        grid-template-columns: 1fr;
    }

    .fortress-filter-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ===========================================
   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 - using unified card system */
.idea-card.lorica-card {
    display: flex;
    flex-direction: column;
    border: none;
}

.idea-card.lorica-card:hover {
    transform: translateY(-2px);
}

.idea-card.lorica-card .idea-title {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: rgba(0,0,0,0.85);
    margin-bottom: 8px;
    line-height: 1.3;
}

.idea-card.lorica-card .idea-footer {
    margin-top: auto;
    padding-top: 8px;
}

.idea-card.lorica-card .idea-date {
    font-size: var(--font-size-xs);
    color: rgba(0,0,0,0.45);
}

.idea-card.lorica-card .idea-actions {
    display: flex;
    gap: 4px;
}

.idea-card.lorica-card .idea-action-btn {
    background: rgba(0,0,0,0.05);
    border: none;
    border-radius: 4px;
    padding: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s, background 0.15s;
}

.idea-card.lorica-card .idea-action-btn:hover {
    opacity: 1;
    background: rgba(0,0,0,0.1);
}

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

/* Starred indicator uses box-shadow instead of ::after to preserve tape effect */
.idea-card.lorica-card.starred {
    box-shadow:
        2px 2px 5px rgba(0, 0, 0, 0.15),
        0 0 1px rgba(0, 0, 0, 0.1),
        inset 0 3px 0 var(--color-warning);
}

.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
   =========================================== */

/* ============================================
   POLISHED MODALS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    padding: 0;
    max-width: 440px;
    width: 100%;
    position: relative;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 10px;
    font-size: 18px;
    color: #64748B;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1E293B;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: fadeIn 0.2s ease;
}

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

/* ==================== GLOBAL SEARCH MODAL ==================== */
.search-modal-overlay {
    z-index: 1200;
}

.search-modal {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    max-width: 640px;
    width: 95%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--color-border);
    animation: modalSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

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

#globalSearchInput {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--font-size-md);
    color: var(--color-text-primary);
    outline: none;
}

#globalSearchInput::placeholder {
    color: var(--color-text-tertiary);
}

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

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

.search-clear-btn.visible {
    display: flex;
}

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

#closeSearchModal {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--space-xs) var(--space-sm);
}

#closeSearchModal kbd {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-size: var(--font-size-xs);
    font-family: inherit;
    color: var(--color-text-tertiary);
}

.search-filters {
    display: flex;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
}

.search-filter {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    border: 1px solid var(--color-border);
    background: transparent;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-fast);
}

.search-filter:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.search-filter.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.search-results-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    min-height: 200px;
    max-height: 60vh;
}

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

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

.search-result-group h5 {
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xs);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    letter-spacing: 0.05em;
}

.search-result-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.search-result-item:hover {
    background: var(--color-bg-subtle);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.search-result-content {
    flex: 1;
    min-width: 0;
}

.search-result-title {
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-title mark {
    background: var(--color-warning-light, rgba(245, 158, 11, 0.2));
    color: inherit;
    padding: 0 2px;
    border-radius: 2px;
}

.search-result-meta {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    display: flex;
    gap: var(--space-sm);
}

/* Search Insights Panel */
.search-insights {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(59, 130, 246, 0.1));
    border-radius: var(--radius-md);
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.insights-header {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

.insights-header svg {
    width: 16px;
    height: 16px;
}

.insights-content {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    line-height: 1.5;
}

/* Quick Actions */
.search-quick-actions h4 {
    font-size: var(--font-size-sm);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
    font-weight: 500;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.quick-action {
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
}

.quick-action:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: var(--color-primary-light, rgba(139, 92, 246, 0.1));
}

/* Search Loading State */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    gap: var(--space-md);
    color: var(--color-text-tertiary);
}

.search-loading .loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Search Empty State */
.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    text-align: center;
    color: var(--color-text-tertiary);
}

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

.search-empty p {
    margin-bottom: var(--space-md);
}

.search-empty #emptyQuery {
    color: var(--color-text-secondary);
    font-weight: 500;
}

/* Quick Modal (Add as Win prompt) */
.quick-modal {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.05),
        0 10px 20px rgba(0, 0, 0, 0.1),
        0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.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;
}

/* Quick Project Modal (smaller, inline creation) */
.quick-project-modal {
    max-width: 400px;
}

.quick-project-modal .color-input {
    width: 50px;
    height: 38px;
    padding: 2px;
    border-radius: var(--radius-md);
    cursor: pointer;
}

/* Add New Project option styling in dropdown */
.add-new-option {
    font-style: italic;
    color: var(--color-primary);
    border-top: 1px solid var(--color-border);
}

/* Ensure quick project modal appears above other modals */
#quickProjectModalOverlay {
    z-index: 10001;
}

.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);
}

/* ============================================
   POLISHED FORM ELEMENTS
   ============================================ */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    font-size: 15px;
    color: #1E293B;
    transition: all 0.2s ease;
}

.form-input:hover,
.form-select:hover {
    border-color: rgba(0, 0, 0, 0.2);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.form-input::placeholder {
    color: #94A3B8;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
    line-height: 1.5;
}

.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;
}

/* Ensure modal footer buttons are visible */
.modal-footer .btn-primary,
.edit-modal .btn-primary {
    background: #2563EB !important;
    color: white !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.modal-footer .btn-primary:hover,
.edit-modal .btn-primary:hover {
    background: #1d4ed8 !important;
}

.modal-footer .btn-secondary,
.edit-modal .btn-secondary {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border: 1px solid #d1d5db !important;
}

.modal-footer .btn-danger,
.edit-modal .btn-danger {
    background: #dc2626 !important;
    color: white !important;
}

/* ============================================
   POLISHED BUTTONS
   ============================================ */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.2);
}

.btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}

.btn-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-accent,
.btn-success {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.btn-accent:hover,
.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.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;
}

/* Card promote section (Strategic to Blueprint) */
.card-promote-section {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: var(--radius-md);
    text-align: center;
    border: 1px dashed rgba(59, 130, 246, 0.3);
}

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

.card-promote-section .btn-accent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
    color: white;
    font-weight: 500;
}

.card-promote-section .btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.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);
}

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

.complete-focus {
    padding: var(--space-md) var(--space-xl);
    background: var(--accent);
    border: 2px solid var(--accent);
    border-radius: var(--radius-full);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
}

.complete-focus:hover {
    background: var(--accent-dark, #7C3AED);
    transform: scale(1.05);
}

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

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

@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;
    }

    /* Growth Date Nav Mobile */
    .growth-date-nav {
        flex-direction: column;
        gap: var(--space-sm);
        padding: var(--space-sm);
    }

    .growth-day-nav,
    .growth-week-nav {
        width: 100%;
        justify-content: center;
    }

    .growth-view-toggle {
        width: 100%;
        justify-content: center;
    }

    .growth-day-label,
    .growth-week-label {
        min-width: 60px;
        font-size: var(--font-size-xs);
    }

    /* 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 and upgrade banners for paid users */
body[data-user-tier="pro"] .ad-container,
body[data-user-tier="pro"] .ad-sidebar,
body[data-user-tier="pro"] .upgrade-banner,
body[data-user-tier="team"] .ad-container,
body[data-user-tier="team"] .ad-sidebar,
body[data-user-tier="team"] .upgrade-banner,
body[data-user-tier="admin"] .ad-container,
body[data-user-tier="admin"] .ad-sidebar,
body[data-user-tier="admin"] .upgrade-banner,
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;
}

/* Upgrade Modal */
.upgrade-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.upgrade-modal {
    background: var(--color-bg-elevated);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

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

.upgrade-modal-close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: var(--space-xs);
    line-height: 1;
    transition: color var(--transition-fast);
}

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

.upgrade-modal-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.upgrade-modal h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

.upgrade-modal p {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
    font-size: var(--font-size-md);
}

.upgrade-benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 var(--space-lg);
    text-align: left;
}

.upgrade-benefits li {
    padding: var(--space-xs) 0;
    padding-left: var(--space-lg);
    position: relative;
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
}

.upgrade-benefits li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--color-success);
    font-weight: bold;
}

.upgrade-modal-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.upgrade-modal-btn {
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.upgrade-modal-btn.primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark, #1a1a2e) 100%);
    color: white;
}

.upgrade-modal-btn.primary:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(var(--color-primary-rgb, 99, 102, 241), 0.4);
}

.upgrade-modal-btn.secondary {
    background: transparent;
    color: var(--color-text-muted);
}

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

/* 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 paid users */
body[data-user-tier="pro"] .promo-banner-inline,
body[data-user-tier="team"] .promo-banner-inline,
body[data-user-tier="admin"] .promo-banner-inline,
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);
    }
}

/* ===========================================
   WAKE WORD DETECTION STYLES
   =========================================== */

/* Wake Word Indicator Ring around Orb */
.orb-wake-indicator {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Subtle indicator when wake word is enabled */
.lorica-orb.wake-enabled .orb-wake-indicator {
    border-color: rgba(59, 130, 246, 0.3);
}

/* Pulsing animation when actively listening for wake word */
.lorica-orb.wake-enabled .orb-wake-indicator.listening {
    animation: wakeIndicatorPulse 3s ease-in-out infinite;
}

@keyframes wakeIndicatorPulse {
    0%, 100% {
        border-color: rgba(59, 130, 246, 0.2);
        transform: scale(1);
    }
    50% {
        border-color: rgba(59, 130, 246, 0.5);
        transform: scale(1.05);
    }
}

/* Flash effect when wake word is detected */
.lorica-orb.wake-detected {
    animation: wakeDetectedFlash 0.5s ease-out;
}

.lorica-orb.wake-detected .orb-wake-indicator {
    border-color: #3B82F6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    animation: wakeDetectedRing 0.5s ease-out;
}

@keyframes wakeDetectedFlash {
    0% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes wakeDetectedRing {
    0% {
        border-width: 2px;
        opacity: 1;
    }
    100% {
        border-width: 8px;
        opacity: 0;
    }
}

/* Wake Word Section in Settings */
.wake-word-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
}

.wake-word-section h4 {
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
    font-size: 15px;
    font-weight: 600;
}

/* Toggle Switch Component */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--color-border);
    border-radius: 26px;
    transition: background-color 0.2s ease;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Preference Item Layout */
.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.preference-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preference-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-primary);
}

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

/* Wake Word Status Indicator */
.wake-word-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: rgba(59, 130, 246, 0.08);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--color-text-secondary);
}

.wake-word-status .status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3B82F6;
    animation: wakeStatusPulse 2s ease-in-out infinite;
}

@keyframes wakeStatusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Privacy Note */
.privacy-note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.privacy-note svg {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
}

/* Dark Mode for Wake Word Styles */
@media (prefers-color-scheme: dark) {
    .lorica-orb.wake-enabled .orb-wake-indicator {
        border-color: rgba(59, 130, 246, 0.4);
    }

    .toggle-slider {
        background-color: var(--color-bg-subtle);
    }

    .wake-word-status {
        background: rgba(59, 130, 246, 0.12);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .toggle-switch {
        width: 44px;
        height: 24px;
    }

    .toggle-slider:before {
        height: 18px;
        width: 18px;
    }

    .toggle-switch input:checked + .toggle-slider:before {
        transform: translateX(20px);
    }
}

/* 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);
    }
}

/* Lorica Search Results in Chat */
.lorica-search-results {
    font-size: var(--font-size-sm);
}

.lorica-search-results .search-category {
    margin: var(--space-sm) 0;
}

.lorica-search-results .search-category strong {
    color: var(--color-primary);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.lorica-search-results ul {
    margin: var(--space-xs) 0 0 0;
    padding-left: var(--space-md);
    list-style: disc;
}

.lorica-search-results li {
    margin-bottom: 2px;
    color: var(--color-text-secondary);
}

.lorica-search-results li .meta {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-xs);
}

.lorica-search-results .search-tip {
    margin-top: var(--space-sm);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    font-style: italic;
}

/* Action Status Indicator */
.lorica-action-status {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    animation: fadeIn 0.3s ease-out;
}

.lorica-action-status.success {
    background: rgba(129, 178, 154, 0.15);
    border-left: 3px solid var(--color-success);
    color: var(--color-success);
}

.lorica-action-status.error {
    background: rgba(230, 57, 70, 0.1);
    border-left: 3px solid var(--color-stop);
    color: var(--color-stop);
}

.lorica-action-status .status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lorica-action-status .status-icon svg {
    width: 16px;
    height: 16px;
}

.lorica-action-status .status-text {
    font-weight: 500;
}

/* 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;
    }
}

/* ===========================================
   LORICA ACTION PREVIEW
   =========================================== */

.lorica-action-preview {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 320px;
    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: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lorica-action-preview.active {
    opacity: 1;
    transform: translateY(0);
}

.lorica-action-preview .action-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    font-weight: 600;
    color: var(--color-text-primary);
}

.lorica-action-preview .action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, rgba(197, 160, 89, 0.15), rgba(212, 175, 55, 0.15));
    border-radius: var(--radius-md);
    color: var(--color-brand-gold);
}

.lorica-action-preview .action-icon svg {
    stroke: var(--color-brand-gold);
}

.lorica-action-preview .action-type {
    font-size: 14px;
}

.lorica-action-preview .action-details {
    background: var(--color-bg-subtle);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
    font-size: 13px;
}

.lorica-action-preview .action-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-xs) 0;
    gap: var(--space-sm);
}

.lorica-action-preview .action-detail-row + .action-detail-row {
    border-top: 1px solid var(--color-border-subtle);
}

.lorica-action-preview .detail-label {
    color: var(--color-text-tertiary);
    font-weight: 500;
    flex-shrink: 0;
}

.lorica-action-preview .detail-value {
    color: var(--color-text-primary);
    text-align: right;
    word-break: break-word;
}

.lorica-action-preview .detail-value.priority-urgent,
.lorica-action-preview .detail-value.priority-high {
    color: var(--color-stop);
    font-weight: 600;
}

.lorica-action-preview .detail-value.priority-medium {
    color: var(--color-caution);
}

.lorica-action-preview .detail-value.priority-low {
    color: var(--color-go);
}

.lorica-action-preview .action-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.lorica-action-preview .btn-small {
    padding: var(--space-xs) var(--space-md);
    font-size: 13px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lorica-action-preview .btn-primary {
    background: linear-gradient(135deg, var(--color-brand-gold), #D4AF37);
    color: var(--color-bg-primary);
    border: none;
}

.lorica-action-preview .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.4);
}

.lorica-action-preview .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.lorica-action-preview .btn-secondary {
    background: var(--color-bg-elevated);
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

.lorica-action-preview .btn-secondary:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-border-hover);
}

.lorica-action-preview .btn-ghost {
    background: transparent;
    color: var(--color-text-tertiary);
    border: none;
}

.lorica-action-preview .btn-ghost:hover {
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
}

/* Animation for action preview entry */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .lorica-action-preview {
        left: var(--space-md);
        right: var(--space-md);
        width: auto;
        bottom: 80px;
    }
}

/* Dark mode adjustments */
body.dark-mode .lorica-action-preview {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
}

body.dark-mode .lorica-action-preview .action-details {
    background: var(--color-bg-primary);
}

/* ===========================================
   LORICA WORKFLOW PREVIEW
   =========================================== */

.lorica-workflow-preview {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-height: 500px;
    overflow-y: auto;
    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: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.lorica-workflow-preview.active {
    opacity: 1;
    transform: translateY(0);
}

.lorica-workflow-preview .workflow-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.lorica-workflow-preview .workflow-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-radius: var(--radius-md);
    color: #8B5CF6;
    flex-shrink: 0;
}

.lorica-workflow-preview .workflow-icon svg {
    stroke: #8B5CF6;
}

.lorica-workflow-preview .workflow-title-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    flex: 1;
}

.lorica-workflow-preview .workflow-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    line-height: 1.3;
}

.lorica-workflow-preview .workflow-trigger-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
    width: fit-content;
}

.lorica-workflow-preview .workflow-trigger-badge.scheduled {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.lorica-workflow-preview .workflow-trigger-badge.manual {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.lorica-workflow-preview .workflow-trigger-badge.event {
    background: rgba(99, 102, 241, 0.1);
    color: #6366F1;
}

.lorica-workflow-preview .workflow-description {
    font-size: 13px;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.lorica-workflow-preview .workflow-trigger-details {
    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);
    margin-bottom: var(--space-md);
    font-size: 13px;
}

.lorica-workflow-preview .trigger-icon {
    color: var(--color-text-tertiary);
}

.lorica-workflow-preview .trigger-text {
    color: var(--color-text-secondary);
}

.lorica-workflow-preview .trigger-schedule {
    color: var(--color-text-primary);
    font-weight: 500;
    font-family: var(--font-mono, monospace);
}

.lorica-workflow-preview .workflow-steps {
    margin-bottom: var(--space-md);
}

.lorica-workflow-preview .workflow-steps-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-sm);
}

.lorica-workflow-preview .workflow-step {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    position: relative;
}

.lorica-workflow-preview .workflow-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 11px;
    top: 28px;
    bottom: -8px;
    width: 2px;
    background: var(--color-border);
}

.lorica-workflow-preview .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--color-bg-subtle);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-secondary);
    flex-shrink: 0;
    z-index: 1;
}

.lorica-workflow-preview .step-content {
    flex: 1;
    min-width: 0;
}

.lorica-workflow-preview .step-action {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: 2px;
}

.lorica-workflow-preview .step-params {
    font-size: 12px;
    color: var(--color-text-tertiary);
    word-break: break-word;
}

.lorica-workflow-preview .workflow-buttons {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border-subtle);
}

.lorica-workflow-preview .btn-small {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    font-size: 13px;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lorica-workflow-preview .btn-primary {
    background: linear-gradient(135deg, #6366F1, #8B5CF6);
    color: white;
    border: none;
}

.lorica-workflow-preview .btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.lorica-workflow-preview .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.lorica-workflow-preview .btn-ghost {
    background: transparent;
    color: var(--color-text-tertiary);
    border: none;
}

.lorica-workflow-preview .btn-ghost:hover {
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .lorica-workflow-preview {
        left: var(--space-md);
        right: var(--space-md);
        width: auto;
        bottom: 80px;
        max-height: 400px;
    }
}

/* Dark mode adjustments */
body.dark-mode .lorica-workflow-preview {
    background: var(--color-bg-elevated);
    border-color: var(--color-border);
}

body.dark-mode .lorica-workflow-preview .workflow-trigger-details {
    background: var(--color-bg-primary);
}

/* ===========================================
   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;
}

/* ============================================
   GOOGLE CALENDAR SYNC SETTINGS
   ============================================ */

.gcal-status-card {
    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-lg);
}

.gcal-status-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.gcal-status-indicator .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--color-text-tertiary);
}

.gcal-status-indicator .status-dot.synced {
    background: var(--color-success);
    box-shadow: 0 0 8px rgba(46, 204, 113, 0.5);
}

.gcal-status-indicator .status-dot.error {
    background: var(--color-danger);
}

.gcal-status-indicator .status-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.gcal-conflict-badge {
    background: rgba(231, 76, 60, 0.1);
    color: var(--color-danger);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.gcal-accounts-section,
.gcal-conflicts-section,
.gcal-history-section {
    margin-bottom: var(--space-xl);
}

.gcal-accounts-section .section-header,
.gcal-conflicts-section .section-header,
.gcal-history-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.gcal-accounts-section .section-header h4,
.gcal-conflicts-section .section-header h4,
.gcal-history-section .section-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

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

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

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

.gcal-account-card .account-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--color-bg-subtle);
}

.gcal-account-card .account-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gcal-account-card .account-email {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.gcal-account-card .account-nickname {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.gcal-account-card .account-status .status-badge {
    font-size: 0.75rem;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    background: rgba(46, 204, 113, 0.1);
    color: var(--color-success);
}

.gcal-account-card .account-status .status-badge.error {
    background: rgba(231, 76, 60, 0.1);
    color: var(--color-danger);
}

.gcal-account-card .account-calendars {
    padding: var(--space-sm) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-md);
}

.gcal-calendar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) 0;
}

.gcal-calendar-item .calendar-name {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.gcal-calendar-item .calendar-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.gcal-calendar-item .sync-toggle-small {
    position: relative;
    width: 36px;
    height: 20px;
    background: var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.gcal-calendar-item .sync-toggle-small::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
}

.gcal-calendar-item .sync-toggle-small.enabled {
    background: var(--color-success);
}

.gcal-calendar-item .sync-toggle-small.enabled::after {
    transform: translateX(16px);
}

.gcal-account-card .account-actions {
    display: flex;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.gcal-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-tertiary);
}

.gcal-empty .empty-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.gcal-empty p {
    margin: 0 0 var(--space-xs);
}

.gcal-empty .hint {
    font-size: 0.75rem;
}

/* Conflict Resolution */
.gcal-conflicts-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.gcal-conflict-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: rgba(231, 76, 60, 0.05);
    border: 1px solid rgba(231, 76, 60, 0.2);
    border-radius: var(--radius-md);
}

.gcal-conflict-item .conflict-info {
    flex: 1;
}

.gcal-conflict-item .conflict-title {
    font-weight: 500;
    color: var(--color-text-primary);
}

.gcal-conflict-item .conflict-date {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.gcal-conflict-item .conflict-actions {
    display: flex;
    gap: var(--space-xs);
}

/* Conflict Modal */
.conflict-content {
    max-width: 700px;
}

.conflict-comparison {
    display: flex;
    gap: var(--space-lg);
    align-items: stretch;
}

.conflict-side {
    flex: 1;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    text-align: center;
}

.conflict-side h4 {
    font-size: 0.875rem;
    margin: 0 0 var(--space-md);
    color: var(--color-text-secondary);
}

.conflict-side .conflict-data {
    text-align: left;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: var(--space-md);
    min-height: 100px;
}

.conflict-side .conflict-data .data-field {
    margin-bottom: var(--space-xs);
}

.conflict-side .conflict-data .data-label {
    font-weight: 500;
    color: var(--color-text-tertiary);
}

.conflict-vs {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

/* Sync History */
.gcal-history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.gcal-history-list .history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.gcal-history-list .history-item .history-time {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

.gcal-history-list .history-item .history-stats {
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
}

/* Google icon indicator on synced time blocks */
.time-block.google-synced::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%234285F4' d='M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z'/%3E%3Cpath fill='%2334A853' d='M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z'/%3E%3Cpath fill='%23FBBC05' d='M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z'/%3E%3Cpath fill='%23EA4335' d='M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
}

.time-block.google-synced:hover::before {
    opacity: 1;
}

/* Conflict indicator on time blocks */
.time-block.has-conflict {
    border-left-color: var(--color-danger) !important;
    background: rgba(231, 76, 60, 0.05);
}

.time-block.has-conflict::after {
    content: '⚠️';
    position: absolute;
    top: 4px;
    right: 24px;
    font-size: 12px;
}

/* Loading spinner small variant */
.loading-spinner.small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

/* 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;
}

/* ==========================================================================
   MODE TOGGLE (Personal / Teams)
   For enterprise users to switch between personal and teams view
   ========================================================================== */

.mode-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    background: var(--color-bg-subtle, #f1f5f9);
    border-radius: var(--radius-lg, 12px);
    margin-right: var(--space-md, 16px);
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md, 8px);
    font-size: var(--font-size-sm, 14px);
    font-weight: 500;
    color: var(--color-text-secondary, #64748b);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mode-btn svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.mode-btn:hover {
    background: var(--color-bg-elevated, #ffffff);
    color: var(--color-text-primary, #1e293b);
}

.mode-btn.active {
    background: var(--color-bg-elevated, #ffffff);
    color: var(--color-text-primary, #1e293b);
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}

.mode-btn.active svg {
    opacity: 1;
    color: var(--color-primary, #6366f1);
}

/* Teams Mode Button Active State */
.mode-btn[data-mode="teams"].active {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
}

.mode-btn[data-mode="teams"].active svg {
    color: white;
}

/* Nav item styling for enterprise views */
.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
}

.nav-item.enterprise-only {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-item.enterprise-only.active {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    border-color: transparent;
}

/* Teams mode body class adjustments */
body.teams-mode .app-header {
    top: 48px; /* Below scope bar */
}

body.teams-mode .main-nav {
    top: calc(48px + var(--header-height, 60px));
}

body.teams-mode .app-main {
    margin-top: calc(48px + var(--header-height, 60px) + var(--nav-height, 52px));
}

/* Responsive mode toggle */
@media (max-width: 768px) {
    .mode-toggle {
        padding: 2px;
        margin-right: var(--space-sm, 8px);
    }

    .mode-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .mode-btn span {
        display: none;
    }

    .mode-btn svg {
        margin: 0;
    }
}

/* ========================================
   USER PROJECTS SYSTEM
   ======================================== */

/* Card Meta Row */
.card-meta-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-xs);
    flex-wrap: wrap;
}

/* Idea Header Left (contains project badge + category) */
.idea-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

/* Project Badge on Cards */
.project-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    margin-right: var(--space-xs);
    white-space: nowrap;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Blueprint KPIs Section */
.blueprint-kpis {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: var(--color-bg-elevated);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.blueprint-kpis .section-header {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: var(--color-text);
}

.blueprint-kpis .project-filter {
    margin-bottom: var(--space-lg);
}

.blueprint-kpis .project-filter .form-select {
    width: 100%;
    max-width: 250px;
}

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

.kpi-card {
    text-align: center;
    padding: var(--space-md);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.kpi-value {
    display: block;
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.kpi-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: var(--space-xs);
}

/* Growth Project Filter */
.growth-project-filter {
    margin-left: auto;
}

.growth-project-filter .form-select {
    min-width: 150px;
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
}

/* Projects Manager (for Settings/Modal) */
.projects-manager {
    padding: var(--space-lg);
}

.projects-manager h3 {
    margin-bottom: var(--space-md);
}

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

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

.project-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.project-status {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    padding: 2px 8px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-sm);
}

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

.project-actions button {
    padding: var(--space-xs);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.project-actions button:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text);
}

/* Project Color Picker */
.project-colors {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.project-color-option {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition-fast);
}

.project-color-option:hover,
.project-color-option.selected {
    border-color: var(--color-text);
    transform: scale(1.1);
}

/* Responsive KPIs */
@media (max-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .kpi-value {
        font-size: var(--font-size-xl);
    }

    .growth-project-filter {
        margin-left: 0;
        margin-top: var(--space-sm);
        width: 100%;
    }

    .growth-project-filter .form-select {
        width: 100%;
    }
}

/* Settings Projects Tab */
.projects-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.projects-header h3 {
    margin: 0;
}

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

.projects-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-secondary);
}

.projects-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

/* Project Form */
.project-form {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}

.project-form h4 {
    margin: 0 0 var(--space-md) 0;
}

.project-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

/* Button small variant */
.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--font-size-sm);
}

.btn-sm svg {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

/* ========================================
   GLOBAL BUTTON FIX - Ensure all buttons visible
   ======================================== */

/* Primary buttons - blue background */
.btn.btn-primary,
.settings-modal .btn-primary,
.modal .btn-primary,
.edit-modal .btn-primary,
.modal-footer .btn-primary,
.project-form .btn-primary,
#changePasswordBtn,
#saveProjectForm,
#addProjectBtn {
    background: #2563EB !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn.btn-primary:hover,
.settings-modal .btn-primary:hover,
.modal .btn-primary:hover,
.edit-modal .btn-primary:hover,
.modal-footer .btn-primary:hover,
.project-form .btn-primary:hover,
#changePasswordBtn:hover,
#saveProjectForm:hover,
#addProjectBtn:hover {
    background: #1d4ed8 !important;
}

/* Secondary buttons - outlined style */
.btn.btn-secondary,
.settings-modal .btn-secondary,
.modal .btn-secondary,
.edit-modal .btn-secondary,
.modal-footer .btn-secondary,
.project-form .btn-secondary,
#cancelProjectForm,
#cancelCardModal,
#cancelIdeaModal {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border: 1px solid #e2e8f0 !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn.btn-secondary:hover,
.settings-modal .btn-secondary:hover,
.modal .btn-secondary:hover,
.edit-modal .btn-secondary:hover,
.modal-footer .btn-secondary:hover,
.project-form .btn-secondary:hover,
#cancelProjectForm:hover,
#cancelCardModal:hover,
#cancelIdeaModal:hover {
    background: #e2e8f0 !important;
}

/* Danger buttons - red */
.btn.btn-danger,
.modal-footer .btn-danger,
#deleteCardModal {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn.btn-danger:hover,
.modal-footer .btn-danger:hover,
#deleteCardModal:hover {
    background: #dc2626 !important;
}

/* Warning buttons - orange/yellow */
.btn.btn-warning,
#archiveIdeaModal {
    background: #f59e0b !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn.btn-warning:hover,
#archiveIdeaModal:hover {
    background: #d97706 !important;
}

/* Accent buttons - purple */
.btn.btn-accent,
#promoteToBlueprint,
#promoteIdeaBtn {
    background: #8B5CF6 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.btn.btn-accent:hover,
#promoteToBlueprint:hover,
#promoteIdeaBtn:hover {
    background: #7c3aed !important;
}

/* AI Settings Test Key button */
#testApiKey,
.byok-form .btn-primary {
    background: #2563EB !important;
    color: white !important;
    border: none !important;
}

/* Small buttons */
.btn-sm {
    padding: 6px 12px !important;
    font-size: 0.875rem !important;
}

/* ===========================================
   ANALYTICS DASHBOARD COMPONENTS
   Phase 1: Visual Dashboard Overhaul
   =========================================== */

/* Glass Card Effect */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

/* KPI Card Component */
.kpi-card {
    position: relative;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-accent, var(--gradient-purple));
}

.kpi-card .kpi-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.kpi-card .kpi-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-card .kpi-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    font-weight: 500;
}

.kpi-card .kpi-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    margin-top: 8px;
}

.kpi-card .kpi-trend.up {
    color: var(--chart-success);
}

.kpi-card .kpi-trend.down {
    color: var(--chart-danger);
}

.kpi-card .kpi-trend.neutral {
    color: var(--color-text-tertiary);
}

.kpi-card .kpi-sublabel {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: 4px;
}

/* Compact KPI Card */
.kpi-card.compact {
    padding: 16px;
}

.kpi-card.compact .kpi-value {
    font-size: 1.75rem;
}

/* Chart Card Container */
.chart-card {
    padding: 24px;
    border-radius: var(--radius-xl);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
}

.chart-card h3,
.chart-card h4 {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 16px;
}

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

.chart-card .chart-legend {
    display: flex;
    gap: 16px;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.chart-card .legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-card .legend-item .dot,
.chart-card .legend-item .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Analytics Layout */
.blueprint-analytics {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Blueprint analytics KPI cards - 2x2 grid since in narrow right column */
.blueprint-analytics .analytics-row.stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.blueprint-analytics .kpi-card.insight-card {
    padding: 14px 16px;
    gap: 10px;
}

.blueprint-analytics .kpi-card.insight-card .kpi-icon-wrap {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    min-height: 40px;
    max-height: 40px;
}

.blueprint-analytics .kpi-card.insight-card .kpi-icon-wrap svg {
    width: 20px;
    height: 20px;
    min-width: 20px;
    max-width: 20px;
    min-height: 20px;
    max-height: 20px;
}

.blueprint-analytics .kpi-card.insight-card .kpi-value {
    font-size: 1.5rem;
}

.blueprint-analytics .kpi-card.insight-card .kpi-label {
    font-size: 10px;
}

/* Legacy Growth Dashboard */
.growth-dashboard:not(.beautiful-dashboard) {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Beautiful Growth Dashboard */
.growth-dashboard.beautiful-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.02);
}

.analytics-row {
    display: grid;
    gap: 16px;
}

.analytics-row.stats-row {
    grid-template-columns: repeat(4, 1fr);
}

.analytics-row.completions-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

/* Success icon wrap for completions */
.kpi-icon-wrap.success {
    background: rgba(16, 185, 129, 0.1);
}

.kpi-icon-wrap.success svg {
    color: var(--color-success);
}

/* Total completions card styling */
.kpi-card.insight-card.total-completions {
    border-left: 4px solid var(--color-success);
}

/* Journal chart card gradients */
.chart-card.insight-chart.mood-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8B5CF6, #EC4899);
}

.chart-card.insight-chart.wins-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10B981, #F59E0B);
}

.chart-card.insight-chart.activity-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #10B981, #F59E0B);
}

/* Full width chart card support */
.chart-card.insight-chart.full-width {
    grid-column: span 2;
    width: 100%;
    flex: 1 1 100%;
}

/* Blueprint/Schedule Analytics cards */
.kpi-card.insight-card.focus-hours {
    --insight-gradient: linear-gradient(90deg, #3B82F6, #60A5FA);
    --insight-icon-bg: rgba(59, 130, 246, 0.12);
    --insight-icon-color: #3B82F6;
}

.kpi-card.insight-card.tasks-done {
    --insight-gradient: linear-gradient(90deg, #10B981, #34D399);
    --insight-icon-bg: rgba(16, 185, 129, 0.12);
    --insight-icon-color: #10B981;
}

.kpi-card.insight-card.nn-completion-card {
    --insight-gradient: linear-gradient(90deg, #8B5CF6, #A78BFA);
    --insight-icon-bg: rgba(139, 92, 246, 0.12);
    --insight-icon-color: #8B5CF6;
}

.kpi-card.insight-card.day-streak {
    --insight-gradient: linear-gradient(90deg, #F59E0B, #FBBF24);
    --insight-icon-bg: rgba(245, 158, 11, 0.12);
    --insight-icon-color: #F59E0B;
}

/* Mini stats cards */
.kpi-card.insight-card.mini.avg-focus {
    --insight-gradient: linear-gradient(90deg, #F97316, #FB923C);
    --insight-icon-bg: rgba(249, 115, 22, 0.12);
    --insight-icon-color: #F97316;
}

.kpi-card.insight-card.mini.peak-hour {
    --insight-gradient: linear-gradient(90deg, #EC4899, #F472B6);
    --insight-icon-bg: rgba(236, 72, 153, 0.12);
    --insight-icon-color: #EC4899;
}

.kpi-card.insight-card.mini.weekly-wins {
    --insight-gradient: linear-gradient(90deg, #10B981, #34D399);
    --insight-icon-bg: rgba(16, 185, 129, 0.12);
    --insight-icon-color: #10B981;
}

/* Mini card compact styling */
.kpi-card.insight-card.mini {
    padding: 14px 16px;
}

.kpi-card.insight-card.mini .kpi-icon-wrap {
    width: 40px;
    height: 40px;
}

.kpi-card.insight-card.mini .kpi-icon-wrap svg {
    width: 20px;
    height: 20px;
}

.kpi-card.insight-card.mini .kpi-value {
    font-size: 1.5rem;
}

/* Mini stats row - 3 columns */
.mini-stats-row {
    grid-template-columns: repeat(3, 1fr) !important;
}

/* Blueprint chart gradients */
.chart-card.insight-chart.productivity-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #10B981);
}

.chart-card.insight-chart.time-distribution-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8B5CF6, #EC4899, #F59E0B);
}

/* Beautiful dashboard container for Blueprint */
.blueprint-analytics.beautiful-dashboard {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.02);
}

.blueprint-analytics.beautiful-dashboard .dashboard-header {
    margin-bottom: 20px;
}

.blueprint-analytics.beautiful-dashboard .dashboard-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1E293B;
    display: flex;
    align-items: center;
    gap: 10px;
}

.blueprint-analytics.beautiful-dashboard .dashboard-header h3::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    border-radius: 50%;
}

.analytics-row.chart-row {
    display: flex;
    gap: 16px;
}

.analytics-row.chart-row .chart-card {
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.analytics-row.chart-row .chart-card canvas {
    flex: 1;
    max-height: 180px;
}

.analytics-row.split-row {
    grid-template-columns: 1fr 200px;
    align-items: stretch;
}

/* Mini Stats Column */
.mini-stats-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

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

.mini-stat .mini-value {
    display: block;
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--chart-primary);
}

.mini-stat .mini-label {
    display: block;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: 4px;
}

/* Productivity Score Card */
.score-card {
    padding: 24px;
}

.score-gauge {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.score-gauge .score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--chart-primary);
}

.score-breakdown {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.score-factor {
    display: flex;
    align-items: center;
    gap: 12px;
}

.score-factor span {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    min-width: 100px;
}

.factor-bar {
    flex: 1;
    height: 8px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.factor-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--value, 0%);
    background: var(--gradient-purple);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

/* Ideas Dashboard */
/* Beautiful Ideas Dashboard */
.ideas-dashboard.beautiful-dashboard {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.02);
}

.ideas-dashboard:not(.beautiful-dashboard) {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
}

.ideas-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

/* Legacy Ideas KPI card styling (without insight-card class) */
.ideas-kpi-row .kpi-card:not(.insight-card) {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.ideas-kpi-row .kpi-card:not(.insight-card) .kpi-icon {
    font-size: 20px;
    margin-bottom: 4px;
}

.ideas-kpi-row .kpi-card:not(.insight-card) .kpi-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.ideas-kpi-row .kpi-card:not(.insight-card) .kpi-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
}

.ideas-charts-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 16px;
}

/* Legacy chart card styling (without insight-chart class) */
.ideas-charts-row .chart-card:not(.insight-chart) {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 16px;
}

.ideas-charts-row .chart-card:not(.insight-chart) h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-primary);
}

/* Growth Charts Row */
.growth-charts-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.growth-charts-row .chart-card {
    padding: 16px;
}

.growth-charts-row .chart-card h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-primary);
}

/* Ideas Metrics Bar (legacy) */
.ideas-metrics-bar {
    display: none; /* Hidden - replaced by ideas-dashboard */
}

.metric-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--color-bg-subtle);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
}

.metric-pill .metric-value {
    font-weight: 700;
    color: var(--color-text-primary);
}

.metric-pill .metric-label {
    color: var(--color-text-secondary);
}

.metric-pill.highlight {
    background: var(--color-primary-light);
}

.metric-pill.highlight .metric-value {
    color: var(--color-primary);
}

/* Strategic Dashboard */
.strategic-dashboard {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
}

.strategic-dashboard.collapsed {
    padding: 0;
}

.strategic-dashboard.collapsed .strategic-kpi-row,
.strategic-dashboard.collapsed .strategic-charts-row {
    display: none;
}

.strategic-dashboard.collapsed .dashboard-toggle {
    width: 100%;
    border-radius: var(--radius-xl);
    justify-content: center;
    padding: 16px;
}

.strategic-dashboard.collapsed .dashboard-toggle .chevron {
    transform: rotate(180deg);
}

/* KPI Row */
.strategic-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.strategic-kpi-row .kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.strategic-kpi-row .kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--card-accent, var(--gradient-blue));
}

.strategic-kpi-row .kpi-icon {
    font-size: 24px;
    opacity: 0.9;
}

.strategic-kpi-row .kpi-content {
    flex: 1;
}

.strategic-kpi-row .kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text-primary);
    line-height: 1;
}

.strategic-kpi-row .kpi-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin-top: 4px;
}

.strategic-kpi-row .kpi-trend {
    font-size: var(--font-size-xs);
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-full);
}

.strategic-kpi-row .kpi-trend.up {
    background: #dcfce7;
    color: #16a34a;
}

.strategic-kpi-row .kpi-trend.down {
    background: #fef2f2;
    color: #dc2626;
}

.strategic-kpi-row .kpi-trend.neutral {
    background: #f1f5f9;
    color: #64748b;
}

/* Charts Row */
.strategic-charts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.strategic-charts-row .chart-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    padding: 16px;
    min-height: 200px;
}

.strategic-charts-row .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.strategic-charts-row .chart-header h4 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
}

.strategic-charts-row .chart-period {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
}

/* Strategic Analytics Panel */
.strategic-analytics {
    margin-top: 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.02);
}

.strategic-analytics .analytics-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    transition: all 0.2s ease;
}

.strategic-analytics .analytics-toggle:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.strategic-analytics .analytics-toggle span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.strategic-analytics .analytics-toggle span::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #3B82F6, #8B5CF6);
    border-radius: 50%;
}

.strategic-analytics .analytics-toggle .chevron {
    transition: transform 0.2s ease;
    color: #64748B;
}

.strategic-analytics.collapsed .analytics-toggle .chevron {
    transform: rotate(-90deg);
}

.strategic-analytics .analytics-content {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.strategic-analytics.collapsed .analytics-content {
    display: none;
}

.strategic-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.strategic-kpi-row .kpi-card {
    background: var(--color-bg-subtle);
    border: none;
}

/* ============================================
   BEAUTIFUL TASK INSIGHTS CARDS
   ============================================ */

/* Insight Card Styling */
.kpi-card.insight-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
    min-height: 80px;
}

.kpi-card.insight-card:hover {
    transform: translateY(-3px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Gradient accent at top */
.kpi-card.insight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--insight-gradient);
}

/* Individual card gradients */
.kpi-card.insight-card.open-tasks {
    --insight-gradient: linear-gradient(90deg, #3B82F6, #60A5FA);
    --insight-icon-bg: rgba(59, 130, 246, 0.12);
    --insight-icon-color: #3B82F6;
}

.kpi-card.insight-card.completed-week {
    --insight-gradient: linear-gradient(90deg, #10B981, #34D399);
    --insight-icon-bg: rgba(16, 185, 129, 0.12);
    --insight-icon-color: #10B981;
}

.kpi-card.insight-card.in-progress {
    --insight-gradient: linear-gradient(90deg, #F59E0B, #FBBF24);
    --insight-icon-bg: rgba(245, 158, 11, 0.12);
    --insight-icon-color: #F59E0B;
}

.kpi-card.insight-card.velocity {
    --insight-gradient: linear-gradient(90deg, #8B5CF6, #A78BFA);
    --insight-icon-bg: rgba(139, 92, 246, 0.12);
    --insight-icon-color: #8B5CF6;
}

/* Ideas Dashboard cards */
.kpi-card.insight-card.total-ideas {
    --insight-gradient: linear-gradient(90deg, #F59E0B, #FBBF24);
    --insight-icon-bg: rgba(245, 158, 11, 0.12);
    --insight-icon-color: #F59E0B;
}

.kpi-card.insight-card.this-week-ideas {
    --insight-gradient: linear-gradient(90deg, #10B981, #34D399);
    --insight-icon-bg: rgba(16, 185, 129, 0.12);
    --insight-icon-color: #10B981;
}

.kpi-card.insight-card.pinned-ideas {
    --insight-gradient: linear-gradient(90deg, #EC4899, #F472B6);
    --insight-icon-bg: rgba(236, 72, 153, 0.12);
    --insight-icon-color: #EC4899;
}

.kpi-card.insight-card.archived-ideas {
    --insight-gradient: linear-gradient(90deg, #6366F1, #818CF8);
    --insight-icon-bg: rgba(99, 102, 241, 0.12);
    --insight-icon-color: #6366F1;
}

/* Journal/Growth Dashboard cards */
.kpi-card.insight-card.productivity-score {
    --insight-gradient: linear-gradient(90deg, #8B5CF6, #A78BFA);
    --insight-icon-bg: rgba(139, 92, 246, 0.12);
    --insight-icon-color: #8B5CF6;
}

.kpi-card.insight-card.wins-count {
    --insight-gradient: linear-gradient(90deg, #10B981, #34D399);
    --insight-icon-bg: rgba(16, 185, 129, 0.12);
    --insight-icon-color: #10B981;
}

.kpi-card.insight-card.streak-count {
    --insight-gradient: linear-gradient(90deg, #F59E0B, #FBBF24);
    --insight-icon-bg: rgba(245, 158, 11, 0.12);
    --insight-icon-color: #F59E0B;
}

.kpi-card.insight-card.journal-entries {
    --insight-gradient: linear-gradient(90deg, #3B82F6, #60A5FA);
    --insight-icon-bg: rgba(59, 130, 246, 0.12);
    --insight-icon-color: #3B82F6;
}

/* Ideas chart cards */
.chart-card.insight-chart.category-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F59E0B, #EC4899);
}

.chart-card.insight-chart.trend-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10B981, #3B82F6);
}

/* Icon wrapper */
.kpi-card.insight-card .kpi-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    max-width: 48px;
    min-height: 48px;
    max-height: 48px;
    background: var(--insight-icon-bg);
    border-radius: 12px;
    flex-shrink: 0;
    overflow: hidden;
}

.kpi-card.insight-card .kpi-icon-wrap svg {
    width: 24px;
    height: 24px;
    min-width: 24px;
    max-width: 24px;
    min-height: 24px;
    max-height: 24px;
    stroke: var(--insight-icon-color);
    stroke-width: 2;
    flex-shrink: 0;
}

/* Content styling */
.kpi-card.insight-card .kpi-content {
    flex: 1;
    min-width: 0;
}

.kpi-card.insight-card .kpi-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1;
    letter-spacing: -0.02em;
}

.kpi-card.insight-card .kpi-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748B;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Insight Chart Cards */
.chart-card.insight-chart {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.chart-card.insight-chart:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 8px 24px rgba(0, 0, 0, 0.06);
}

.chart-card.insight-chart .chart-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.chart-card.insight-chart .chart-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1E293B;
    margin: 0;
}

.chart-card.insight-chart .chart-subtitle {
    font-size: 12px;
    color: #94A3B8;
    font-weight: 500;
}

.chart-card.insight-chart .chart-body {
    padding: 16px 20px 20px;
}

/* Chart specific styling */
.chart-card.velocity-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6);
}

.chart-card.distribution-chart::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #F59E0B, #EF4444, #10B981);
}

/* Strategic charts row - 2 column layout */
.strategic-analytics .strategic-charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .kpi-card.insight-card {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .kpi-card.insight-card .kpi-value {
        color: #F1F5F9;
    }

    .kpi-card.insight-card .kpi-label {
        color: #94A3B8;
    }

    .chart-card.insight-chart {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .chart-card.insight-chart .chart-header h4 {
        color: #F1F5F9;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .strategic-analytics .strategic-charts-row {
        grid-template-columns: 1fr;
    }

    .kpi-card.insight-card {
        padding: 14px 16px;
    }

    .kpi-card.insight-card .kpi-icon-wrap {
        width: 40px;
        height: 40px;
        min-width: 40px;
        max-width: 40px;
        min-height: 40px;
        max-height: 40px;
    }

    .kpi-card.insight-card .kpi-icon-wrap svg {
        width: 20px;
        height: 20px;
        min-width: 20px;
        max-width: 20px;
        min-height: 20px;
        max-height: 20px;
    }

    .kpi-card.insight-card .kpi-value {
        font-size: 1.5rem;
    }
}

/* Dashboard Toggle */
.dashboard-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
}

.dashboard-toggle:hover {
    background: var(--color-bg-subtle);
    border-color: var(--color-text-tertiary);
}

.dashboard-toggle .chevron {
    transition: transform var(--transition-fast);
}

/* Lorica AI Nudge */
.lorica-nudge {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-xl);
    max-width: 320px;
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

.lorica-nudge.hidden {
    display: none;
}

.lorica-nudge .nudge-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.lorica-nudge .nudge-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.lorica-nudge .nudge-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-primary);
    line-height: 1.5;
}

.lorica-nudge .nudge-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--color-text-tertiary);
    cursor: pointer;
    font-size: 1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lorica-nudge .nudge-dismiss:hover {
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

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

/* Growth Dashboard Grid */
.growth-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.growth-dashboard .full-width {
    grid-column: span 2;
}

.growth-dashboard .mood-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.growth-dashboard .mood-trend.up {
    color: var(--chart-success);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .analytics-row.stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .analytics-row.chart-row {
        flex-direction: column;
    }

    .analytics-row.chart-row .chart-card {
        flex: 1 1 auto !important;
    }

    .analytics-row.split-row {
        grid-template-columns: 1fr;
    }

    .growth-dashboard {
        grid-template-columns: 1fr;
    }

    .growth-dashboard .full-width {
        grid-column: span 1;
    }

    .strategic-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .strategic-charts-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .analytics-row.stats-row {
        grid-template-columns: 1fr;
    }

    .strategic-analytics .analytics-row {
        grid-template-columns: 1fr;
    }

    .strategic-kpi-row {
        grid-template-columns: 1fr;
    }

    .strategic-kpi-row .kpi-card {
        padding: 12px;
    }

    .strategic-kpi-row .kpi-value {
        font-size: 1.5rem;
    }

    .strategic-dashboard {
        padding: 16px;
    }

    .ideas-metrics-bar {
        flex-wrap: wrap;
    }

    .lorica-nudge {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* Activity Heatmap Styles */
.activity-heatmap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
}

.heatmap-row {
    display: flex;
    gap: 4px;
    align-items: center;
}

.heatmap-row.header {
    margin-bottom: 4px;
}

.heatmap-label {
    width: 40px;
    font-size: 10px;
    color: var(--color-text-secondary);
    text-align: right;
    padding-right: 8px;
}

.heatmap-day {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.heatmap-cell {
    flex: 1;
    height: 24px;
    border-radius: 4px;
    transition: transform var(--transition-fast);
}

.heatmap-cell:hover {
    transform: scale(1.1);
    cursor: pointer;
}

.heatmap-cell.level-0 { background: #F1F5F9; }
.heatmap-cell.level-1 { background: #C7D2FE; }
.heatmap-cell.level-2 { background: #A5B4FC; }
.heatmap-cell.level-3 { background: #818CF8; }
.heatmap-cell.level-4 { background: var(--chart-primary); }

/* Mood legend in chart header */
.mood-legend {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--color-text-secondary);
}

/* ===========================================
   ENHANCED MOBILE RESPONSIVENESS
   Phase 5: Comprehensive mobile improvements
   =========================================== */

/* Safe Area Insets for Modern Phones (notch support) */
@supports (padding: max(0px)) {
    .app-header {
        padding-left: max(var(--space-md), env(safe-area-inset-left));
        padding-right: max(var(--space-md), env(safe-area-inset-right));
    }

    .main-nav {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .modal-content {
        padding-left: max(var(--space-lg), env(safe-area-inset-left));
        padding-right: max(var(--space-lg), env(safe-area-inset-right));
    }
}

/* Mobile-First Touch Targets (minimum 44px) */
@media (max-width: 768px) {
    /* Ensure all interactive elements meet touch target requirements */
    .btn,
    .auth-button,
    .nav-item,
    .day-nav-btn,
    .view-toggle-btn,
    .modal-close,
    .icon-btn,
    button {
        min-height: 44px;
        min-width: 44px;
    }

    /* Navigation bottom bar improvements */
    .main-nav {
        background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    }

    .nav-item {
        flex-direction: column;
        gap: 4px;
        padding: 8px 6px;
        font-size: 10px;
        min-height: 52px;
    }

    .nav-item svg {
        width: 22px;
        height: 22px;
    }

    .nav-item.active {
        background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
        color: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    /* Improved mobile modals - full screen on small devices */
    .modal-content {
        margin: 0;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        padding: 20px;
        padding-top: 60px;
    }

    .modal-close {
        position: fixed;
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(8px);
        border-radius: 50%;
        z-index: 10;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .quick-modal .modal-content {
        min-height: auto;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
        animation: slideUpModal 0.3s ease;
    }

    /* Form inputs optimized for touch */
    .form-input,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px; /* Prevents iOS zoom on focus */
        padding: 14px 16px;
        min-height: 48px;
        border-radius: 12px;
    }

    /* Better button spacing on mobile */
    .btn,
    .auth-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        justify-content: center;
    }

    .btn + .btn,
    .auth-button + .auth-button {
        margin-top: 12px;
    }

    .btn-group,
    .warning-actions,
    .timer-controls,
    .modal-actions {
        flex-direction: column;
        gap: 12px;
    }

    .btn-group .btn,
    .warning-actions .btn,
    .timer-controls .btn,
    .modal-actions .btn {
        width: 100%;
    }

    /* Card improvements for mobile */
    .kanban-card,
    .lorica-card,
    .idea-card,
    .nn-card {
        padding: 16px;
        border-radius: 14px;
    }

    .kanban-card h4,
    .lorica-card h4,
    .idea-card h3 {
        font-size: 15px;
        line-height: 1.4;
    }

    /* Swipe-friendly card actions */
    .card-actions {
        display: flex;
        gap: 8px;
        padding-top: 12px;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        margin-top: 12px;
    }

    .card-actions .btn {
        flex: 1;
        min-height: 40px;
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Better spacing for KPI/insight cards on mobile */
    .analytics-row.stats-row {
        gap: 12px;
    }

    .kpi-card.insight-card {
        padding: 16px;
        border-radius: 14px;
    }

    .kpi-card.insight-card .kpi-icon-wrap {
        width: 44px;
        height: 44px;
        min-width: 44px;
        max-width: 44px;
        min-height: 44px;
        max-height: 44px;
    }

    .kpi-card.insight-card .kpi-icon-wrap svg {
        width: 22px;
        height: 22px;
        min-width: 22px;
        max-width: 22px;
        min-height: 22px;
        max-height: 22px;
    }

    .kpi-card.insight-card .kpi-value {
        font-size: 1.375rem;
    }

    .kpi-card.insight-card .kpi-label {
        font-size: 11px;
    }

    /* Improved date navigation for mobile */
    .day-nav-compact {
        background: rgba(255, 255, 255, 0.8);
        backdrop-filter: blur(8px);
        padding: 8px;
        border-radius: 14px;
        gap: 4px;
    }

    .day-label {
        min-width: 60px;
        padding: 10px 14px;
        font-size: 11px;
        font-weight: 600;
        border-radius: 10px;
    }

    .day-nav-btn {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    /* View toggle improvements */
    .view-toggle {
        padding: 4px;
        border-radius: 12px;
        background: rgba(241, 245, 249, 0.8);
    }

    .view-toggle-btn {
        padding: 10px 14px;
        font-size: 12px;
        border-radius: 10px;
        min-height: 40px;
    }

    /* Beautiful dashboard mobile layout */
    .beautiful-dashboard,
    .blueprint-analytics.beautiful-dashboard,
    .ideas-dashboard.beautiful-dashboard {
        padding: 16px;
        border-radius: 16px;
    }

    .dashboard-header h3 {
        font-size: 16px;
    }

    /* Chart cards mobile */
    .chart-card {
        padding: 16px;
        border-radius: 14px;
    }

    .chart-card .card-header h4 {
        font-size: 14px;
    }

    /* Mobile-optimized Kanban columns */
    .kanban-board {
        gap: 16px;
    }

    .kanban-column {
        padding: 12px;
        border-radius: 14px;
    }

    .kanban-column-header {
        padding: 10px 12px;
        border-radius: 10px;
    }

    /* Journal tabs scrollable on mobile */
    .journal-tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 8px;
    }

    .journal-tabs::-webkit-scrollbar {
        display: none;
    }

    .journal-tab {
        flex-shrink: 0;
        padding: 12px 18px;
        font-size: 13px;
        border-radius: 10px;
    }

    /* Header improvements on mobile */
    .app-header {
        padding: 10px 12px;
    }

    .app-logo {
        font-size: 18px;
    }

    /* Profile menu mobile */
    .profile-menu {
        right: 8px;
        min-width: calc(100vw - 32px);
        max-width: none;
    }

    /* Floating action button position */
    .fab,
    .add-task-fab {
        bottom: calc(var(--nav-height) + 16px + env(safe-area-inset-bottom, 0px));
        right: 16px;
        width: 56px;
        height: 56px;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
}

/* Animation for bottom sheet modals */
@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Small mobile (iPhone SE, etc.) */
@media (max-width: 375px) {
    /* Tighter spacing for small screens */
    .app-main {
        padding: var(--space-xs) var(--space-sm) var(--space-md);
    }

    .kpi-card.insight-card {
        padding: 12px 14px;
    }

    .kpi-card.insight-card .kpi-icon-wrap {
        width: 36px;
        height: 36px;
        min-width: 36px;
        max-width: 36px;
        min-height: 36px;
        max-height: 36px;
    }

    .kpi-card.insight-card .kpi-icon-wrap svg {
        width: 18px;
        height: 18px;
        min-width: 18px;
        max-width: 18px;
        min-height: 18px;
        max-height: 18px;
    }

    .kpi-card.insight-card .kpi-value {
        font-size: 1.25rem;
    }

    .nav-item {
        padding: 6px 4px;
        font-size: 9px;
    }

    .nav-item svg {
        width: 20px;
        height: 20px;
    }

    .day-label {
        min-width: 50px;
        font-size: 10px;
    }

    .modal-content {
        padding: 16px;
        padding-top: 56px;
    }
}

/* Tablet landscape improvements */
@media (min-width: 769px) and (max-width: 1024px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .analytics-row.stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

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

/* Hover state removal for touch devices */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .nav-item:hover,
    .kanban-card:hover,
    .lorica-card:hover,
    .idea-card:hover,
    .kpi-card:hover {
        transform: none;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .nav-item:active,
    .kanban-card:active,
    .lorica-card:active {
        transform: scale(0.98);
    }
}

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

    .modal-content,
    .quick-modal .modal-content {
        animation: none;
    }
}

/* ===========================================
   ENHANCED DARK MODE
   Phase 6: Comprehensive dark theme polish
   =========================================== */

@media (prefers-color-scheme: dark) {
    /* Extended Dark Mode Color Palette */
    :root {
        --color-bg: #0F172A;
        --color-bg-elevated: #1E293B;
        --color-bg-subtle: #334155;
        --color-bg-tertiary: #475569;
        --color-text-primary: #F1F5F9;
        --color-text-secondary: #94A3B8;
        --color-text-tertiary: #64748B;
        --color-border: rgba(255, 255, 255, 0.1);
        --color-border-light: rgba(255, 255, 255, 0.06);
    }

    /* Dark body background */
    body {
        background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    }

    /* Header Dark Mode */
    .app-header {
        background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
        border-bottom-color: rgba(255, 255, 255, 0.06);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .app-logo {
        color: #F1F5F9;
    }

    /* Navigation Dark Mode */
    .main-nav {
        background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
        border-bottom-color: rgba(255, 255, 255, 0.06);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .nav-item {
        color: #94A3B8;
    }

    .nav-item:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #F1F5F9;
    }

    .nav-item.active {
        background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    /* Day Navigation Dark Mode */
    .day-nav-compact {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .day-label {
        background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
        color: #F1F5F9;
        border-color: rgba(255, 255, 255, 0.1);
    }

    .day-nav-btn {
        background: rgba(255, 255, 255, 0.08);
        color: #94A3B8;
    }

    .day-nav-btn:hover {
        background: rgba(59, 130, 246, 0.2);
        color: #60A5FA;
    }

    /* View Toggle Dark Mode */
    .view-toggle {
        background: rgba(30, 41, 59, 0.8);
    }

    .view-toggle-btn {
        color: #94A3B8;
    }

    .view-toggle-btn:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #F1F5F9;
    }

    .view-toggle-btn.active {
        background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
        color: white;
    }

    /* Week Navigation Dark Mode */
    .week-nav-compact {
        background: rgba(30, 41, 59, 0.8);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .week-label {
        background: linear-gradient(135deg, #334155 0%, #1E293B 100%);
        color: #F1F5F9;
    }

    /* Modal Dark Mode */
    .modal {
        background: rgba(0, 0, 0, 0.7);
    }

    .modal-content {
        background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow:
            0 4px 6px rgba(0, 0, 0, 0.2),
            0 10px 20px rgba(0, 0, 0, 0.3),
            0 20px 40px rgba(0, 0, 0, 0.4);
    }

    .modal-content h2,
    .modal-content h3 {
        color: #F1F5F9;
    }

    .modal-content p {
        color: #94A3B8;
    }

    .modal-close {
        color: #94A3B8;
    }

    .modal-close:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #F1F5F9;
    }

    /* Quick Modal Dark Mode */
    .quick-modal .modal-content {
        background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    /* Form Inputs Dark Mode */
    .form-group label {
        color: #F1F5F9;
    }

    .form-input,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        background: #0F172A;
        border-color: rgba(255, 255, 255, 0.12);
        color: #F1F5F9;
    }

    .form-input:focus,
    .form-select:focus,
    input:focus,
    textarea:focus,
    select:focus {
        border-color: #3B82F6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    }

    .form-input::placeholder,
    input::placeholder,
    textarea::placeholder {
        color: #64748B;
    }

    /* Buttons Dark Mode */
    .btn-secondary {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(255, 255, 255, 0.12);
        color: #F1F5F9;
    }

    .btn-secondary:hover:not(:disabled) {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Cards Dark Mode */
    .kanban-card,
    .lorica-card {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .kanban-card:hover,
    .lorica-card:hover {
        border-color: rgba(59, 130, 246, 0.3);
    }

    .kanban-card h4,
    .lorica-card h4 {
        color: #F1F5F9;
    }

    .kanban-card p,
    .lorica-card p {
        color: #94A3B8;
    }

    /* Non-Negotiable Cards Dark Mode */
    .nn-card {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .nn-title {
        color: #F1F5F9;
    }

    .nn-number {
        color: #F1F5F9;
    }

    /* Idea Cards Dark Mode */
    .idea-card {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .idea-card h3 {
        color: #F1F5F9;
    }

    .idea-card p {
        color: #94A3B8;
    }

    /* Kanban Column Dark Mode */
    .kanban-column {
        background: rgba(30, 41, 59, 0.5);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .kanban-column-header {
        background: rgba(15, 23, 42, 0.5);
    }

    .kanban-column-header h3 {
        color: #F1F5F9;
    }

    /* Dashboard Dark Mode */
    .beautiful-dashboard,
    .blueprint-analytics.beautiful-dashboard,
    .ideas-dashboard.beautiful-dashboard,
    .strategic-dashboard {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.06);
    }

    .dashboard-header h3 {
        color: #F1F5F9;
    }

    /* Chart Cards Dark Mode */
    .chart-card {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .chart-card .card-header h4 {
        color: #F1F5F9;
    }

    .chart-card .card-header p {
        color: #94A3B8;
    }

    /* Journal Tabs Dark Mode */
    .journal-tabs {
        background: rgba(30, 41, 59, 0.5);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .journal-tab {
        color: #94A3B8;
    }

    .journal-tab:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #F1F5F9;
    }

    .journal-tab.active {
        background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
        color: white;
    }

    /* Heatmap Dark Mode */
    .heatmap-cell.level-0 { background: #1E293B; }
    .heatmap-cell.level-1 { background: #3730A3; }
    .heatmap-cell.level-2 { background: #4F46E5; }
    .heatmap-cell.level-3 { background: #6366F1; }
    .heatmap-cell.level-4 { background: #818CF8; }

    /* Profile Menu Dark Mode */
    .profile-menu {
        background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .profile-menu-item {
        color: #94A3B8;
    }

    .profile-menu-item:hover {
        background: rgba(255, 255, 255, 0.08);
        color: #F1F5F9;
    }

    /* Lorica Nudge Dark Mode */
    .lorica-nudge {
        background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .lorica-nudge .nudge-text {
        color: #F1F5F9;
    }

    /* Mobile Navigation Dark Mode */
    @media (max-width: 768px) {
        .main-nav {
            background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
            border-top-color: rgba(255, 255, 255, 0.08);
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
        }

        .modal-close {
            background: rgba(30, 41, 59, 0.9);
        }

        .day-nav-compact {
            background: rgba(30, 41, 59, 0.9);
        }

        .view-toggle {
            background: rgba(30, 41, 59, 0.9);
        }
    }

    /* Quick Win Items Dark Mode */
    .quick-win-item {
        background: rgba(30, 41, 59, 0.5);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .quick-win-item:hover {
        background: rgba(59, 130, 246, 0.1);
        border-color: rgba(59, 130, 246, 0.3);
    }

    /* Timer Display Dark Mode */
    .timer-display {
        color: #F1F5F9;
    }

    /* Success/Error States Dark Mode */
    .success-message h2 {
        color: #F1F5F9;
    }

    .success-message p {
        color: #94A3B8;
    }

    /* Scrollbar Dark Mode */
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: #0F172A;
    }

    ::-webkit-scrollbar-thumb {
        background: #334155;
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #475569;
    }

    /* Selection Color Dark Mode */
    ::selection {
        background: rgba(59, 130, 246, 0.4);
        color: #F1F5F9;
    }
}

/* ===========================================
   MICRO-INTERACTIONS
   Phase 7: Delightful animation touches
   =========================================== */

/* Button Press Effect */
.btn,
.auth-button,
.nav-item,
.day-nav-btn,
.view-toggle-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:active:not(:disabled),
.auth-button:active:not(:disabled) {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

/* Card Lift Effect on Hover */
.kanban-card,
.lorica-card,
.idea-card,
.nn-card,
.kpi-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s ease;
}

.kanban-card:hover,
.lorica-card:hover,
.idea-card:hover {
    transform: translateY(-4px);
}

.kpi-card:hover,
.kpi-card.insight-card:hover {
    transform: translateY(-3px);
}

/* Checkbox Bounce Animation */
@keyframes checkboxBounce {
    0% { transform: scale(1); }
    30% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    70% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

input[type="checkbox"]:checked {
    animation: checkboxBounce 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Checkmark Draw Animation */
@keyframes checkmarkDraw {
    0% { stroke-dashoffset: 30; }
    100% { stroke-dashoffset: 0; }
}

.task-checkbox.checked svg,
.nn-checkbox.checked svg {
    animation: checkmarkDraw 0.3s ease-out;
}

/* Input Focus Glow */
.form-input,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea {
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease,
                background-color 0.2s ease;
}

/* Input Label Float Effect */
.form-group.floating-label {
    position: relative;
}

.form-group.floating-label label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0 4px;
}

.form-group.floating-label input:focus + label,
.form-group.floating-label input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
    color: #3B82F6;
    background: white;
}

/* Button Loading Spinner Animation */
@keyframes buttonSpinner {
    to { transform: rotate(360deg); }
}

.btn.loading,
.auth-button.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after,
.auth-button.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: buttonSpinner 0.8s linear infinite;
}

/* Success Checkmark Animation */
@keyframes successPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.success-icon {
    animation: successPop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card Completion Animation */
@keyframes cardComplete {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.kanban-card.completing,
.lorica-card.completing {
    background: linear-gradient(90deg,
        rgba(16, 185, 129, 0.1) 0%,
        rgba(16, 185, 129, 0.2) 50%,
        rgba(16, 185, 129, 0.1) 100%);
    background-size: 200% 200%;
    animation: cardComplete 0.8s ease;
}

/* Pulse Animation for Important Elements */
@keyframes softPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

.pulse-attention {
    animation: softPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Shake Animation for Errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.form-input.error,
.form-group.error .form-input {
    animation: shake 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-color: #EF4444;
}

/* Tooltip Fade Animation */
@keyframes tooltipFade {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}

[data-tooltip]::after {
    animation: tooltipFade 0.2s ease;
}

/* Ripple Effect for Buttons */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Navigation Tab Slide Indicator */
.nav-item {
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3B82F6, #2563EB);
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 2px;
}

.nav-item:hover::after {
    width: 60%;
    left: 20%;
}

.nav-item.active::after {
    width: 80%;
    left: 10%;
}

/* Counter Number Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.kpi-value,
.stat-number {
    animation: countUp 0.5s ease-out;
}

/* Progress Bar Fill Animation */
@keyframes progressFill {
    from { width: 0; }
}

.progress-bar-fill,
.completion-bar {
    animation: progressFill 1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal Backdrop Fade */
.modal {
    transition: opacity 0.3s ease;
}

.modal.closing {
    opacity: 0;
}

/* Modal Content Slide */
.modal-content {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease;
}

.modal.closing .modal-content {
    transform: scale(0.95);
    opacity: 0;
}

/* Notification Slide In */
@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast,
.notification {
    animation: notificationSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger Animation for Lists */
@keyframes staggerFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kanban-card:nth-child(1) { animation-delay: 0ms; }
.kanban-card:nth-child(2) { animation-delay: 50ms; }
.kanban-card:nth-child(3) { animation-delay: 100ms; }
.kanban-card:nth-child(4) { animation-delay: 150ms; }
.kanban-card:nth-child(5) { animation-delay: 200ms; }

.stagger-animation .kanban-card,
.stagger-animation .idea-card,
.stagger-animation .kpi-card {
    animation: staggerFadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

/* Badge Bounce */
@keyframes badgeBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.badge.new,
.notification-badge {
    animation: badgeBounce 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Streak Flame Animation */
@keyframes flameFlicker {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.05) rotate(-2deg); }
    50% { transform: scale(0.98) rotate(2deg); }
    75% { transform: scale(1.02) rotate(-1deg); }
}

.streak-icon,
.flame-icon {
    animation: flameFlicker 1.5s ease-in-out infinite;
}

/* Icon Spin on Interaction */
.icon-refresh:active svg,
.sync-btn:active svg {
    animation: buttonSpinner 0.5s linear;
}

/* Subtle Breathing Animation for Loading States */
@keyframes breathe {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.skeleton,
.loading-placeholder {
    animation: breathe 1.5s ease-in-out infinite;
    background: linear-gradient(90deg,
        var(--color-bg-subtle) 25%,
        var(--color-bg-elevated) 50%,
        var(--color-bg-subtle) 75%);
    background-size: 200% 100%;
}

/* Heart/Like Animation */
@keyframes heartPop {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(0.9); }
    75% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.like-btn.liked svg,
.pin-btn.pinned svg {
    animation: heartPop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #EF4444;
}

/* Confetti-style completion celebration (subtle) */
@keyframes confettiPop {
    0% { transform: scale(0) rotate(0deg); opacity: 1; }
    100% { transform: scale(1.5) rotate(180deg); opacity: 0; }
}

.celebration-particle {
    animation: confettiPop 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ===========================================
   EMPTY STATES
   Phase 8: Beautiful empty state designs
   =========================================== */

/* Base Empty State Container */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
    min-height: 300px;
}

.empty-state-compact {
    padding: 32px 20px;
    min-height: 200px;
}

/* Empty State Illustration */
.empty-state-illustration {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 50%;
    position: relative;
}

.empty-state-illustration::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(139, 92, 246, 0.2));
    z-index: -1;
    opacity: 0.5;
}

.empty-state-illustration svg {
    width: 56px;
    height: 56px;
    color: #3B82F6;
    opacity: 0.8;
}

.empty-state-illustration.small {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
}

.empty-state-illustration.small svg {
    width: 36px;
    height: 36px;
}

/* Empty State Icon Variants */
.empty-state-illustration.tasks {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(34, 197, 94, 0.12) 100%);
}

.empty-state-illustration.tasks svg {
    color: #10B981;
}

.empty-state-illustration.ideas {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(251, 191, 36, 0.12) 100%);
}

.empty-state-illustration.ideas svg {
    color: #F59E0B;
}

.empty-state-illustration.search {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(139, 92, 246, 0.12) 100%);
}

.empty-state-illustration.search svg {
    color: #6366F1;
}

.empty-state-illustration.journal {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.12) 0%, rgba(244, 114, 182, 0.12) 100%);
}

.empty-state-illustration.journal svg {
    color: #EC4899;
}

/* Empty State Text */
.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.empty-state p {
    font-size: 14px;
    color: var(--color-text-secondary);
    max-width: 280px;
    margin: 0 auto 20px;
    line-height: 1.6;
}

.empty-state-compact h3 {
    font-size: 15px;
}

.empty-state-compact p {
    font-size: 13px;
    max-width: 220px;
    margin-bottom: 16px;
}

/* Empty State Action Button */
.empty-state-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.empty-state-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.empty-state-action svg {
    width: 18px;
    height: 18px;
}

.empty-state-action.secondary {
    background: transparent;
    color: #3B82F6;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: none;
}

.empty-state-action.secondary:hover {
    background: rgba(59, 130, 246, 0.08);
    box-shadow: none;
}

/* Kanban Column Empty State */
.kanban-column-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    border: 2px dashed rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    min-height: 120px;
    transition: all 0.2s ease;
}

.kanban-column-empty:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(139, 92, 246, 0.06) 100%);
}

.kanban-column-empty svg {
    width: 32px;
    height: 32px;
    color: #94A3B8;
    margin-bottom: 8px;
    opacity: 0.6;
}

.kanban-column-empty p {
    font-size: 13px;
    color: var(--color-text-tertiary);
    margin: 0;
}

/* Drop Zone Highlight */
.kanban-column-empty.drop-active {
    border-color: #3B82F6;
    background: rgba(59, 130, 246, 0.1);
    animation: softPulse 1.5s ease-in-out infinite;
}

/* No Results State */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}

.no-results-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #F1F5F9 0%, #E2E8F0 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.no-results-icon svg {
    width: 28px;
    height: 28px;
    color: #94A3B8;
}

.no-results h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 4px;
}

.no-results p {
    font-size: 13px;
    color: var(--color-text-secondary);
    max-width: 240px;
}

/* Welcome State for First Time Users */
.welcome-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 30px;
    text-align: center;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    max-width: 500px;
    margin: 40px auto;
}

.welcome-state-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.welcome-state-icon svg {
    width: 48px;
    height: 48px;
    color: white;
}

.welcome-state h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.welcome-state p {
    font-size: 15px;
    color: var(--color-text-secondary);
    max-width: 340px;
    margin-bottom: 24px;
    line-height: 1.6;
}

.welcome-state .get-started-btn {
    padding: 14px 28px;
    font-size: 16px;
}

/* Feature Highlight Cards in Empty States */
.empty-state-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 24px;
    width: 100%;
    max-width: 400px;
}

.empty-state-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: rgba(59, 130, 246, 0.04);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.empty-state-feature:hover {
    background: rgba(59, 130, 246, 0.08);
    transform: translateY(-2px);
}

.empty-state-feature svg {
    width: 24px;
    height: 24px;
    color: #3B82F6;
}

.empty-state-feature span {
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* Loading Skeleton Empty State */
.skeleton-card {
    background: var(--color-bg-elevated);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--color-border-light);
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg,
        var(--color-bg-subtle) 25%,
        var(--color-bg-elevated) 50%,
        var(--color-bg-subtle) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 6px;
    margin-bottom: 12px;
}

.skeleton-line:last-child {
    margin-bottom: 0;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Inline Empty State (for small sections) */
.inline-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    border: 1px dashed rgba(59, 130, 246, 0.2);
    border-radius: 10px;
}

.inline-empty svg {
    width: 24px;
    height: 24px;
    color: #94A3B8;
    flex-shrink: 0;
}

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

.inline-empty .add-link {
    color: #3B82F6;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}

.inline-empty .add-link:hover {
    text-decoration: underline;
}

/* Empty State Dark Mode */
@media (prefers-color-scheme: dark) {
    .empty-state-illustration {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    }

    .empty-state-illustration::before {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(139, 92, 246, 0.25));
    }

    .kanban-column-empty {
        border-color: rgba(59, 130, 246, 0.15);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    }

    .kanban-column-empty:hover {
        border-color: rgba(59, 130, 246, 0.3);
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    }

    .no-results-icon {
        background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    }

    .welcome-state {
        background: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
        border-color: rgba(255, 255, 255, 0.08);
    }

    .empty-state-feature {
        background: rgba(59, 130, 246, 0.08);
        border-color: rgba(59, 130, 246, 0.15);
    }

    .inline-empty {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.06) 0%, rgba(139, 92, 246, 0.06) 100%);
        border-color: rgba(59, 130, 246, 0.15);
    }

    .skeleton-line {
        background: linear-gradient(90deg,
            #1E293B 25%,
            #334155 50%,
            #1E293B 75%);
        background-size: 200% 100%;
    }
}

/* Empty State Mobile Adjustments */
@media (max-width: 768px) {
    .empty-state {
        padding: 32px 20px;
        min-height: 250px;
    }

    .empty-state-illustration {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }

    .empty-state-illustration svg {
        width: 44px;
        height: 44px;
    }

    .empty-state h3 {
        font-size: 16px;
    }

    .empty-state p {
        font-size: 13px;
        max-width: 260px;
    }

    .welcome-state {
        padding: 40px 24px;
        margin: 20px 16px;
    }

    .welcome-state h2 {
        font-size: 20px;
    }

    .welcome-state p {
        font-size: 14px;
    }

    .empty-state-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   LORICA AI - HIDDEN (AI is external only now)
   Eddie 2026-01-28
   Full HTML cleanup pending - this CSS hides the UI
   ============================================ */
.lorica-container,
.lorica-panel,
.lorica-backdrop,
.lorica-action-preview,
.lorica-workflow-preview,
.lorica-nudge,
#loricaContainer,
#loricaPanel,
#loricaBackdrop,
#loricaActionPreview,
#loricaWorkflowPreview,
#loricaNudge,
#askLoricaBtn,
#settingsAI,
.settings-tab[data-tab="ai"],
.lorica-settings-section {
    display: none !important;
}


/* ============================================
   RECURRING EVENTS
   Eddie 2026-01-28
   ============================================ */
.recurring-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recurring-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.recurring-item:hover {
    border-color: var(--primary);
}

.recurring-item.inactive {
    opacity: 0.6;
}

.recurring-item-content {
    flex: 1;
}

.recurring-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.recurring-item-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.recurring-item-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--bg-tertiary);
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.recurring-item-badge.daily { background: #dbeafe; color: #1d4ed8; }
.recurring-item-badge.weekly { background: #dcfce7; color: #16a34a; }
.recurring-item-badge.monthly { background: #fef3c7; color: #d97706; }
.recurring-item-badge.nn { background: #fee2e2; color: #dc2626; }
.recurring-item-badge.tb { background: #e0e7ff; color: #4f46e5; }

.recurring-item-actions {
    display: flex;
    gap: 0.5rem;
}

.recurring-item-actions button {
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.recurring-item-actions button:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.recurring-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.recurring-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.recurring-empty .hint {
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Weekday picker */
.weekday-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.weekday-picker label {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.weekday-picker label:has(input:checked) {
    background: var(--primary);
    color: white;
}

.weekday-picker input {
    display: none;
}

.settings-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ===========================================
   BRIEFINGS VIEW - Presidential Daily Brief
   =========================================== */

.briefings-view {
    padding: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.briefings-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.briefings-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.briefings-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.briefings-date-nav {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.briefings-nav-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.briefings-nav-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-color);
}

.briefings-nav-btn svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.briefings-date {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 160px;
    text-align: center;
}

.briefings-summary {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.briefings-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Briefing Section Card */
.briefing-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.briefing-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.briefing-section-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.briefing-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.briefing-section-category {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--accent-color);
    color: white;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
}

.briefing-section-content {
    padding: 1.25rem;
}

/* Content Types */
.briefing-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

.briefing-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.briefing-metric {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.briefing-metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
}

.briefing-metric-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.briefing-metric.positive .briefing-metric-value { color: var(--success-color, #22c55e); }
.briefing-metric.negative .briefing-metric-value { color: var(--error-color, #ef4444); }
.briefing-metric.warning .briefing-metric-value { color: var(--warning-color, #f59e0b); }

.briefing-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.briefing-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.briefing-list-item:last-child {
    border-bottom: none;
}

.briefing-list-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.briefing-list-content {
    flex: 1;
}

.briefing-list-title {
    font-weight: 500;
    color: var(--text-primary);
}

.briefing-list-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Chart placeholder */
.briefing-chart {
    background: var(--bg-primary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Table */
.briefing-table {
    width: 100%;
    border-collapse: collapse;
}

.briefing-table th,
.briefing-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.briefing-table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.briefing-table td {
    color: var(--text-secondary);
}

/* Empty State */
.briefing-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.briefing-empty-state .empty-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.briefing-empty-state h3 {
    margin: 0 0 0.5rem;
    color: var(--text-secondary);
}

.briefing-empty-state p {
    margin: 0;
}

/* Archive Section */
.briefings-archive {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.briefings-archive h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.archive-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.archive-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.archive-day:hover {
    border-color: var(--accent-color);
}

.archive-day.has-briefing {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.archive-day.today {
    border: 2px solid var(--accent-color);
}

.archive-day.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
}

/* Category Colors */
.briefing-section[data-category="financial"] .briefing-section-category { background: #22c55e; }
.briefing-section[data-category="calendar"] .briefing-section-category { background: #3b82f6; }
.briefing-section[data-category="tasks"] .briefing-section-category { background: #8b5cf6; }
.briefing-section[data-category="alerts"] .briefing-section-category { background: #ef4444; }
.briefing-section[data-category="weather"] .briefing-section-category { background: #06b6d4; }
.briefing-section[data-category="actions"] .briefing-section-category { background: #f59e0b; }

/* Responsive */
@media (max-width: 640px) {
    .briefings-view {
        padding: 1rem;
    }
    
    .briefings-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .briefings-title {
        font-size: 1.5rem;
    }
    
    .briefing-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===========================================
   WORKFLOW TRIGGER SYSTEM STYLES
   =========================================== */

/* Workflow action buttons */
.workflow-pickup-btn,
.workflow-complete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.workflow-pickup-btn {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
}

.workflow-pickup-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

.workflow-complete-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.workflow-complete-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.workflow-pickup-btn svg,
.workflow-complete-btn svg {
    width: 14px;
    height: 14px;
}

/* Active indicator */
.active-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #16a34a;
    animation: pulse-active 2s ease-in-out infinite;
}

.active-indicator svg {
    color: #16a34a;
}

@keyframes pulse-active {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Card in active workflow state */
.promoted-card.workflow-active {
    border: 2px solid #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

/* Trigger date indicator */
.trigger-date-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(251, 146, 60, 0.15);
    border: 1px solid rgba(251, 146, 60, 0.3);
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #ea580c;
}

/* ==================== CENTURION EXECUTION CONFIG ==================== */

.centurion-config-section {
    margin-top: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.centurion-agent-config,
.centurion-scheduled-config,
.centurion-webhook-config {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.centurion-execution-stats {
    font-size: 12px;
}

/* Execution type badges on cards */
.execution-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.execution-type-badge.agent {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #8b5cf6;
}

.execution-type-badge.scheduled {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.execution-type-badge.webhook {
    background: rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(236, 72, 153, 0.3);
    color: #ec4899;
}

/* Execute button on cards */
.execute-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.execute-btn:hover {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.execute-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.execute-btn.running {
    animation: pulse-execute 1.5s ease-in-out infinite;
}

@keyframes pulse-execute {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    50% { opacity: 0.9; box-shadow: 0 0 0 8px rgba(139, 92, 246, 0); }
}

/* Execution progress modal */
.execution-modal {
    max-width: 600px;
}

.execution-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    margin-bottom: 16px;
}

.execution-status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.execution-status-icon.running {
    background: rgba(59, 130, 246, 0.15);
    animation: spin 1s linear infinite;
}

.execution-status-icon.completed {
    background: rgba(34, 197, 94, 0.15);
}

.execution-status-icon.failed {
    background: rgba(239, 68, 68, 0.15);
}

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

.spin {
    animation: spin 1s linear infinite;
}

.execution-result {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    max-height: 300px;
    overflow-y: auto;
}

.execution-metrics {
    display: flex;
    gap: 16px;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-muted);
}

.execution-metric {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== CENTURION CHAT PANEL ==================== */

.centurion-chat-panel {
    position: fixed;
    right: -400px;
    top: 0;
    bottom: 0;
    width: 400px;
    max-width: 100vw;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
}

.centurion-chat-panel.open {
    right: 0;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-icon {
    font-size: 24px;
}

.chat-title {
    font-weight: 600;
    font-size: 16px;
}

.chat-status {
    font-size: 10px;
    color: #ef4444;
}

.chat-status.connected {
    color: #22c55e;
}

.chat-header-right {
    display: flex;
    gap: 8px;
}

.chat-action-btn,
.chat-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.chat-action-btn:hover,
.chat-close-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-context {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-welcome {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
}

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

.welcome-text strong {
    display: block;
    margin-bottom: 4px;
}

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

.chat-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-message.error {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.chat-message.thinking {
    color: var(--text-muted);
    font-style: italic;
}

.chat-quick-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    overflow-x: auto;
    border-top: 1px solid var(--border-color);
}

.quick-action {
    flex-shrink: 0;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.quick-action:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent);
}

.chat-input-container {
    display: flex;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.chat-input {
    flex: 1;
    resize: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    background: var(--bg-primary);
    color: var(--text-primary);
    max-height: 120px;
}

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

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.centurion-chat-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    font-size: 28px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    transition: all 0.3s;
}

.centurion-chat-toggle:hover {
    transform: scale(1.1);
}

.centurion-chat-toggle.hidden {
    display: none;
}

/* Hide toggle when panel is open */
.centurion-chat-panel.open ~ .centurion-chat-toggle {
    display: none;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .centurion-chat-panel {
        width: 100vw;
        right: -100vw;
    }
}

/* ===========================================
   POMODORO TIMER STYLES
   =========================================== */

.pomodoro-section {
    background: var(--color-bg-elevated);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-card);
}

.pomodoro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.pomodoro-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pomodoro-title svg {
    color: var(--color-brand-gold);
}

.pomodoro-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
    padding: 4px 10px;
    border-radius: 20px;
}

.pomodoro-icon {
    font-size: 14px;
}

.pomodoro-timer-display {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.pomodoro-ring {
    position: relative;
    width: 140px;
    height: 140px;
}

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

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

.pomodoro-ring-progress {
    fill: none;
    stroke: var(--color-brand-gold);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}

.pomodoro-ring.break .pomodoro-ring-progress {
    stroke: var(--color-success);
}

.pomodoro-ring.paused .pomodoro-ring-progress {
    stroke: var(--color-text-tertiary);
}

.pomodoro-time {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text-primary);
    font-variant-numeric: tabular-nums;
}

.pomodoro-phase {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    font-size: 12px;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pomodoro-ring.break .pomodoro-phase {
    color: var(--color-success);
}

.pomodoro-card-link {
    margin-bottom: 16px;
}

.pomodoro-card-link label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pomodoro-card-link select {
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    color: var(--color-text-primary);
}

.pomodoro-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pomodoro-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.pomodoro-btn:hover {
    transform: scale(1.08);
}

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

.pomodoro-btn-start {
    background: linear-gradient(135deg, var(--color-brand-gold) 0%, var(--color-brand-gold-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(184, 135, 47, 0.3);
}

.pomodoro-btn-start:hover {
    box-shadow: 0 6px 16px rgba(184, 135, 47, 0.4);
}

.pomodoro-btn-pause {
    background: var(--color-warning);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

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

.pomodoro-btn-reset:hover {
    background: var(--color-border);
}

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

.pomodoro-btn-skip:hover {
    background: var(--color-border);
}

.pomodoro-settings-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: 8px;
    margin: 0 -16px -16px;
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-subtle);
    border-radius: 0 0 12px 12px;
    transition: all 0.2s ease;
}

.pomodoro-settings-toggle:hover {
    color: var(--color-text-secondary);
    background: var(--color-border-light);
}

.pomodoro-settings-toggle svg {
    transition: transform 0.2s ease;
}

.pomodoro-settings-toggle.open svg {
    transform: rotate(180deg);
}

.pomodoro-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px 0 0;
    margin-top: 12px;
    border-top: 1px solid var(--color-border-light);
}

.pomodoro-setting {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pomodoro-setting label {
    font-size: 11px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.pomodoro-setting input {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    width: 100%;
}

.pomodoro-setting .setting-hint {
    font-size: 10px;
    color: var(--color-text-tertiary);
}

/* Card Modal Pomodoro Sessions */
.card-pomodoro-section {
    margin-top: 16px;
    padding: 16px;
    background: var(--color-bg-subtle);
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
}

.pomodoro-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pomodoro-section-header h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pomodoro-section-header h4 svg {
    color: var(--color-brand-gold);
}

.pomodoro-total {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-brand-gold);
}

.pomodoro-sessions-list {
    max-height: 150px;
    overflow-y: auto;
}

.pomodoro-sessions-empty {
    font-size: 12px;
    color: var(--color-text-tertiary);
    text-align: center;
    padding: 12px;
}

.pomodoro-session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--color-bg-elevated);
    border-radius: 6px;
    margin-bottom: 6px;
    border: 1px solid var(--color-border-light);
}

.pomodoro-session-item:last-child {
    margin-bottom: 0;
}

.pomodoro-session-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pomodoro-session-type {
    font-size: 12px;
    font-weight: 500;
}

.pomodoro-session-type.work {
    color: var(--color-brand-gold);
}

.pomodoro-session-type.break {
    color: var(--color-success);
}

.pomodoro-session-duration {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

.pomodoro-session-time {
    font-size: 11px;
    color: var(--color-text-tertiary);
}

/* Animation for timer completion */
@keyframes pomodoroComplete {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pomodoro-ring.complete {
    animation: pomodoroComplete 0.5s ease;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .pomodoro-section {
        padding: 12px;
    }
    
    .pomodoro-ring {
        width: 120px;
        height: 120px;
    }
    
    .pomodoro-time {
        font-size: 24px;
    }
    
    .pomodoro-settings {
        grid-template-columns: 1fr;
    }
}

/* ===========================================
   DAILY PLANNING MODAL
   =========================================== */

.daily-planning-modal {
    background: var(--color-bg-elevated);
    border-radius: var(--radius-xl);
    width: min(95vw, 560px);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.planning-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

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

.planning-date-display svg {
    color: var(--color-brand-gold);
}

.planning-date-display h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: 600;
}

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

.planning-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: none;
    background: var(--color-bg-subtle);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.planning-summary {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-subtle);
    border-bottom: 1px solid var(--color-border);
}

.planning-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    flex: 1;
}

.planning-stat .stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

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

.planning-cards-container {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md) var(--space-lg);
    min-height: 200px;
    max-height: 400px;
}

.planning-hint {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-align: center;
    margin-bottom: var(--space-md);
    padding: var(--space-sm);
    background: var(--color-bg-subtle);
    border-radius: var(--radius-md);
}

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

/* Planning Card */
.planning-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    cursor: grab;
}

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

.planning-card.dragging {
    opacity: 0.5;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    cursor: grabbing;
}

.planning-card.drag-over {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.planning-drag-handle {
    color: var(--color-text-tertiary);
    cursor: grab;
    padding: var(--space-xs);
    flex-shrink: 0;
}

.planning-drag-handle:active {
    cursor: grabbing;
}

.planning-card-content {
    flex: 1;
    min-width: 0;
}

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

.planning-card-priority {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.planning-card-priority.high {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.planning-card-priority.medium {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.planning-card-priority.low {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.planning-card-priority.urgent {
    background: rgba(127, 29, 29, 0.2);
    color: #7f1d1d;
}

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

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

.time-estimate-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--color-text-secondary);
    background: var(--color-bg-subtle);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.time-estimate-badge svg {
    width: 12px;
    height: 12px;
}

.planning-card-project {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.planning-card-scheduled {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.planning-card-scheduled svg {
    width: 12px;
    height: 12px;
}

.planning-schedule-btn {
    padding: 6px 12px;
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--color-primary);
    background: var(--color-primary-light);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.planning-schedule-btn:hover {
    background: var(--color-primary);
    color: white;
}

.planning-schedule-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.planning-schedule-btn.scheduled {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--color-success);
    color: var(--color-success);
}

.planning-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--color-text-tertiary);
    text-align: center;
}

.planning-empty svg {
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.planning-empty p {
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.planning-empty .hint {
    font-size: var(--font-size-sm);
    max-width: 280px;
}

.planning-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-subtle);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

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

/* Plan My Day Button in Blueprint */
.promoted-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.plan-my-day-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.plan-my-day-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.plan-my-day-btn svg {
    animation: sunRotate 8s linear infinite;
}

@keyframes sunRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile responsiveness for Daily Planning Modal */
@media (max-width: 600px) {
    .daily-planning-modal {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .planning-modal-header {
        border-radius: 0;
    }
    
    .planning-actions {
        border-radius: 0;
    }
    
    .planning-summary {
        padding: var(--space-sm);
    }
    
    .planning-stat {
        padding: var(--space-xs);
    }
}
