/* 
   WhatsApp CRM Pro - macOS Tahoe 26.3.1 Premium
   Ultimate Glassmorphism & Apple Design Language
*/

:root {
    /* Core Palette - Apple White Mode Restoration */
    --bg-app: #F5F5F7;
    --bg-main: #FFFFFF;
    
    /* Tahoe Color Palette */
    --text-primary: #1d1d1f;
    --text-secondary: #424245;
    --text-muted: #86868b;
    --accent-blue: #007aff;
    --accent-blue-vibrant: #007aff;
    --accent-emerald: #34c759;
    --accent-emerald-dark: #248a3d;
    --danger: #ff3b30;
    
    /* Master Glass Materials */
    --bg-glass-thick: rgba(255, 255, 255, 0.75);
    --bg-glass-medium: rgba(255, 255, 255, 0.5);
    --bg-sidebar: rgba(246, 246, 246, 0.82);
    
    /* Borders & Accents */
    --border-glass: rgba(255, 255, 255, 0.5);
    --border-ultra-white: rgba(255, 255, 255, 0.7);
    --border-light: rgba(0, 0, 0, 0.08);
    
    /* Typography (Apple HIG Standard) */
    --font-size-base: 13px; /* macOS standard */
    --font-size-sm: 11px;
    --font-size-h3: 15px;
    --font-size-h2: 20px;
    --font-display: 'SF Pro Display', 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing (Apple 8pt/12pt Rule) */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 20px;
    --spacing-xl: 32px;
    
    /* Icon Sizes */
    --icon-size-sm: 14px;
    --icon-size-md: 18px; /* Fixed 'enormous' icons */
    --icon-size-lg: 22px;
    
    /* Layout Tokens */
    --radius-panel: 20px;
    --radius-item: 10px;
    --shadow-tahoe: 0 4px 12px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
}



* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-display);
    letter-spacing: -0.015em; /* Premium Apple Tracking */
    background: var(--bg-app);
    color: var(--text-primary);
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    user-select: none; /* Desktop App Feel */
}

/* Pseudo-layer for noise/texture to look premium */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml,...'); /* Low-opacity noise */
    opacity: 0.03;
    pointer-events: none;
    z-index: 1000;
}


.saas-container {
    display: flex;
    height: 100vh;
}

/* Sidebar - Native Tahoe Material */
.saas-sidebar {
    width: 260px;
    background: var(--bg-glass-thick);
    backdrop-filter: var(--blur-sidebar);
    -webkit-backdrop-filter: var(--blur-sidebar);
    border-right: 1px solid var(--border-glass);
    border-top: 1px solid var(--border-ultra-white); /* Inner Glow */
    display: flex;
    flex-direction: column;
    padding: var(--spacing-lg);
    z-index: 100;
}



.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.whatsapp-icon-wrapper {
    background: linear-gradient(180deg, var(--accent-emerald) 0%, var(--accent-emerald-dark) 100%);
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(52, 199, 89, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2.5;
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 20px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.82rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    text-align: left;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

.nav-item.active {
    background: white;
    color: var(--accent-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
    font-weight: 700;
}




.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

/* Content Area */
.saas-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
}

.view-content {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-content.active {
    display: block;
}

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

/* Common Components */
.glass-panel {
    background: white;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-tahoe);
    border-radius: var(--radius-panel);
    padding: 32px;
    margin-bottom: var(--spacing-lg);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

.glass-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06);
}

/* Buttons */
.primary-btn {
    background: var(--accent-blue);
    background: linear-gradient(180deg, #3291FF 0%, #0070F3 100%);
    color: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-button);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 112, 243, 0.4);
    filter: brightness(1.05);
}

.primary-btn:active {
    transform: translateY(0) scale(0.97);
}



.action-pill {
    background: rgba(0, 122, 255, 0.08);
    color: var(--accent-blue-vibrant);
    border: 1px solid rgba(0, 122, 255, 0.15);
    padding: 8px 18px;
    border-radius: 22px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-pill:hover {
    background: var(--accent-blue-vibrant);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.icon-btn-tahoe {
    width: 28px; /* Native Tahoe action size */
    height: 28px;
    border-radius: 6px;
    border: none !important;
    background: rgba(0, 0, 0, 0.05); /* Native Apple button base */
    color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s cubic-bezier(0, 0, 0.5, 1);
}

.icon-btn-tahoe:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    transform: scale(1.05);
}

.icon-btn-tahoe.active {
    background: var(--accent-blue-vibrant) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

.icon-btn-tahoe.danger:hover {
    background: rgba(255, 59, 48, 0.15);
    color: var(--danger);
}

.icon-btn-tahoe svg {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
    stroke-width: 2; /* Regular weight per HIG */
}

/* Secondary/Tool Buttons - Subtle Apple Style */
.tool-btn {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.1, 0, 0.3, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tool-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.tool-btn:active {
    transform: scale(0.98);
}

/* Segmented Control (Inner Tabs) */
.tabs-header {
    background: rgba(0, 0, 0, 0.05);
    padding: 3px;
    border-radius: 10px;
    display: inline-flex;
    gap: 2px;
}

.inner-tab-btn {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.inner-tab-btn.active {
    background: white;
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Glass Inputs & Textareas */
.tahoe-input, .tahoe-select, .tahoe-textarea, 
input[type="text"], input[type="number"], input[type="datetime-local"], select, textarea {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 10px !important;
    padding: 11px 16px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    width: 100%;
}

.tahoe-input:focus, .tahoe-select:focus, .tahoe-textarea:focus,
input:focus, select:focus, textarea:focus {
    background: white !important;
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.2) !important;
}

textarea { resize: none; min-height: 100px; }

/* Form Group Labels */
.input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 10px;
}




/* Tables */
.tahoe-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tahoe-table th {
    padding: 12px 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border-light);
    background: rgba(0, 0, 0, 0.02);
}

.tahoe-table td {
    padding: 18px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
}

.tahoe-table tr:last-child td {
    border-bottom: none;
}

.tahoe-table tr:hover td {
    background: rgba(255, 255, 255, 0.4);
}



/* Cards */
.sequence-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-panel);
    padding: 24px;
    box-shadow: var(--shadow-premium);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    margin-bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sequence-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.sequence-type-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sequence-type-badge.farmer { background: rgba(16, 185, 129, 0.1); color: var(--accent-emerald-dark); }
.sequence-type-badge.hunter { background: rgba(0, 122, 255, 0.1); color: var(--accent-blue); }

.sequence-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sequence-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-pill {
    background: var(--bg-main);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.meta-pill:hover {
    background: white;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

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

.sequence-actions {
    display: flex;
    gap: 8px;
}

.rule-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-tahoe);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 20px;
}

/* Contact Cards in Queue (HIG Refinement) */
.contact-card {
    padding: var(--spacing-md) !important;
    margin-bottom: var(--spacing-md) !important;
    position: relative;
    border: 1px solid var(--border-light) !important;
    background: var(--bg-main) !important;
    border-radius: var(--radius-item) !important;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm) !important;
    transition: all 0.2s ease !important;
}

.contact-card.pending { border-left: 4px solid var(--accent-blue-vibrant) !important; }
.contact-card.sent { border-left: 4px solid #34C759 !important; background: rgba(52, 199, 89, 0.05) !important; }
.contact-card.failed { border-left: 4px solid #FF3B30 !important; background: rgba(255, 59, 48, 0.05) !important; }

.contact-card .contact-phone {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.contact-card .contact-phone svg {
    width: var(--icon-size-sm);
    height: var(--icon-size-sm);
    opacity: 0.6;
}

.contact-card .icon-btn-tahoe {
    width: 28px;
    height: 28px;
}

.contact-card .contact-primary-icon {
    width: 34px;
    height: 34px;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.contact-card .contact-primary-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* Icons & Buttons Standardized */
.icon-btn-tahoe {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn-tahoe:hover {
    background: white;
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    box-shadow: 0 4px 12px rgba(0, 112, 243, 0.15);
}

.rule-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-tahoe);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 20px;
}

.rule-card:hover {
    background: var(--bg-glass-thick);
    transform: scale(1.01);
}

.rule-trigger {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-blue-vibrant);
    display: flex;
    align-items: center;
    gap: 8px;
}

.interest-badge {
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Tag Filter Bar Buttons */
.tag-filter-btn {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-filter-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.tag-filter-btn.active {
    background: var(--accent-blue-vibrant);
    color: white;
    border-color: var(--accent-blue-vibrant);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}



/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content-tahoe {
    background: white;
    border: 1px solid var(--border-light);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.15);
    border-radius: 24px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Dashboard Stats */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    box-shadow: var(--shadow-tahoe);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    margin-top: 8px;
    color: var(--text-primary);
}

/* Utilities */

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

.server-status-pill {
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    margin-bottom: 12px;
}

.flex-between { display: flex; justify-content: space-between; align-items: center; }
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #FF3B30; /* Apple Red */
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.4);
    position: relative;
    transition: all 0.3s ease;
}

.status-dot.online {
    background: #34C759; /* Apple Green */
    box-shadow: 0 0 12px rgba(52, 199, 89, 0.5);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(52, 199, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0); }
}

.status-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.tahoe-tag {
    background: rgba(0, 122, 255, 0.08);
    color: var(--accent-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(0, 122, 255, 0.15);
}

.rule-var-helper {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: var(--accent-blue-vibrant);
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(5px);
}

.rule-var-helper:hover {
    background: var(--accent-blue-vibrant);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.2);
}


/* Restored Tahoe Utilities */
.lead-name { font-weight: 700; color: var(--text-primary); font-size: 0.9rem; }
.lead-phone { font-size: 0.75rem; color: rgba(0, 0, 0, 0.4); margin-top: 2px; }
.lead-company { font-weight: 600; color: var(--accent-blue-vibrant); font-size: 0.8rem; }
.lead-job { font-size: 0.75rem; color: rgba(0, 0, 0, 0.45); }

.status-badge-active {
    background: rgba(52, 199, 89, 0.15);
    color: var(--accent-emerald-dark);
    padding: 6px 14px;
    border-radius: 14px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(52, 199, 89, 0.2);
}
.status-badge-active svg { width: 14px; height: 14px; stroke-width: 3; }

/* Status Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(0, 0, 0, 0.1);
}


/* New Tahoe Layout Components */
.header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
}

.header-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.grid-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.input-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.switch-wrapper {
    display: flex;
    align-items: center;
    padding-top: 4px;
}

/* Stats Cards Refinement */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-glass-thick);
    backdrop-filter: var(--blur-standard);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 
        inset 0 1px 1px var(--border-ultra-white),
        var(--shadow-premium);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.stat-label {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    display: block;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Tahoe Switch (Apple Native) */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.08);
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
    border: 1px solid var(--border-light);
}
.slider:before {
    position: absolute; content: "";
    height: 18px; width: 18px;
    left: 2px; bottom: 2px;
    background-color: white;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.switch input:checked + .slider {
    background-color: #34C759; /* Apple Green */
    border-color: #34C759;
}
.switch input:checked + .slider:before {
    transform: translateX(20px);
}
.switch.blue input:checked + .slider {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* Custom File Input */
.tahoe-file-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}
.tahoe-file-input-wrapper input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}
.tahoe-file-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.tahoe-file-label:hover {
    background: var(--bg-main);
    border-color: var(--text-muted);
}
.tahoe-file-label svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-secondary);
}
.secretary-label {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.highlight-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 800;
}

.modal-header {
    margin-bottom: 24px;
}

.modal-actions-row {
    display: flex;
    gap: 16px;
    margin-top: 24px;
}

.modal-actions-row .tool-btn, .modal-actions-row .primary-btn {
    flex: 1;
    height: 48px;
}

.input-label-tahoe {
    display: block;
    margin-bottom: 12px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.flex-row { display: flex; }
.align-center { align-items: center; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }


.status-text-muted { font-size: 0.75rem; color: rgba(0, 0, 0, 0.3); font-weight: 500; }

.tag-container-tahoe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag-input-wrapper { display: flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, 0.03); padding: 2px; border-radius: 10px; }

.icon-btn-tahoe.small { width: 22px; height: 22px; border-radius: 5px; font-size: 14px; }

.active-seq-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: rgba(0, 122, 255, 0.05);
    padding: 8px;
    border-radius: 12px;
    min-width: 100px;
}
.active-seq-indicator .seq-name { color: var(--accent-blue-vibrant); font-weight: 800; font-size: 0.75rem; }
.active-seq-indicator .seq-progress { font-size: 0.65rem; color: rgba(0, 0, 0, 0.45); font-weight: 600; }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.stat-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
    fill: none;
}

.stat-icon.blue { stroke: var(--accent-blue); }
.stat-icon.emerald { stroke: var(--accent-emerald-dark); }
.stat-icon.orange { stroke: #FF9500; }
.stat-icon.red { stroke: var(--danger); }

.stat-value.emerald { color: var(--accent-emerald-dark); }
.stat-value.orange { color: #FF9500; }
.stat-value.red { color: var(--danger); }

.header-actions {
    display: flex;
    gap: 12px;
}

