/* 
 * cuti - Main Stylesheet
 * Unified design system for all interfaces
 */

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

:root {
    /* Core color palette - unified design system */
    --bg-darkest: #0a0f14;
    --bg-dark: #141e26;
    --bg-secondary: #1a2530;
    --bg-card: #141e26;
    --bg-elevated: rgba(20, 30, 38, 0.95);
    
    /* Accent colors */
    --primary: #10b981; /* Emerald green */
    --secondary: #60a5fa; /* Blue */
    --warning: #f59e0b; /* Amber */
    --error: #ef4444; /* Red */
    --success-color: #10b981; /* Same as primary */
    --warning-color: #f59e0b; /* Same as warning */
    --error-color: #ef4444; /* Same as error */
    
    /* Text colors */
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Legacy terminal colors for compatibility */
    --terminal-bg: var(--bg-darkest);
    --terminal-green: var(--primary);
    --terminal-blue: var(--secondary);
    --terminal-yellow: var(--warning);
    --terminal-red: var(--error);
    
    /* Borders and surfaces */
    --border: rgba(255, 255, 255, 0.1);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    
    /* Symphony Mode colors */
    --symphony-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --symphony-glow: rgba(102, 126, 234, 0.4);
    
    /* Spacing scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;
    --space-2xl: 24px;
    --space-3xl: 32px;
    
    /* Typography scale */
    --text-xs: 12px;
    --text-sm: 14px;
    --text-base: 16px;
    --text-lg: 18px;
    --text-xl: 24px;
    --text-2xl: 32px;
    
    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animations */
@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-enter-active {
    animation: fade-in 0.3s ease;
}

/* Custom Scrollbar */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
    height: 100vh;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

/* Subtle Ambient Background - elegant and professional */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(96, 165, 250, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.7;
}

/* Subtle Mesh Gradient Overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(180deg, transparent 0%, rgba(10, 15, 20, 0.2) 100%),
        linear-gradient(70deg, transparent 0%, rgba(16, 185, 129, 0.02) 100%);
    pointer-events: none;
    z-index: 0;
}

/* HEADER COMPONENTS */
/* Modern Header - unified design */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.98) 0%, rgba(15, 23, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 0 var(--space-3xl);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

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

.logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    transition: transform var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 20px;
}

.app-title {
    font-size: var(--text-xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.app-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* Navigation Pills - unified design */
.nav-pills {
    display: flex;
    gap: var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px;
    border-radius: var(--radius-lg);
}

.nav-pill {
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-pill i {
    font-size: 14px;
}

.nav-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.nav-pill.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Header Status Section */
.header-status {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: pulse 2s infinite;
}

.status-dot.active {
    background: var(--primary);
}

.status-dot.warning {
    background: var(--warning-color, #f59e0b);
}

.status-dot.error {
    background: var(--error-color, #ef4444);
}

.status-dot.pending {
    background: var(--text-muted);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 500;
}

.working-dir {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--text-xs);
    color: var(--text-muted);
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    min-width: 120px;
}

.working-dir:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.working-dir i {
    font-size: 12px;
    color: var(--text-muted);
    transition: color var(--transition-base);
}

.working-dir:hover i {
    color: var(--primary);
}

.working-dir-display,
.working-dir-full {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.working-dir-full {
    position: absolute;
    left: 40px;
    right: 12px;
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.98) 0%, rgba(15, 23, 30, 0.98) 100%);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 10;
    top: -2px;
}

/* LAYOUT COMPONENTS */
/* Main Layout */
.main-container {
    display: flex;
    height: 100vh;
    position: relative;
    z-index: 1;
}

/* Content Area */
.content-wrapper {
    display: flex;
    flex: 1;
    margin-top: 72px;
    height: calc(100vh - 72px); /* Account for header (72px) */
    min-height: calc(100vh - 72px);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.95) 0%, rgba(15, 23, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: var(--space-2xl);
    margin-right: var(--space-md);
    margin-bottom: 0; /* Remove bottom margin to prevent overlap */
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Terminal-Style Tab Navigation */
.terminal-tabs {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    border-bottom: 1px solid rgba(16, 185, 129, 0.2);
    position: relative;
    overflow: hidden;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.02),
        0 2px 10px rgba(0, 0, 0, 0.3);
}

.terminal-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(16, 185, 129, 0.5) 20%, 
        rgba(16, 185, 129, 0.5) 80%, 
        transparent 100%);
    animation: subtle-pulse 4s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

.terminal-tabs-header {
    display: flex;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    font-family: 'JetBrains Mono', monospace;
    position: relative;
}

.tab-prefix,
.tab-suffix {
    color: var(--text-muted);
    font-size: var(--text-sm);
    opacity: 0.4;
    user-select: none;
    font-weight: 300;
    letter-spacing: 1px;
}

.tab-prefix {
    margin-right: var(--space-sm);
}

.tab-suffix {
    margin-left: var(--space-sm);
    flex: 1;
    position: relative;
}

.tab-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: repeating-linear-gradient(
        90deg,
        var(--text-muted) 0px,
        var(--text-muted) 4px,
        transparent 4px,
        transparent 8px
    );
    opacity: 0.2;
}

.tab-separator {
    color: var(--text-muted);
    opacity: 0.3;
    margin: 0 var(--space-xs);
    font-size: var(--text-lg);
    user-select: none;
}

.terminal-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-sm) var(--space-md);
    cursor: pointer;
    transition: none; /* Removed animation for instant transitions */
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.terminal-tab::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: none; /* Removed animation for instant transitions */
}

.tab-icon {
    color: var(--text-muted);
    font-size: 16px;
    transition: none; /* Removed animation for instant transitions */
    display: inline-block;
    width: 20px;
    text-align: center;
    position: relative;
    top: 1px;
}

.tab-text {
    position: relative;
}

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

.terminal-tab:hover .tab-icon {
    color: var(--text-secondary);
    /* Removed transform animation */
}

.terminal-tab.tab-active {
    color: var(--primary);
}

.terminal-tab.tab-active::before {
    transform: scaleX(1);
}

.terminal-tab.tab-active .tab-icon {
    color: var(--primary);
    /* Removed animations for instant transitions */
}

/* Special animation for terminal tab icon when active */
.terminal-tab.tab-active .tab-icon {
    /* Default pulsing for all active tabs */
}

/* Removed animations for instant transitions */
.terminal-tab.tab-active .tab-text:contains("TERMINAL") ~ .tab-icon,
.terminal-tab:first-child.tab-active .tab-icon {
    /* animation removed */
}

@keyframes terminal-cursor {
    0%, 49% {
        opacity: 1;
    }
    50%, 100% {
        opacity: 0.3;
    }
}

/* Removed animations for instant transitions */
.terminal-tab:nth-child(3).tab-active .tab-icon {
    /* animation removed */
}

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

/* Removed animations for instant transitions */
.terminal-tab:nth-child(5).tab-active .tab-icon {
    /* animation removed */
}

@keyframes gear-rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 5px currentColor;
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 10px currentColor;
    }
}

.terminal-tabs-indicator {
    padding: 6px var(--space-lg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    background: linear-gradient(90deg, 
        rgba(16, 185, 129, 0.02) 0%, 
        rgba(16, 185, 129, 0.08) 50%, 
        rgba(16, 185, 129, 0.02) 100%);
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    overflow: hidden;
}

.terminal-tabs-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(16, 185, 129, 0.1), 
        transparent);
    animation: indicator-scan 3s linear infinite;
}

@keyframes indicator-scan {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.indicator-text {
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.indicator-blink {
    animation: terminal-blink 1s step-end infinite;
    color: var(--primary);
    opacity: 0.8;
}

@keyframes terminal-blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Removed active tab animations */
.terminal-tab.tab-active .tab-text::after {
    /* Removed scanning line animation */
}

@keyframes scan-line {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* TERMINAL COMPONENTS */
/* Terminal Area (Chat Only) */
.terminal-container {
    flex: 1;
    background: var(--bg-darkest);
    border-radius: var(--radius-lg);
    margin: var(--space-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;  /* Ensure proper stacking */
}

/* Agent Suggestions Dropdown */
.agent-suggestions {
    position: absolute;
    bottom: calc(100% + 8px);  /* Position above input with gap */
    left: 40px;  /* Align with input (after prompt symbol) */
    right: 0;
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.agent-suggestion-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid var(--border);
}

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

.agent-suggestion-item:hover,
.agent-suggestion-item.active {
    background: rgba(16, 185, 129, 0.1);
}

.suggestion-name {
    font-weight: 500;
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 2px;
}

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

.terminal-header {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darkest) 100%);
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #28ca42; }

.terminal-dot:hover {
    transform: scale(1.1);
}

.terminal-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    line-height: 1.8;
    min-height: 0; /* Allow proper flexbox scrolling */
}

/* Terminal Message Styles */
.terminal-message {
    margin-bottom: var(--space-lg);
    animation: terminalFadeIn var(--transition-base);
}

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

.user-input {
    color: var(--secondary);
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
}

.assistant-output {
    color: var(--primary);
    margin-left: var(--space-xl);
}

.system-message {
    color: var(--warning);
    font-style: italic;
}

.error-message {
    color: var(--error);
    font-weight: 500;
}

.timestamp {
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    margin-right: 8px;
}

.terminal-prompt {
    color: var(--secondary);
    font-weight: 600;
}

.streaming-cursor::after {
    content: '▊';
    color: var(--primary);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Modern Input Area */
.input-container {
    background: linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border);
    padding: var(--space-xl);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    background: rgba(255, 255, 255, 0.03);
    position: relative;  /* Make this the positioning context for suggestions */
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    transition: all var(--transition-base);
}

.input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.prompt-symbol {
    color: var(--secondary);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

.prompt-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    caret-color: var(--secondary);
}

.prompt-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.processing-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--warning);
    font-size: var(--text-xs);
}

.processing-dot {
    width: 6px;
    height: 6px;
    background: var(--warning);
    border-radius: 50%;
    animation: processingPulse 1.5s ease infinite;
}

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

@keyframes processingPulse {
    0%, 60%, 100% { transform: scale(1); opacity: 1; }
    30% { transform: scale(1.5); opacity: 0.7; }
}

/* SIDEBAR COMPONENTS */
/* Sidebar */
.sidebar {
    width: 360px;
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.95) 0%, rgba(15, 23, 30, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: var(--space-2xl) var(--space-2xl) 0 var(--space-md); /* Remove bottom margin */
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
    overflow: hidden;
}

.sidebar.collapsed {
    width: 0;
    margin-right: 0;
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    padding: var(--space-2xl);
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    background: linear-gradient(180deg, rgba(20, 30, 38, 0.4) 0%, transparent 100%);
}

.sidebar-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sidebar-title::before {
    content: '📋';
    font-size: 20px;
    filter: grayscale(20%);
}

.sidebar-subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    opacity: 0.9;
    line-height: 1.4;
}

.sidebar-stats {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
    padding: var(--space-md);
    background: rgba(16, 185, 129, 0.05);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.stat-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(16, 185, 129, 0.3), transparent);
}

.stat-value {
    font-size: var(--text-xl);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--space-xs);
    font-weight: 500;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2xl);
}

.empty-state {
    text-align: center;
    padding: 48px var(--space-2xl);
    color: var(--text-secondary);
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    position: relative;
    overflow: hidden;
}

.empty-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

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

/* Todo Items */
.todo-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.todo-item {
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.6) 0%, rgba(15, 23, 30, 0.8) 100%);
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.todo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.todo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border-color: rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.8) 0%, rgba(15, 23, 30, 0.95) 100%);
}

.todo-item:hover::before {
    opacity: 1;
}

.todo-item.completed {
    opacity: 0.5;
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.3) 0%, rgba(15, 23, 30, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

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

.todo-item.completed::before {
    background: linear-gradient(180deg, var(--text-muted) 0%, var(--text-muted) 100%);
}

.todo-content {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(16, 185, 129, 0.5);
    border-radius: var(--radius-sm);
    background: rgba(20, 30, 38, 0.8);
    cursor: pointer;
    transition: all var(--transition-base);
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
}

.todo-checkbox:hover {
    border-color: var(--primary);
    background: rgba(16, 185, 129, 0.1);
}

.todo-checkbox:checked {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
}

.todo-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.todo-details {
    flex: 1;
}

.todo-text {
    font-size: var(--text-sm);
    color: var(--text-primary); /* Fixed: Use proper text color for dark background */
    line-height: 1.5;
    margin-bottom: 6px;
    font-weight: 500;
}

.todo-meta {
    font-size: 11px;
    color: var(--text-secondary); /* Fixed: Use proper secondary text color */
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    opacity: 0.8;
}

/* Toggle Button */
.sidebar-toggle {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(20, 30, 38, 0.95) 0%, rgba(15, 23, 30, 0.98) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 40px rgba(16, 185, 129, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 110; /* Increased z-index to be above the header (z-index: 100) */
    overflow: hidden;
}

.sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4), 0 0 60px rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
}

.sidebar-toggle:hover::before {
    transform: translate(-50%, -50%) scale(1.5);
}

.sidebar-toggle-icon {
    font-size: var(--text-xl);
    position: relative;
    z-index: 1;
    filter: grayscale(0%) brightness(1.2);
}

/* STATUS BAR - Removed per user request */
/* .status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 32px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-2xl);
    font-size: 11px;
    color: var(--text-muted);
    z-index: 90;
}

.status-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
}

.status-indicator.ready {
    background: var(--primary);
}

.status-indicator.streaming {
    background: var(--warning);
    animation: pulse 1s ease infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
} */

/* HISTORY TAB STYLES - Beautiful Modern Design */
.history-container {
    flex: 1;
    background: var(--bg-darkest);
    border-radius: var(--radius-lg);
    margin: var(--space-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.history-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.history-header {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darkest) 100%);
    padding: var(--space-2xl) var(--space-3xl);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

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

.history-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

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

.history-stats {
    display: flex;
    gap: var(--space-3xl);
    margin-bottom: var(--space-xl);
}

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

.history-stat-value {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

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

.history-controls {
    display: flex;
    gap: var(--space-md);
    align-items: stretch;
}

.history-search-wrapper {
    flex: 1;
    position: relative;
}

.history-search-icon {
    position: absolute;
    left: var(--space-lg);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.history-search {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    transition: all var(--transition-base);
}

.history-search:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.history-filter-pills {
    display: flex;
    gap: var(--space-xs);
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.filter-pill {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.filter-pill.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.history-list-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-xl) var(--space-3xl) var(--space-3xl);
    position: relative;
    z-index: 1;
}

.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: var(--space-xl);
}

.history-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.history-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.history-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-color: var(--primary);
}

.history-item:hover::before {
    transform: scaleX(1);
}

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

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

.history-time {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-family: 'JetBrains Mono', monospace;
}

.history-duration {
    color: var(--secondary);
    font-size: var(--text-xs);
    font-weight: 500;
}

.history-status {
    font-size: var(--text-xs);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-status.success {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.history-status.error {
    color: var(--error);
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.history-status.pending {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.history-content {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    line-height: 1.6;
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.history-tokens {
    display: flex;
    gap: var(--space-lg);
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.token-stat {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.token-icon {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
}

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

.history-action-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.history-action-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: var(--secondary);
}

.history-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-3xl) var(--space-2xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.history-empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-xl);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(96, 165, 250, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.history-empty-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.history-empty-text {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* SETTINGS TAB STYLES - Beautiful Modern Design */
.settings-container {
    flex: 1;
    background: var(--bg-darkest);
    border-radius: var(--radius-lg);
    margin: var(--space-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.settings-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(96, 165, 250, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.settings-header {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darkest) 100%);
    padding: var(--space-2xl) var(--space-3xl);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 1;
}

.settings-title {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.settings-subtitle {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.settings-nav {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    padding: 6px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.settings-nav-item {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.settings-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.settings-nav-item.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.settings-nav-icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.settings-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-3xl);
    position: relative;
    z-index: 1;
}

.settings-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--space-2xl);
    max-width: 1200px;
    margin: 0 auto;
}

.settings-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.settings-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.settings-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.settings-section:hover::before {
    opacity: 1;
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.settings-section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.settings-section-title {
    flex: 1;
}

.settings-section h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.settings-section-desc {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.settings-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

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

.settings-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.settings-label-hint {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-style: italic;
}

.settings-input-wrapper {
    position: relative;
}

.settings-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-family: 'JetBrains Mono', monospace;
    transition: all var(--transition-base);
}

.settings-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.settings-input-icon {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.settings-select {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.settings-select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.settings-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
}

.settings-toggle-label {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.settings-toggle-text {
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: 500;
}

.settings-toggle-desc {
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.settings-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border);
    border-radius: 24px;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.settings-switch-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.settings-switch input:checked + .settings-switch-slider {
    transform: translateX(24px);
    background: white;
}

.settings-switch input:checked ~ .settings-switch {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
}

.settings-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.settings-checkbox {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.settings-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
}

.settings-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    cursor: pointer;
}

.settings-checkbox-label {
    flex: 1;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.settings-actions {
    padding: var(--space-2xl) var(--space-3xl);
    background: linear-gradient(180deg, var(--bg-darkest) 0%, var(--bg-dark) 100%);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-actions-info {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.settings-actions-buttons {
    display: flex;
    gap: var(--space-md);
}

.btn-primary, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--error);
}

/* Symphony Mode Toggle Styles */
.symphony-mode-toggle {
    margin-left: auto;
    margin-right: 2rem;
    display: flex;
    align-items: center;
}

.symphony-toggle-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.symphony-toggle-container input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.symphony-toggle-slider {
    position: relative;
    width: 140px;
    height: 32px;
    background: linear-gradient(135deg, rgba(100, 100, 100, 0.3) 0%, rgba(60, 60, 60, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    overflow: hidden;
}

.symphony-toggle-slider::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 26px;
    left: 3px;
    top: 2px;
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.symphony-label-off,
.symphony-label-on {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 3;
    transition: all 0.3s ease;
}

.symphony-label-off {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 4px;
}

.symphony-label-on {
    color: rgba(255, 255, 255, 0.3);
    margin-right: 4px;
}

.symphony-icon {
    position: absolute;
    right: -30px;
    font-size: 20px;
    transition: all 0.3s ease;
    opacity: 0.5;
}

/* Active state */
.symphony-toggle-container input:checked + .symphony-toggle-slider {
    background: var(--symphony-gradient);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 0 20px var(--symphony-glow);
}

.symphony-toggle-container input:checked + .symphony-toggle-slider::before {
    transform: translateX(74px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
}

.symphony-toggle-container input:checked + .symphony-toggle-slider + .symphony-icon {
    opacity: 1;
    animation: musicPulse 2s ease-in-out infinite;
}

.symphony-toggle-container input:checked + .symphony-toggle-slider .symphony-label-off {
    color: rgba(255, 255, 255, 0.3);
}

.symphony-toggle-container input:checked + .symphony-toggle-slider .symphony-label-on {
    color: rgba(255, 255, 255, 0.9);
}

@keyframes musicPulse {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* Symphony config link */
.symphony-config-link {
    margin-left: 1rem;
    padding: 0.25rem 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    color: #667eea;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.symphony-config-link:hover {
    background: rgba(102, 126, 234, 0.2);
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Hover effects */
.symphony-toggle-container:hover .symphony-toggle-slider {
    border-color: rgba(255, 255, 255, 0.2);
}

.symphony-toggle-container:hover input:checked + .symphony-toggle-slider {
    box-shadow: 0 0 30px var(--symphony-glow);
}

/* AGENT STATUS PAGE COMPONENTS - Unified Design */
/* Main Container for agent status */
.content-container {
    display: flex;
    flex-direction: column;
    margin-top: 72px;
    min-height: calc(100vh - 72px);
    position: relative;
    z-index: 1;
}

.agent-main-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: var(--space-2xl);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.agent-inner-container {
    background: var(--bg-darkest);
    border-radius: var(--radius-lg);
    margin: var(--space-xl);
    padding: var(--space-3xl);
    min-height: calc(100vh - 200px);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.agent-inner-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

/* Stats Grid - Beautiful Cards with Glassmorphism */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-3xl);
    position: relative;
    z-index: 1;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.1;
    transition: all var(--transition-slow);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.stat-card:hover::before {
    opacity: 0.15;
    transform: rotate(45deg);
}

.stat-card:hover::after {
    transform: scaleX(1);
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(96, 165, 250, 0.2) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: var(--space-lg);
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-sm);
}

.stat-card-footer {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: var(--space-md);
}

.stat-trend {
    font-size: var(--text-xs);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.stat-trend.up {
    color: var(--primary);
}

.stat-trend.down {
    color: var(--error);
}

.stat-trend-icon {
    font-size: 16px;
}

/* Section Styles */
.section {
    margin-bottom: var(--space-3xl);
}

.section-title {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
}

/* Agents Grid */
.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.agent-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.agent-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition-slow);
    pointer-events: none;
}

.agent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.agent-card:hover::after {
    opacity: 0.05;
}

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

.agent-name {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.agent-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-fast);
}

.status-available {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-busy {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-offline {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.detail-label {
    color: var(--text-muted);
    font-weight: 400;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
}

/* Token Usage Section */
.token-usage-section {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.token-usage-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(96, 165, 250, 0.05) 100%);
    pointer-events: none;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-2xl);
    margin-top: var(--space-2xl);
    position: relative;
}

.usage-item {
    text-align: center;
    padding: var(--space-lg);
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-base);
}

.usage-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.usage-label {
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.usage-value {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.usage-value.highlight {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading and Error States */
.loading {
    text-align: center;
    color: var(--text-muted);
    padding: var(--space-3xl);
    font-size: var(--text-sm);
}

.loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: var(--space-md);
    vertical-align: middle;
}

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

.error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
    font-size: var(--text-sm);
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        right: 0;
        top: 72px;
        bottom: 32px;
        margin: 0;
        border-radius: 24px 0 0 24px;
        z-index: 80;
    }
    
    .main-content {
        margin-right: 24px;
    }
    
    .nav-pills {
        display: none;
    }
    
    .content-container {
        padding: var(--space-lg);
    }
    
    .stats-grid,
    .agents-grid {
        grid-template-columns: 1fr;
    }
}

/* UTILITY CLASSES */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.glow {
    text-shadow: 0 0 10px currentColor;
}