/* Liminal Brand Colors - Light Mode (Default) */
:root {
    /* Primary Brand Colors */
    --primary-brand: #7f7055;
    --secondary-brand: #201a0f;
    --accent-gold: #edac25;
    --accent-gold-dark: #d49b1d;
    --accent-gold-light: rgba(237, 172, 37, 0.1);
    
    /* Background Colors */
    --bg-main: #faead6;
    --bg-sidebar: #faead6;
    --bg-card: #fcf2e3;
    --bg-card-hover: #fef6eb;
    --bg-input: #ffffff;
    --bg-dark: #343541;
    
    /* Text Colors */
    --text-primary: #333333;
    --text-secondary: #7b6f51;
    --text-sidebar: #48371e;
    --text-muted: #b89660;
    --text-light: #faead6;
    --text-greeting: #7b6f51;
    
    /* UI Colors */
    --border-color: #e8d8c4;
    --border-light: #f0e0cc;
    --shadow-color: rgba(0, 0, 0, 0.05);
    --shadow-hover: rgba(0, 0, 0, 0.1);
    
    /* Status Colors */
    --success: #5a7a5a;
    --warning: #c89a3f;
    --error: #a85a5a;
    --info: #5a7a8a;
    
    /* Component Specific */
    --heading-color: #edac25;
    --subheading-color: #edac25;
    --icon-color: #edac25;
    --icon-size: 20px;
    --link-color: #7f7055;
    --link-hover: #edac25;
    
    /* Settings Panel */
    --settings-slide-bg: #7d6848;
    --settings-slide-heading: #edac25;
    --settings-slide-subheading: #f0d58f;
    --settings-slide-content: #f6ead6;
    
    /* Status Panel Colors */
    --status-panel-bg: #faead6;
    --status-panel-heading: #edac25;
    --status-panel-subheading: #edac25;
    --status-panel-content: #666666;
    
    /* Dimensions */
    --sidebar-width: 280px;
    --status-panel-width: 320px;
    --light-gray: rgba(0, 0, 0, 0.05);
}



/* Dark Mode - Ultra-Dark Obsidian Sea Palette with Dark Green Accents */
.theme-dark,
.theme-system.system-dark {
    /* Primary Brand Colors - Ultra-Dark Mode */
    --primary-brand: #D8EAE2;
    --secondary-brand: #AABFB6;
    --accent-gold: linear-gradient(135deg, #4f636c 0%, #5a7078 100%);
    --accent-gold-dark: linear-gradient(135deg, #3a4b52 0%, #4f636c 100%);
    --accent-gold-light: rgba(79, 99, 108, 0.15);
    
    /* Background Colors - Obsidian Sea Scheme */
    --bg-main: #101312;
    --bg-sidebar: #121917;
    --bg-card: #18221F;
    --bg-card-hover: #1D2925;
    --bg-input: #18221F;
    --bg-dark: #101312;
    
    /* Text Colors - Ultra-Dark Mode */
    --text-primary: #D8EAE2;
    --text-secondary: #AABFB6;
    --text-sidebar: #AABFB6;
    --text-muted: #8B9F96;
    --text-light: #D8EAE2;
    --text-greeting: #D8EAE2;
    
    /* UI Colors - Ultra-Dark Mode */
    --border-color: #25302E;
    --border-light: #25302E;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --shadow-hover: rgba(0, 0, 0, 0.6);
    
    /* Status Colors - Ultra-Dark Mode */
    --success: #3A8763;
    --warning: #856B45;
    --error: #856B45;
    --info: #25302E;
    
    /* Component Specific - Ultra-Dark Mode */
    --heading-color: #e6ded3;
    --subheading-color: #AABFB6;
    --icon-color: #4f636c;
    --link-color: #4f636c;
    --link-hover: #3a4b52;
    
    /* Settings Panel - Ultra-Dark Mode */
    --settings-slide-bg: #121917;
    --settings-slide-heading: #D8EAE2;
    --settings-slide-subheading: #AABFB6;
    --settings-slide-content: #8B9F96;
    
    /* Status Panel Colors - Ultra-Dark Mode */
    --status-panel-bg: #18221F;
    --status-panel-heading: #D8EAE2;
    --status-panel-subheading: #AABFB6;
    --status-panel-content: #8B9F96;
}

/* Logo-Based Design System - Global Improvements */

.theme-dark .card,
.theme-system.system-dark .card,
.theme-dark .email-card,
.theme-system.system-dark .email-card,
.theme-dark .status-card,
.theme-system.system-dark .status-card,
.theme-dark .project-card,
.theme-system.system-dark .project-card,
.theme-dark .modal-container,
.theme-system.system-dark .modal-container {
    /* Improved card spacing and modern radius */
    padding: 1rem 1.25rem;
    border-radius: 12px;
}

.theme-dark h1, .theme-dark h2, .theme-dark h3, .theme-dark h4, .theme-dark h5, .theme-dark h6,
.theme-system.system-dark h1, .theme-system.system-dark h2, .theme-system.system-dark h3, 
.theme-system.system-dark h4, .theme-system.system-dark h5, .theme-system.system-dark h6 {
    /* Title font weight */
    font-weight: 500;
    letter-spacing: 0.03em;
}

.theme-dark .text-tertiary,
.theme-system.system-dark .text-tertiary {
    /* Metadata font weight */
    font-weight: 300;
    color: var(--text-muted);
}

/* Custom Modal Styles (for 2FA without Bootstrap dependency) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-container {
    transform: scale(1);
}

.modal-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid #e8dcc8;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h5 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background-color: var(--light-gray);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    border-top: 1px solid #e8dcc8;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.two-factor-input-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.two-factor-digit {
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid #e8dcc8;
    border-radius: 12px;
    background: white;
    transition: border-color 0.2s;
}

.two-factor-digit:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(237, 172, 37, 0.1);
}

.two-factor-digit:valid {
    border-color: var(--accent-gold);
    background: var(--bg-card-hover);
}

/* Auth Form Styles */
.auth-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 2rem;
}

.auth-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(237, 172, 37, 0.1);
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-gold);
}

.form-check-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: var(--accent-gold-dark);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

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

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

.btn-block {
    width: 100%;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--accent-gold);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #cce7ff;
    color: #004085;
    border: 1px solid #b8daff;
}

.form-error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

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

.text-muted {
    color: var(--text-muted);
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

/* Navigation Divider */
.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 15px 20px;
    opacity: 0.5;
}

.sidebar-link.admin-only {
    opacity: 0.8;
    font-size: 0.9rem;
}

.sidebar-link.admin-only:hover {
    opacity: 1;
    background: rgba(var(--accent-color), 0.1);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
    z-index: 1000000 !important;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 99999;
    padding: 0.5rem 0;
    margin: 0;
    list-style: none;
}

.dropdown-header {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    margin: 0 0 0.5rem 0;
}

.dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: background-color 0.2s;
}

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

.hamburger-menu {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu i[data-feather="menu"] svg {
    stroke: var(--accent-gold) !important;
    stroke-width: 2 !important;
    width: 27px !important;
    height: 27px !important;
    display: block !important;
}

.hamburger-menu:hover {
    background-color: var(--bg-card-hover);
}

.close-status-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    color: var(--text-secondary);
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-status-btn:hover {
    background-color: var(--bg-card-hover);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 1.05rem;
}

/* Ensure all headings use the proper color scheme */
h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
}

/* Ensure all text elements use proper colors */
p, span, div {
    color: var(--text-primary);
}

/* Muted text elements */
.text-muted, .text-secondary {
    color: var(--text-muted);
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar - FIXED STICKY POSITIONING */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    padding: 32px 24px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
    text-decoration: none;
}

.sidebar-logo img {
    height: 52px;
    width: auto;
}

/* Dark mode logo - hide in light mode */
.sidebar-logo .logo-dark {
    display: none;
}

/* Show dark logo in dark mode */
.theme-dark .sidebar-logo .logo-light {
    display: none;
}

.theme-dark .sidebar-logo .logo-dark {
    display: block;
}

.sidebar-logo-text {
    font-size: 2.75rem;
    font-weight: 400;
    color: var(--text-sidebar);
    font-family: 'canela-deck', Georgia, serif;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-sidebar);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 16px;
}

.sidebar-link:hover {
    background-color: var(--accent-gold-light);
    color: var(--primary-brand);
}

.sidebar-link.active {
    background-color: var(--accent-gold-light);
    color: var(--primary-brand);
    font-weight: 500;
}

.nav-icon {
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}

.sidebar-link:hover .nav-icon,
.sidebar-link.active .nav-icon {
    opacity: 1;
}

/* Main Content Area - FIXED STICKY POSITIONING */
.main-content {
    margin-left: 0;
    flex: 1;
    padding: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f6ead6 0%, #f0e0cc 30%, #ebd19f 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    transition: margin-right 0.3s ease;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Dark Mode Main Content - FIXED STICKY POSITIONING */
.theme-dark .main-content,
.theme-system.system-dark .main-content {
    background: linear-gradient(315deg, #0a0f0c 0%, #121917 50%, #25302E 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: var(--sidebar-width);
    overflow-y: auto;
    overflow-x: hidden;
}

/* Dark Mode Comprehensive Styling */
/* Cards */
.theme-dark .card,
.theme-system.system-dark .card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.theme-dark .card:hover,
.theme-system.system-dark .card:hover {
    background: var(--bg-card-hover);
}

.theme-dark .card-header,
.theme-system.system-dark .card-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-dark .card-body,
.theme-system.system-dark .card-body {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* Forms */
.theme-dark .form-control,
.theme-dark .form-select,
.theme-system.system-dark .form-control,
.theme-system.system-dark .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-dark .form-control:focus,
.theme-dark .form-select:focus,
.theme-system.system-dark .form-control:focus,
.theme-system.system-dark .form-select:focus {
    background: var(--bg-input);
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.2rem var(--accent-gold-light);
    color: var(--text-primary);
}

.theme-dark .form-label,
.theme-system.system-dark .form-label {
    color: var(--text-secondary);
}

/* Buttons */
.theme-dark .btn-primary,
.theme-system.system-dark .btn-primary {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-dark);
}

.theme-dark .btn-primary:hover,
.theme-system.system-dark .btn-primary:hover {
    background: var(--accent-gold-dark);
    border-color: var(--accent-gold-dark);
}

.theme-dark .btn-secondary,
.theme-system.system-dark .btn-secondary {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.theme-dark .btn-secondary:hover,
.theme-system.system-dark .btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-color);
}

/* Sidebar */
.theme-dark .sidebar,
.theme-system.system-dark .sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
}

.theme-dark .sidebar-link,
.theme-system.system-dark .sidebar-link {
    color: var(--text-sidebar);
}

.theme-dark .sidebar-link:hover,
.theme-system.system-dark .sidebar-link:hover {
    background: var(--accent-gold-light);
    color: var(--text-primary);
}

.theme-dark .sidebar-link.active,
.theme-system.system-dark .sidebar-link.active {
    background: var(--accent-gold-light);
    color: var(--text-primary);
}

/* Status Panel */
.theme-dark .status-panel,
.theme-system.system-dark .status-panel {
    background: var(--status-panel-bg);
    border-left: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-dark .status-panel-title,
.theme-system.system-dark .status-panel-title {
    color: var(--status-panel-heading);
}

.theme-dark .status-section h5,
.theme-system.system-dark .status-section h5 {
    color: var(--status-panel-subheading);
}

.theme-dark .status-value,
.theme-system.system-dark .status-value {
    color: var(--text-primary);
}

.theme-dark .status-subtitle,
.theme-system.system-dark .status-subtitle {
    color: var(--status-panel-content);
}

/* Dropdowns */
.theme-dark .dropdown-menu,
.theme-system.system-dark .dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.theme-dark .dropdown-item,
.theme-system.system-dark .dropdown-item {
    color: var(--text-primary);
}

.theme-dark .dropdown-item:hover,
.theme-system.system-dark .dropdown-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

/* Modals */
.theme-dark .modal-container,
.theme-system.system-dark .modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-dark .modal-header,
.theme-system.system-dark .modal-header {
    border-bottom: 1px solid var(--border-color);
}

.theme-dark .modal-close,
.theme-system.system-dark .modal-close {
    color: var(--text-secondary);
}

/* Settings Tabs */
.theme-dark .floating-tabs,
.theme-system.system-dark .floating-tabs {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.theme-dark .floating-tab,
.theme-system.system-dark .floating-tab {
    color: var(--text-secondary);
    border-right: none !important;
}

.theme-dark .floating-tab:hover,
.theme-system.system-dark .floating-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.theme-dark .floating-tab.active,
.theme-system.system-dark .floating-tab.active {
    background: var(--accent-gold);
    color: var(--bg-dark);
}

/* Navigation */
.theme-dark .nav-icon,
.theme-system.system-dark .nav-icon {
    color: var(--icon-color);
}

/* System Analytics Special Button */
.system-analytics-container {
    position: absolute;
    left: 16px;
    right: 16px;
    z-index: 10;
}

.system-analytics-container:nth-last-child(2) {
    bottom: 90px;
}

.system-analytics-container:last-child {
    bottom: 20px;
}

.system-analytics-btn {
    display: flex;
    align-items: center;
    position: relative;
    padding: 10px 12px;
    border-radius: 8px;
    /* Subtle gradient background */
    background: linear-gradient(135deg, rgba(58, 73, 72, 0.3) 0%, rgba(74, 87, 86, 0.15) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 87, 86, 0.2);
    color: var(--text-sidebar);
    text-decoration: none;
    font-weight: 400;
    font-size: 16px;
    transition: all 0.2s ease;
    overflow: hidden;
}

/* Traveling glow animation */
.system-analytics-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(
        from var(--angle, 0deg),
        transparent 0deg,
        transparent 340deg,
        rgba(74, 87, 86, 0.5) 350deg,
        rgba(74, 87, 86, 0.8) 360deg
    );
    border-radius: 8px;
    z-index: -1;
    animation: glowRotate 4s linear infinite;
}

/* Inner masking for clean border effect */
.system-analytics-btn::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    bottom: 1px;
    background: linear-gradient(135deg, rgba(58, 73, 72, 0.3) 0%, rgba(74, 87, 86, 0.15) 100%);
    border-radius: 7px;
    z-index: -1;
}

.system-analytics-btn:hover {
    background: linear-gradient(135deg, rgba(58, 73, 72, 0.4) 0%, rgba(74, 87, 86, 0.25) 100%);
    color: var(--accent-gold);
    border-color: rgba(74, 87, 86, 0.3);
}

.system-analytics-btn:hover::before {
    animation-duration: 2s;
}

/* Active state with liminal gold glow */
.system-analytics-btn.active {
    background: linear-gradient(135deg, rgba(214, 168, 95, 0.15) 0%, rgba(237, 172, 37, 0.1) 100%);
    color: var(--accent-gold);
    font-weight: 500;
    border-color: rgba(237, 172, 37, 0.2);
}

.system-analytics-btn.active::before {
    background: conic-gradient(
        from var(--angle, 0deg),
        transparent 0deg,
        transparent 340deg,
        rgba(237, 172, 37, 0.5) 350deg,
        rgba(237, 172, 37, 0.8) 360deg
    );
    animation-duration: 3s;
}

.system-analytics-btn.active::after {
    background: linear-gradient(135deg, rgba(214, 168, 95, 0.15) 0%, rgba(237, 172, 37, 0.1) 100%);
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes glowRotate {
    from {
        --angle: 0deg;
    }
    to {
        --angle: 360deg;
    }
}

/* Fix for browsers that don't support CSS custom properties in keyframes */
@supports not (background: conic-gradient(from var(--angle, 0deg), red, blue)) {
    .system-analytics-btn::before {
        background: linear-gradient(90deg, transparent, rgba(74, 87, 86, 0.6), transparent);
        background-size: 200% 100%;
        animation: borderGlow 4s linear infinite;
    }
    
    .system-analytics-btn.active::before {
        background: linear-gradient(90deg, transparent, rgba(237, 172, 37, 0.6), transparent);
    }
    
    @keyframes borderGlow {
        0% {
            background-position: 0% 50%;
        }
        100% {
            background-position: 200% 50%;
        }
    }
}

.analytics-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
    width: 100%;
}

.analytics-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    color: currentColor;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    display: inline-block;
    visibility: visible;
    flex-shrink: 0;
}

/* Ensure icon SVG inherits proper styling */
.analytics-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Ensure icon SVG inherits proper styling */
.analytics-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Ensure SVG icons are visible after feather replacement */
.analytics-icon svg {
    width: 20px;
    height: 20px;
    display: inline-block;
    visibility: visible;
    color: inherit;
    stroke: inherit;
}

/* Keep buttons simple to match navigation style */

/* Text Elements */
.theme-dark h1, .theme-dark h2, .theme-dark h3, .theme-dark h4, .theme-dark h5, .theme-dark h6,
.theme-system.system-dark h1, .theme-system.system-dark h2, .theme-system.system-dark h3, 
.theme-system.system-dark h4, .theme-system.system-dark h5, .theme-system.system-dark h6 {
    color: var(--text-primary);
}

.theme-dark .text-muted,
.theme-system.system-dark .text-muted {
    color: var(--text-muted) !important;
}

/* Lists */
.theme-dark .list-group-item,
.theme-system.system-dark .list-group-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.theme-dark .list-group-item:hover,
.theme-system.system-dark .list-group-item:hover {
    background: var(--bg-card-hover);
}

/* Alerts */
.theme-dark .alert,
.theme-system.system-dark .alert {
    border: 1px solid var(--border-color);
}

.theme-dark .alert-success,
.theme-system.system-dark .alert-success {
    background: var(--success);
    color: var(--text-light);
}

.theme-dark .alert-warning,
.theme-system.system-dark .alert-warning {
    background: var(--warning);
    color: var(--bg-dark);
}

.theme-dark .alert-danger,
.theme-system.system-dark .alert-danger {
    background: var(--error);
    color: var(--text-light);
}

.theme-dark .alert-info,
.theme-system.system-dark .alert-info {
    background: var(--info);
    color: var(--text-light);
}

/* Page Headers */
.theme-dark .page-header h1,
.theme-system.system-dark .page-header h1 {
    color: var(--text-primary);
}

.theme-dark .page-header p,
.theme-system.system-dark .page-header p {
    color: var(--text-secondary);
}

/* Settings Container */
.theme-dark .settings-container,
.theme-system.system-dark .settings-container {
    color: var(--text-primary);
}

/* Settings Sections */
.theme-dark .settings-section,
.theme-system.system-dark .settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Input Groups */
.theme-dark .input-group-text,
.theme-system.system-dark .input-group-text {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

/* Color Presets */
.theme-dark .color-preset,
.theme-system.system-dark .color-preset {
    border: 2px solid var(--border-color);
}

/* Form Check */
.theme-dark .form-check-label,
.theme-system.system-dark .form-check-label {
    color: var(--text-primary);
}

.theme-dark .form-check-label .text-muted,
.theme-system.system-dark .form-check-label .text-muted {
    color: var(--text-muted) !important;
}

/* Email Subnav Items */
.theme-dark .subnav-item,
.theme-system.system-dark .subnav-item {
    color: var(--text-sidebar) !important;
    background: var(--bg-sidebar) !important;
}

.theme-dark .subnav-item:hover,
.theme-system.system-dark .subnav-item:hover {
    background: var(--accent-gold-light) !important;
    color: var(--text-primary) !important;
}

.theme-dark .subnav-item.active,
.theme-system.system-dark .subnav-item.active {
    background: var(--accent-gold-light) !important;
    color: var(--text-primary) !important;
}

.theme-dark .subnav-header,
.theme-system.system-dark .subnav-header {
    color: var(--text-secondary) !important;
}

.theme-dark .subnav-divider,
.theme-system.system-dark .subnav-divider {
    background-color: #4f636c !important;
}

.theme-dark .unread-count,
.theme-system.system-dark .unread-count {
    background: #4f636c !important;
    color: white !important;
}

/* Email Subnav Icons */
.theme-dark .subnav-item i,
.theme-system.system-dark .subnav-item i {
    color: var(--text-sidebar) !important;
}

.theme-dark .subnav-item:hover i,
.theme-system.system-dark .subnav-item:hover i {
    color: var(--text-primary) !important;
}

/* COMPREHENSIVE EMAIL PAGE DARK MODE OVERRIDES */
/* Email Container */
.theme-dark .email-container,
.theme-system.system-dark .email-container {
    background: var(--bg-main) !important;
}

/* Email Ribbon/Header */
.theme-dark .email-ribbon,
.theme-system.system-dark .email-ribbon {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Search Box */
.theme-dark .email-search-box input,
.theme-system.system-dark .email-search-box input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-search-box input:focus,
.theme-system.system-dark .email-search-box input:focus {
    background: var(--bg-input) !important;
    border-color: var(--accent-gold) !important;
    box-shadow: 0 1px 3px var(--accent-gold-light) !important;
}

.theme-dark .email-search-box i,
.theme-system.system-dark .email-search-box i {
    color: var(--text-secondary) !important;
}

/* Email Main Area */
.theme-dark .email-main,
.theme-system.system-dark .email-main {
    background: var(--bg-main) !important;
}

/* Left Pane - Email List */
.theme-dark .email-list-pane,
.theme-system.system-dark .email-list-pane {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-color) !important;
}

.theme-dark .email-list-header,
.theme-system.system-dark .email-list-header {
    background: var(--bg-sidebar) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-sidebar) !important;
}

.theme-dark .email-list-header h6,
.theme-system.system-dark .email-list-header h6 {
    color: var(--text-sidebar) !important;
}

.theme-dark .email-list,
.theme-system.system-dark .email-list {
    background: var(--bg-sidebar) !important;
}

/* Email Items/Cards */
.theme-dark .email-item,
.theme-system.system-dark .email-item {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-item:hover,
.theme-system.system-dark .email-item:hover {
    background: var(--bg-card-hover) !important;
}

.theme-dark .email-item.selected,
.theme-system.system-dark .email-item.selected {
    background: var(--accent-gold-light) !important;
    border-color: var(--accent-gold) !important;
}

.theme-dark .email-item .subject,
.theme-system.system-dark .email-item .subject {
    color: var(--text-primary) !important;
}

.theme-dark .email-item .sender,
.theme-system.system-dark .email-item .sender {
    color: var(--text-secondary) !important;
}

.theme-dark .email-item .preview,
.theme-system.system-dark .email-item .preview {
    color: var(--text-muted) !important;
}

.theme-dark .email-item .date,
.theme-system.system-dark .email-item .date {
    color: var(--text-secondary) !important;
}

/* Right Pane - Email Preview */
.theme-dark .email-preview-pane,
.theme-system.system-dark .email-preview-pane {
    background: var(--bg-card) !important;
}

.theme-dark .email-preview-header,
.theme-system.system-dark .email-preview-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-preview-actions button,
.theme-system.system-dark .email-preview-actions button {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-preview-actions button:hover,
.theme-system.system-dark .email-preview-actions button:hover {
    background: var(--accent-gold) !important;
    color: var(--bg-dark) !important;
    border-color: var(--accent-gold) !important;
}

.theme-dark .email-view,
.theme-system.system-dark .email-view {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-header,
.theme-system.system-dark .email-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-content,
.theme-system.system-dark .email-content {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
}

/* Email Placeholder */
.theme-dark .email-placeholder,
.theme-system.system-dark .email-placeholder {
    color: var(--text-secondary) !important;
}

.theme-dark .email-placeholder h5,
.theme-system.system-dark .email-placeholder h5 {
    color: var(--text-secondary) !important;
}

.theme-dark .email-placeholder p,
.theme-system.system-dark .email-placeholder p {
    color: var(--text-muted) !important;
}

.theme-dark .email-placeholder i,
.theme-system.system-dark .email-placeholder i {
    color: var(--border-color) !important;
}

/* Loading States */
.theme-dark .loading-spinner,
.theme-system.system-dark .loading-spinner {
    color: var(--text-secondary) !important;
}

.theme-dark .loading-spinner p,
.theme-system.system-dark .loading-spinner p {
    color: var(--text-secondary) !important;
}

.theme-dark .loading-spinner .spinner-border,
.theme-system.system-dark .loading-spinner .spinner-border {
    color: var(--accent-gold) !important;
}

/* No Emails State */
.theme-dark .no-emails,
.theme-system.system-dark .no-emails {
    color: var(--text-secondary) !important;
}

/* Auth Required State */
.theme-dark .auth-required,
.theme-system.system-dark .auth-required {
    color: var(--text-primary) !important;
}

.theme-dark .auth-required .card,
.theme-system.system-dark .auth-required .card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

/* Compose Modal */
.theme-dark .compose-modal,
.theme-system.system-dark .compose-modal {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

.theme-dark .compose-header,
.theme-system.system-dark .compose-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .compose-field input,
.theme-dark .compose-field textarea,
.theme-system.system-dark .compose-field input,
.theme-system.system-dark .compose-field textarea {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .compose-field input:focus,
.theme-dark .compose-field textarea:focus,
.theme-system.system-dark .compose-field input:focus,
.theme-system.system-dark .compose-field textarea:focus {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 2px var(--accent-gold-light) !important;
}

.theme-dark .compose-field label,
.theme-system.system-dark .compose-field label {
    color: var(--text-secondary) !important;
}

.theme-dark .compose-footer,
.theme-system.system-dark .compose-footer {
    border-top: 1px solid var(--border-color) !important;
}

.theme-dark .compose-footer .btn-secondary,
.theme-system.system-dark .compose-footer .btn-secondary {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
}

.theme-dark .compose-footer .btn-secondary:hover,
.theme-system.system-dark .compose-footer .btn-secondary:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-color) !important;
}

/* Buttons and Actions */
.theme-dark .email-actions .btn,
.theme-system.system-dark .email-actions .btn {
    color: var(--text-secondary) !important;
}

.theme-dark .email-actions .btn:hover,
.theme-system.system-dark .email-actions .btn:hover {
    color: var(--accent-gold) !important;
}

/* Override All Inline Styles */
.theme-dark [style*="background: #ffffff"],
.theme-dark [style*="background: #f8ecd6"],
.theme-dark [style*="background: #fcf2e3"],
.theme-dark [style*="background: #faf5ed"],
.theme-dark [style*="background-color: #ffffff"],
.theme-dark [style*="background-color: #f8ecd6"],
.theme-dark [style*="background-color: #fcf2e3"],
.theme-dark [style*="background-color: #faf5ed"],
.theme-system.system-dark [style*="background: #ffffff"],
.theme-system.system-dark [style*="background: #f8ecd6"],
.theme-system.system-dark [style*="background: #fcf2e3"],
.theme-system.system-dark [style*="background: #faf5ed"],
.theme-system.system-dark [style*="background-color: #ffffff"],
.theme-system.system-dark [style*="background-color: #f8ecd6"],
.theme-system.system-dark [style*="background-color: #fcf2e3"],
.theme-system.system-dark [style*="background-color: #faf5ed"] {
    background: var(--bg-card) !important;
    background-color: var(--bg-card) !important;
}

.theme-dark [style*="color: #7b6d57"],
.theme-dark [style*="color: #48371e"],
.theme-dark [style*="color: #202124"],
.theme-dark [style*="color: #5f6368"],
.theme-dark [style*="color: #a89a83"],
.theme-system.system-dark [style*="color: #7b6d57"],
.theme-system.system-dark [style*="color: #48371e"],
.theme-system.system-dark [style*="color: #202124"],
.theme-system.system-dark [style*="color: #5f6368"],
.theme-system.system-dark [style*="color: #a89a83"] {
    color: var(--text-primary) !important;
}

/* COMPREHENSIVE CHAT PAGE DARK MODE OVERRIDES */
.theme-dark .chat-container,
.theme-system.system-dark .chat-container {
    background: var(--bg-main) !important;
}

.theme-dark .chat-sidebar,
.theme-system.system-dark .chat-sidebar {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-color) !important;
}

.theme-dark .sidebar-header,
.theme-system.system-dark .sidebar-header {
    background: var(--bg-sidebar) !important;
    color: var(--text-sidebar) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.theme-dark .sidebar-title,
.theme-system.system-dark .sidebar-title {
    color: var(--text-sidebar) !important;
}

.theme-dark .conversation-list,
.theme-system.system-dark .conversation-list {
    background: var(--bg-sidebar) !important;
}

.theme-dark .conversation-item,
.theme-system.system-dark .conversation-item {
    background: var(--bg-sidebar) !important;
    color: var(--text-sidebar) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.theme-dark .conversation-item:hover,
.theme-system.system-dark .conversation-item:hover {
    background: var(--accent-gold-light) !important;
    color: var(--text-primary) !important;
}

.theme-dark .conversation-item.active,
.theme-system.system-dark .conversation-item.active {
    background: var(--accent-gold-light) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-main,
.theme-system.system-dark .chat-main {
    background: var(--bg-main) !important;
}

.theme-dark .chat-header,
.theme-system.system-dark .chat-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-messages,
.theme-system.system-dark .chat-messages {
    background: var(--bg-main) !important;
}

.theme-dark .welcome-container,
.theme-system.system-dark .welcome-container {
    background: var(--bg-main) !important;
}

.theme-dark .welcome-card,
.theme-system.system-dark .welcome-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .welcome-card h3,
.theme-system.system-dark .welcome-card h3 {
    color: var(--text-primary) !important;
}

.theme-dark .welcome-card p,
.theme-system.system-dark .welcome-card p {
    color: var(--text-secondary) !important;
}

.theme-dark .action-card,
.theme-system.system-dark .action-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .action-card:hover,
.theme-system.system-dark .action-card:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--accent-gold) !important;
}

.theme-dark .message,
.theme-system.system-dark .message {
    color: var(--text-primary) !important;
}

.theme-dark .message.user,
.theme-system.system-dark .message.user {
    background: var(--accent-gold-light) !important;
    color: var(--text-primary) !important;
}

.theme-dark .message.assistant,
.theme-system.system-dark .message.assistant {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-input-container,
.theme-system.system-dark .chat-input-container {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color) !important;
}

.theme-dark .chat-input,
.theme-system.system-dark .chat-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-input:focus,
.theme-system.system-dark .chat-input:focus {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 0.2rem var(--accent-gold-light) !important;
}

.theme-dark .chat-input::placeholder,
.theme-system.system-dark .chat-input::placeholder {
    color: var(--text-muted) !important;
}

/* UNIVERSAL BUTTON AND ICON OVERRIDES */
.theme-dark button i,
.theme-dark .btn i,
.theme-system.system-dark button i,
.theme-system.system-dark .btn i {
    color: inherit !important;
}

.theme-dark .btn-link,
.theme-system.system-dark .btn-link {
    color: var(--text-secondary) !important;
}

.theme-dark .btn-link:hover,
.theme-system.system-dark .btn-link:hover {
    color: var(--accent-gold) !important;
}

/* COMPREHENSIVE SUBNAV OVERRIDES */
.theme-dark .subnav-item i[data-feather],
.theme-system.system-dark .subnav-item i[data-feather] {
    color: var(--accent-gold) !important;
    stroke: var(--accent-gold) !important;
}

.theme-dark .subnav-item:hover i[data-feather],
.theme-system.system-dark .subnav-item:hover i[data-feather] {
    color: var(--accent-gold) !important;
    stroke: var(--accent-gold) !important;
}

.theme-dark .subnav-item.active i[data-feather],
.theme-system.system-dark .subnav-item.active i[data-feather] {
    color: var(--accent-gold) !important;
    stroke: var(--accent-gold) !important;
}

/* EMAIL AND CALENDAR SUBNAV SPECIFIC ICON FIXES */
.theme-dark .email-subnav .subnav-item i,
.theme-system.system-dark .email-subnav .subnav-item i,
.theme-dark .calendar-subnav .subnav-item i,
.theme-system.system-dark .calendar-subnav .subnav-item i {
    color: #7a9471 !important;
    stroke: #7a9471 !important;
    fill: none !important;
    stroke-width: 2 !important;
}

.theme-dark .email-subnav .subnav-item:hover i,
.theme-system.system-dark .email-subnav .subnav-item:hover i {
    color: #7a9471 !important;
    stroke: #7a9471 !important;
}

/* SPAM ICON DARK MODE - ORIGINAL GOLD */
.theme-dark .email-subnav .subnav-item[href*="spam"] i,
.theme-system.system-dark .email-subnav .subnav-item[href*="spam"] i {
    color: #edac25 !important;
    stroke: #edac25 !important;
}

/* UNIVERSAL SUBNAV ICON RULES - HIGHEST PRIORITY */
.subnav-item i,
.subnav-item svg,
.subnav-item i[data-feather] {
    display: inline-block !important;
    width: 16px !important;
    height: 16px !important;
    color: #7a9471 !important;
    stroke: #7a9471 !important;
    fill: none !important;
    stroke-width: 2 !important;
    margin-right: 8px !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* SPAM ICON SPECIFIC COLOR - ORIGINAL GOLD */
.subnav-item[href*="spam"] i,
.subnav-item[href*="spam"] svg,
.subnav-item[href*="spam"] i[data-feather] {
    color: #edac25 !important;
    stroke: #edac25 !important;
}

/* INBOX NOTIFICATION CIRCLE COLOR FIX */
.theme-dark #inbox-count,
.theme-system.system-dark #inbox-count {
    background: #7c9874 !important;
    color: white !important;
}

/* INBOX LOADING SPINNER COLOR FIX */
.theme-dark .spinner-border,
.theme-system.system-dark .spinner-border,
.theme-dark .loading-spinner,
.theme-system.system-dark .loading-spinner {
    border-color: #7c9874 !important;
    border-right-color: transparent !important;
}

/* COMPREHENSIVE EMAIL CARD DARK MODE FIXES */
.theme-dark .email-card,
.theme-system.system-dark .email-card,
.theme-dark .email-list-item,
.theme-system.system-dark .email-list-item,
.theme-dark .email-item,
.theme-system.system-dark .email-item {
    background: linear-gradient(135deg, #101312 0%, #121917 100%) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-card:hover,
.theme-system.system-dark .email-card:hover,
.theme-dark .email-list-item:hover,
.theme-system.system-dark .email-list-item:hover,
.theme-dark .email-item:hover,
.theme-system.system-dark .email-item:hover {
    background: linear-gradient(135deg, #1D2925 0%, #18221F 100%) !important;
    border-color: #4f636c !important;
}

.theme-dark .email-card .email-sender,
.theme-system.system-dark .email-card .email-sender {
    color: var(--text-primary) !important;
}

.theme-dark .email-card .email-subject,
.theme-system.system-dark .email-card .email-subject {
    color: var(--text-primary) !important;
}

.theme-dark .email-card .email-preview,
.theme-system.system-dark .email-card .email-preview {
    color: var(--text-secondary) !important;
}

.theme-dark .email-card .email-time,
.theme-system.system-dark .email-card .email-time {
    color: var(--text-muted) !important;
}

/* OVERRIDE ALL EMAIL ITEM BACKGROUNDS */
.theme-dark .email-item,
.theme-dark .email-list .email-item,
.theme-dark .email-list-item,
.theme-system.system-dark .email-item,
.theme-system.system-dark .email-list .email-item,
.theme-system.system-dark .email-list-item {
    background: linear-gradient(135deg, #101312 0%, #121917 100%) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .email-item:hover,
.theme-dark .email-list .email-item:hover,
.theme-dark .email-list-item:hover,
.theme-system.system-dark .email-item:hover,
.theme-system.system-dark .email-list .email-item:hover,
.theme-system.system-dark .email-list-item:hover {
    background: linear-gradient(135deg, #1D2925 0%, #18221F 100%) !important;
    border-color: #4f636c !important;
}

/* FORCE OVERRIDE ALL WHITE BACKGROUNDS IN EMAIL */
.theme-dark .email-list *[style*="background"],
.theme-dark .email-list *[style*="background-color"],
.theme-system.system-dark .email-list *[style*="background"],
.theme-system.system-dark .email-list *[style*="background-color"],
.theme-dark .email-list div,
.theme-dark .email-list .card,
.theme-system.system-dark .email-list div,
.theme-system.system-dark .email-list .card {
    background: linear-gradient(135deg, #101312 0%, #121917 100%) !important;
    background-color: #101312 !important;
}

/* UNIVERSAL STYLE ATTRIBUTE OVERRIDES */
.theme-dark *[style*="color: #e8dcc8"],
.theme-system.system-dark *[style*="color: #e8dcc8"] {
    color: var(--border-color) !important;
}

.theme-dark *[style*="background: #f6ead6"],
.theme-system.system-dark *[style*="background: #f6ead6"] {
    background: var(--bg-main) !important;
}

.theme-dark *[style*="margin-top"],
.theme-dark *[style*="padding"],
.theme-system.system-dark *[style*="margin-top"],
.theme-system.system-dark *[style*="padding"] {
    /* Preserve spacing but override colors */
}

/* SPECIFIC EMAIL ELEMENT OVERRIDES */
.theme-dark #email-subject-header,
.theme-system.system-dark #email-subject-header {
    color: var(--text-primary) !important;
}

.theme-dark #email-count,
.theme-system.system-dark #email-count {
    color: var(--text-secondary) !important;
}

.theme-dark .dropdown .btn,
.theme-system.system-dark .dropdown .btn {
    color: var(--text-secondary) !important;
}

.theme-dark .text-muted,
.theme-system.system-dark .text-muted {
    color: var(--text-muted) !important;
}

/* COMPREHENSIVE CARD CONTENT STYLING */
.theme-dark .card .card-title,
.theme-dark .card h1, .theme-dark .card h2, .theme-dark .card h3,
.theme-dark .card h4, .theme-dark .card h5, .theme-dark .card h6,
.theme-system.system-dark .card .card-title,
.theme-system.system-dark .card h1, .theme-system.system-dark .card h2,
.theme-system.system-dark .card h3, .theme-system.system-dark .card h4,
.theme-system.system-dark .card h5, .theme-system.system-dark .card h6 {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.theme-dark .card .card-text,
.theme-dark .card p, .theme-dark .card span,
.theme-dark .card .text-secondary,
.theme-system.system-dark .card .card-text,
.theme-system.system-dark .card p, .theme-system.system-dark .card span,
.theme-system.system-dark .card .text-secondary {
    color: var(--text-secondary) !important;
}

/* EMAIL CARD SPECIFIC CONTENT STYLING */
.theme-dark .email-item .email-subject,
.theme-dark .email-item .subject,
.theme-system.system-dark .email-item .email-subject,
.theme-system.system-dark .email-item .subject {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.theme-dark .email-item .email-sender,
.theme-dark .email-item .sender,
.theme-dark .email-item .from,
.theme-system.system-dark .email-item .email-sender,
.theme-system.system-dark .email-item .sender,
.theme-system.system-dark .email-item .from {
    color: var(--text-secondary) !important;
    font-weight: 500;
}

.theme-dark .email-item .email-preview,
.theme-dark .email-item .preview,
.theme-dark .email-item .snippet,
.theme-system.system-dark .email-item .email-preview,
.theme-system.system-dark .email-item .preview,
.theme-system.system-dark .email-item .snippet {
    color: var(--text-muted) !important;
}

.theme-dark .email-item .email-date,
.theme-dark .email-item .date,
.theme-dark .email-item .time,
.theme-system.system-dark .email-item .email-date,
.theme-system.system-dark .email-item .date,
.theme-system.system-dark .email-item .time {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
}

/* ENHANCED BUTTON STYLING FOR BETTER CONTRAST */
.theme-dark .btn-primary,
.theme-system.system-dark .btn-primary {
    background: var(--accent-gold) !important;
    border-color: var(--accent-gold) !important;
    color: var(--bg-dark) !important;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(122, 148, 113, 0.2);
}

.theme-dark .btn-primary:hover,
.theme-dark .btn-primary:focus,
.theme-system.system-dark .btn-primary:hover,
.theme-system.system-dark .btn-primary:focus {
    background: var(--accent-gold-dark) !important;
    border-color: var(--accent-gold-dark) !important;
    color: var(--bg-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(122, 148, 113, 0.3);
}

/* COMPOSE BUTTON ENHANCED */
.theme-dark #compose-btn,
.theme-system.system-dark #compose-btn {
    background: var(--accent-gold) !important;
    border: none !important;
    color: var(--bg-dark) !important;
    font-weight: 600 !important;
    padding: 10px 24px !important;
    
    box-shadow: 0 3px 6px rgba(122, 148, 113, 0.3) !important;
    transition: all 0.2s ease !important;
}

.theme-dark #compose-btn:hover,
.theme-system.system-dark #compose-btn:hover {
    background: var(--accent-gold-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 5px 12px rgba(122, 148, 113, 0.4) !important;
}

/* EMAIL ACTION BUTTONS ENHANCED */
.theme-dark .email-actions button,
.theme-dark .email-preview-actions button,
.theme-system.system-dark .email-actions button,
.theme-system.system-dark .email-preview-actions button {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.theme-dark .email-actions button:hover,
.theme-dark .email-preview-actions button:hover,
.theme-system.system-dark .email-actions button:hover,
.theme-system.system-dark .email-preview-actions button:hover {
    background: var(--accent-gold) !important;
    border-color: var(--accent-gold) !important;
    color: var(--bg-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(122, 148, 113, 0.3);
}

/* UNIVERSAL TEXT CONTRAST IMPROVEMENTS */
.theme-dark *[style*="color: #edac25"],
.theme-system.system-dark *[style*="color: #edac25"] {
    color: var(--accent-gold) !important;
}

/* SPINNER AND LOADING ELEMENTS */
.theme-dark .spinner-border,
.theme-system.system-dark .spinner-border {
    border-color: var(--accent-gold) var(--border-color) var(--border-color) var(--border-color) !important;
}

/* CHAT PAGE DARK MODE OVERRIDES - ENHANCED */
.theme-dark .chat-container,
.theme-system.system-dark .chat-container {
    background: var(--bg-main) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-sidebar,
.theme-system.system-dark .chat-sidebar {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-color) !important;
    color: var(--text-sidebar) !important;
}

.theme-dark .sidebar-header,
.theme-system.system-dark .sidebar-header {
    background: var(--bg-sidebar) !important;
    color: var(--text-sidebar) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.theme-dark .sidebar-title,
.theme-system.system-dark .sidebar-title {
    color: var(--text-sidebar) !important;
}

.theme-dark .conversation-list,
.theme-system.system-dark .conversation-list {
    background: var(--bg-sidebar) !important;
}

.theme-dark .conversation-item,
.theme-system.system-dark .conversation-item {
    background: var(--bg-sidebar) !important;
    color: var(--text-sidebar) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.theme-dark .conversation-item:hover,
.theme-system.system-dark .conversation-item:hover {
    background: var(--accent-gold-light) !important;
    color: var(--text-primary) !important;
}

.theme-dark .conversation-item.active,
.theme-system.system-dark .conversation-item.active {
    background: var(--accent-gold-light) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-main,
.theme-system.system-dark .chat-main {
    background: var(--bg-main) !important;
}

.theme-dark .chat-header,
.theme-system.system-dark .chat-header {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-messages,
.theme-system.system-dark .chat-messages {
    background: var(--bg-main) !important;
}

.theme-dark .welcome-container,
.theme-system.system-dark .welcome-container {
    background: var(--bg-main) !important;
}

.theme-dark .welcome-card,
.theme-system.system-dark .welcome-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .action-card,
.theme-system.system-dark .action-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .action-card:hover,
.theme-system.system-dark .action-card:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--accent-gold) !important;
}

.theme-dark .message,
.theme-system.system-dark .message {
    color: var(--text-primary) !important;
}

.theme-dark .message.user,
.theme-system.system-dark .message.user {
    background: var(--accent-gold-light) !important;
}

.theme-dark .message.assistant,
.theme-system.system-dark .message.assistant {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}

.theme-dark .chat-input-container,
.theme-system.system-dark .chat-input-container {
    background: var(--bg-card) !important;
    border-top: 1px solid var(--border-color) !important;
}

.theme-dark .chat-input,
.theme-system.system-dark .chat-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.theme-dark .chat-input:focus,
.theme-system.system-dark .chat-input:focus {
    border-color: var(--accent-gold) !important;
    box-shadow: 0 0 0 0.2rem var(--accent-gold-light) !important;
}

.main-content.status-panel-open {
    margin-right: var(--status-panel-width);
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 1vh 2vw;
    background: transparent;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 100000;
}

.top-nav-end {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hamburger-menu {
    background: none;
    border: none;
    color: var(--accent-gold);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.2s;
}

.hamburger-menu:hover {
    color: var(--accent-gold-dark);
}

.hamburger-menu svg {
    width: 27px !important;
    height: 27px !important;
    stroke: var(--accent-color) !important;
    stroke-width: 2 !important;
    fill: none !important;
    display: inline-block !important;
}

/* Fix hamburger menu visibility - CRITICAL FIX */
.hamburger-menu i {
    display: inline-block !important;
    color: var(--accent-color) !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hamburger-menu {
    display: inline-block !important;
    visibility: visible !important;
}

.hamburger-menu .dropdown-content {
    z-index: 100001 !important;
    position: absolute !important;
    display: block !important;
}

/* Calendar Month View Styling */
.full-month-calendar {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--accent-color);
    color: white;
}

.calendar-day-header {
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.calendar-week-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-bottom: 1px solid var(--border-color);
}

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

.calendar-day-cell {
    min-height: 120px;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    background: var(--card-bg);
    position: relative;
    transition: background-color 0.2s;
}

.calendar-day-cell:last-child {
    border-right: none;
}

.calendar-day-cell:hover {
    background: var(--hover-bg);
}

.calendar-day-cell.today {
    background: var(--selected-bg);
    box-shadow: inset 0 0 0 2px var(--accent-color);
}

.calendar-day-cell.other-month {
    opacity: 0.4;
    background: var(--bg-color);
}

.day-number {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
}

.day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.calendar-event {
    background: var(--accent-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.more-events {
    color: var(--secondary-text);
    font-size: 10px;
    padding: 2px 6px;
}

.hamburger-large svg {
    width: 27px !important;
    height: 27px !important;
    stroke: var(--accent-gold) !important;
    stroke-width: 2 !important;
    fill: none !important;
}

.hamburger-menu.dropdown-toggle::after {
    display: none;
}

.dropdown-menu {
    min-width: 250px;
    box-shadow: var(--shadow-color) 0 4px 12px;
    border: 1px solid var(--border-color);
    margin-top: 0.5rem;
    background-color: var(--bg-card);
    z-index: 1000001 !important;
    position: absolute;
}

.dropdown-header {
    font-weight: 600;
    color: var(--heading-color);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
}

.dropdown-item:hover {
    background-color: var(--accent-gold-light);
    color: var(--text-primary);
}

/* Content Wrapper */
.content-wrapper {
    padding-top: 3rem;
}

/* System Status Panel */
.status-panel {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: var(--status-panel-width);
    background-color: var(--status-panel-bg);
    border-left: 1px solid var(--border-color);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 20;
    padding: 2rem 1.5rem;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.05);
}

.status-panel.open {
    transform: translateX(0);
}

.status-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.status-panel-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--status-panel-heading);
    font-family: 'canela-deck', Georgia, serif;
}

.close-status-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

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

/* Status Panel Content */
.status-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.status-section {
    padding-bottom: 1.5rem;
}

.status-section:last-child {
    padding-bottom: 0;
}

.status-section h5 {
    font-size: 1.35rem;
    color: var(--status-panel-subheading);
    margin-bottom: 0.75rem;
    font-weight: 600;
    font-family: 'canela-deck', Georgia, serif;
}

.status-value {
    font-size: 1rem;
    color: var(--status-panel-content);
    font-weight: 500;
}

.status-subtitle {
    font-size: 0.875rem;
    color: var(--status-panel-content);
    margin-top: 0.25rem;
    opacity: 0.8;
}

/* Settings Panel Styles */
.settings-panel {
    background-color: var(--settings-slide-bg);
}

.settings-panel h2,
.settings-panel h3 {
    color: var(--settings-slide-heading);
}

.settings-panel h4,
.settings-panel h5,
.settings-panel .subheading {
    color: var(--settings-slide-subheading);
}

.settings-panel p,
.settings-panel .content {
    color: var(--settings-slide-content);
}

/* Icon Colors */
i[data-feather],
.feather {
    color: var(--icon-color);
    stroke: var(--icon-color);
}

/* Page Container - Universal padding for all pages */
.page-container,
.projects-container,
.liminal-drive-container,
.book-generator-container,
.generate-container,
.chat-container {
    padding: 3vh 2vw 2vh 2vw;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 3vh);
}

/* Dashboard Layout */
.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3vh 2vw 2vh 2vw;
    min-height: calc(100vh - 3vh);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2vw;
    margin-top: 2vh;
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5vh;
}

/* Greeting Section */
.greeting-section {
    margin-bottom: 2vh;
}

.daily-assessment {
    margin-top: 1rem;
    padding: 1rem 0;
}

.daily-assessment p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.greeting {
    font-size: 3.5rem;
    font-weight: 400;
    color: var(--text-greeting);
    margin: 0;
    font-family: 'canela-deck', Georgia, serif;
}

/* Cards */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

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

.card-title {
    font-size: 2rem;
    font-weight: 400;
    color: var(--heading-color);
    margin: 0;
    font-family: 'canela-deck', Georgia, serif;
}

.card-body {
    padding: 1.5vw;
}

/* System Status Button */
.system-status-btn {
    background: transparent;
    border: none;
    color: var(--accent-gold-dark);
    font-size: 0.95rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    text-decoration: underline;
    transition: color 0.2s;
}

.system-status-btn:hover {
    color: var(--accent-gold);
}

/* Docket Items */
.docket-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.docket-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
}

.docket-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent-gold);
    border-radius: 3px;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
    transition: all 0.2s;
    background: transparent;
}

.docket-checkbox:checked,
.docket-checkbox.checked {
    background-color: var(--accent-gold);
    position: relative;
}

.docket-checkbox:checked::after,
.docket-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.docket-text {
    flex: 1;
    color: var(--text-primary);
    font-size: 1.05rem;
    line-height: 1.5;
}

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

/* Content Boxes */
.content-boxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2vw;
    margin-top: 3vh;
}

.progress-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}

.progress-box h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: 'canela-deck', Georgia, serif;
}

.box-info p {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.progress-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gold);
    border-radius: 3px;
    transition: width 0.3s ease;
}

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

/* Sidebar Bottom */
.sidebar-bottom {
    position: absolute;
    bottom: 2rem;
    left: 1.5rem;
    right: 1.5rem;
}

/* Loading State */
.loading {
    color: var(--text-secondary);
    font-style: italic;
    padding: 1rem 0;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.125rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--accent-gold);
    color: var(--text-primary);
    box-shadow: 0 2px 4px var(--shadow-color);
}

.btn-primary:hover {
    background-color: var(--accent-gold-dark);
    box-shadow: 0 3px 6px var(--shadow-hover);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-gold);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Project Progress */
.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.project-status {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-main);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.project-deadline {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-success {
    color: var(--success);
}

.text-muted {
    color: var(--text-muted);
}

.mb-3 {
    margin-bottom: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.95rem;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: spin 0.8s linear infinite;
}

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

/* Status Overview in Dashboard */
.status-overview {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-overview .status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.status-overview .status-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.status-overview .status-value {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* API Key Status Styles */
.api-key-item {
    padding: 1rem 0;
}

.api-key-item:last-child {
    padding-bottom: 0;
}

.api-key-item h5 {
    margin-bottom: 0.75rem;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#auth-status-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#auth-connected,
#auth-disconnected {
    align-items: center;
}

/* Color Picker Styles */
.color-picker-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-presets {
    display: flex;
    gap: 0.5rem;
}

.color-preset {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: var(--accent-gold);
}

/* Alert Container */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Email subnav */
.email-subnav {
    margin-left: 20px;
    margin-top: 8px;
    margin-bottom: 8px;
    padding-left: 12px;
}

.subnav-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 6px;
    color: #48371e;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    position: relative;
}

.subnav-item:hover {
    background: #f0e4c8;
    color: #7f7055;
    text-decoration: none;
}

.subnav-item i {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    color: #7a9471;
    stroke: #7a9471;
    fill: none;
    stroke-width: 2;
    display: inline-block;
}

.subnav-item .unread-count {
    margin-left: auto;
    background: #4f636c;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    min-width: 16px;
    text-align: center;
    display: none;
}

.subnav-item .unread-count.has-count {
    display: inline-block;
}

.subnav-item.active {
    background: #f0e4c8;
    color: #7f7055;
    font-weight: 600;
}

/* Email loading states */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #7b6d57;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #edac25;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    margin: 0;
}

.auth-required-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
}

.auth-required-content {
    text-align: center;
    max-width: 400px;
}

.auth-required-content h3 {
    color: #48371e;
    margin: 16px 0 8px;
}

.auth-required-content p {
    color: #7b6d57;
    margin-bottom: 20px;
}

.subnav-divider {
    height: 1px;
    background: #4f636c;
    margin: 8px 0;
}

/* Email and Calendar subnav containers */
.email-subnav, .calendar-subnav {
    background: #1a1f1c;
    border-left: 1px solid #2a3332;
    margin-left: 16px;
    border-radius: 0 0 8px 8px;
    padding: 8px 0 16px 0;
    overflow: hidden;
}

.subnav-header {
    padding: 8px 12px 4px 12px;
    font-size: 12px;
    font-weight: 600;
    color: #7b6d57;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
}

.subnav-header {
    font-size: 12px;
    font-weight: 600;
    color: #7b6d57;
    margin: 8px 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .status-panel {
        width: 280px;
    }
}

.card-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Greeting */
.greeting {
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-family: Georgia, serif;
}

.current-time {
    color: var(--text-muted);
    font-size: 1rem;
}

/* Docket */
.docket-list {
    list-style: none;
}

.docket-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
}

.docket-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.docket-checkbox.completed {
    background-color: var(--success);
    border-color: var(--success);
}

.docket-text {
    flex: 1;
    color: var(--text-primary);
}

.docket-text.completed {
    text-decoration: line-through;
    color: var(--text-muted);
}

.docket-type {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 500;
}

.docket-type.project {
    background-color: var(--accent-gold);
    color: var(--text-primary);
}

.docket-type.calendar {
    background-color: var(--bg-main);
    color: var(--text-secondary);
}

/* System Status */
.system-status {
    position: relative;
}

.system-status-trigger {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-gold);
    font-size: 0.875rem;
    font-weight: 500;
}

.system-status-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: none;
}

.system-status-panel.active {
    display: block;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.status-item:last-child {
    border-bottom: none;
}

.status-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.status-value {
    color: var(--text-primary);
    font-weight: 500;
}

.status-value.success {
    color: var(--success);
}

.status-value.warning {
    color: var(--warning);
}

.status-value.error {
    color: var(--error);
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: var(--accent-gold);
}

/* Settings page styles */
.settings-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 2rem;
    position: relative;
    z-index: 1;
    box-sizing: border-box;
}

/* Ensure all tab panes have consistent width */
.tab-pane {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure integrations section is properly visible */
#integrations,
#help {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 400px;
}

/* Override Bootstrap grid constraints for settings page */
.settings-container .row {
    margin-left: 0;
    margin-right: 0;
}

.settings-container .col-12 {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
}

/* Responsive adjustments for settings page */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 2vw;
    }
    
    .settings-container {
        padding: 2vw;
    }
    
    .floating-tabs-container {
        width: calc(100% + 4vw);
        margin-left: -2vw;
        margin-right: -2vw;
        padding: 2vw;
    }
}

/* Ensure settings page content doesn't overlap with sidebar */
.main-content .settings-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.page-header h1 {
    color: var(--primary-brand);
    font-family: 'Canela Deck', serif;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
    margin-bottom: 2vh;
}

/* Settings wrapper for proper sticky positioning */
.settings-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
}

/* Individual floating pill tabs */
.floating-tabs-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2vh;
    width: calc(100vw - var(--sidebar-width));
    margin-left: calc(-1 * ((100vw - var(--sidebar-width) - 100%) / 2));
    margin-right: calc(-1 * ((100vw - var(--sidebar-width) - 100%) / 2));
    background: transparent;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 9999;
    transition: all 0.3s ease;
    padding: 1vh 3vw;
}

/* When the container is stuck to top */
.floating-tabs-container.is-sticky {
    background: linear-gradient(135deg, #3a4948 0%, #465856 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid #4f636c !important;
}

/* Smooth transition for dark mode stuck state */
.theme-dark .floating-tabs-container.is-sticky,
.theme-system.system-dark .floating-tabs-container.is-sticky {
    background: linear-gradient(135deg, #2d3a39 0%, #3a4948 100%) !important;
    border-bottom: 2px solid #5a7078 !important;
}

/* Fix overflow on parent containers to allow sticky positioning */
.settings-container {
    overflow: visible !important;
}

/* Remove any conflicting overflow rules */

/* Critical rule for sticky positioning to work in main-content */
html, body {
    height: 100%;
}

body > .main-content {
    overflow-y: auto;
    height: 100vh;
}

.floating-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    max-width: 100%;
    padding: 0;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.floating-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 25px;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: none;
    cursor: pointer;
    border: 2px solid transparent;
}

.floating-tab:hover {
    background: var(--accent-gold-light);
    color: var(--primary-brand);
    transform: none;
    box-shadow: none;
}

.floating-tab.active {
    background: var(--accent-gold);
    color: white;
    box-shadow: none;
    border-color: transparent;
}

.floating-tab i {
    width: 16px;
    height: 16px;
    color: currentColor;
}

.floating-tab span {
    font-size: 0.9rem;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .floating-tabs {
        gap: 0.5rem;
    }
    
    .floating-tab {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    .floating-tab span {
        display: none;
    }
    
    .floating-tab i {
        width: 18px;
        height: 18px;
    }
}

/* Settings content spacing - removed duplicate */

/* Container wrapper for all settings cards - matches nav-ribbon width */
.settings-container-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Cards now fill the natural container width, matching nav-ribbon */
.settings-container-wrapper .settings-section {
    width: 100%;
}

/* Dark mode support for container wrapper */
.theme-dark .settings-container-wrapper,
.theme-system.system-dark .settings-container-wrapper {
    /* Container itself doesn't need background, cards handle that */
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Project Cards */
.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.project-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'canela-deck', Georgia, serif;
}

.project-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-transform: uppercase;
    font-weight: 500;
    background-color: var(--accent-gold);
    color: var(--text-primary);
}

.project-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* Additional Button Styles */
.btn-outline {
    background-color: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

.btn-outline:hover {
    background-color: var(--accent-gold);
    color: var(--text-primary);
}

.btn-ghost {
    background-color: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background-color: var(--accent-gold-light);
    color: var(--text-primary);
}

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

.btn-danger:hover {
    background-color: #e53e3e;
}

/* Forms */
.form-group {
    margin-bottom: 1.75rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px var(--accent-gold-light);
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid;
}

.alert-success {
    background-color: rgba(72, 187, 120, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background-color: rgba(237, 137, 54, 0.1);
    border-color: var(--warning);
    color: var(--warning);
}

.alert-error {
    background-color: rgba(245, 101, 101, 0.1);
    border-color: var(--error);
    color: var(--error);
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        order: -1;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .greeting {
        font-size: 1.5rem;
    }
    
    .system-status-panel {
        width: 250px;
    }
}

/* Loading States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Feather Icons Styling */
.nav-icon {
    width: var(--icon-size);
    height: var(--icon-size);
    stroke: #edac25 !important;
    stroke-width: 2;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.dropdown-item i {
    width: 16px;
    height: 16px;
    stroke: #edac25 !important;
    stroke-width: 2;
    margin-right: 0.5rem;
}

.hamburger-menu i {
    display: inline-block !important;
    color: var(--accent-gold);
}

.close-status-btn i {
    width: 16px;
    height: 16px;
    stroke: #edac25 !important;
    stroke-width: 2;
}

/* Onboarding Styles */
.onboarding-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.onboarding-card .card-body {
    background: var(--bg-card);
}

.onboarding-logo {
    height: 52px;
    filter: none; /* Ensure logo keeps original colors */
}

.onboarding-header h2 {
    color: var(--primary-brand);
    font-size: 2rem;
    font-weight: 600;
}

.onboarding-header p.lead {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

.progress-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background: var(--accent-gold);
    transform: scale(1.2);
}

.step-content {
    min-height: 400px;
    position: relative;
}

.step {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.step-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.step-icon i {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gold-light);
    color: var(--accent-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.step h3 {
    text-align: center;
    color: var(--primary-brand);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step-description {
    text-align: center;
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

.role-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
}

.role-option:hover {
    border-color: var(--accent-gold);
    background: var(--accent-gold-light);
    transform: translateY(-2px);
}

.role-option.selected {
    border-color: var(--accent-gold);
    background: var(--accent-gold-light);
    box-shadow: 0 0 0 3px rgba(237, 172, 37, 0.2);
}

.role-option i {
    color: var(--accent-gold);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.role-option span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
}

.communication-input,
.expertise-input {
    margin-bottom: 1.5rem;
}

.style-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.suggestion-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-input);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.suggestion-btn:hover {
    border-color: var(--accent-gold);
    background: var(--accent-gold-light);
}

.response-options {
    display: grid;
    gap: 1rem;
}

.response-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-input);
    cursor: pointer;
    transition: all 0.2s ease;
}

.response-option:hover {
    border-color: var(--accent-gold);
    background: var(--accent-gold-light);
}

.response-option.selected {
    border-color: var(--accent-gold);
    background: var(--accent-gold-light);
    box-shadow: 0 0 0 3px rgba(237, 172, 37, 0.2);
}

.response-option i {
    color: var(--accent-gold);
    font-size: 24px;
    min-width: 24px;
}

.option-content strong {
    color: var(--primary-brand);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.25rem;
}

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

.setup-summary {
    text-align: center;
}

.summary-card {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-card h5 {
    color: var(--primary-brand);
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.summary-grid {
    display: grid;
    gap: 1rem;
    text-align: left;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: var(--text-primary);
    font-weight: 500;
}

.summary-item span {
    color: var(--text-secondary);
    font-style: italic;
}

.next-steps {
    text-align: left;
    background: var(--accent-gold-light);
    border: 1px solid var(--accent-gold);
    border-radius: 8px;
    padding: 1.5rem;
}

.next-steps h6 {
    color: var(--primary-brand);
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.next-steps ul {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.next-steps li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.onboarding-navigation {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

/* Onboarding Form Controls */
.onboarding-card .form-control {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.onboarding-card .form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(237, 172, 37, 0.2);
}

.onboarding-card .btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.onboarding-card .btn-primary {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

.onboarding-card .btn-primary:hover {
    background: var(--accent-gold-dark);
    border-color: var(--accent-gold-dark);
    transform: translateY(-1px);
}

.onboarding-card .btn-primary:disabled {
    background: var(--border-color);
    border-color: var(--border-color);
    color: var(--text-muted);
    transform: none;
    cursor: not-allowed;
}

.onboarding-card .btn-success {
    background: var(--success);
    border-color: var(--success);
}

.onboarding-card .btn-success:hover {
    background: #4a6a4a;
    border-color: #4a6a4a;
    transform: translateY(-1px);
}

.onboarding-card .btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.onboarding-card .btn-outline-secondary:hover {
    background: var(--accent-gold-light);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* Responsive Design */
@media (max-width: 768px) {
    .role-options {
        grid-template-columns: 1fr;
    }
    
    .style-suggestions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .suggestion-btn {
        text-align: center;
    }
}

/* Onboarding Styles */
.onboarding-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f6ead6 0%, #f8ecd6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.onboarding-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    position: relative;
}

.onboarding-header {
    background: linear-gradient(135deg, #7f7055 0%, #9a8b6f 100%);
    color: white;
    padding: 3rem 2rem 2rem;
    text-align: center;
}

.onboarding-logo {
    height: 60px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.onboarding-header h2 {
    font-family: 'Canela Deck', serif;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.progress-dots {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
    gap: 1rem;
    margin-top: 2rem;
    border-top: 1px solid #e8dcc8;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e8dcc8;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dot.active {
    background: #edac25;
    transform: scale(1.2);
}

.step-content {
    padding: 0 3rem 2rem;
    min-height: 400px;
    position: relative;
}

.step {
    display: none;
    text-align: center;
}

.step.active {
    display: block;
}

/* Dark Mode Scrollbars, Notifications, and Button Styling */
.theme-dark ::-webkit-scrollbar,
.theme-system.system-dark ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.theme-dark ::-webkit-scrollbar-track,
.theme-system.system-dark ::-webkit-scrollbar-track {
    background: transparent;
}

.theme-dark ::-webkit-scrollbar-thumb,
.theme-system.system-dark ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4f636c 0%, #5a7078 100%);
    border-radius: 4px;
}

.theme-dark ::-webkit-scrollbar-thumb:hover,
.theme-system.system-dark ::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #3a4b52 0%, #4f636c 100%);
}



/* Dark Mode Button Styling */
.theme-dark .btn-primary,
.theme-system.system-dark .btn-primary,
.theme-dark .email-action-btn,
.theme-system.system-dark .email-action-btn {
    background: linear-gradient(135deg, #4f636c 0%, #5a7078 100%) !important;
    border: 1px solid #4f636c !important;
    color: #D8EAE2 !important;
}

.theme-dark .btn-primary:hover,
.theme-system.system-dark .btn-primary:hover,
.theme-dark .email-action-btn:hover,
.theme-system.system-dark .email-action-btn:hover {
    background: linear-gradient(135deg, #3a4b52 0%, #4f636c 100%) !important;
    border-color: #3a4b52 !important;
}

/* Dark Mode Icon Colors */
.theme-dark .nav-icon,
.theme-system.system-dark .nav-icon,
.theme-dark .dropdown-item i,
.theme-system.system-dark .dropdown-item i,
.theme-dark .hamburger-menu i,
.theme-system.system-dark .hamburger-menu i,
.theme-dark .close-status-btn i,
.theme-system.system-dark .close-status-btn i,
.theme-dark .email-action-btn i,
.theme-system.system-dark .email-action-btn i {
    stroke: #4f636c !important;
    color: #4f636c !important;
}

/* Ensure email page hamburger menu follows color rules */
.theme-dark .hamburger-menu svg,
.theme-system.system-dark .hamburger-menu svg,
.theme-dark .hamburger-menu svg path,
.theme-system.system-dark .hamburger-menu svg path,
.theme-dark .hamburger-menu svg line,
.theme-system.system-dark .hamburger-menu svg line {
    stroke: #4f636c !important;
    color: #4f636c !important;
    fill: none !important;
}

/* Force hamburger menu and dropdown icon colors */
.theme-dark .hamburger-menu *,
.theme-system.system-dark .hamburger-menu *,
.theme-dark .dropdown-menu i,
.theme-system.system-dark .dropdown-menu i,
.theme-dark .dropdown-menu svg,
.theme-system.system-dark .dropdown-menu svg {
    stroke: #4f636c !important;
    color: #4f636c !important;
}

/* Navigation titles and headers */
.theme-dark .nav-title,
.theme-system.system-dark .nav-title,
.theme-dark h1,
.theme-system.system-dark h1,
.theme-dark h2,
.theme-system.system-dark h2,
.theme-dark h3,
.theme-system.system-dark h3,
.theme-dark .page-title,
.theme-system.system-dark .page-title,
.theme-dark .section-title,
.theme-system.system-dark .section-title {
    color: #e6ded3 !important;
}

/* Email search bar and form inputs */
.theme-dark .email-search-input,
.theme-system.system-dark .email-search-input,
.theme-dark .email-search-input::placeholder,
.theme-system.system-dark .email-search-input::placeholder {
    color: #e6ded3 !important;
}

/* Email search icon */
.theme-dark .email-search-icon,
.theme-system.system-dark .email-search-icon {
    color: #e6ded3 !important;
}

/* More specific dark mode text colors for headers */
.theme-dark input[type="text"],
.theme-system.system-dark input[type="text"],
.theme-dark input[type="search"],
.theme-system.system-dark input[type="search"] {
    color: #e6ded3 !important;
}

/* Header and navigation styling */
.theme-dark .email-header h1,
.theme-system.system-dark .email-header h1,
.theme-dark .nav-item,
.theme-system.system-dark .nav-item {
    color: #e6ded3 !important;
}

/* Dark Mode Glow Effects */
.theme-dark .email-action-btn:hover,
.theme-system.system-dark .email-action-btn:hover {
    box-shadow: 0 0 8px rgba(79, 99, 108, 0.4) !important;
}

.theme-dark .btn-primary:focus,
.theme-system.system-dark .btn-primary:focus,
.theme-dark .form-control:focus,
.theme-system.system-dark .form-control:focus {
    box-shadow: 0 0 0 3px rgba(79, 99, 108, 0.3) !important;
    border-color: #4f636c !important;
}

.theme-dark .floating-tab.active,
.theme-system.system-dark .floating-tab.active {
    background: linear-gradient(135deg, #4f636c 0%, #5a7078 100%) !important;
    box-shadow: 0 4px 16px rgba(79, 99, 108, 0.4) !important;
    border-color: #4f636c !important;
}

/* Dark Mode Selected Email Glow */
.theme-dark .email-card.selected,
.theme-system.system-dark .email-card.selected {
    box-shadow: 0 0 0 2px #4f636c, 0 0 12px rgba(79, 99, 108, 0.4) !important;
    border-color: #4f636c !important;
}

/* Dark Mode Progress Bars */
.theme-dark .progress-fill,
.theme-system.system-dark .progress-fill {
    background: linear-gradient(135deg, #4f636c 0%, #5a7078 100%) !important;
}

.theme-dark .spinner,
.theme-system.system-dark .spinner {
    border-top: 2px solid #4f636c !important;
}

/* Dark Mode Notifications */
.theme-dark .notification,
.theme-system.system-dark .notification {
    background: linear-gradient(135deg, #4f636c 0%, #5a7078 100%) !important;
    border-color: #4f636c !important;
    color: #D8EAE2 !important;
}play: block;
    animation: fadeInUp 0.4s ease;
}

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

.step-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #edac25 0%, #f4c542 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
}

.step-icon i {
    width: 32px;
    height: 32px;
}

.step h3 {
    font-family: 'Canela Deck', serif;
    font-size: 2rem;
    color: #7f7055;
    margin-bottom: 0.75rem;
}

.step-description {
    color: #7b6d57;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.role-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.role-option {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border: 2px solid #e8dcc8;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #7f7055;
    min-height: 60px;
}

.role-option:hover {
    border-color: #edac25;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(237, 172, 37, 0.2);
}

.role-option.selected {
    border-color: #edac25;
    background: linear-gradient(135deg, #fef9e7 0%, #fdf6d8 100%);
    color: #7f7055;
}

.role-option span {
    font-weight: 600;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.other-option {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
}

.custom-role {
    margin-top: 1rem;
}

.custom-role-section {
    margin-top: 1.5rem;
}

.custom-role-section .form-label {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.custom-role-section .form-control {
    font-size: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e8dcc8;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.custom-role-section .form-control:focus {
    border-color: #edac25;
    box-shadow: 0 0 0 0.2rem rgba(237, 172, 37, 0.25);
    outline: none;
}

.custom-role-section .form-text {
    color: #7b6d57;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.communication-input {
    margin-bottom: 1.5rem;
}

.communication-input .form-control {
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e8dcc8;
    text-align: center;
}

.communication-input .form-control:focus {
    border-color: #edac25;
    box-shadow: 0 0 0 0.2rem rgba(237, 172, 37, 0.25);
}

.style-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.suggestion-btn {
    background: #f8ecd6;
    border: 1px solid #e8dcc8;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: #7f7055;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-btn:hover {
    background: #edac25;
    color: white;
    border-color: #edac25;
}

.expertise-input {
    margin-bottom: 1rem;
}

.expertise-input .form-control {
    font-size: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #e8dcc8;
    resize: none;
}

.expertise-input .form-control:focus {
    border-color: #edac25;
    box-shadow: 0 0 0 0.2rem rgba(237, 172, 37, 0.25);
}

.expertise-examples {
    text-align: left;
    padding: 1rem;
    background: #fdf6d8;
    border-radius: 8px;
}

.response-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.response-option {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border: 2px solid #e8dcc8;
    border-radius: 16px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.response-option:hover {
    border-color: #edac25;
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(237, 172, 37, 0.15);
}

.response-option.selected {
    border-color: #edac25;
    background: linear-gradient(135deg, #fef9e7 0%, #fdf6d8 100%);
}

.response-option i {
    width: 24px;
    height: 24px;
    color: #edac25;
    margin-right: 1rem;
    flex-shrink: 0;
}

.option-content strong {
    display: block;
    color: #7f7055;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.option-content p {
    color: #7b6d57;
    margin: 0;
    font-size: 0.95rem;
}

.setup-summary {
    text-align: left;
}

.summary-card {
    background: #fdf6d8;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.summary-card h5 {
    color: #7f7055;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.summary-grid {
    display: grid;
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e8dcc8;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item strong {
    color: #7f7055;
}

.summary-item span {
    color: #7b6d57;
    text-align: right;
    flex: 1;
    margin-left: 1rem;
}

.next-steps {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid #edac25;
}

.next-steps h6 {
    color: #7f7055;
    font-weight: 600;
    margin-bottom: 1rem;
}

.next-steps ul {
    margin: 0;
    padding-left: 1.5rem;
}

.next-steps li {
    color: #7b6d57;
    margin-bottom: 0.5rem;
}

.onboarding-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    background: #f8ecd6;
    border-top: 1px solid #e8dcc8;
}

.nav-right-buttons {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.onboarding-navigation .btn {
    padding: 0.75rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.onboarding-navigation .btn-primary {
    background: linear-gradient(135deg, #edac25 0%, #f4c542 100%);
    border: none;
    color: white;
}

.onboarding-navigation .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(237, 172, 37, 0.3);
}

.onboarding-navigation .btn-success {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    border: none;
    color: white;
}

.onboarding-navigation .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.onboarding-navigation .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }

/* Enhanced Chat Interface with Sidebar and Bubble */
.chat-container-enhanced {
    height: calc(100vh - var(--sidebar-width));
    display: flex;
    background-color: var(--main-bg);
}

.chat-sidebar {
    width: 300px;
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.chat-sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    color: var(--heading-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.new-chat-btn {
    width: 100%;
    background-color: var(--icon-color);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.new-chat-btn:hover {
    background-color: #d19b1f;
    transform: translateY(-1px);
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.conversation-item {
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.conversation-item:hover {
    background-color: var(--card-hover-bg);
    border-color: var(--border-color);
}

.conversation-item.active {
    background-color: var(--icon-color);
    color: white;
}

.conversation-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.3;
}

.conversation-preview {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.conversation-item.active .conversation-preview {
    color: rgba(255, 255, 255, 0.8);
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.personality-btn {
    width: 100%;
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.personality-btn:hover {
    background-color: var(--card-hover-bg);
    border-color: var(--icon-color);
}

.chat-main-bubble {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.chat-bubble {
    width: 100%;
    max-width: 900px;
    height: calc(100vh - 200px);
    background-color: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fcf2e3;
}

.chat-title h2 {
    color: var(--heading-color);
    margin: 0;
    font-size: 1.5rem;
}

.conversation-status {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.chat-controls {
    display: flex;
    gap: 0.5rem;
}

.chat-control-btn {
    background: none;
    border: none;
    color: var(--icon-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.chat-control-btn:hover {
    background-color: rgba(237, 172, 37, 0.1);
}

/* Update existing chat styles for bubble */
.chat-container-gpt {
    height: calc(100vh - var(--sidebar-width));
    display: flex;
    flex-direction: column;
    background-color: var(--main-bg);
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 48rem;
    margin: 0 auto;
    width: 100%;
}

.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.chat-welcome-gpt {
    text-align: center;
    padding: 4rem 1rem;
}

.chat-welcome-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.chat-welcome-subtitle {
    font-size: 1.25rem;
    color: var(--subheading-color);
    margin-bottom: 3rem;
}

.chat-suggestions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    max-width: 700px;
    margin: 0 auto;
}

.suggestion-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.suggestion-card:hover {
    background-color: var(--card-hover-bg);
    border-color: var(--icon-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.suggestion-card svg {
    width: 18px;
    height: 18px;
    stroke: var(--icon-color);
}

.messages-container-gpt {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-wrapper {
    display: flex;
    padding: 1.5rem 0;
}

.message-wrapper.user {
    background-color: var(--card-bg);
}

.message-wrapper.assistant {
    background-color: #fcf2e3;
}

.message-content {
    max-width: 48rem;
    width: 100%;
    margin: 0 auto;
    display: flex;
    gap: 1.5rem;
    padding: 0 1rem;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background-color: var(--icon-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar.assistant {
    background-color: var(--icon-color);
}

.message-text {
    flex: 1;
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.75;
}

.message-text pre {
    background-color: #f5f5f5;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin: 1rem 0;
}

.message-text code {
    background-color: #f5f5f5;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.875rem;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem;
    max-width: 48rem;
    margin: 0 auto;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--icon-color);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

/* Chat Input Area */
.chat-input-area {
    border-top: 1px solid var(--border-color);
    background-color: var(--card-bg);
    padding: 1rem;
}

.chat-input-container-gpt {
    max-width: 48rem;
    margin: 0 auto;
    position: relative;
    background-color: var(--main-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: flex-end;
}

.chat-input-gpt {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-size: 1rem;
    resize: none;
    outline: none;
    max-height: 200px;
    line-height: 1.5;
}

.chat-input-gpt::placeholder {
    color: var(--text-muted);
}

.send-btn-gpt {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: none;
    background-color: var(--icon-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.send-btn-gpt:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
}

.send-btn-gpt:not(:disabled):hover {
    background-color: #d19b1f;
    transform: scale(1.05);
}

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

.chat-footer {
    max-width: 48rem;
    margin: 0.5rem auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-action-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.chat-action-btn:hover {
    background-color: var(--card-hover-bg);
    color: var(--icon-color);
}

.chat-info {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Settings Page Styles - removed duplicate */

.settings-container h1,
.page-header h1 {
    color: var(--heading-color);
}

.settings-container h3,
.settings-section h3 {
    color: var(--subheading-color);
}

/* Settings Tab Navigation */
.settings-tabs-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0;
    overflow: hidden;
    margin-bottom: 20px;
}

.settings-tabs {
    border-bottom: 1px solid #e8dcc8;
    margin-bottom: 0;
    padding: 10px 20px 0;
}

.settings-tabs .nav-link {
    color: #7b6f51;
    padding: 12px 20px;
    margin-bottom: 0;
    border-radius: 6px 6px 0 0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
}

.settings-tabs .nav-link i {
    width: 16px;
    height: 16px;
    color: #edac25;
}

.settings-tabs .nav-link:hover {
    background: #f8f9fa;
    color: #7b6f51;
    border-color: transparent;
}

.settings-tabs .nav-link.active {
    background: #edac25;
    color: white;
    border-color: #edac25;
}

.settings-tabs .nav-link.active i {
    color: white;
}

/* Legacy settings nav styles - keep for backwards compatibility */
.settings-nav {
    background-color: var(--bg-card);
}

.settings-nav .nav-link {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.settings-nav .nav-link:hover {
    background-color: var(--accent-gold-light);
    color: var(--text-primary);
}

.settings-nav .nav-link.active {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--heading-color);
    font-weight: 500;
}

.settings-nav .nav-link svg {
    width: 20px;
    height: 20px;
    stroke: var(--icon-color);
}

/* All headings color updates */
h1, h2 {
    color: var(--heading-color);
}

h3, h4, h5, h6 {
    color: var(--subheading-color);
}

/* Update status panel colors to use the new variables */
.status-panel h3,
.status-panel .status-panel-title {
    color: var(--status-panel-heading);
}

.status-panel h5 {
    color: var(--status-panel-subheading);
}

.status-panel p,
.status-panel .status-value,
.status-panel .status-subtitle {
    color: var(--status-panel-content);
}

/* Book Generator Preview Tab */
.preview-tab-container {
    margin-top: 1rem;
}

.preview-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.preview-tab {
    padding: 0.75rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.preview-tab.active {
    color: var(--heading-color);
    border-bottom-color: var(--icon-color);
}

.preview-content {
    padding: 1.5rem;
    background-color: var(--bg-card);
    border-radius: 8px;
}

.tone-adjustment {
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
}

.tone-adjustment h4 {
    margin-bottom: 0.5rem;
    color: var(--subheading-color);
}

.tone-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tone-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.tone-btn:hover {
    background-color: var(--accent-gold-light);
    border-color: var(--icon-color);
}

/* Board Tabs */
.board-tabs {
    margin-bottom: 1.5rem;
}

.tab-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.tab-category {
    margin-bottom: 1rem;
}

.tab-category-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.tab-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.board-tab {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.board-tab:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
}

.board-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.board-tab i {
    width: 14px;
    height: 14px;
}

/* Board Info */
.board-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.board-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.board-stats {
    display: flex;
    gap: 2rem;
}

/* Trello-style Cards */
.trello-card {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.trello-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.trello-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.card-labels {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.card-label {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-due-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.card-due-date.overdue {
    color: #dc3545;
}

.card-due-date i {
    width: 12px;
    height: 12px;
}

.card-progress {
    margin-bottom: 0.5rem;
}

.card-progress .progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.card-progress .progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.card-progress .progress-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.card-indicators {
    display: flex;
    gap: 0.5rem;
}

.card-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.card-indicator i {
    width: 12px;
    height: 12px;
}

.card-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.trello-card:hover .card-actions {
    opacity: 1;
}

.card-action-btn {
    background: transparent;
    border: none;
    padding: 0.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.card-action-btn i {
    width: 14px;
    height: 14px;
}

/* Projects Board Layout - Proper Kanban Style */
.projects-board {
    padding: 1rem;
    min-height: 70vh;
    overflow-x: auto;
}

.board-columns {
    display: flex;
    gap: 1rem;
    min-height: 600px;
    padding: 0.5rem;
}

.kanban-column {
    background-color: var(--bg-card);
    border-radius: 8px;
    min-width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    border: 1px solid var(--border-color);
}

.column-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-main);
    border-radius: 8px 8px 0 0;
}

.column-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.column-count {
    background-color: var(--text-muted);
    color: var(--bg-card);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
    min-width: 20px;
    text-align: center;
}

.column-cards {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-gold);
}

.project-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.project-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.project-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.65rem;
}

.project-date {
    color: var(--text-muted);
}

.project-progress {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.progress-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-gold);
}

.add-card-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.25rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.add-card-btn:hover {
    opacity: 1;
    color: var(--accent-gold);
}

.column-cards:empty::after {
    content: "Drop cards here";
    display: block;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    margin: 0.5rem 0;
}

/* Drag and drop styling */
.kanban-column.drag-over {
    background-color: var(--bg-card-hover);
    border-color: var(--accent-gold);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

.empty-projects {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.projects-grid .trello-card {
    max-width: 100%;
    margin: 0;
}

/* Authentication Layout */
html, body.auth-body {
    background: linear-gradient(135deg, #f6ead6 0%, #edac25 100%) !important;
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body.auth-body {
    background-attachment: fixed;
}

.auth-main-content {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: transparent;
}

.auth-content-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

/* Auth Container */
.auth-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
    margin: 0;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-family: 'Canela Deck', serif;
    font-size: 2.5rem;
    color: var(--text-greeting);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 0;
}

.auth-form {
    width: 100%;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.auth-form .form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(237, 172, 37, 0.1);
}

.auth-form .form-error {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.auth-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-gold);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
}

.auth-form .btn-primary:hover {
    background: var(--accent-gold-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 172, 37, 0.3);
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-links a {
    color: var(--text-greeting);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.auth-links a:hover {
    color: var(--accent-gold);
}

/* Responsive Design for Auth Pages */
@media (max-width: 768px) {
    .auth-body {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 2rem;
        margin: 1rem 0;
    }
    
    .auth-header h2 {
        font-size: 2rem;
    }
}

/* 2FA Modal Styles */
.two-factor-input-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.two-factor-digit {
    width: 3rem;
    height: 3rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    background: white;
}

.two-factor-digit:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(237, 172, 37, 0.2);
    transform: scale(1.05);
}

.two-factor-digit:valid {
    border-color: var(--accent-gold);
    background: var(--bg-card);
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-title {
    font-family: 'Canela Deck', serif;
    color: var(--text-greeting);
    font-size: 1.5rem;
}

.modal-body {
    padding: 2rem 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Authentication Alert Styles */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.875rem;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

/* Login form specific alerts */
.auth-form .alert {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Disable login form when locked */
.auth-form.locked .form-control {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
}

.auth-form.locked .btn-primary {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
}

.auth-form.locked .btn-primary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Email Page Styles */
.email-container {
    display: flex;
    height: calc(100vh - 140px);
    gap: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.email-list-pane {
    width: 400px;
    min-width: 350px;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.email-list-header {
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.email-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    background: #fafafa;
}

.email-preview-pane {
    flex: 1;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.email-view {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

/* Email Item Card Styles */
.email-item {
    margin: 12px 8px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.email-item:hover {
    background-color: #f8f9fa;
    border-color: #edac25;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(237, 172, 37, 0.2);
}

.email-row {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-row.selected {
    background-color: #fff8e1;
    border-color: #edac25;
    box-shadow: 0 2px 12px rgba(237, 172, 37, 0.3);
}

.email-item.selected {
    border-left: 4px solid #edac25;
    background-color: #fff8e1;
}

.email-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.email-sender {
    font-weight: 600;
    color: #202124;
    font-size: 0.9rem;
}

.email-time {
    color: #5f6368;
    font-size: 0.8125rem;
    font-weight: 500;
}

.email-subject {
    font-size: 0.9rem;
    color: #202124;
    margin-bottom: 4px;
    font-weight: 500;
    line-height: 1.3;
}

.email-snippet {
    color: #5f6368;
    font-size: 0.8125rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.email-item.unread {
    background: #fff;
    border-left: 4px solid #edac25;
}

.email-item.unread .email-sender {
    font-weight: 700;
    color: #edac25;
}

.email-item.unread .email-subject {
    font-weight: 600;
}

.email-full-content {
    padding: 24px;
    max-width: 100%;
}

.email-full-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.email-full-title {
    flex: 1;
    margin-right: 16px;
}

.email-full-subject {
    font-size: 1.375rem;
    font-weight: 400;
    color: #202124;
    margin-bottom: 8px;
    line-height: 1.3;
}

.email-full-from {
    color: #5f6368;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.email-full-date {
    color: #5f6368;
    font-size: 0.8125rem;
}

.email-full-body {
    line-height: 1.6;
    color: #202124;
    font-size: 0.875rem;
}

.email-full-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.email-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #5f6368;
}

/* Compose Popup */
.compose-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 550px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

.compose-popup.show {
    display: block;
    animation: composeSlideIn 0.3s ease-out;
}

.compose-popup.minimized {
    height: 40px;
    overflow: hidden;
}

.compose-popup.minimized .compose-body {
    display: none;
}

.compose-header {
    background: #404040;
    color: #fff;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    cursor: move;
}

.compose-controls {
    display: flex;
    gap: 4px;
}

.compose-controls button {
    background: none;
    border: none;
    color: #fff;
    padding: 4px;
    cursor: pointer;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.compose-controls button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.compose-body {
    padding: 16px;
}

.compose-field {
    margin-bottom: 12px;
}

.compose-field label {
    display: block;
    font-size: 12px;
    color: #5f6368;
    margin-bottom: 4px;
    font-weight: 500;
}

.compose-field input,
.compose-field textarea {
    width: 100%;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.compose-field input:focus,
.compose-field textarea:focus {
    border-color: #edac25;
}

.compose-field.message-field textarea {
    min-height: 120px;
    resize: vertical;
}

.compose-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.compose-footer .btn-primary {
    background: #edac25;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.compose-footer .btn-primary:hover {
    background: #d19b20;
}

.compose-footer .btn-secondary {
    background: #fff;
    border: 1px solid #dadce0;
    color: #5f6368;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.compose-footer .btn-secondary:hover {
    background: #f8f9fa;
}

@keyframes composeSlideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Dashboard Card Animation System */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes aiInsightFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }
    50% {
        opacity: 0.5;
        transform: translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-card {
    animation: cardSlideIn 0.6s ease-out forwards;
    animation-delay: calc(var(--animation-order, 0) * 150ms);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ai-insights-inline {
    animation: aiInsightFadeIn 0.8s ease-out 1.2s both;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-card,
    .ai-insights-inline {
        animation: none !important;
        transition: none !important;
    }
}
