/* ============================================================
   QUANTUM IQ - Main Stylesheet
   Dark/Light Theme Support
   ============================================================ */

/* CSS Variables - Dark Theme (Default) */
:root {
    /* Theme Colors */
    --bg-primary: #020617;
    --bg-secondary: #0f172a;
    --bg-tertiary: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #0f172a;
    --bg-hover: rgba(255, 255, 255, 0.03);
    
    --border-primary: #334155;
    --border-secondary: #475569;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-faint: #64748b;
    
    /* Base Colors */
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    
    --cyan-500: #06b6d4;
    --cyan-400: #22d3ee;
    --cyan-300: #67e8f9;
    
    --purple-600: #9333ea;
    --purple-500: #a855f7;
    --purple-400: #c084fc;
    
    --emerald-500: #10b981;
    --emerald-400: #34d399;
    
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    
    --red-500: #ef4444;
    --red-400: #f87171;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--cyan-500), var(--purple-600));
    --gradient-bg: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.15);
    
    /* Spacing */
    --sidebar-width: 260px;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Light Theme */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #f1f5f9;
    --bg-tertiary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.03);
    
    --border-primary: #e2e8f0;
    --border-secondary: #cbd5e1;
    
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-faint: #94a3b8;
    
    --slate-950: #f8fafc;
    --slate-900: #f1f5f9;
    --slate-800: #e2e8f0;
    --slate-700: #cbd5e1;
    --slate-600: #94a3b8;
    --slate-500: #64748b;
    --slate-400: #475569;
    --slate-300: #334155;
    --slate-200: #1e293b;
    --slate-100: #0f172a;
    --slate-50: #020617;
    
    --gradient-bg: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(6, 182, 212, 0.1);
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-secondary);
    min-height: 100vh;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Links */
a {
    color: var(--cyan-400);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--cyan-300);
}

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

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--cyan-400);
    letter-spacing: 0.2em;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

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

.nav-item.active {
    color: var(--cyan-400);
    background: rgba(6, 182, 212, 0.15);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

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

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.logout-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all 0.2s;
    flex-shrink: 0;
}

.logout-btn:hover {
    color: var(--red-400);
    background: rgba(239, 68, 68, 0.1);
}

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

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

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2rem;
    min-height: 100vh;
}

.main-content.full-width {
    margin-left: 0;
}

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

.page-header-text h1 {
    margin-bottom: 0.25rem;
}

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

.page-actions {
    display: flex;
    gap: 0.75rem;
}

/* ============================================================
   CARDS & PANELS
   ============================================================ */

.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] .card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.card-header h2, .card-header h3 {
    font-size: 1.125rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-primary);
    background: var(--bg-secondary);
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: background 0.3s ease, border-color 0.3s ease;
}

[data-theme="light"] .stat-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

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

.stat-card-label {
    font-size: 0.875rem;
    color: var(--slate-400);
}

.stat-card-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.stat-card-icon.cyan { background: rgba(6, 182, 212, 0.15); color: var(--cyan-400); }
.stat-card-icon.purple { background: rgba(147, 51, 234, 0.15); color: var(--purple-400); }
.stat-card-icon.emerald { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.stat-card-icon.amber { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }
.stat-card-icon.red { background: rgba(239, 68, 68, 0.15); color: var(--red-400); }

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.stat-card-change {
    font-size: 0.8125rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-card-change.positive { color: var(--emerald-400); }
.stat-card-change.negative { color: var(--red-400); }
.stat-card-change.neutral { color: var(--slate-400); }

/* ============================================================
   TABLES
   ============================================================ */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-secondary);
}

th {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

th.text-right, td.text-right {
    text-align: right;
}

th.text-center, td.text-center {
    text-align: center;
}

td {
    padding: 1rem 1.5rem;
    font-size: 0.9375rem;
    border-top: 1px solid var(--border-primary);
}

tbody tr {
    transition: background 0.2s;
}

tbody tr:hover {
    background: var(--bg-hover);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

.btn-primary:hover {
    opacity: 0.9;
    color: white;
}

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

.btn-secondary:hover {
    background: var(--slate-600);
    color: white;
}

.btn-ghost {
    background: transparent;
    color: var(--slate-400);
}

.btn-ghost:hover {
    background: rgba(51, 65, 85, 0.5);
    color: white;
}

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

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    color: var(--red-400);
}

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

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

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
}

/* ============================================================
   FORMS
   ============================================================ */

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-300);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: var(--bg-input);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--cyan-500);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.form-control::placeholder {
    color: var(--text-faint);
}

.form-control.mono {
    font-family: 'JetBrains Mono', monospace;
}

select.form-control {
    cursor: pointer;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-append {
    padding: 0 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-primary);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    display: flex;
    align-items: center;
    color: var(--slate-400);
    font-size: 0.875rem;
}

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

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid var(--slate-600);
    background: var(--slate-900);
    cursor: pointer;
    accent-color: var(--cyan-500);
}

/* ============================================================
   BADGES & STATUS
   ============================================================ */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: var(--cyan-300);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-purple {
    background: rgba(147, 51, 234, 0.15);
    color: var(--purple-400);
    border: 1px solid rgba(147, 51, 234, 0.3);
}

.badge-emerald {
    background: rgba(16, 185, 129, 0.15);
    color: var(--emerald-400);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-amber {
    background: rgba(245, 158, 11, 0.15);
    color: var(--amber-400);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-red {
    background: rgba(239, 68, 68, 0.15);
    color: var(--red-400);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-slate {
    background: rgba(100, 116, 139, 0.15);
    color: var(--slate-300);
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* Status Badges */
.status-on_track { @extend .badge-emerald; }
.status-ahead { @extend .badge-cyan; }
.status-behind { @extend .badge-amber; }
.status-at_risk { @extend .badge-amber; }
.status-critical { @extend .badge-red; }

/* Text Colors */
.text-emerald { color: var(--emerald-400); }
.text-red { color: var(--red-400); }
.text-amber { color: var(--amber-400); }
.text-cyan { color: var(--cyan-400); }
.text-purple { color: var(--purple-400); }
.text-slate { color: var(--slate-400); }
.text-white { color: white; }

/* ============================================================
   GRID LAYOUTS
   ============================================================ */

.grid {
    display: grid;
    gap: 1.5rem;
}

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

.grid-sidebar {
    grid-template-columns: 300px 1fr;
}

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

@media (max-width: 900px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-sidebar { grid-template-columns: 1fr; }
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(6, 182, 212, 0.1);
    z-index: 100;
}

.landing-hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
}

.landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at top right, rgba(6, 182, 212, 0.15), transparent 60%);
    pointer-events: none;
}

.landing-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at bottom left, rgba(147, 51, 234, 0.15), transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    color: var(--cyan-300);
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--slate-400);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-buttons .btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* Features Section */
.features-section {
    padding: 6rem 2rem;
    background: var(--slate-900);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    padding: 2rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-xl);
    transition: all 0.3s;
}

.feature-card:hover {
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.25rem;
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--slate-400);
    font-size: 0.9375rem;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-xl);
    padding: 2rem;
}

.login-card h1 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.login-card .subtitle {
    text-align: center;
    color: var(--slate-400);
    margin-bottom: 2rem;
}

.login-card .btn-primary {
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--slate-400);
    font-size: 0.875rem;
}

/* ============================================================
   DAILY INPUT PAGE
   ============================================================ */

.input-date-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}

.input-date-selector svg {
    color: var(--cyan-400);
}

.task-input-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    transition: background 0.2s;
}

.task-input-row:hover {
    background: rgba(51, 65, 85, 0.3);
}

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

.task-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.task-info p {
    font-size: 0.8125rem;
    color: var(--slate-400);
}

.task-counter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.task-counter button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--slate-700);
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.2s;
}

.task-counter button:hover {
    background: var(--slate-600);
}

.task-counter input {
    width: 70px;
    text-align: center;
    font-size: 1.125rem;
    font-family: 'JetBrains Mono', monospace;
}

.input-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
}

.summary-stat h3 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.summary-stat p {
    font-size: 0.875rem;
    color: var(--slate-400);
}

/* ============================================================
   FLOW BUILDER
   ============================================================ */

.swimlane-container {
    background: var(--slate-900);
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-700);
    overflow: auto;
    padding: 1rem;
}

.swimlane {
    display: flex;
    border-bottom: 1px solid var(--slate-700);
    min-height: 80px;
}

.swimlane:last-child {
    border-bottom: none;
}

.swimlane-label {
    width: 100px;
    flex-shrink: 0;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(15, 23, 42, 0.5);
    border-right: 1px solid var(--slate-700);
}

.swimlane-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    overflow-x: auto;
}

.flow-task {
    min-width: 140px;
    padding: 0.75rem 1rem;
    background: var(--slate-800);
    border: 2px solid var(--slate-600);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 500;
    color: white;
    position: relative;
}

.flow-task.connected::after {
    content: '';
    position: absolute;
    right: -2rem;
    top: 50%;
    width: 2rem;
    height: 2px;
    background: var(--cyan-400);
}

/* ============================================================
   UTILITIES
   ============================================================ */

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

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

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.hidden { display: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
}

/* ============================================================
   THEME TOGGLE
   ============================================================ */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-primary);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    color: var(--cyan-400);
    border-color: var(--cyan-500);
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

/* Light theme specific overrides */
[data-theme="light"] .text-white {
    color: var(--text-primary) !important;
}

[data-theme="light"] .text-slate {
    color: var(--text-muted) !important;
}

[data-theme="light"] .nav-item {
    color: var(--text-secondary);
}

[data-theme="light"] .nav-item:hover {
    background: var(--bg-hover);
}

[data-theme="light"] .nav-item.active {
    background: rgba(6, 182, 212, 0.1);
}

[data-theme="light"] .page-header {
    border-bottom-color: var(--border-primary);
}

[data-theme="light"] .login-card {
    background: var(--bg-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .modal-backdrop,
[data-theme="light"] [style*="rgba(0,0,0,0.7)"] {
    background: rgba(0, 0, 0, 0.4) !important;
}

[data-theme="light"] .landing-nav {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: var(--border-primary);
}

[data-theme="light"] .hero-badge {
    background: rgba(6, 182, 212, 0.1);
    border-color: rgba(6, 182, 212, 0.3);
}

[data-theme="light"] .feature-card {
    background: var(--bg-card);
    border-color: var(--border-primary);
}

[data-theme="light"] .login-page {
    background: var(--gradient-bg);
}

/* Light theme inline style overrides */
[data-theme="light"] [style*="background: var(--slate-900)"],
[data-theme="light"] [style*="background:var(--slate-900)"] {
    background: var(--bg-secondary) !important;
}

[data-theme="light"] [style*="background: var(--slate-800)"],
[data-theme="light"] [style*="background:var(--slate-800)"] {
    background: var(--bg-tertiary) !important;
}

[data-theme="light"] [style*="border-color: var(--slate-700)"],
[data-theme="light"] [style*="border: 1px solid var(--slate-700)"] {
    border-color: var(--border-primary) !important;
}
