/* ============================================
   DESIGN SYSTEM - STRICT COLOR TOKENS
   Premium SaaS aesthetic: clarity + precision
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* =========================
       PRIMARY PALETTE
       ========================= */
    --primary: #dc2626;
    --primary-hover: #b91c1c;
    --primary-light: rgba(220, 38, 38, 0.1);
    --primary-glow: rgba(220, 38, 38, 0.25);
    
    /* =========================
       SEMANTIC COLORS (use sparingly)
       ========================= */
    --semantic-success: #f87171;      /* Light red - matches theme */
    --semantic-success-light: rgba(248, 113, 113, 0.1);
    --semantic-warning: #fbbf24;
    --semantic-warning-light: rgba(251, 191, 36, 0.1);
    --semantic-error: #ef4444;
    --semantic-error-light: rgba(239, 68, 68, 0.1);
    
    /* =========================
       LIGHT MODE - NEUTRAL GRAYS ONLY
       ========================= */
    --bg-base: #f8f9fa;               /* Pure neutral */
    --bg-elevated: #ffffff;
    --bg-sunken: #f1f3f5;
    
    --surface-primary: #ffffff;
    --surface-secondary: #f8f9fa;
    --surface-hover: #f1f3f5;
    
    --border-light: #e9ecef;
    --border-default: #dee2e6;
    --border-strong: #ced4da;
    
    /* =========================
       TEXT HIERARCHY (3 levels only)
       ========================= */
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-disabled: #adb5bd;
    
    /* =========================
       SHADOWS & ELEVATION
       ========================= */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    
    /* =========================
       TYPOGRAPHY
       ========================= */
    --font-family: 'Inter', 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* =========================
       SPACING SCALE
       ========================= */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    
    /* =========================
       LEGACY COMPATIBILITY
       ========================= */
    --primary-color: var(--primary);
    --secondary-color: #6c757d;
    --accent-color: var(--primary);
    --danger-color: var(--semantic-error);
    --warning-color: var(--semantic-warning);
    --success-color: var(--semantic-success);
    --background: var(--bg-base);
    --white: var(--bg-elevated);
    --border-color: var(--border-default);
    --shadow: var(--shadow-md);
    --headline-font: var(--font-family);
    --body-font: var(--font-family);
    --bg-primary: var(--surface-primary);
    --bg-secondary: var(--surface-secondary);
}

/* ============================================
   IMPRESSIVE LOADING SCREEN
   Desktop-focused premium animation
   ============================================ */

.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Move content slightly down from center for better visual balance */
    padding-top: 8vh;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a0a0a 50%, #0a0a0a 100%);
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* Responsive loading animation positioning */
@media (min-height: 800px) {
    .app-loader {
        padding-top: 12vh;
    }
}

@media (max-height: 600px) {
    .app-loader {
        padding-top: 4vh;
    }
}

@media (max-width: 768px) {
    .app-loader {
        padding-top: 2vh;
    }
    
    .loader-content {
        gap: 16px;
        transform: scale(0.85);
    }
    
    .loader-logo {
        width: 100px;
        height: 100px;
    }
    
    .logo-icon {
        font-size: 32px;
    }
    
    .ring-1 {
        width: 60px;
        height: 60px;
    }
    
    .ring-2 {
        width: 80px;
        height: 80px;
    }
    
    .ring-3 {
        width: 100px;
        height: 100px;
    }
    
    .logo-particles {
        width: 120px;
        height: 120px;
    }
    
    .loader-text h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .loader-tagline {
        font-size: 11px;
    }
    
    .loader-progress {
        width: 240px;
    }
    
    .loader-continue-options {
        margin-top: 12px;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .continue-option {
        padding: 8px 14px;
    }
    
    .key-badge {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .key-badge-small {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .option-text {
        font-size: 12px;
    }
}

/* Extra small screens - ensure loading fits without scroll */
@media (max-height: 600px) {
    .app-loader {
        padding-top: 1vh;
    }
    
    .loader-content {
        gap: 10px;
        transform: scale(0.75);
    }
    
    .loader-logo {
        width: 80px;
        height: 80px;
    }
    
    .logo-icon {
        font-size: 28px;
    }
    
    .ring-1 { width: 50px; height: 50px; }
    .ring-2 { width: 65px; height: 65px; }
    .ring-3 { width: 80px; height: 80px; }
    
    .loader-text h2 {
        font-size: 16px;
    }
    
    .loader-tagline {
        font-size: 10px;
    }
    
    .loader-progress {
        width: 200px;
    }
    
    .progress-steps {
        display: none;
    }
    
    .loader-continue-options {
        margin-top: 8px;
    }
}

/* Very small mobile screens */
@media (max-width: 400px) {
    .loader-content {
        gap: 12px;
        transform: scale(0.7);
    }
    
    .loader-progress {
        width: 200px;
    }
    
    .continue-option {
        padding: 6px 12px;
    }
}

.app-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

/* Logo Container */
.loader-logo {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon {
    position: relative;
    z-index: 3;
    display: flex;
    gap: 4px;
    font-family: 'Nunito Sans', sans-serif;
    font-size: 48px;
    font-weight: 700;
}

.logo-letter {
    display: inline-block;
    background: linear-gradient(135deg, #dc2626 0%, #f87171 50%, #dc2626 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite, letterPulse 2s ease-in-out infinite;
    text-shadow: 0 0 40px rgba(220, 38, 38, 0.5);
}

.logo-letter:nth-child(2) {
    animation-delay: 0.1s;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes letterPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Animated Rings */
.logo-rings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid transparent;
}

.ring-1 {
    width: 100px;
    height: 100px;
    border-top-color: #dc2626;
    border-right-color: rgba(220, 38, 38, 0.3);
    animation: ringRotate 2s linear infinite;
}

.ring-2 {
    width: 130px;
    height: 130px;
    border-bottom-color: #f87171;
    border-left-color: rgba(248, 113, 113, 0.3);
    animation: ringRotate 3s linear infinite reverse;
}

.ring-3 {
    width: 160px;
    height: 160px;
    border-top-color: rgba(220, 38, 38, 0.5);
    border-right-color: rgba(248, 113, 113, 0.2);
    animation: ringRotate 4s linear infinite;
}

@keyframes ringRotate {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Floating Particles */
.logo-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 200px;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #dc2626;
    border-radius: 50%;
    box-shadow: 0 0 10px #dc2626, 0 0 20px rgba(220, 38, 38, 0.5);
}

.particle:nth-child(1) {
    top: 10%;
    left: 50%;
    animation: particleOrbit 4s ease-in-out infinite;
}

.particle:nth-child(2) {
    top: 50%;
    right: 10%;
    animation: particleOrbit 4s ease-in-out infinite 0.5s;
}

.particle:nth-child(3) {
    bottom: 10%;
    left: 50%;
    animation: particleOrbit 4s ease-in-out infinite 1s;
}

.particle:nth-child(4) {
    top: 50%;
    left: 10%;
    animation: particleOrbit 4s ease-in-out infinite 1.5s;
}

.particle:nth-child(5) {
    top: 25%;
    right: 20%;
    animation: particleOrbit 4s ease-in-out infinite 2s;
}

.particle:nth-child(6) {
    bottom: 25%;
    left: 20%;
    animation: particleOrbit 4s ease-in-out infinite 2.5s;
}

@keyframes particleOrbit {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }
    25% {
        transform: translate(10px, -10px) scale(1.2);
        opacity: 1;
    }
    50% {
        transform: translate(0, -20px) scale(0.8);
        opacity: 0.4;
    }
    75% {
        transform: translate(-10px, -10px) scale(1.1);
        opacity: 0.8;
    }
}

/* Loading Text */
.loader-text {
    text-align: center;
}

.loader-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.loader-tagline {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Progress Bar */
.loader-progress {
    width: 320px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.loader-progress .progress-label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.progress-percent {
    font-size: 14px;
    font-weight: 700;
    color: #f87171;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
}

.progress-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}

.loader-progress .progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #dc2626 0%, #f87171 50%, #dc2626 100%) !important;
    background-size: 200% 100%;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.5), 0 0 20px rgba(220, 38, 38, 0.3);
    animation: progressGlow 2s ease infinite;
    transition: none !important; /* Disable CSS transition - JS handles animation */
}

@keyframes progressGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.progress-steps .step {
    color: rgba(255, 255, 255, 0.3);
    transition: color 0.3s ease;
}

.progress-steps .step.active {
    color: #dc2626;
}

.progress-steps .step.complete {
    color: #f87171;
}

/* Press to Continue Options - SIDE BY SIDE layout */
.loader-continue-options {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-continue-options.visible {
    opacity: 1;
    visibility: visible;
}

.continue-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.continue-option:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.4);
    transform: translateY(-2px);
}

.tutorial-option {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

.tutorial-option:hover {
    background: rgba(220, 38, 38, 0.25);
    border-color: rgba(220, 38, 38, 0.6);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.3);
}

/* Hide divider since buttons are now side by side */
.continue-divider {
    display: none;
}

.key-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    border-radius: 8px;
    box-shadow: 
        0 4px 12px rgba(220, 38, 38, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.key-badge.pulsating {
    animation: keyPulse 1.5s ease-in-out infinite;
}

@keyframes keyPulse {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(220, 38, 38, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 0 0 rgba(220, 38, 38, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(220, 38, 38, 0.6),
            inset 0 1px 0 rgba(255, 255, 255, 0.2),
            0 0 0 12px rgba(220, 38, 38, 0);
        transform: scale(1.05);
    }
}

.key-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-text {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.5px;
}

.continue-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.continue-divider::before,
.continue-divider::after {
    content: '';
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
}

@keyframes continuePulse {
    0%, 100% { 
        opacity: 0.4;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Transition Glow Sweep Effect */
.loader-shimmer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100000;
    opacity: 0;
}

.loader-shimmer.active {
    opacity: 1;
}

/* Glow wave that sweeps down and illuminates red elements */
.loader-shimmer.active::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(220, 38, 38, 0.4) 30%,
        rgba(248, 113, 113, 0.6) 50%,
        rgba(220, 38, 38, 0.4) 70%,
        transparent 100%
    );
    filter: blur(80px);
    animation: glowSweepDown 1.2s ease-out forwards;
}

@keyframes glowSweepDown {
    0% {
        top: -200px;
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        top: calc(100% + 200px);
        opacity: 0;
    }
}

/* Red accent elements glow animation */
body.app-reveal .cockpit-title i,
body.app-reveal .panel-header i,
body.app-reveal .launch-btn-icon,
body.app-reveal .subsystem-btn i,
body.app-reveal .checklist-indicator,
body.app-reveal .indicator.active,
body.app-reveal .nav-item.active a i,
body.app-reveal .app-title,
body.app-reveal .chatbot-toggle {
    animation: accentGlow 1.5s ease-out forwards;
}

@keyframes accentGlow {
    0% {
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }
    40% {
        filter: brightness(1.8) drop-shadow(0 0 25px rgba(220, 38, 38, 0.9));
    }
    100% {
        filter: brightness(1) drop-shadow(0 0 0 transparent);
    }
}

/* Staggered glow for different elements - top to bottom flow */
body.app-reveal .app-title {
    animation-delay: 0s;
}

body.app-reveal .nav-item.active a i {
    animation-delay: 0.15s;
}

body.app-reveal .cockpit-title i {
    animation-delay: 0.2s;
}

body.app-reveal .panel-header i {
    animation-delay: 0.3s;
}

body.app-reveal .checklist-indicator {
    animation-delay: 0.4s;
}

body.app-reveal .launch-btn-icon {
    animation-delay: 0.5s;
}

body.app-reveal .subsystem-btn i {
    animation-delay: 0.6s;
}

body.app-reveal .indicator.active {
    animation-delay: 0.7s;
}

body.app-reveal .chatbot-toggle {
    animation-delay: 0.8s;
}

/* Cards get a subtle border glow - staggered */
body.app-reveal .cockpit-panel {
    animation: panelReveal 1.2s ease-out forwards;
}

@keyframes panelReveal {
    0% {
        box-shadow: var(--shadow-card);
    }
    40% {
        box-shadow: var(--shadow-card), 0 0 40px rgba(220, 38, 38, 0.4), inset 0 0 30px rgba(220, 38, 38, 0.15);
    }
    100% {
        box-shadow: var(--shadow-card);
    }
}

body.app-reveal .cockpit-panel:nth-child(1) { animation-delay: 0.2s; }
body.app-reveal .cockpit-panel:nth-child(2) { animation-delay: 0.35s; }
body.app-reveal .cockpit-panel:nth-child(3) { animation-delay: 0.5s; }

/* Sidebar nav items glow in sequence */
body.app-reveal .nav-item a i {
    animation: navGlow 1s ease-out forwards;
}

body.app-reveal .nav-item:nth-child(1) a i { animation-delay: 0.1s; }
body.app-reveal .nav-item:nth-child(2) a i { animation-delay: 0.15s; }
body.app-reveal .nav-item:nth-child(3) a i { animation-delay: 0.2s; }
body.app-reveal .nav-item:nth-child(4) a i { animation-delay: 0.25s; }
body.app-reveal .nav-item:nth-child(5) a i { animation-delay: 0.3s; }
body.app-reveal .nav-item:nth-child(6) a i { animation-delay: 0.35s; }

@keyframes navGlow {
    0% {
        filter: brightness(1);
        text-shadow: none;
    }
    40% {
        filter: brightness(1.5);
        text-shadow: 0 0 15px rgba(220, 38, 38, 0.8);
    }
    100% {
        filter: brightness(1);
        text-shadow: none;
    }
}

/* Background Effects */
.loader-bg-effects {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(220, 38, 38, 0.15) 0%, transparent 70%);
    animation: bgPulse 4s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.bg-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(220, 38, 38, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(220, 38, 38, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.bg-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(220, 38, 38, 0.2) 0%, transparent 60%);
    filter: blur(60px);
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.3; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.6; transform: translate(-50%, -50%) scale(1.2); }
}

/* Hide on mobile - simpler experience */
@media (max-width: 768px) {
    .app-loader {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a0808 100%);
    }
    
    .loader-logo {
        width: 120px;
        height: 120px;
    }
    
    .logo-icon {
        font-size: 36px;
    }
    
    .ring-1 { width: 80px; height: 80px; }
    .ring-2 { width: 100px; height: 100px; }
    .ring-3 { width: 120px; height: 120px; }
    
    .logo-particles { display: none; }
    
    .loader-text h2 {
        font-size: 22px;
    }
    
    .loader-progress {
        width: 250px;
    }
    
    .bg-grid { display: none; }
    .bg-glow { width: 300px; height: 300px; }
}

/* Large screen optimizations - scale up fonts for big monitors */
@media (min-width: 1600px) {
    :root {
        --base-font-size: 16px;
    }
    
    .form-control,
    .btn,
    .form-label {
        font-size: 15px;
    }
    
    .module-title {
        font-size: 1.6rem;
    }
    
    .card,
    .cockpit-panel {
        padding: 24px;
    }
    
    .panel-header {
        font-size: 12px;
    }
    
    .checklist-label {
        font-size: 15px;
    }
    
    .checklist-value {
        font-size: 13px;
    }
}

@media (min-width: 1920px) {
    :root {
        --base-font-size: 17px;
    }
    
    body {
        font-size: 16px;
    }
    
    .form-control,
    .btn {
        font-size: 16px;
        padding: 14px 18px;
    }
    
    .form-label {
        font-size: 15px;
    }
    
    .module-title {
        font-size: 1.8rem;
    }
    
    .app-title {
        font-size: 28px;
    }
    
    .nav-item a {
        font-size: 15px;
        padding: 14px 18px;
    }
    
    .nav-item i {
        font-size: 20px;
    }
    
    .panel-header {
        font-size: 13px;
        padding: 16px 20px;
    }
    
    .checklist-label {
        font-size: 16px;
    }
    
    .checklist-value {
        font-size: 14px;
    }
    
    .launch-btn-title {
        font-size: 16px;
    }
    
    .launch-btn-desc {
        font-size: 13px;
    }
}

@media (min-width: 2560px) {
    body {
        font-size: 18px;
    }
    
    .form-control,
    .btn {
        font-size: 17px;
        padding: 16px 20px;
    }
    
    .module-title {
        font-size: 2rem;
    }
    
    .app-title {
        font-size: 32px;
    }
    
    .nav-item a {
        font-size: 16px;
        padding: 16px 20px;
    }
}

body {
    font-family: var(--font-family);
    background: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* ============================================
   STANDARDIZED ICON SYSTEM
   Consistent weights, sizes, and alignment
   ============================================ */

/* Base icon styling - use Font Awesome Regular weight consistently */
.fas, .far, .fab {
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Icon size scale */
.icon-xs { font-size: 12px; }
.icon-sm { font-size: 14px; }
.icon-md { font-size: 16px; }
.icon-lg { font-size: 20px; }
.icon-xl { font-size: 24px; }

/* Navigation icons - consistent sizing */
.nav-item i,
.sidebar i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

/* Header icons */
.top-header i,
.header-actions i {
    font-size: 18px;
}

/* Button icons */
.btn i {
    font-size: 14px;
}

/* Card header icons */
.card-header i,
.panel-header i {
    font-size: 14px;
    opacity: 0.8;
}

/* Status icons */
.status-icon i,
.checklist-indicator i {
    font-size: 12px;
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    button, a, .nav-item, .card {
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
    }
    
    /* Disable hover effects on touch devices */
    .btn:hover,
    .nav-item:hover,
    .card:hover {
        transform: none;
    }
    
    /* Enable active states for better feedback */
    .btn:active {
        transform: scale(0.98);
    }
    
    .nav-item:active {
        background: linear-gradient(135deg, rgba(var(--primary-color-rgb, 213, 0, 50), 0.15) 0%, rgba(var(--primary-color-rgb, 213, 0, 50), 0.2) 100%);
    }
}

/* Top Header */
.top-header {
    background: var(--white);
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #e1e4e8;
}

.app-title {
    font-family: var(--headline-font);
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 700;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Global Brand Selector */
.global-brand-selector {
    position: relative;
}

.brand-selector-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    max-width: 220px;
}

.brand-selector-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(213, 0, 50, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.brand-selector-btn i:first-child {
    color: #D50032;
    font-size: 16px;
    flex-shrink: 0;
}

.brand-selector-btn i:last-child {
    font-size: 11px;
    opacity: 0.7;
    transition: transform 0.2s ease;
    color: rgba(255, 255, 255, 0.8);
    margin-left: auto;
}

.global-brand-selector.open .brand-selector-btn {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(213, 0, 50, 0.5);
}

.global-brand-selector.open .brand-selector-btn i:last-child {
    transform: rotate(180deg);
}

.selected-brand-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    color: #ffffff;
    font-weight: 500;
}

.brand-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: rgba(20, 20, 25, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(213, 0, 50, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.global-brand-selector.open .brand-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.brand-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 255, 255, 0.02);
}

.brand-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 8px;
}

.brand-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.brand-dropdown-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.brand-dropdown-list::-webkit-scrollbar-thumb {
    background: rgba(213, 0, 50, 0.5);
    border-radius: 3px;
}

.brand-dropdown-list::-webkit-scrollbar-thumb:hover {
    background: rgba(213, 0, 50, 0.7);
}

.brand-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    color: #ffffff;
    margin-bottom: 4px;
}

.brand-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

/* Admin Indicator */
.admin-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 8px;
    background: linear-gradient(135deg, rgba(213, 0, 50, 0.2) 0%, rgba(213, 0, 50, 0.1) 100%);
    border: 1px solid rgba(213, 0, 50, 0.4);
    border-radius: 8px;
    color: #ff4d6d;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 8px rgba(213, 0, 50, 0.2);
}

.admin-indicator i {
    font-size: 14px;
    color: #D50032;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(213, 0, 50, 0.2) 0%, rgba(213, 0, 50, 0.1) 100%);
    border: 1px solid rgba(213, 0, 50, 0.3);
    border-radius: 20px;
    color: #D50032;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.admin-badge i {
    font-size: 10px;
}

.brand-dropdown-item.selected {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.brand-dropdown-item.selected .brand-name {
    color: #10b981;
    font-weight: 600;
}

.brand-dropdown-item .brand-color {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.brand-dropdown-item.selected .brand-color {
    border-color: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.brand-dropdown-item .brand-info {
    flex: 1;
    min-width: 0;
}

.brand-dropdown-item .brand-name {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}

.brand-dropdown-item .brand-platforms {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
    font-weight: 400;
}

.brand-dropdown-item.selected .brand-platforms {
    color: rgba(16, 185, 129, 0.8);
}

.brand-dropdown-footer {
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.brand-dropdown-footer .btn {
    width: 100%;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    padding: 10px 16px;
}

.brand-dropdown-footer .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.brand-dropdown-empty {
    padding: 24px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.brand-dropdown-empty i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.4;
    color: rgba(255, 255, 255, 0.5);
}

.icon-button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 20px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button:hover {
    background: var(--background);
    color: var(--primary-color);
    transform: scale(1.05);
}

.icon-button:active {
    transform: scale(0.95);
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-container i {
    position: absolute;
    left: 15px;
    color: var(--text-secondary);
}

#global-search {
    padding: 10px 15px 10px 45px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    width: 300px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#global-search:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.1);
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-secondary);
}

/* Old notification badge - now using new notifications-wrapper */

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
}

.user-profile:hover {
    background: var(--background);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
}

.user-avatar-icon i {
    font-size: 40px;
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
}

/* Main Container */
.main-container {
    display: none; /* Hidden by default, shown when loader is dismissed */
    visibility: hidden;
    margin-top: 60px;
    height: calc(100vh - 60px);
}

/* Sidebar Navigation - Card-like elevation */
.sidebar {
    width: 250px;
    background: var(--surface-primary);
    position: fixed;
    left: 0;
    top: 60px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-light);
    box-shadow: 1px 0 0 var(--border-light);
    box-shadow: 2px 0 12px rgba(0,0,0,0.08);
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
    margin: 0;
}

.nav-item {
    display: block;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    margin: 2px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-item a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 12px 16px;
    font-weight: var(--font-weight-medium);
    transition: all 0.15s ease;
    border-radius: 8px;
}

.nav-item i {
    font-size: 18px;
    width: 24px; /* Ensure consistent width */
    text-align: center; /* Center icon */
    transition: all 0.3s ease;
}

/* Hover state - light mode */
.nav-item:hover:not(.active) a {
    background: var(--surface-secondary);
    color: var(--text-primary);
}

.nav-item:hover:not(.active) a i {
    color: var(--text-primary);
}

/* Active state - modern with inset indicator */
.nav-item.active a {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.08) 0%, rgba(220, 38, 38, 0.02) 100%);
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    box-shadow: inset 3px 0 0 var(--primary);
}

.nav-item.active a i {
    color: var(--primary);
}

/* Nav Section Labels */
.nav-section-label {
    padding: 16px 16px 8px 16px;
    margin-top: 8px;
}

.nav-section-label:first-child {
    margin-top: 0;
    padding-top: 8px;
}

.nav-section-label span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    opacity: 0.6;
}

body.dark-mode .nav-section-label span {
    color: #6b7280;
}

/* Coming Soon Navigation Items */
.nav-item-coming-soon a {
    opacity: 0.6;
    cursor: default;
}

.nav-item-coming-soon:hover a {
    background: rgba(139, 92, 246, 0.08) !important;
}

.coming-soon-badge {
    margin-left: auto;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: #fff;
    border-radius: 10px;
    animation: comingSoonPulse 2s ease-in-out infinite;
}

@keyframes comingSoonPulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

body.dark-mode .nav-item-coming-soon a {
    color: #6b7280;
}

body.dark-mode .nav-item-coming-soon:hover a {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #9ca3af;
}

body.dark-mode .nav-item-coming-soon:hover a i {
    color: #8b5cf6;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    flex-shrink: 0;
    border-top: 1px solid var(--border-light);
    background: var(--surface-secondary);
}

/* Content Area */
.content-area {
    flex: 1;
    margin-left: 250px;
    padding: var(--space-8) var(--space-10);
    overflow-y: auto;
    background: #fafbfc;
}

/* Module Container */
.module-container {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.module-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.module-header-right .brand-selector {
    min-width: 180px;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
}

body.dark-mode .module-header-right .brand-selector {
    background: #252525;
    border-color: #3a3a3a;
    color: #f0f0f0;
}

.module-title {
    font-family: var(--headline-font);
    font-size: 32px;
    color: var(--text-primary);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.module-actions {
    display: flex;
    gap: 10px;
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color) 0%, #E53935 100%);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(213, 0, 50, 0.25);
}

.btn-primary:hover {
    background: #B8002A;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(213, 0, 50, 0.35);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(99, 102, 106, 0.2);
}

.btn-secondary:hover {
    background: #4A4D50;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 106, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(213, 0, 50, 0.05);
}

body.dark-mode .btn-outline {
    border-color: #4B5563;
    color: #e0e0e0;
}

body.dark-mode .btn-outline:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

.btn-success:hover {
    background: #05906B;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
}

.btn-danger:hover {
    background: #D62839;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.card {
    background: var(--surface-primary);
    border-radius: 12px;
    padding: var(--space-6);
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
    border: 1px solid var(--border-light);
    position: relative;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Dark mode cards with elevation and slightly more padding */
body.dark-mode .card {
    background: var(--surface-primary);
    border-color: var(--border-default);
    padding: calc(var(--space-6) + 2px);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.dark-mode .card:hover {
    border-color: var(--border-strong);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.card-title {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
    letter-spacing: 0.3px;
}

.card-icon {
    font-size: 32px;
    color: var(--primary-color); /* Use primary color for light mode */
    opacity: 0.9;
}

.card-value {
    font-size: 42px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    line-height: 1;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 163, 224, 0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

/* Multi-select */
.multi-select-container {
    position: relative;
}

.multi-select-display {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    min-height: 45px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 5px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
}

.multi-select-dropdown.show {
    display: block;
}

.multi-select-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.multi-select-option:hover {
    background: var(--background);
}

.multi-select-option input[type="checkbox"] {
    margin-right: 10px;
}

.selected-tag {
    background: var(--primary-color);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.selected-tag .remove-tag {
    cursor: pointer;
    font-weight: bold;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

thead {
    background: var(--background);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: var(--background);
}

/* Status Badge */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
}

.status-approved {
    background: #D4EDDA;
    color: #155724;
}

.status-rejected {
    background: #F8D7DA;
    color: #721C24;
}

.status-draft {
    background: #E2E8F0;
    color: #4A5568;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 163, 224, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Preview Pane */
.preview-pane {
    background: var(--background);
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
    min-height: 400px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary-color);
}

/* File Upload */
.file-upload-container {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.file-upload-container:hover {
    border-color: var(--primary-color);
    background: var(--background);
}

.file-upload-container input[type="file"] {
    display: none;
}

.upload-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.upload-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: #F8D7DA;
    color: #721C24;
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background: #FFF3CD;
    color: #856404;
    border-left: 4px solid var(--warning-color);
}

.alert-info {
    background: #D1ECF1;
    color: #0C5460;
    border-left: 4px solid var(--primary-color);
}

/* Responsive Design */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1002;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
    transition: all 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle:hover {
    background: #b91c1c;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

body.dark-mode .mobile-menu-toggle {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.4);
}

body.dark-mode .mobile-menu-toggle:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .sidebar {
        width: 220px;
    }
    
    .content-area {
        margin-left: 220px;
        padding: 30px 20px;
    }
    
    #global-search {
        width: 200px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .app-title {
        font-size: 20px;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Adjust header for mobile */
    .top-header {
        padding: 0 12px 0 60px;
        height: 55px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .app-title {
        font-size: 16px;
        margin-left: 0;
    }
    
    .header-right {
        gap: 10px;
    }
    
    #global-search {
        display: none; /* Hide search on mobile, can add a modal version */
    }
    
    .user-name {
        display: none;
    }
    
    .notifications {
        font-size: 18px;
    }
    
    /* Sidebar mobile behavior */
    .sidebar {
        position: fixed;
        left: 0;
        top: 55px;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 2px 0 20px rgba(0,0,0,0.1);
        background: linear-gradient(180deg, rgba(245,247,250,0.98) 0%, rgba(240,242,245,0.98) 100%);
        backdrop-filter: blur(10px);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    body.sidebar-open {
        overflow: hidden;
    }
    
    /* Overlay when sidebar is open */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 55px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Content area full width on mobile */
    .content-area {
        margin-left: 0;
        padding: 20px 15px;
        margin-top: 55px;
    }
    
    /* Single column cards */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Stack module header items */
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .module-header-right {
        width: 100%;
    }
    
    .module-header-right .brand-selector {
        width: 100%;
    }
    
    .module-actions {
        width: 100%;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .module-actions > div {
        width: 100%;
    }
    
    .module-actions select,
    .module-actions button {
        width: 100% !important;
    }
    
    /* Better button spacing on mobile */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Form improvements for mobile */
    .form-control,
    select.form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Table responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Reduce padding for mobile */
    .card {
        padding: 20px 15px;
    }
    
    .module-container {
        padding: 20px 15px;
    }
    
    /* Touch-friendly nav items */
    .nav-item {
        padding: 16px 20px;
        margin: 6px 12px;
        font-size: 15px;
    }
    
    .nav-item i {
        font-size: 20px;
    }
}

/* Small mobile phones */
@media (max-width: 480px) {
    .top-header {
        padding: 0 50px 0 10px;
    }
    
    .app-title {
        font-size: 16px;
        margin-left: 40px;
    }
    
    .sidebar {
        width: 260px;
    }
    
    .content-area {
        padding: 15px 10px;
    }
    
    .module-title {
        font-size: 20px;
    }
    
    .card-title {
        font-size: 14px;
    }
    
    .card-value {
        font-size: 28px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Status badges smaller */
    .status-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* Feature Section Styles (Anthill-inspired) */
.feature-section {
    margin: 40px 0;
}

.feature-step {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    align-items: flex-start;
}

.feature-number {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    background: rgba(213, 0, 50, 0.1);
    padding: 12px 20px;
    border-radius: 25px;
    min-width: 120px;
    text-align: center;
    letter-spacing: 1px;
}

.feature-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    letter-spacing: -0.3px;
}

.feature-content p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Quote/Testimonial Cards */
.quote-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 12px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quote-card blockquote {
    font-size: 18px;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-weight: 500;
}

.quote-card .quote-author {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Enhanced Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

th, td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background: rgba(213, 0, 50, 0.03);
    transform: translateX(4px);
}

/* Section Headers */
.section-header {
    margin-bottom: 40px;
}

.section-header h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 800px;
}

/* Chatbot Widget Styles */
.chatbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, #B8002A 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(213, 0, 50, 0.4);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(213, 0, 50, 0.5);
}

.chatbot-toggle.active {
    background: var(--secondary-color);
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #B8002A 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
}

.chatbot-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 15px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    max-width: calc(100% - 158px);
}

.chatbot-header-left .model-picker {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    margin-left: 4px !important;
}

.chatbot-header-left .model-picker-btn {
    max-width: 100% !important;
    min-width: 0;
}

.chatbot-header-left i {
    font-size: 18px;
    flex-shrink: 0;
}

.chatbot-header-left > span {
    flex-shrink: 0;
}

.chatbot-header-actions {
    display: flex;
    gap: 4px;
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-left: auto;
}

.chatbot-action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-size: 12px;
}

.chatbot-action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-context {
    background: var(--background);
    padding: 10px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chatbot-welcome {
    text-align: center;
    padding: 40px 20px;
}

.chatbot-welcome-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #B8002A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 28px;
}

.chatbot-welcome h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.chatbot-welcome p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

/* Chatbot Quick Links */
.chatbot-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chatbot-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chatbot-quick-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.chatbot-quick-link i {
    font-size: 11px;
    opacity: 0.8;
}

.chatbot-quick-link:hover i {
    opacity: 1;
}

.chatbot-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-message-user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.chatbot-message-assistant {
    margin-right: auto;
}

.chatbot-message-error {
    margin-right: auto;
    background: #FFF3CD;
    padding: 12px;
    border-radius: 10px;
    border-left: 3px solid var(--warning-color);
}

.chatbot-message-error i {
    color: var(--warning-color);
    margin-right: 8px;
}

.chatbot-message-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.chatbot-message-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chatbot-message-text {
    background: var(--background);
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.chatbot-message-user .chatbot-message-text {
    background: var(--primary-color);
    color: white;
}

.chatbot-message-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.chatbot-message-user .chatbot-message-text a {
    color: white;
}

.chatbot-message-time {
    font-size: 11px;
    color: var(--text-secondary);
    padding: 0 4px;
}

.chatbot-message-user .chatbot-message-time {
    text-align: right;
}

.chatbot-typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
}

.chatbot-typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.chatbot-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.chatbot-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Inline streaming typing dots (compact) */
.typing-dots {
    display: inline-flex;
    gap: 3px;
    vertical-align: middle;
}
.typing-dots span {
    width: 5px; height: 5px;
    background: var(--text-secondary, #888);
    border-radius: 50%;
    animation: typing 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

/* Skill pill used in streaming bubble — brand red, matches system */
.skill-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(220,38,38,0.15);
    color: #fca5a5;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Model picker dropdown options hover */
.model-picker-menu .model-option:hover {
    background: rgba(255,255,255,0.06) !important;
}

/* Persistent Quick Actions Bar */
.chatbot-quick-actions {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-wrap: wrap;
}

.chatbot-quick-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chatbot-quick-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.chatbot-quick-btn i {
    font-size: 11px;
}

body.dark-mode .chatbot-quick-actions {
    background: #151515;
    border-top-color: #2a2a2a;
}

body.dark-mode .chatbot-quick-btn {
    background: #1a1a1a;
    border-color: #333;
    color: #aaa;
}

body.dark-mode .chatbot-quick-btn:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

.chatbot-input-container {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
    align-items: flex-end;
}

.chatbot-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    overflow-y: auto;
}

.chatbot-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chatbot-attach-btn {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-attach-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chat-kb-folder-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.chat-qc-progress {
    margin: 4px 0 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-qc-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.chat-qc-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc2626, #f87171);
    border-radius: 2px;
}

.chat-qc-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chat-qc-step {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
}

.chat-qc-step.active {
    background: rgba(220, 38, 38, 0.2);
    color: #fca5a5;
    font-weight: 600;
}

.chat-qc-step.done {
    background: rgba(74, 222, 128, 0.15);
    color: #86efac;
}

/* In-chat workflow cards (Quick Create, Video, Idea Sparring) */
.agent-action-result--workflow,
.agent-action-result--pending.agent-action-result--workflow {
    margin-top: 10px;
    padding: 0;
    background: transparent;
    border: none;
    font-size: inherit;
    color: inherit;
    max-width: 100%;
}

.agent-action-result--pending {
    margin-top: 10px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #9ca3af;
    font-size: 0.85rem;
}

.chat-wf-card {
    margin: 4px 0;
    padding: 14px 16px;
    background: rgba(15, 15, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.chat-wf-header {
    margin-bottom: 12px;
}

.chat-wf-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: color-mix(in srgb, var(--wf-accent, #9ca3af) 18%, transparent);
    border: 1px solid color-mix(in srgb, var(--wf-accent, #9ca3af) 35%, transparent);
    color: var(--wf-accent, #d4d4d4);
}

.chat-wf-title {
    margin-top: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f5f5;
    line-height: 1.35;
}

.chat-wf-subtitle {
    margin-top: 4px;
    font-size: 0.8rem;
    color: #9ca3af;
}

.chat-wf-progress {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-wf-progress-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.75rem;
}

.chat-wf-stage-now {
    font-weight: 600;
    color: #e5e5e5;
}

.chat-wf-stage-count {
    color: #6b7280;
}

.chat-wf-step {
    font-size: 0.68rem;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #9ca3af;
}

.chat-wf-step.active {
    font-weight: 600;
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.18);
}

.chat-wf-step.done {
    color: #86efac;
    background: rgba(74, 222, 128, 0.12);
}

.chat-wf-body {
    margin-top: 4px;
}

.chat-wf-body--legacy {
    margin-top: 10px;
    font-size: 0.85rem;
    line-height: 1.55;
    color: #d4d4d4;
}

.chat-wf-prose {
    font-size: 0.85rem;
    line-height: 1.6;
    color: #d4d4d4;
}

.chat-wf-p {
    margin: 0 0 10px;
}

.chat-wf-spacer {
    height: 8px;
}

.chat-wf-h3 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f5f5f5;
}

.chat-wf-section {
    margin: 0 0 16px;
}

.chat-wf-section-title {
    margin: 0 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #a3a3a3;
}

.chat-wf-list {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: disc;
}

.chat-wf-list li {
    margin-bottom: 8px;
    line-height: 1.5;
    color: #d4d4d4;
}

.chat-wf-list li strong {
    color: #f5f5f5;
}

.chat-wf-li-desc {
    display: block;
    margin-top: 2px;
    color: #9ca3af;
    font-size: 0.8rem;
}

.chat-wf-summary {
    margin: 0 0 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    color: #d4d4d4;
    line-height: 1.55;
}

.chat-wf-result-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #c4b5fd;
}

.chat-wf-score {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: color-mix(in srgb, var(--score-color) 15%, transparent);
    color: var(--score-color);
}

.chat-wf-callout {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    font-size: 0.82rem;
    line-height: 1.5;
    color: #e5e5e5;
}

.chat-wf-callout--success {
    background: rgba(74, 222, 128, 0.08);
    border-color: rgba(74, 222, 128, 0.25);
    color: #bbf7d0;
}

.chat-wf-callout i {
    margin-right: 6px;
    color: #fbbf24;
}

.chat-wf-concepts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-wf-concept-card {
    display: flex;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
}

.chat-wf-concept-num {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(96, 165, 250, 0.15);
    color: #93c5fd;
    font-weight: 700;
    font-size: 0.85rem;
}

.chat-wf-concept-title {
    font-weight: 600;
    font-size: 0.88rem;
    color: #f5f5f5;
    margin-bottom: 4px;
}

.chat-wf-concept-desc {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #9ca3af;
}

.chat-wf-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-wf-hint {
    font-size: 0.72rem;
    color: #6b7280;
}

.chat-wf-hint i {
    margin-right: 4px;
    color: #9ca3af;
}

.navi-fs-msg-text .chat-wf-card,
.chatbot-message-text .chat-wf-card,
.streaming-actions .chat-wf-card,
.agent-action-result--workflow .chat-wf-card {
    max-width: 100%;
    width: 100%;
}

.streaming-actions .agent-action-result--workflow {
    width: 100%;
    flex: 1 1 100%;
}

.chat-wf-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.chat-wf-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #e5e5e5;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.chat-wf-action-btn:hover:not(:disabled) {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.35);
    color: #fecaca;
}

.chat-wf-action-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.chat-wf-action-btn--write {
    border-color: rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.1);
}

.chat-wf-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-wf-picker-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-wf-picker-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f5f5f5;
}

.chat-wf-picker-meta {
    font-size: 0.72rem;
    color: #9ca3af;
    text-transform: capitalize;
}

.chat-wf-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-wf-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: #a3a3a3;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-wf-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
    color: #f5f5f5;
    font-size: 0.85rem;
    font-family: inherit;
}

.chat-wf-textarea {
    resize: vertical;
    min-height: 72px;
}

.chat-wf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.chat-wf-form-actions {
    margin-top: 4px;
}

.chat-wf-action-btn--primary {
    border-color: rgba(167, 139, 250, 0.45);
    background: rgba(167, 139, 250, 0.15);
    color: #e9d5ff;
}

.chatbot-send-btn {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(220, 38, 38, 0.3);
}

.chatbot-send-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

.chatbot-send-btn:active {
    transform: scale(0.95);
}

/* Mobile Chatbot Styles */
@media (max-width: 768px) {
    .chatbot-widget {
        bottom: 10px;
        right: 10px;
    }
    
    .chatbot-window {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 100px);
    }
    
    .chatbot-toggle {
        width: 56px;
        height: 56px;
        font-size: 22px;
    }
}

/* Settings Module Styles */
.settings-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
}

.settings-tab {
    background: none;
    border: none;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.settings-tab:hover {
    color: var(--primary-color);
    background: var(--background);
}

.settings-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.settings-content {
    padding: 20px 0;
}

.settings-section {
    margin-bottom: 30px;
}

/* Brand Management */
.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.brands-actions {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

.brands-actions .btn {
    min-width: 180px;
}

body.dark-mode .brands-actions {
    border-color: #333;
}

.brand-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.brand-card.selected {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb, 213, 0, 50), 0.2);
}

.brand-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.brand-colors {
    display: flex;
    gap: 8px;
}

.brand-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.brand-card-actions {
    display: flex;
    gap: 5px;
}

.icon-btn {
    background: var(--background);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.icon-btn:hover {
    background: var(--primary-color);
    color: white;
}

.brand-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.brand-card-created {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.brand-card-created i {
    font-size: 11px;
    opacity: 0.7;
}

.brand-card-guidelines {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 15px;
    min-height: 60px;
}

.brand-card-guidelines.text-muted {
    font-style: italic;
    color: #aaa;
}

.brand-card-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-bottom: 20px;
}

.empty-state h4 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* No Brand Selected Prompt */
.no-brand-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 40px;
    background: linear-gradient(135deg, var(--surface-primary) 0%, var(--surface-secondary) 100%);
    border-radius: 16px;
    border: 2px dashed var(--border-color);
    margin: 20px auto;
    max-width: 500px;
}

.no-brand-prompt .prompt-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(248, 113, 113, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.no-brand-prompt .prompt-icon i {
    font-size: 36px;
    color: var(--primary);
}

.no-brand-prompt h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.no-brand-prompt p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.no-brand-prompt .prompt-brand-select {
    width: 100%;
    max-width: 300px;
    margin-bottom: 20px;
}

.no-brand-prompt .prompt-brand-select label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.no-brand-prompt .prompt-brand-select select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
}

.no-brand-prompt .prompt-actions {
    display: flex;
    gap: 12px;
}

.no-brand-prompt .prompt-actions .btn {
    padding: 12px 24px;
}

/* Content Planner specific - full width */
.planner-no-brand {
    max-width: none;
    width: 100%;
    min-height: 300px;
}

/* Dark mode */
body.dark-mode .no-brand-prompt {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border-color: #333;
}

body.dark-mode .no-brand-prompt .prompt-icon {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(248, 113, 113, 0.1) 100%);
}

body.dark-mode .no-brand-prompt h3 {
    color: #f0f0f0;
}

body.dark-mode .no-brand-prompt p {
    color: #9ca3af;
}

body.dark-mode .no-brand-prompt .prompt-brand-select select {
    background: #252525;
    border-color: #3a3a3a;
    color: #f0f0f0;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .no-brand-prompt {
        padding: 40px 20px;
        margin: 10px;
    }
    
    .no-brand-prompt .prompt-icon {
        width: 64px;
        height: 64px;
    }
    
    .no-brand-prompt .prompt-icon i {
        font-size: 28px;
    }
    
    .no-brand-prompt h3 {
        font-size: 18px;
    }
    
    .no-brand-prompt p {
        font-size: 13px;
    }
    
    .no-brand-prompt .prompt-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .no-brand-prompt .prompt-actions .btn {
        width: 100%;
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay .feedback-modal {
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .feedback-modal {
    transform: scale(1) translateY(0);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--background);
    color: var(--text-primary);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form Layouts */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.color-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker {
    width: 60px;
    height: 45px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-secondary);
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 5px;
}

.uploaded-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--background);
    border-radius: 8px;
    margin-top: 10px;
}

.btn-remove-file {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

/* Webhook Configuration */
.webhook-config {
    max-width: 800px;
}

.webhook-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.webhook-label > span:first-child {
    flex: 1;
}

.platform-update-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 10px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + label:before {
    transform: translateX(24px);
}

/* Preferences Form */
.preferences-form {
    max-width: 600px;
}

/* Mobile Settings Styles */
@media (max-width: 768px) {
    .settings-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .settings-tab {
        flex-shrink: 0;
        padding: 12px 20px;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    .brands-actions {
        margin-top: 16px;
        padding-top: 16px;
    }
    
    .brands-actions .btn {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 20px;
    }
}

/* Create Content Module Styles */
.brand-indicator {
    background: var(--background);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.platform-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.platform-btn {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.platform-btn:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.platform-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.platform-btn i {
    font-size: 32px;
}

.platform-btn span {
    font-weight: 600;
}

.platform-btn small {
    font-size: 11px;
    opacity: 0.8;
}

.content-form-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.content-form {
    background: var(--background);
    padding: 30px;
    border-radius: 12px;
}

.content-form h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
}

.constraints-input {
    position: relative;
}

.constraints-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.constraint-tag {
    background: var(--secondary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.constraint-tag i {
    cursor: pointer;
    opacity: 0.8;
}

.constraint-tag i:hover {
    opacity: 1;
}

.content-results {
    background: var(--background);
    padding: 30px;
    border-radius: 12px;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-variant {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.variant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.variant-actions {
    display: flex;
    gap: 8px;
}

.variant-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.variant-body {
    margin-bottom: 15px;
}

.variant-text {
    background: var(--background);
    padding: 15px;
    border-radius: 8px;
    white-space: pre-wrap;
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-primary);
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.char-count.over-limit {
    color: var(--danger-color);
    font-weight: 600;
}

.variant-cta {
    background: var(--success-color);
    color: white;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.variant-hashtags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.hashtag {
    background: var(--primary-color);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.variant-notes {
    background: #E3F2FD;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #1976D2;
    display: flex;
    gap: 10px;
}

@media (max-width: 1024px) {
    .content-form-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .content-form-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .platform-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* New Content Creation Workflow Styles */
.content-selection-container {
    max-width: 900px;
    margin: 0 auto;
}

.chat-input-section {
    background: var(--background);
    padding: 40px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center;
}

.chat-input-section h3 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.helper-text {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 16px;
}

.chat-input-large {
    min-height: 120px;
    font-size: 16px;
    line-height: 1.6;
}

.manual-selection-section {
    background: var(--background);
    padding: 40px;
    border-radius: 16px;
    margin-top: 30px;
}

.manual-selection-section h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 25px;
}

/* Platform Selector - Clean Card Style */
.platform-selector-new {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .platform-selector-new {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .platform-selector-new {
        grid-template-columns: 1fr;
    }
}

.platform-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    position: relative;
    min-height: 100px;
}

.platform-card i:first-child {
    font-size: 32px;
    transition: transform 0.2s ease;
}

.platform-card span {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    text-align: center;
}

.platform-card:hover {
    border-color: var(--primary-color);
    background: rgba(213, 0, 50, 0.03);
}

.platform-card.selected {
    border-color: var(--primary-color);
    background: rgba(213, 0, 50, 0.08);
}

.platform-card.selected i:first-child {
    transform: scale(1.05);
}

.platform-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
}

.platform-card.selected .platform-check {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Confirmation Styles */
.confirmation-container {
    max-width: 800px;
    margin: 0 auto;
}

.confirmation-section {
    background: var(--background);
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.confirmation-section h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.confirmation-section h3 i {
    color: var(--primary-color);
}

.selected-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.selected-platform-badge {
    background: var(--white);
    border: 2px solid;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
}

.selected-platform-badge i {
    font-size: 36px;
}

.selected-platform-badge span {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.selected-platform-badge small {
    font-size: 13px;
    color: var(--text-secondary);
}

.confirmation-value {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Creation Workflow Styles */
.creation-status-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 30px;
    background: var(--background);
    border-radius: 16px;
    position: relative;
}

.creation-status-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 60px;
    right: 60px;
    height: 4px;
    background: var(--border-color);
    z-index: 0;
}

.status-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--white);
    border: 4px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.status-step span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.status-step.active .status-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 16px rgba(213, 0, 50, 0.3);
    animation: pulse 2s infinite;
}

.status-step.active span {
    color: var(--primary-color);
    font-weight: 700;
}

.status-step.completed .status-icon {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.status-step.completed span {
    color: var(--success-color);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 16px rgba(213, 0, 50, 0.3);
    }
    50% {
        box-shadow: 0 4px 24px rgba(213, 0, 50, 0.5);
    }
}

/* Stage Cards */
.creation-stages {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stage-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.stage-card.in-progress {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(213, 0, 50, 0.15);
}

.stage-card.completed {
    border-color: var(--success-color);
}

.stage-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stage-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stage-title i {
    font-size: 24px;
    color: var(--primary-color);
}

.stage-status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stage-status-badge.status-pending {
    background: #E2E8F0;
    color: #4A5568;
}

.stage-status-badge.status-in-progress {
    background: rgba(213, 0, 50, 0.1);
    color: var(--primary-color);
}

.stage-status-badge.status-completed {
    background: rgba(6, 167, 125, 0.1);
    color: var(--success-color);
}

.stage-status-badge.status-waiting-input {
    background: rgba(247, 127, 0, 0.1);
    color: var(--warning-color);
}

.stage-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-size: 15px;
}

.stage-content {
    min-height: 100px;
}

.stage-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
}

.stage-loading i {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stage-output {
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.output-item {
    margin-bottom: 20px;
}

.output-item:last-child {
    margin-bottom: 0;
}

.output-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 15px;
}

.output-value {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.stage-actions {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.stage-actions.editing-actions {
    background: rgba(220, 38, 38, 0.05);
    padding: 15px;
    border-radius: 10px;
    border: 1px dashed rgba(220, 38, 38, 0.3);
}

/* Editing Mode Styles */
.stage-output.editing-mode {
    background: var(--bg-secondary);
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    padding: 15px;
}

.editable-output-textarea {
    background: var(--white) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    min-height: 200px;
    width: 100%;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.editable-output-textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    outline: none;
}

/* Dark mode editing textarea */
body.dark-mode .stage-output.editing-mode {
    background: #1a1a1a;
    border-color: #dc2626;
}

body.dark-mode .editable-output-textarea {
    background: #0f0f0f !important;
    color: #e5e5e5 !important;
    border-color: #333;
}

body.dark-mode .editable-output-textarea:focus {
    background: #0f0f0f !important;
    border-color: #dc2626;
}

.editing-notice {
    display: flex;
    align-items: center;
    gap: 10px;
}

.edited-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Dark Mode - New Content Creation Styles */
body.dark-mode .chat-input-section,
body.dark-mode .manual-selection-section,
body.dark-mode .confirmation-section {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .chat-input-section h3,
body.dark-mode .manual-selection-section h3,
body.dark-mode .confirmation-section h3 {
    color: #F9FAFB;
}

body.dark-mode .helper-text {
    color: #D1D5DB;
}

body.dark-mode .platform-card {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .platform-card span {
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .platform-card:hover {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

body.dark-mode .platform-card.selected {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.15);
}

body.dark-mode .platform-check {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .platform-card.selected .platform-check {
    background: #dc2626;
    border-color: #dc2626;
}

body.dark-mode .selected-platform-badge,
body.dark-mode .confirmation-value {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode .selected-platform-badge span {
    color: #F9FAFB;
}

body.dark-mode .creation-status-bar {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 20px;
}

body.dark-mode .creation-status-bar::before {
    background: #333;
}

body.dark-mode .status-icon {
    background: #1f1f1f;
    border-color: #333;
    color: #888;
}

body.dark-mode .status-step span {
    color: #D1D5DB;
}

body.dark-mode .status-step.active .status-icon {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

body.dark-mode .status-step.active span {
    color: #dc2626;
}

body.dark-mode .stage-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
    border: 1px solid #333;
}

body.dark-mode .stage-card.in-progress {
    border-color: #dc2626;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
    background: linear-gradient(135deg, #1a1212 0%, #0f0a0a 100%);
}

body.dark-mode .stage-card.completed {
    border-color: #f87171;
    background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
}

body.dark-mode .stage-title {
    color: #F9FAFB;
}

body.dark-mode .stage-title i {
    color: #dc2626;
}

body.dark-mode .stage-description {
    color: #D1D5DB;
}

body.dark-mode .stage-output {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .output-value {
    background: #0f0f0f;
    color: #e5e5e5;
    border: 1px solid #333;
}

body.dark-mode .stage-loading {
    color: #D1D5DB;
}

body.dark-mode .stage-loading i {
    color: #dc2626;
}

/* Responsive */
@media (max-width: 768px) {
    .platform-selector-new {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .creation-status-bar {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .creation-status-bar::before {
        display: none;
    }
    
    .status-step {
        flex: 0 0 calc(50% - 10px);
    }
    
    .selected-platforms {
        grid-template-columns: 1fr;
    }
}

/* Playbook Module Styles */
.playbook-section {
    margin-bottom: 40px;
}

.playbook-section h3 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.guidelines-content {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.guidelines-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-secondary);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.template-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 20px;
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.template-platform {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.template-actions {
    display: flex;
    gap: 5px;
}

.template-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.template-preview {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* History Module Styles */
.history-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    background: var(--background);
    padding: 20px;
    border-radius: 12px;
}

.history-records {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-record {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.record-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.record-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
}

.record-brand {
    font-weight: 600;
    color: var(--text-primary);
}

.record-platform {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.record-date {
    color: var(--text-secondary);
}

.record-actions .icon-btn i {
    transition: transform 0.3s ease;
}

.record-body {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--background);
}

.record-details {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
}

.record-request h5,
.record-response h5 {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.record-request pre {
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.record-response .content-variant {
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .history-filters {
        grid-template-columns: 1fr;
    }

    .record-details {
        grid-template-columns: 1fr;
    }

.record-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}
}

/* Dashboard Quick Actions */
.quick-action-card {
    cursor: pointer;
    text-align: center;
}

.quick-action-card .card-icon {
    font-size: 40px;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.quick-action-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* ============================================
   SEXY DARK MODE - PRO DESIGNER AESTHETIC
   ============================================ */

/* Dark Mode Variables - Dark Red Theme */
:root {
    --dark-bg-primary: #111827;
    --dark-bg-secondary: #1F2937;
    --dark-bg-tertiary: #374151;
    --dark-accent-red: #dc2626;
    --dark-accent-red-hover: #b91c1c;
    --dark-accent-red-glow: rgba(220, 38, 38, 0.15);
    --dark-accent-red-glow-strong: rgba(220, 38, 38, 0.25);
    --dark-text-primary: #F9FAFB;
    --dark-text-secondary: #D1D5DB;
    --dark-text-muted: #9CA3AF;
    --dark-border: #4B5563;
    --dark-hover: #4B5563;
    --dark-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --dark-glow: 0 0 20px var(--dark-accent-red-glow);
}

/* ============================================
   DARK MODE COMPONENT OVERRIDES
   Pure neutral backgrounds + red accent
   ============================================ */

/* App title - red accent */
body.dark-mode .app-title {
    color: var(--primary);
}

/* Icon buttons */
body.dark-mode .icon-button {
    color: var(--text-secondary);
}

body.dark-mode .icon-button:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

body.dark-mode #dark-mode-toggle i {
    color: var(--primary);
}

/* Navigation - Modern dark mode style */
body.dark-mode .nav-item {
    margin: 2px 8px;
    border-radius: 8px;
}

body.dark-mode .nav-item a {
    color: #a0a0a0;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: none;
    transition: all 0.2s ease;
}

/* Hover state - subtle glow */
body.dark-mode .nav-item:hover:not(.active) a {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%);
    color: #e0e0e0;
}

body.dark-mode .nav-item:hover:not(.active) a i {
    color: #e0e0e0;
}

/* Active state - red accent with gradient */
body.dark-mode .nav-item.active a {
    background: linear-gradient(90deg, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0.03) 100%);
    color: #f5f5f5;
    font-weight: var(--font-weight-semibold);
    border-left: none;
    box-shadow: inset 3px 0 0 var(--primary);
}

body.dark-mode .nav-item.active a i {
    color: var(--primary);
    filter: drop-shadow(0 0 4px rgba(220, 38, 38, 0.4));
}

body.dark-mode .sidebar-footer {
    background: #374151;
    border-top: 1px solid #4B5563;
}

/* Content Area - defined in main dark mode section */

body.dark-mode .module-container {
    background: linear-gradient(135deg, #1F2937 0%, #111827 100%);
    border: 1px solid #4B5563;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

body.dark-mode .module-title {
    color: #F9FAFB;
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.1);
}

body.dark-mode .module-header {
    border-bottom-color: #4B5563;
}

/* ============================================
   UNIFIED CARD ELEVATION SYSTEM - DARK MODE
   Premium: elevated surfaces with subtle highlights
   ============================================ */

body.dark-mode .card,
body.dark-mode .brand-card,
body.dark-mode .template-card,
body.dark-mode .history-record,
body.dark-mode .content-variant,
body.dark-mode .analytics-card,
body.dark-mode .module-container,
body.dark-mode .cockpit-panel {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.02),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
}

body.dark-mode .card:hover,
body.dark-mode .brand-card:hover,
body.dark-mode .template-card:hover,
body.dark-mode .analytics-card:hover {
    border-color: var(--border-strong);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Card with accent on hover */
body.dark-mode .card.accent-hover:hover,
body.dark-mode .brand-card:hover {
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 
        0 4px 20px rgba(220, 38, 38, 0.15),
        0 0 0 1px rgba(220, 38, 38, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dark-mode .card {
    background: var(--surface-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-left: 4px solid var(--dark-accent-red);
}

body.dark-mode .card-title,
body.dark-mode .card-subtitle {
    color: #D1D5DB;
}

body.dark-mode .card-value {
    color: #dc2626;
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

body.dark-mode .card-icon {
    color: #dc2626;
}

/* Buttons - Red Primary */
body.dark-mode .btn-primary {
    background: linear-gradient(45deg, var(--dark-accent-red) 0%, #b91c1c 100%);
    color: #111827;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.2);
}

body.dark-mode .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(220, 38, 38, 0.6);
}

body.dark-mode .btn-secondary {
    background: #4B5563;
    color: #F9FAFB;
    border: 1px solid #4B5563;
}

body.dark-mode .btn-secondary:hover {
    background: #374151;
    border-color: #dc2626;
}

/* Forms - Clean Modern Inputs */
body.dark-mode .form-control,
body.dark-mode textarea.form-control,
body.dark-mode select.form-control {
    background: #374151;
    border: 1px solid #4B5563;
    color: #F9FAFB;
}

body.dark-mode .form-control:focus {
    background: #1F2937;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

body.dark-mode .form-label {
    color: #F9FAFB;
    font-weight: 600;
}

/* Modals - Sleek Overlay */
body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

body.dark-mode .modal-content {
    background: #1F2937;
    border: 1px solid #4B5563;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

body.dark-mode .modal-header {
    border-bottom: 1px solid #4B5563;
}

body.dark-mode .modal-header h3 {
    color: #F9FAFB;
}

body.dark-mode .modal-footer {
    border-top: 1px solid #4B5563;
}

body.dark-mode .modal-close {
    color: #D1D5DB;
}

body.dark-mode .modal-close:hover {
    background: #4B5563;
    color: #dc2626;
}

/* Settings Tabs - Red Accent */
body.dark-mode .settings-tabs {
    border-bottom: 1px solid #4B5563;
}

body.dark-mode .settings-tab {
    color: #D1D5DB;
}

body.dark-mode .settings-tab:hover {
    background: #4B5563;
    color: #dc2626;
}

body.dark-mode .settings-tab.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
    box-shadow: 0 -2px 20px rgba(220, 38, 38, 0.2);
}

/* Platform Buttons - Modern Selection */
body.dark-mode .platform-btn {
    background: #374151;
    border: 2px solid #4B5563;
    color: #F9FAFB;
}

body.dark-mode .platform-btn:hover {
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
}

body.dark-mode .platform-btn.active {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #111827;
    border-color: #dc2626;
    font-weight: 700;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.4);
}

/* Icon Buttons - Subtle with Red Hover */
body.dark-mode .icon-btn {
    background: #4B5563;
    color: #D1D5DB;
}

body.dark-mode .icon-btn:hover {
    background: #dc2626;
    color: #111827;
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4);
}

/* Brand Cards - Clean Selection */
body.dark-mode .brand-card.selected {
    border-color: var(--primary);
    box-shadow: 
        0 0 0 1px var(--primary),
        0 4px 20px rgba(220, 38, 38, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

body.dark-mode .brand-card-name,
body.dark-mode .template-name,
body.dark-mode .variant-title {
    color: var(--text-primary);
}

body.dark-mode .brand-card-created {
    color: var(--text-disabled);
}

body.dark-mode .brand-card-guidelines,
body.dark-mode .template-preview {
    color: var(--text-secondary);
}

/* Content Areas - Backgrounds */
body.dark-mode .content-form,
body.dark-mode .content-results,
body.dark-mode .guidelines-content,
body.dark-mode .history-filters {
    background: #374151;
    border: 1px solid #4B5563;
}

body.dark-mode .variant-text {
    background: #1F2937;
    color: #F9FAFB;
    border: 1px solid #4B5563;
}

/* Tables - Modern Grid */
body.dark-mode thead {
    background: #374151;
}

body.dark-mode th {
    color: #D1D5DB;
}

body.dark-mode tbody tr:hover {
    background: #4B5563;
}

body.dark-mode td {
    color: #F9FAFB;
    border-bottom-color: #4B5563;
}

/* File Upload - Dark Mode */
body.dark-mode .file-upload-container {
    background: #1f1f1f;
    border: 2px dashed #444;
}

body.dark-mode .file-upload-container:hover {
    border-color: #dc2626;
    background: #252525;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.1);
}

body.dark-mode .file-upload-container .upload-icon {
    color: #dc2626;
}

body.dark-mode .file-upload-container .upload-text {
    color: #e0e0e0;
}

body.dark-mode .file-upload-container .upload-hint {
    color: #888;
}

body.dark-mode .uploaded-file {
    background: #374151;
    border: 1px solid #4B5563;
}

/* Chatbot - Red Accent */
/* Chat toggle button - consistent between modes */
body.dark-mode .chatbot-toggle {
    background: linear-gradient(135deg, var(--primary) 0%, #991b1b 100%);
    box-shadow: 
        0 4px 20px rgba(220, 38, 38, 0.4),
        0 0 40px rgba(220, 38, 38, 0.2);
}

body.dark-mode .chatbot-toggle:hover {
    box-shadow: 
        0 6px 30px rgba(220, 38, 38, 0.5),
        0 0 50px rgba(220, 38, 38, 0.3);
}

body.dark-mode .chatbot-window {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.dark-mode .chatbot-header {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

body.dark-mode .chatbot-header-left {
    color: white;
}

body.dark-mode .chatbot-header-left i {
    color: white;
}

body.dark-mode .chatbot-context {
    background: var(--surface-secondary);
    border-bottom: 1px solid var(--border-default);
    color: var(--text-secondary);
}

body.dark-mode .chatbot-welcome h4 {
    color: #f0f0f0;
}

body.dark-mode .chatbot-welcome p {
    color: #9CA3AF;
}

body.dark-mode .chatbot-quick-link {
    background: var(--surface-secondary);
    border-color: var(--border-default);
    color: var(--text-primary);
}

body.dark-mode .chatbot-quick-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

body.dark-mode .chatbot-quick-link i {
    color: var(--primary);
}

body.dark-mode .chatbot-quick-link:hover i {
    color: white;
}

body.dark-mode .chatbot-input-container {
    background: var(--surface-primary);
    border-top-color: var(--border-default);
}

body.dark-mode .chatbot-input {
    background: var(--surface-secondary);
    border-color: var(--border-default);
    color: var(--text-primary);
}

body.dark-mode .chatbot-input::placeholder {
    color: var(--text-disabled);
}

body.dark-mode .chatbot-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

body.dark-mode .chatbot-send-btn {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
}

body.dark-mode .chatbot-send-btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
}

body.dark-mode .chatbot-toggle {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
}

body.dark-mode .chatbot-toggle:hover {
    box-shadow: 0 6px 30px rgba(220, 38, 38, 0.6);
}

body.dark-mode .chatbot-message-text {
    background: #1f1f1f;
    color: #e5e5e5;
    border: 1px solid #333;
}

body.dark-mode .chatbot-message-user .chatbot-message-text {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
}

body.dark-mode .chatbot-messages {
    background: #0f0f0f;
}

body.dark-mode .chatbot-message-avatar {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

body.dark-mode .chatbot-message-error {
    background: #422006;
    border-left-color: #f59e0b;
}

body.dark-mode .chatbot-message-error i {
    color: #f59e0b;
}

body.dark-mode .chatbot-welcome h4 {
    color: #F9FAFB;
}

body.dark-mode .chatbot-welcome p {
    color: #D1D5DB;
}

body.dark-mode .chatbot-quick-link {
    background: #374151;
    border-color: #4B5563;
    color: #e0e0e0;
}

body.dark-mode .chatbot-quick-link:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #dc2626;
    color: #fff;
}

/* Record/History - Clean Organization */
body.dark-mode .record-body {
    background: #374151;
    border-top: 1px solid #4B5563;
}

body.dark-mode .record-request pre {
    background: #1F2937;
    color: #F9FAFB;
    border: 1px solid #4B5563;
}

body.dark-mode .record-brand {
    color: #F9FAFB;
}

body.dark-mode .record-date {
    color: #D1D5DB;
}

/* Section Headers - Clear Hierarchy */
body.dark-mode .section-header h3 {
    color: #F9FAFB;
}

body.dark-mode .section-header p {
    color: #D1D5DB;
}

/* Empty States - Friendly */
body.dark-mode .empty-state i {
    color: #4B5563;
}

body.dark-mode .empty-state h4 {
    color: #F9FAFB;
}

body.dark-mode .empty-state p {
    color: #D1D5DB;
}

/* Quick Actions */
body.dark-mode .quick-action-card .card-icon {
    color: var(--dark-accent-red);
}

body.dark-mode .quick-action-title {
    color: #F9FAFB;
}

/* Multi-select - Modern Dropdown */
body.dark-mode .multi-select-dropdown {
    background: #1a1a1a;
    border-color: #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

body.dark-mode .multi-select-option:hover {
    background: #252525;
    color: #dc2626;
}

/* Fix dropdown/select styling in dark mode */
body.dark-mode select,
body.dark-mode .planning-table select,
body.dark-mode .form-control[type="select"] {
    background: #1a1a1a !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

body.dark-mode select option,
body.dark-mode .planning-table select option {
    background: #1a1a1a;
    color: #e0e0e0;
    padding: 10px;
}

body.dark-mode select:focus,
body.dark-mode .planning-table select:focus {
    border-color: #dc2626 !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Loading States */
body.dark-mode .loading-state {
    color: #D1D5DB;
}

body.dark-mode .loading-spinner {
    border-color: rgba(220, 38, 38, 0.2);
    border-top-color: #dc2626;
}

/* Toggle Switch - Red */
body.dark-mode .toggle-switch input:checked + label {
    background-color: #dc2626;
}

/* Scrollbars - Sleek */
body.dark-mode ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #1F2937;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #4B5563;
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #dc2626;
}

/* Dark Mode Contrast Fixes for Readability */
body.dark-mode .feature-number {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
    font-weight: 700;
}

body.dark-mode .playbook-section h3 {
    color: #F9FAFB;
}

body.dark-mode .guidelines-content pre {
    color: #D1D5DB;
}

body.dark-mode .content-form h3 {
    color: #F9FAFB;
}

body.dark-mode .brand-indicator {
    background: #374151;
    color: #D1D5DB;
    border: 1px solid #4B5563;
}

body.dark-mode .feature-content h3 {
    color: #F9FAFB;
}

body.dark-mode .feature-content p {
    color: #D1D5DB;
}

/* ============================================
   ANALYTICS MODULE STYLES
   ============================================ */

.analytics-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.analytics-loading i {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.analytics-loading p {
    font-size: 16px;
}

.analytics-content {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.analytics-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    flex-shrink: 0;
}

.stat-info h3 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 5px 0;
    line-height: 1;
}

.stat-info p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

.analytics-section {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary-color);
}

.platform-stats,
.brand-stats,
.content-type-stats {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stat-item {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: #f0f2f5;
    transform: translateX(4px);
}

.stat-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-label i {
    font-size: 18px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    background: var(--primary-color);
}

.stat-percentage {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 40px;
    font-style: italic;
}

.timeline-chart {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    min-height: 200px;
}

.timeline-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    height: 200px;
    padding: 20px 0;
}

.timeline-bar-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 20px;
}

.timeline-bar {
    width: 100%;
    min-height: 30px;
    background: linear-gradient(180deg, var(--primary-color) 0%, rgba(213, 0, 50, 0.7) 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5px;
}

.timeline-bar:hover {
    background: linear-gradient(180deg, #B8002A 0%, var(--primary-color) 100%);
    transform: scaleY(1.05);
}

.timeline-count {
    font-size: 11px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.timeline-date {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 8px;
    writing-mode: horizontal-tb;
    white-space: nowrap;
    transform: rotate(-45deg);
    transform-origin: center;
}

.error-message {
    text-align: center;
    padding: 60px 20px;
}

.error-message i {
    font-size: 48px;
    color: var(--danger-color);
    margin-bottom: 20px;
}

.error-message p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 25px;
}

/* Dark Mode Analytics Styles */
body.dark-mode .stat-card {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    border-color: #4B5563;
}

body.dark-mode .stat-info h3 {
    color: #F9FAFB;
}

body.dark-mode .stat-info p {
    color: #D1D5DB;
}

body.dark-mode .analytics-section {
    background: var(--surface-primary);
    border-color: var(--border-default);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body.dark-mode .section-title {
    color: #F9FAFB;
}

body.dark-mode .stat-item {
    background: #374151;
}

body.dark-mode .stat-item:hover {
    background: #4B5563;
}

body.dark-mode .stat-label {
    color: #F9FAFB;
}

body.dark-mode .stat-value {
    color: #dc2626;
}

body.dark-mode .progress-bar {
    background: #1F2937;
}

body.dark-mode .stat-percentage {
    color: #D1D5DB;
}

body.dark-mode .no-data {
    color: #D1D5DB;
}

body.dark-mode .timeline-chart {
    background: #374151;
}

body.dark-mode .timeline-date {
    color: #D1D5DB;
}

body.dark-mode .analytics-loading {
    color: #D1D5DB;
}

body.dark-mode .analytics-loading i {
    color: #dc2626;
}

/* Analytics Quick Stats - Dark Mode */
body.dark-mode .quick-stat-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .quick-stat-card .stat-icon {
    background: rgba(220, 38, 38, 0.15) !important;
    color: #f87171 !important;
}

body.dark-mode .quick-stat-card:nth-child(1) .stat-icon {
    background: rgba(220, 38, 38, 0.15) !important;
    color: #f87171 !important;
}

body.dark-mode .quick-stat-card:nth-child(2) .stat-icon {
    background: rgba(59, 130, 246, 0.15) !important;
    color: #60a5fa !important;
}

body.dark-mode .quick-stat-card:nth-child(3) .stat-icon {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
}

body.dark-mode .quick-stat-card:nth-child(4) .stat-icon {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #a78bfa !important;
}

body.dark-mode .quick-stat-card .stat-value {
    color: #f0f0f0;
}

body.dark-mode .quick-stat-card .stat-label {
    color: #9ca3af;
}

/* Responsive Analytics */
@media (max-width: 1024px) {
    .analytics-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .analytics-summary {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .stat-info h3 {
        font-size: 28px;
    }
    
    .analytics-section {
        padding: 20px;
    }
    
    .timeline-bars {
        height: 150px;
    }
    
    .timeline-date {
        font-size: 9px;
    }
}

/* ============================================
   WEBHOOK DEBUGGER MODULE STYLES
   ============================================ */

.debugger-stage-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 15px; /* For scrollbar visibility */
}

.debugger-stage-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 0 0 220px; /* Fixed width for each card */
}

.debugger-stage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.debugger-stage-card.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(213, 0, 50, 0.05) 0%, rgba(213, 0, 50, 0.02) 100%);
}

.debugger-stage-card.success {
    border-color: var(--success-color);
    background: linear-gradient(135deg, rgba(6, 167, 125, 0.05) 0%, rgba(6, 167, 125, 0.02) 100%);
}

.debugger-stage-card.error {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.05) 0%, rgba(230, 57, 70, 0.02) 100%);
}

.debugger-stage-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.debugger-stage-card.locked:hover {
    transform: none;
    box-shadow: none;
}

.stage-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.debugger-stage-card.success .stage-number {
    background: var(--success-color);
}

.debugger-stage-card.error .stage-number {
    background: var(--danger-color);
}

.stage-info {
    flex: 1;
}

.stage-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.test-status {
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.test-status.pending {
    color: var(--text-secondary);
}

.test-status.success {
    color: var(--success-color);
}

.test-status.error {
    color: var(--danger-color);
}

.test-status.locked {
    color: var(--text-secondary);
}

.debugger-content {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.debugger-stage-details h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.debugger-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.debugger-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.debugger-section h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.debugger-section h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-block {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.code-block pre {
    margin: 0;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    overflow-x: auto;
    white-space: pre;
}

.format-guide {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.format-guide ul {
    margin: 10px 0;
    padding-left: 20px;
}

.format-guide li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.format-guide code {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 12px;
    color: #D50032;
}

.test-actions {
    text-align: center;
    margin: 30px 0;
}

.validation-errors {
    background: #FEE2E2;
    border-left: 4px solid var(--danger-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.validation-errors h5 {
    color: #856404;
    margin-bottom: 15px;
}

.validation-errors ul {
    margin: 0;
    padding-left: 20px;
}

.validation-errors li {
    color: #991B1B;
    margin-bottom: 12px;
    line-height: 1.8;
    font-weight: 500;
}

.validation-errors li::marker {
    color: var(--danger-color);
    font-size: 1.2em;
}

.fix-suggestions {
    background: #D1ECF1;
    border-left: 4px solid #0C5460;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.fix-suggestions h5 {
    color: #0C5460;
    margin-bottom: 15px;
}

.suggestion {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.suggestion:last-child {
    margin-bottom: 0;
}

.suggestion strong {
    color: #0C5460;
    display: block;
    margin-bottom: 5px;
}

/* Dark Mode Debugger Styles */
body.dark-mode .debugger-stage-card {
    background: #1F2937;
    border-color: #4B5563;
}

body.dark-mode .debugger-stage-card:hover {
    border-color: #dc2626;
}

body.dark-mode .debugger-stage-card.active {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

body.dark-mode .debugger-stage-card.success {
    border-color: var(--success-color);
    background: rgba(6, 167, 125, 0.1);
}

body.dark-mode .debugger-stage-card.error {
    border-color: var(--danger-color);
    background: rgba(230, 57, 70, 0.1);
}

body.dark-mode .debugger-stage-card.locked {
    opacity: 0.4;
}

body.dark-mode .stage-number {
    background: #dc2626;
    color: #111827;
}

body.dark-mode .stage-info h4 {
    color: #F9FAFB;
}

body.dark-mode .debugger-content {
    background: #1F2937;
    border: 1px solid #4B5563;
}

body.dark-mode .debugger-stage-details h3 {
    color: #F9FAFB;
}

body.dark-mode .debugger-section h4,
body.dark-mode .debugger-section h5 {
    color: #F9FAFB;
}

body.dark-mode .code-block {
    background: #374151;
    border-color: #4B5563;
}

body.dark-mode .code-block pre {
    color: #D1D5DB;
}

body.dark-mode .format-guide {
    background: rgba(220, 38, 38, 0.1);
    border-left-color: #dc2626;
}

body.dark-mode .format-guide code {
    background: rgba(0, 0, 0, 0.2);
    color: #dc2626;
}

body.dark-mode .validation-errors {
    background: rgba(230, 57, 70, 0.15);
    border-left-color: var(--danger-color);
}

body.dark-mode .validation-errors ul {
    color: #F87171;
}

body.dark-mode .validation-errors li {
    color: #F87171;
    font-weight: 500;
}

body.dark-mode .validation-errors li::marker {
    color: #EF4444;
}

body.dark-mode .fix-suggestions {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: #42A5F5;
}

body.dark-mode .fix-suggestions h5 {
    color: #64B5F6;
}

body.dark-mode .suggestion {
    background: #374151;
}

body.dark-mode .suggestion strong {
    color: #64B5F6;
}

/* Responsive Debugger */
@media (max-width: 768px) {
    .debugger-stage-selector {
        grid-template-columns: 1fr;
    }
    
    .debugger-content {
        padding: 20px;
    }
    
    .section-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ============================================
   DISABLED BUTTON STATES
   ============================================ */

/* Disabled buttons - clearly distinguished */
.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
}

.btn-primary:disabled,
.btn-primary[disabled] {
    background: #9CA3AF;
    color: #D1D5DB;
}

.btn-secondary:disabled,
.btn-secondary[disabled] {
    background: #E5E7EB;
    color: #9CA3AF;
}

/* Dark mode disabled buttons */
body.dark-mode .btn:disabled,
body.dark-mode .btn[disabled] {
    opacity: 0.4;
}

body.dark-mode .btn-primary:disabled,
body.dark-mode .btn-primary[disabled] {
    background: #374151;
    color: #6B7280;
}

body.dark-mode .btn-secondary:disabled,
body.dark-mode .btn-secondary[disabled] {
    background: #1F2937;
    color: #6B7280;
    border-color: #374151;
}

/* ============================================
   DEBUGGER CHAT ASSISTANT STYLES
   ============================================ */

.debugger-chat-assistant {
    background: linear-gradient(135deg, var(--background) 0%, #f0f2f5 100%);
    border-radius: 16px;
    padding: 40px;
    margin-top: 40px;
    text-align: center;
    border: 2px dashed var(--border-color);
    transition: all 0.3s ease;
}

.debugger-chat-assistant:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #f8f9fa 0%, var(--background) 100%);
    box-shadow: 0 4px 20px rgba(213, 0, 50, 0.08);
}

.debugger-chat-assistant h3 {
    font-size: 22px;
    color: var(--text-primary);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.debugger-chat-assistant h3 i {
    color: var(--primary-color);
    font-size: 28px;
}

.debugger-chat-assistant p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.debugger-chat-assistant .btn {
    margin: 0 auto;
}

/* Dark Mode Debugger Chat Assistant */
body.dark-mode .debugger-chat-assistant {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    border-color: #4B5563;
}

body.dark-mode .debugger-chat-assistant:hover {
    border-color: #dc2626;
    background: linear-gradient(135deg, #4B5563 0%, #374151 100%);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.15);
}

body.dark-mode .debugger-chat-assistant h3 {
    color: #F9FAFB;
}

body.dark-mode .debugger-chat-assistant h3 i {
    color: #dc2626;
}

body.dark-mode .debugger-chat-assistant p {
    color: #D1D5DB;
}

/* ============================================
   CHATBOT DEBUGGER MODULE STYLES
   ============================================ */

.test-summary {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    overflow-x: auto;
    padding-bottom: 15px;
}

.summary-stat {
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
    border-radius: 16px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    flex: 0 0 250px;
}

.summary-stat:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.test-suites {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.test-suite-card {
    background: var(--white);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
}

.test-suite-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.test-suite-header h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.test-suite-header p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.test-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.test-item {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.test-item.pending {
    border-color: var(--border-color);
}

.test-item.success {
    border-color: var(--success-color);
    background: rgba(6, 167, 125, 0.05);
}

.test-item.error {
    border-color: var(--danger-color);
    background: rgba(230, 57, 70, 0.05);
}

.test-item.running {
    border-color: var(--primary-color);
    background: rgba(213, 0, 50, 0.05);
    animation: pulse 2s infinite;
}

.test-info {
    display: flex;
    gap: 15px;
    flex: 1;
}

.test-status {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
}

.test-item.pending .test-status {
    background: var(--border-color);
    color: var(--text-secondary);
}

.test-item.success .test-status {
    background: var(--success-color);
    color: white;
}

.test-item.error .test-status {
    background: var(--danger-color);
    color: white;
}

.test-item.running .test-status {
    background: var(--primary-color);
    color: white;
}

.test-item.running .test-status i {
    animation: spin 1s linear infinite;
}

.test-details {
    flex: 1;
}

.test-details h4 {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.test-input {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-family: 'SFMono-Regular', Consolas, monospace;
    background: rgba(0, 0, 0, 0.03);
    padding: 8px 12px;
    border-radius: 6px;
}

.test-result-details {
    margin-top: 12px;
}

.result-success {
    color: var(--success-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.result-error {
    color: var(--danger-color);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.result-response {
    margin-top: 10px;
}

.result-response summary {
    cursor: pointer;
    color: var(--primary-color);
    font-size: 13px;
    padding: 8px;
    background: var(--background);
    border-radius: 6px;
    font-weight: 600;
}

.result-response summary:hover {
    background: rgba(213, 0, 50, 0.1);
}

.result-response pre {
    margin-top: 10px;
    background: var(--white);
    padding: 15px;
    border-radius: 8px;
    font-size: 12px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.test-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Dark Mode Chatbot Debugger Styles */
body.dark-mode .summary-stat {
    background: linear-gradient(135deg, #374151 0%, #4B5563 100%);
    border-color: #4B5563;
}

body.dark-mode .test-suite-card {
    background: #1F2937;
    border-color: #4B5563;
}

body.dark-mode .test-suite-header h3 {
    color: #F9FAFB;
}

body.dark-mode .test-suite-header p {
    color: #D1D5DB;
}

body.dark-mode .test-item {
    background: #374151;
    border-color: #4B5563;
}

body.dark-mode .test-item.success {
    border-color: var(--success-color);
    background: rgba(6, 167, 125, 0.1);
}

body.dark-mode .test-item.error {
    border-color: var(--danger-color);
    background: rgba(230, 57, 70, 0.1);
}

body.dark-mode .test-item.running {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

body.dark-mode .test-item.pending .test-status {
    background: #4B5563;
    color: #D1D5DB;
}

body.dark-mode .test-item.running .test-status {
    background: #dc2626;
    color: #111827;
}

body.dark-mode .test-details h4 {
    color: #F9FAFB;
}

body.dark-mode .test-input {
    color: #D1D5DB;
    background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .result-response summary {
    color: #dc2626;
    background: #374151;
}

body.dark-mode .result-response summary:hover {
    background: rgba(220, 38, 38, 0.1);
}

body.dark-mode .result-response pre {
    background: #1F2937;
    color: #D1D5DB;
    border-color: #4B5563;
}

/* Responsive Chatbot Debugger */
@media (max-width: 768px) {
    .test-summary {
        grid-template-columns: 1fr;
    }
    
    .test-item {
        flex-direction: column;
    }
    
    .test-actions {
        width: 100%;
    }
    
    .test-actions button {
        flex: 1;
    }
}

/* ============================================
   CONTENT TYPE SELECTION STYLES
   ============================================ */

.content-type-selector-group {
    margin-bottom: 20px;
}

.platform-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.content-type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.content-type-option {
    padding: 10px 16px;
    border: 2px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(220, 38, 38, 0.05);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    user-select: none;
}

.content-type-option i {
    font-size: 16px;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.content-type-option:hover {
    border-color: rgba(220, 38, 38, 0.6);
    background: rgba(220, 38, 38, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.15);
}

.content-type-option:hover i {
    transform: scale(1.1);
}

.content-type-option.selected {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(220, 38, 38, 0.1) 100%);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.25);
    font-weight: 700;
    color: var(--accent-color);
}

.content-type-option.selected i {
    color: var(--accent-color);
    transform: scale(1.15);
}

/* Dark Mode Content Type Options */
body.dark-mode .platform-label {
    color: #F9FAFB;
}

body.dark-mode .content-type-option {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(220, 38, 38, 0.05);
    color: #F9FAFB;
}

body.dark-mode .content-type-option i {
    color: #dc2626;
}

body.dark-mode .content-type-option:hover {
    border-color: rgba(220, 38, 38, 0.6);
    background: rgba(220, 38, 38, 0.1);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

body.dark-mode .content-type-option.selected {
    border-color: #dc2626;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.3);
    color: #dc2626;
}

body.dark-mode .content-type-option.selected i {
    color: #dc2626;
}

/* Responsive Content Type Selection */
@media (max-width: 768px) {
    .content-type-options {
        flex-direction: column;
    }
    
    .content-type-option {
        width: 100%;
        justify-content: center;
    }
}

/* Creation Status Bar - Fixed Alignment */
.creation-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 30px 0 50px 0;
    margin-bottom: 30px;
}

/* Progress Line Behind Stages */
.creation-status-bar::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 3px;
    background: linear-gradient(to right, 
        rgba(220, 38, 38, 0.3) 0%, 
        rgba(220, 38, 38, 0.1) 100%
    );
    transform: translateY(-50%);
    z-index: 0;
}

/* Each Status Step */
.status-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
    z-index: 1;
}

/* Status Icon Circle */
.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 3px solid rgba(220, 38, 38, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

/* Status Step States */
.status-step.active .status-icon {
    background: rgba(220, 38, 38, 0.2);
    border-color: #dc2626;
    color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.status-step.completed .status-icon {
    background: rgba(220, 38, 38, 0.15);
    border-color: #dc2626;
    color: #dc2626;
}

.status-step.pending .status-icon {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
}

/* Status Step Label */
.status-step span {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
}

.status-step.active span {
    color: #dc2626;
    font-weight: 600;
}

.status-step.completed span {
    color: rgba(220, 38, 38, 0.8);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(220, 38, 38, 0.5);
    }
}

/* Stage Cards Container */
.creation-stages {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Individual Stage Card */
.stage-card {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(220, 38, 38, 0.2);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.stage-card.in-progress {
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
}

.stage-card.completed {
    border-color: rgba(220, 38, 38, 0.4);
    background: rgba(220, 38, 38, 0.03);
}

/* Stage Actions */
.stage-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   FEEDBACK INPUT ANIMATION & STYLING
   ============================================ */

/* Expandable Feedback Input Animation */
@keyframes expandFeedback {
    from {
        opacity: 0;
        max-height: 0;
        transform: scaleY(0.8);
    }
    to {
        opacity: 1;
        max-height: 300px;
        transform: scaleY(1);
    }
}

.feedback-input-container {
    animation: expandFeedback 0.3s ease-out;
    transform-origin: top;
}

.feedback-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(220, 38, 38, 0.3);
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    transition: all 0.3s ease;
}

.feedback-textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .feedback-textarea {
    background: #374151;
    border-color: #4B5563;
    color: #F9FAFB;
}

body.dark-mode .feedback-textarea:focus {
    border-color: #dc2626;
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.2);
    background: #1F2937;
}

/* ============================================
   LOADING/PROCESSING BUTTON FIX
   ============================================ */

/* Processing buttons - lighter background for better visibility */
.btn-primary:disabled,
.btn-primary[disabled] {
    background: rgba(220, 38, 38, 0.7) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    opacity: 1;
}

body.dark-mode .btn-primary:disabled,
body.dark-mode .btn-primary[disabled] {
    background: rgba(220, 38, 38, 0.6) !important;
    color: #111827 !important;
    opacity: 1;
}

/* Stage loading indicator - better visibility */
.stage-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stage-loading i {
    font-size: 32px;
    color: #dc2626;
    margin-bottom: 15px;
}

body.dark-mode .stage-loading {
    color: #D1D5DB;
}

body.dark-mode .stage-loading i {
    color: #dc2626;
}

/* ============================================
   STAGE OUTPUT IMPROVED VISIBILITY
   ============================================ */

.stage-content {
    min-height: 120px;
    margin: 20px 0;
}

.stage-output {
    background: rgba(255, 255, 255, 0.5);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.2);
    animation: fadeIn 0.5s ease;
}

body.dark-mode .stage-output {
    background: #1a1a1a;
    border-color: #333;
}

.output-item {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(220, 38, 38, 0.1);
}

.output-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.output-item strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 700;
}

body.dark-mode .output-item strong {
    color: rgba(255, 255, 255, 0.95);
}

.output-value {
    background: rgba(255, 255, 255, 0.8);
    padding: 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
}

body.dark-mode .output-value {
    background: #0f0f0f;
    color: #e5e5e5;
    border: 1px solid #333;
}

/* Waiting Approval State */
.stage-status-badge.status-waiting-approval {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

body.dark-mode .stage-status-badge.status-waiting-approval {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .creation-status-bar {
        padding: 20px 0 40px 0;
    }
    
    .creation-status-bar::before {
        left: 10%;
        right: 10%;
    }
    
    .status-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .status-step span {
        font-size: 11px;
    }
    
    .feedback-input-container {
        flex-direction: column;
    }
    
    .feedback-input-container > div {
        width: 100%;
    }
    
    .feedback-input-container button {
        width: 100%;
    }
}

/* ============================================
   CONTENT PLANNER MODULE
   ============================================ */

.content-planner-container {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 80px);
    padding: 20px;
    background: var(--bg-secondary);
}

.content-planner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--bg-primary);
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.content-planner-header .header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.content-planner-header .module-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.week-navigation {
    display: flex;
    align-items: center;
    gap: 8px;
}

.week-navigation .btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.week-navigation .btn-icon:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.week-display {
    font-weight: 600;
    color: var(--text-primary);
    min-width: 180px;
    text-align: center;
    font-size: 14px;
    white-space: nowrap;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

body.dark-mode .week-display {
    background: #252525;
    border-color: #3a3a3a;
    color: #f0f0f0;
}

.content-planner-header .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.brand-selector {
    min-width: 180px;
}

/* Main Body Layout */
.content-planner-body {
    display: flex;
    gap: 20px;
    flex: 1;
    min-height: 400px;
    overflow: hidden;
}

/* Mobile cards - hidden by default on desktop */
.planner-mobile-cards {
    display: none;
}

/* Planning Table Container */
.planning-table-container {
    flex: 1;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.planning-table-wrapper {
    flex: 1;
    overflow: auto;
    padding: 15px;
    min-height: 300px;
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.planning-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-primary);
}

.planning-table th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.planning-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.planning-table tr.plan-row {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.planning-table tr.plan-row:hover {
    background: var(--bg-secondary);
}

.planning-table tr.plan-row.drop-target {
    background: rgba(220, 38, 38, 0.1);
    border-left: 3px solid var(--row-category-color, #dc2626);
}

/* Table column widths */
.col-number { width: 40px; text-align: center; }
.col-date { width: 130px; }
.col-post-type { width: 130px; }
.col-category { width: 180px; }
.col-content-type { width: 140px; }
.col-idea { min-width: 200px; }
.col-link { width: 150px; }
.col-approved { width: 70px; text-align: center; }
.col-status { width: 110px; }
.col-actions { width: 80px; }

/* Table inputs */
.planning-table input[type="text"],
.planning-table input[type="url"],
.planning-table input[type="date"],
.planning-table select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.planning-table input:focus,
.planning-table select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.1);
}

.planning-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.status-select {
    font-weight: 500;
    padding: 6px 10px !important;
    border-radius: 20px !important;
    text-align: center;
}

/* Row actions */
.planning-table td.col-actions {
    display: table-cell;
}

.planning-table td.col-actions > div,
.planning-table .row-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.planning-table .btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.planning-table .btn-icon:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.planning-table .btn-icon.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Empty table message */
.empty-table-message {
    padding: 0 !important;
}

.empty-table-message .empty-state {
    min-height: 200px;
    padding: 30px;
}

/* Table actions */
.table-actions {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* Content Toolbar */
.content-toolbar {
    width: 320px;
    min-width: 280px;
    max-width: 350px;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 350px;
}

.toolbar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 12px 12px 0 0;
}

.toolbar-header h4 {
    margin: 0 0 4px 0;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
}

.toolbar-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 12px;
}

.toolbar-categories {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    min-height: 250px;
}

.toolbar-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--text-secondary);
    text-align: center;
    padding: 30px;
}

.toolbar-placeholder i {
    font-size: 42px;
    margin-bottom: 12px;
    opacity: 0.3;
}

.toolbar-placeholder p {
    margin: 0;
    font-size: 13px;
}

/* Toolbar Category */
.toolbar-category {
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.toolbar-category.depleted {
    opacity: 0.6;
}

.category-header {
    padding: 10px 15px;
    color: white;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-content-types {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Content Type Item (Draggable) */
.content-type-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.content-type-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.content-type-item:active {
    cursor: grabbing;
}

.content-type-item.dragging {
    opacity: 0.5;
}

.content-type-item.depleted {
    opacity: 0.5;
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    cursor: not-allowed;
}

.content-type-item.depleted:hover::after {
    content: 'Weekly limit reached';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
}

.content-type-item i {
    font-size: 16px;
}

.content-type-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.usage-badge {
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.usage-badge.depleted {
    background: #9CA3AF !important;
}

/* Legend */
.content-planner-legend {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 15px 20px;
    margin-top: 15px;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.legend-section h5 {
    margin: 0 0 10px 0;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.legend-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-primary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

/* Settings - Content Planner Config */
.content-planner-config {
    max-width: 900px;
}

.content-categories-config {
    margin-top: 20px;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.categories-header h4 {
    margin: 0;
    color: var(--text-primary);
}

.categories-actions {
    display: flex;
    gap: 10px;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.category-config-card {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Compact Categories in Brand Modal */
.content-categories-section {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    margin-top: 20px;
}

.categories-compact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
}

.category-compact-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 12px 15px;
    border-left-width: 3px;
    border-left-style: solid;
}

.category-compact-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.category-toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.category-toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.category-name-text {
    font-weight: 600;
    font-size: 14px;
}

.category-compact-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-color-input {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.content-types-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.content-types-compact.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.content-type-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-primary);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
}

.content-type-compact span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-type-compact i {
    font-size: 12px;
    opacity: 0.7;
}

.content-type-limit-input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

/* Category Accordion Styles */
.categories-accordion-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.category-accordion-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.category-accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.category-accordion-header:hover {
    background: rgba(0, 0, 0, 0.03);
}

.category-accordion-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-accordion-left input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.category-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.category-accordion-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.category-type-count {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.category-accordion-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-color-input-small {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.icon-btn-small {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.icon-btn-small.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.accordion-chevron {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.accordion-chevron.rotated {
    transform: rotate(180deg);
}

.category-accordion-body {
    padding: 0 15px 15px;
    border-top: 1px solid var(--border-color);
    background: var(--white);
}

.content-types-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
}

.content-types-grid.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.content-type-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.content-type-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
}

.content-type-label i {
    width: 16px;
    text-align: center;
    color: var(--text-secondary);
}

.content-type-limit {
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-type-limit label {
    font-size: 11px;
    color: var(--text-secondary);
}

.content-type-limit input {
    width: 50px;
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.empty-types-message {
    padding: 15px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

.empty-types-message i {
    margin-right: 6px;
}

/* Dark mode for accordion categories */
body.dark-mode .category-accordion-item {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .category-accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode .category-type-count {
    background: #333;
    color: #aaa;
}

body.dark-mode .category-accordion-body {
    background: #151515;
    border-top-color: #333;
}

body.dark-mode .content-type-row {
    background: #1a1a1a;
}

body.dark-mode .content-type-limit input {
    background: #252525;
    border-color: #333;
    color: #e0e0e0;
}

/* Dark mode for compact categories */
body.dark-mode .category-compact-item {
    background: #252525;
}

body.dark-mode .content-type-compact {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .content-type-limit-input {
    background: #1f1f1f;
    border-color: #444;
    color: #e0e0e0;
}

body.dark-mode .content-categories-section {
    border-top-color: #333;
}

.category-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.category-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-name {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
}

.category-config-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-config-actions input[type="color"] {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.content-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.content-types-grid.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.content-type-config {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.content-type-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.content-type-info i {
    font-size: 16px;
}

.content-type-info span {
    font-size: 13px;
    color: var(--text-primary);
}

.content-type-limit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-type-limit label {
    font-size: 12px;
    color: var(--text-secondary);
}

.content-type-limit input {
    width: 50px;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
}

.add-content-type {
    margin-top: 10px;
}

.info-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    color: #3B82F6;
}

.info-message i {
    font-size: 20px;
}

/* Empty state for planner */
.content-planner-container .empty-state,
.planning-table-container .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    height: 100%;
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
}

.content-planner-container .empty-state i,
.planning-table-container .empty-state i {
    font-size: 56px;
    margin-bottom: 20px;
    opacity: 0.4;
    color: var(--primary-color);
}

.content-planner-container .empty-state h4,
.planning-table-container .empty-state h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.content-planner-container .empty-state p,
.planning-table-container .empty-state p {
    margin: 0;
    font-size: 14px;
    max-width: 300px;
}

/* Dark Mode adjustments */
body.dark-mode .content-planner-container {
    background: #111827;
}

body.dark-mode .content-planner-header {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Removed - see consolidated dark mode styles below */

body.dark-mode .week-navigation .btn-icon {
    background: #374151;
    border-color: #4B5563;
    color: #F3F4F6;
}

body.dark-mode .week-navigation .btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Removed - see consolidated dark mode styles below */

body.dark-mode .table-actions {
    border-color: #374151;
}

body.dark-mode .content-type-item {
    background: rgba(55, 65, 81, 0.5) !important;
}

body.dark-mode .content-type-item.depleted {
    background: #374151 !important;
    border-color: #4B5563 !important;
}

body.dark-mode .content-type-name {
    color: #F3F4F6;
}

body.dark-mode .category-config-card {
    background: #1F2937;
}

body.dark-mode .content-type-config {
    background: #374151;
}

body.dark-mode .toolbar-placeholder {
    color: #888;
}

/* Removed - see consolidated dark mode styles below */

body.dark-mode .empty-state {
    color: #9CA3AF;
}

body.dark-mode .empty-state h4 {
    color: #F3F4F6;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .content-planner-body {
        flex-direction: column;
    }
    
    .content-toolbar {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        max-height: 350px;
    }
    
    .toolbar-categories {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        min-height: auto;
    }
    
    .toolbar-category {
        flex: 1 1 280px;
        min-width: 250px;
        margin-bottom: 0;
    }
    
    .planning-table-container {
        min-height: 300px;
    }
}

@media (max-width: 900px) {
    .content-planner-container {
        padding: 15px;
    }
    
    .content-planner-header {
        padding: 12px 15px;
    }
    
    .content-planner-header .module-title {
        font-size: 1.2rem;
    }
    
    .week-display {
        min-width: 150px;
        font-size: 13px;
    }
    
    .brand-selector {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .content-planner-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .content-planner-header .header-left {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .content-planner-header .header-right {
        flex-wrap: wrap;
        justify-content: stretch;
    }
    
    .content-planner-header .header-right .btn,
    .content-planner-header .header-right .brand-selector {
        flex: 1;
        min-width: 120px;
    }
    
    .week-navigation {
        width: 100%;
        justify-content: center;
    }
    
    .week-display {
        flex: 1;
    }
    
    .content-planner-legend {
        flex-direction: column;
        gap: 15px;
        padding: 12px 15px;
    }
    
    .legend-items {
        gap: 10px;
    }
    
    .planning-table-wrapper {
        padding: 10px;
    }
    
    .planning-table {
        font-size: 12px;
    }
    
    .planning-table th,
    .planning-table td {
        padding: 6px 4px;
    }
    
    .col-link,
    .col-approved,
    .col-content-type {
        display: none;
    }
    
    .col-idea {
        min-width: 120px;
    }
    
    .toolbar-category {
        flex: 1 1 100%;
        min-width: 100%;
    }
    
    .content-toolbar {
        max-height: 280px;
    }
}

@media (max-width: 480px) {
    .content-planner-container {
        padding: 10px;
    }
    
    .content-planner-header .module-title {
        font-size: 1.1rem;
    }
    
    .week-navigation .btn-icon {
        width: 32px;
        height: 32px;
    }
    
    .week-display {
        font-size: 12px;
        min-width: 130px;
    }
    
    .planning-table {
        font-size: 11px;
    }
    
    .col-category {
        max-width: 100px;
    }
    
    .planning-table select,
    .planning-table input {
        padding: 4px 6px;
        font-size: 11px;
    }
    
    .content-planner-legend {
        font-size: 11px;
    }
    
    .legend-color {
        width: 12px;
        height: 12px;
    }
}

/* ============================================
   DEBUGGER MODULES
   ============================================ */

.debugger-module {
    max-width: 1400px;
}

.debugger-info-bar {
    display: flex;
    gap: 20px;
    padding: 12px 20px;
    background: var(--bg-primary);
    border-radius: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.debugger-info-bar .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.debugger-info-bar .status-ok {
    color: #f87171;
    font-weight: 600;
}

body.dark-mode .debugger-info-bar .status-ok {
    color: #f87171;
}

.debugger-info-bar .status-error {
    color: #EF4444;
    font-weight: 600;
}

.debugger-info-bar .status-warning {
    color: #F59E0B;
    font-weight: 600;
}

/* Debugger Layout */
.debugger-layout {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stage-navigator,
.suite-navigator {
    width: 280px;
    min-width: 250px;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
}

.stage-navigator h4,
.suite-navigator h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.stage-list,
.suite-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Stage Nav Item */
.stage-nav-item,
.suite-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
    border: 2px solid transparent;
}

.stage-nav-item:hover,
.suite-nav-item:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.stage-nav-item.active,
.suite-nav-item.active {
    border-color: var(--primary-color);
    background: rgba(var(--primary-color-rgb), 0.1);
}

.stage-nav-item.success,
.suite-nav-item.success {
    border-color: #f87171;
}

body.dark-mode .stage-nav-item.success,
body.dark-mode .suite-nav-item.success {
    border-color: #f87171;
}

.stage-nav-item.error,
.suite-nav-item.error {
    border-color: #EF4444;
}

.stage-nav-item.partial {
    border-color: #F59E0B;
}

.stage-nav-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
}

.suite-nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(var(--primary-color-rgb), 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stage-nav-content,
.suite-nav-content {
    flex: 1;
    min-width: 0;
}

.stage-nav-title,
.suite-nav-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.stage-nav-status,
.suite-nav-progress {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.suite-nav-status {
    color: #f87171;
}

body.dark-mode .suite-nav-status {
    color: #f87171;
}

.suite-nav-item.error .suite-nav-status {
    color: #EF4444;
}

/* Stage Details Panel */
.stage-details-panel,
.test-details-panel {
    flex: 1;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 25px;
    min-width: 0;
}

.stage-details-header,
.suite-details-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.stage-details-header h3,
.suite-details-header h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.stage-details-header p,
.suite-details-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.suite-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 15px;
}

/* Debugger Sections */
.debugger-section {
    margin-bottom: 25px;
}

.debugger-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.debugger-section h4,
.debugger-section h5 {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Code Block */
.code-block {
    background: #1a1a2e;
    border-radius: 10px;
    padding: 15px;
    overflow-x: auto;
    border: 1px solid #2d2d44;
}

.code-block pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    color: #e4e4e7;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Schema Table */
.schema-table {
    overflow-x: auto;
}

.schema-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.schema-table th,
.schema-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.schema-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
}

.schema-table code {
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.type-badge {
    background: #3B82F6;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

/* Test Actions */
.test-actions {
    margin: 25px 0;
    display: flex;
    justify-content: center;
}

.btn-large {
    padding: 14px 30px;
    font-size: 15px;
}

/* Test Result */
.test-result {
    border-radius: 12px;
    overflow: hidden;
}

.test-result.success {
    border: 1px solid #f87171;
}

body.dark-mode .test-result.success {
    border-color: #f87171;
}

.test-result.error {
    border: 1px solid #EF4444;
}

.result-header {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.result-header.success {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

body.dark-mode .result-header.success {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.result-header.error {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.result-header small {
    margin-left: auto;
    font-weight: 400;
    opacity: 0.7;
}

.error-list {
    padding: 15px 20px;
    background: rgba(239, 68, 68, 0.05);
}

.error-list h5 {
    margin: 0 0 10px 0;
    color: #EF4444;
}

.error-list ul {
    margin: 0;
    padding-left: 20px;
}

.error-list li {
    margin-bottom: 5px;
    color: var(--text-primary);
}

.response-section {
    padding: 15px 20px;
}

.result-meta {
    padding: 10px 20px;
    background: var(--bg-secondary);
    font-size: 12px;
    color: var(--text-secondary);
}

/* Test List */
.test-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-item {
    background: var(--bg-secondary);
    border-radius: 10px;
    padding: 15px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.test-item.success {
    border-color: #f87171;
}

body.dark-mode .old-test-item.success {
    border-color: #f87171;
}

.test-item.error {
    border-color: #EF4444;
}

.test-item-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.test-status-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.test-item.success .test-status-icon {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

body.dark-mode .test-item.success .test-status-icon {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.test-item.error .test-status-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

.test-info {
    flex: 1;
}

.test-input {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.test-expectation {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.expectation-tag {
    font-size: 11px;
    background: rgba(var(--primary-color-rgb), 0.1);
    color: var(--primary-color);
    padding: 2px 8px;
    border-radius: 4px;
}

.test-result-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.result-success {
    color: #f87171;
    font-weight: 500;
}

.result-error {
    color: #EF4444;
    font-weight: 500;
}

.response-details {
    margin-top: 10px;
}

.response-details summary {
    cursor: pointer;
    font-size: 12px;
    color: var(--primary-color);
}

.response-details pre {
    margin-top: 8px;
    padding: 12px;
    background: #1a1a2e;
    border-radius: 8px;
    font-size: 11px;
    overflow-x: auto;
    color: #e4e4e7;
}

/* Stats */
.debugger-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    flex: 1;
    min-width: 100px;
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.stat-card.success {
    border-bottom: 3px solid #f87171;
}

.stat-card.error {
    border-bottom: 3px solid #EF4444;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Live Console */
.live-console {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
}

.live-console h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.console-input {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.console-input input {
    flex: 1;
}

.console-output {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: #1a1a2e;
    border-radius: 10px;
    padding: 15px;
}

.console-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: #6B7280;
}

.console-placeholder i {
    font-size: 36px;
    margin-bottom: 10px;
}

.console-message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
}

.console-message.user {
    background: rgba(59, 130, 246, 0.15);
    border-left: 3px solid #3B82F6;
}

.console-message.bot {
    background: rgba(248, 113, 113, 0.15);
    border-left: 3px solid #f87171;
}

.console-message.error {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #EF4444;
}

.message-label {
    font-size: 11px;
    font-weight: 600;
    color: #9CA3AF;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.message-content {
    color: #E4E4E7;
    font-size: 13px;
    line-height: 1.5;
}

.message-actions {
    margin-top: 8px;
    font-size: 12px;
    color: #9CA3AF;
}

.action-tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    color: #A78BFA;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 6px;
    font-size: 11px;
}

.console-raw {
    margin-top: 10px;
}

.console-raw summary {
    cursor: pointer;
    font-size: 11px;
    color: #6B7280;
}

.console-raw pre {
    margin-top: 8px;
    font-size: 10px;
    color: #9CA3AF;
}

/* Dark mode adjustments */
body.dark-mode .debugger-info-bar,
body.dark-mode .stage-navigator,
body.dark-mode .suite-navigator,
body.dark-mode .stage-details-panel,
body.dark-mode .test-details-panel,
body.dark-mode .stat-card,
body.dark-mode .live-console {
    background: #1F2937;
}

body.dark-mode .stage-nav-item,
body.dark-mode .suite-nav-item,
body.dark-mode .test-item {
    background: #374151;
}

body.dark-mode .schema-table th {
    background: #374151;
}

/* Responsive */
@media (max-width: 900px) {
    .debugger-layout {
        flex-direction: column;
    }
    
    .stage-navigator,
    .suite-navigator {
        width: 100%;
    }
    
    .stage-list,
    .suite-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .debugger-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stage-list,
    .suite-list {
        grid-template-columns: 1fr;
    }
    
    .debugger-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 22px;
    }
}

/* ============================================
   COCKPIT DASHBOARD STYLES
   ============================================ */

.cockpit-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Header Strip - contained in card */
.cockpit-header {
    background: var(--surface-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.cockpit-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.cockpit-title i {
    color: var(--primary);
    font-size: 16px;
}

.cockpit-readiness {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

.readiness-label {
    font-size: 10px;
    font-weight: var(--font-weight-semibold);
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.readiness-bar {
    width: 100px;
    height: 6px;
    background: var(--border-default);
    border-radius: 3px;
    overflow: hidden;
}

.readiness-fill {
    height: 100%;
    background: var(--semantic-warning);
    border-radius: 3px;
    transition: width 1.2s ease-out;
    width: 0%; /* Start at 0 for animation */
}

.readiness-fill.complete {
    background: var(--semantic-success);
}

.readiness-value {
    font-size: 13px;
    font-weight: var(--font-weight-bold);
    color: var(--semantic-warning);
    min-width: 36px;
}

.cockpit-readiness:has(.readiness-fill.complete) .readiness-value {
    color: var(--semantic-success);
}

/* Main Grid */
.cockpit-grid {
    display: grid;
    grid-template-columns: 320px 1fr 280px;
    gap: 20px;
    margin-bottom: 20px;
}

/* Panel Base - unified card treatment */
.cockpit-panel {
    background: var(--surface-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

/* Dark mode panels with elevation */
body.dark-mode .cockpit-panel {
    background: var(--surface-primary);
    border-color: var(--border-default);
    box-shadow: var(--shadow-card), var(--card-highlight);
}

.panel-header {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.panel-header i {
    color: var(--primary-color);
    font-size: 14px;
}

/* Checklist Panel */
.checklist {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid #555;
    transition: all 0.2s ease;
}

.checklist-item.ok {
    border-left-color: #f87171;
}

.checklist-item.warning {
    border-left-color: #fbbf24;
}

.checklist-item.error {
    border-left-color: #ef4444;
}

.checklist-item.neutral {
    border-left-color: #6b7280;
}

.checklist-indicator {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.checklist-item.ok .checklist-indicator {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

.checklist-item.warning .checklist-indicator {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.checklist-item.error .checklist-indicator {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.checklist-item.neutral .checklist-indicator {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

.checklist-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checklist-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.checklist-value {
    font-size: 11px;
    color: var(--text-secondary);
}

.checklist-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 16px 16px;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #991b1b 100%);
    color: white;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.checklist-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

/* Launch Panel */
.launch-buttons {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.launch-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.launch-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    transform: translateX(4px);
}

.launch-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.launch-btn.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #991b1b 100%);
    border: none;
    color: white;
}

.launch-btn.primary:hover:not(:disabled) {
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
    transform: translateX(4px);
}

.launch-btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.launch-btn.primary .launch-btn-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.launch-btn-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.launch-btn-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.launch-btn.primary .launch-btn-title {
    color: white;
}

.launch-btn-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.launch-btn.primary .launch-btn-desc {
    color: rgba(255, 255, 255, 0.7);
}

.launch-btn-arrow {
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.2s ease;
}

.launch-btn:hover .launch-btn-arrow {
    opacity: 1;
    transform: translateX(0);
}

.launch-btn.primary .launch-btn-arrow {
    color: rgba(255, 255, 255, 0.7);
}

/* Access Panel */
.subsystem-grid {
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.subsystem-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subsystem-btn:hover {
    border-color: var(--primary-color);
    background: rgba(220, 38, 38, 0.05);
}

.subsystem-btn i {
    font-size: 20px;
    color: var(--primary-color);
}

.subsystem-btn span {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

.subsystem-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.subsystem-btn.disabled:hover {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.subsystem-btn.disabled i {
    color: var(--text-secondary);
}

body.dark-mode .subsystem-btn.disabled:hover {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

/* System Indicators */
.system-indicators {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.indicator {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #6b7280;
}

.indicator i {
    font-size: 12px;
}

.indicator.active {
    color: var(--semantic-success);
    background: var(--semantic-success-light);
}

.indicator.clickable {
    cursor: pointer;
    transition: all 0.15s ease;
}

.indicator.clickable:hover {
    background: var(--surface-hover);
    transform: translateY(-1px);
}

.indicator.clickable.active:hover {
    background: var(--semantic-success-light);
}

/* Status Bar */
.cockpit-statusbar {
    background: var(--surface-secondary);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.statusbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.statusbar-item i {
    color: var(--text-disabled);
    font-size: 12px;
}

/* Dark mode cockpit */
body.dark-mode .cockpit-header {
    background: linear-gradient(135deg, #141414 0%, #1a1a1a 100%);
    border-color: #2a2a2a;
}

body.dark-mode .cockpit-title {
    color: #a0a0a0;
}

body.dark-mode .cockpit-title i {
    color: #f87171;
}

body.dark-mode .cockpit-panel {
    background: #141414;
    border-color: #2a2a2a;
}

body.dark-mode .panel-header {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.08) 0%, transparent 100%);
    border-bottom-color: #2a2a2a;
}

body.dark-mode .panel-header i {
    color: #f87171;
}

body.dark-mode .checklist-action {
    background: linear-gradient(135deg, #1a1a1a 0%, #dc2626 100%);
}

body.dark-mode .checklist-action:hover {
    background: linear-gradient(135deg, #252525 0%, #ef4444 100%);
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
}

body.dark-mode .checklist-item {
    background: #1a1a1a;
}

body.dark-mode .launch-btn {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .launch-btn:hover:not(:disabled) {
    background: #1f1f1f;
    border-color: #dc2626;
}

body.dark-mode .subsystem-btn {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .subsystem-btn:hover {
    background: rgba(220, 38, 38, 0.1);
}

body.dark-mode .indicator {
    background: #1a1a1a;
    color: var(--text-disabled);
}

body.dark-mode .indicator.active {
    color: var(--semantic-success);
    background: var(--semantic-success-light);
}

body.dark-mode .indicator.clickable:hover {
    background: var(--surface-hover);
}

body.dark-mode .cockpit-statusbar {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1a1a 100%);
    border-color: #2a2a2a;
}

/* Dark mode checklist colors */
body.dark-mode .checklist-item.ok {
    border-left-color: #f87171;
}

body.dark-mode .checklist-item.ok .checklist-indicator {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

body.dark-mode .checklist-item.warning {
    border-left-color: #fbbf24;
}

body.dark-mode .checklist-item.warning .checklist-indicator {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

body.dark-mode .checklist-item.error {
    border-left-color: #f87171;
}

body.dark-mode .checklist-item.error .checklist-indicator {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

body.dark-mode .checklist-item.neutral {
    border-left-color: #6b7280;
}

body.dark-mode .checklist-item.neutral .checklist-indicator {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

body.dark-mode .checklist-label {
    color: #e0e0e0;
}

body.dark-mode .checklist-value {
    color: #9ca3af;
}

body.dark-mode .readiness-bar {
    background: #2a2a2a;
}

body.dark-mode .readiness-fill {
    background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%);
}

body.dark-mode .readiness-fill.complete {
    background: linear-gradient(90deg, #dc2626 0%, #f87171 100%);
}

body.dark-mode .readiness-value {
    color: #fbbf24;
}

body.dark-mode .readiness-fill.complete ~ .readiness-value,
body.dark-mode .cockpit-readiness:has(.readiness-fill.complete) .readiness-value {
    color: #f87171;
}

body.dark-mode .launch-btn-icon {
    background: rgba(255, 255, 255, 0.05);
    color: #f87171;
}

body.dark-mode .launch-btn-title {
    color: #f0f0f0;
}

body.dark-mode .launch-btn-desc {
    color: #9ca3af;
}

body.dark-mode .subsystem-btn i {
    color: #f87171;
}

body.dark-mode .subsystem-btn span {
    color: #e0e0e0;
}

body.dark-mode .statusbar-item {
    color: #6b7280;
}

body.dark-mode .statusbar-item i {
    color: #4b5563;
}

/* ============================================
   MODULE CONTROL PANEL
   ============================================ */

.cockpit-modules-panel {
    background: var(--surface-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 16px;
}

.module-toggle-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 14px;
    position: relative;
    transition: all 0.3s ease;
}

.module-toggle-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

.module-toggle-card.enabled {
    border-color: rgba(16, 185, 129, 0.3);
}

.module-toggle-card.disabled {
    opacity: 0.6;
}

.module-toggle-card.restricted {
    opacity: 0.5;
    border-color: rgba(239, 68, 68, 0.3);
}

.module-toggle-card.restricted .module-toggle-icon {
    opacity: 0.5;
}

.toggle-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.toggle-switch.disabled input {
    cursor: not-allowed;
}

.restricted-badge {
    font-size: 10px;
    color: #ef4444;
    font-weight: 600;
    margin-left: 4px;
}

.module-status-light.restricted {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

.module-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.module-toggle-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.module-toggle-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.module-toggle-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.module-toggle-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    transition: 0.3s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Status Light */
.module-status-light {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.module-status-light.on {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}

.module-status-light.off {
    background: rgba(255, 255, 255, 0.2);
}

/* Dark mode adjustments */
body.dark-mode .cockpit-modules-panel {
    background: #141414;
    border-color: #2a2a2a;
}

body.dark-mode .module-toggle-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .module-toggle-card:hover {
    background: #1f1f1f;
}

/* Responsive cockpit */
@media (max-width: 1200px) {
    .cockpit-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .access-panel {
        grid-column: span 2;
    }
    
    .subsystem-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .system-indicators {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .cockpit-grid {
        grid-template-columns: 1fr;
    }
    
    .access-panel {
        grid-column: span 1;
    }
    
    .subsystem-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cockpit-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .cockpit-readiness {
        width: 100%;
        justify-content: center;
    }
    
    .cockpit-statusbar {
        flex-direction: column;
        gap: 8px;
    }
}

/* ============================================
   LEGACY DASHBOARD STYLES (kept for compatibility)
   ============================================ */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #5a1020 50%, #1a0a10 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
}

.current-brand-badge {
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.15);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.brand-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
}

/* Setup Banner */
.setup-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    padding: 16px 24px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.setup-banner-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.setup-banner-content i {
    font-size: 24px;
    color: #F59E0B;
}

.setup-banner-content strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.setup-banner-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Main Actions */
.dashboard-main-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.main-action-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.main-action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
    border-color: var(--primary-color);
}

.main-action-card.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #991b1b 100%);
    border: none;
    color: white;
}

.main-action-card.primary:hover {
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.3);
}

.main-action-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.main-action-card.primary .main-action-icon {
    background: rgba(255,255,255,0.2);
    color: white;
}

.main-action-content {
    flex: 1;
}

.main-action-content h2 {
    margin: 0 0 6px;
    font-size: 1.3rem;
    font-weight: 700;
}

.main-action-card.primary .main-action-content h2 {
    color: white;
}

.main-action-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.main-action-card.primary .main-action-content p {
    color: rgba(255,255,255,0.8);
}

.main-action-arrow {
    font-size: 20px;
    color: var(--text-secondary);
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.main-action-card:hover .main-action-arrow {
    opacity: 1;
    transform: translateX(0);
}

.main-action-card.primary .main-action-arrow {
    color: rgba(255,255,255,0.7);
}

/* Secondary Actions */
.dashboard-secondary-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.secondary-action-card {
    flex: 1;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.secondary-action-card:hover {
    border-color: var(--primary-color);
    background: rgba(220, 38, 38, 0.03);
}

.secondary-action-card i {
    font-size: 24px;
    color: var(--primary-color);
}

.secondary-action-card span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

/* Dark mode for new dashboard elements */
body.dark-mode .setup-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.02) 100%);
    border-color: rgba(245, 158, 11, 0.2);
}

body.dark-mode .main-action-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .main-action-card:hover {
    border-color: #dc2626;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

body.dark-mode .main-action-card.primary {
    background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
}

body.dark-mode .main-action-icon {
    background: rgba(255,255,255,0.05);
}

body.dark-mode .main-action-content h2 {
    color: #f0f0f0;
}

body.dark-mode .secondary-action-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .secondary-action-card:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: #dc2626;
}

body.dark-mode .secondary-action-card span {
    color: #f0f0f0;
}

/* Responsive dashboard */
@media (max-width: 768px) {
    .dashboard-main-actions {
        grid-template-columns: 1fr;
    }
    
    .dashboard-secondary-actions {
        flex-wrap: wrap;
    }
    
    .secondary-action-card {
        min-width: calc(50% - 10px);
    }
    
    .setup-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .setup-banner-content {
        flex-direction: column;
    }
}

/* Status Cards */
.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.status-card {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.status-card.success {
    border-left: 4px solid #dc2626;
}

.status-card.warning {
    border-left: 4px solid #F59E0B;
}

.status-card.neutral {
    border-left: 4px solid var(--border-color);
}

.status-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.status-card.success .status-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.status-card.warning .status-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.status-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.status-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.status-action {
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.status-action:hover {
    text-decoration: underline;
}

/* Section Title */
.section-title {
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.action-card {
    background: var(--bg-primary);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.action-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.action-card.primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7a1030 100%);
    border: none;
}

.action-card.primary .action-content h3,
.action-card.primary .action-content p,
.action-card.primary .action-arrow {
    color: #fff;
}

.action-card.primary .action-icon {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: var(--bg-secondary);
    color: var(--primary-color);
    flex-shrink: 0;
}

.action-content {
    flex: 1;
}

.action-content h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.action-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.action-arrow {
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.action-card:hover .action-arrow {
    transform: translateX(4px);
    color: var(--primary-color);
}

/* Dashboard Columns */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 900px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

.dashboard-section {
    background: var(--bg-primary);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.section-heading {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-heading i {
    color: var(--primary-color);
}

/* Tip Cards */
.tip-card {
    display: flex;
    gap: 15px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.tip-card:hover {
    border-color: var(--border-color);
}

.tip-card.highlight {
    background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1) 0%, rgba(var(--primary-color-rgb), 0.05) 100%);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
}

.tip-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.tip-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tip-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.tip-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.tip-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.tip-link:hover {
    text-decoration: underline;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text-secondary);
}

.activity-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-platform {
    font-weight: 500;
    color: var(--text-primary);
    text-transform: capitalize;
}

.activity-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.view-all-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
    padding: 10px;
    background: var(--bg-secondary);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s;
}

.view-all-link:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}

.empty-activity {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.empty-activity i {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.4;
}

.empty-activity p {
    margin: 0 0 15px 0;
}

.start-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.start-link:hover {
    text-decoration: underline;
}

/* ============================================
   DARK MODE - PURE NEUTRAL + RED ACCENT
   Premium: precision, not drama
   ============================================ */

body.dark-mode {
    /* Override CSS variables for dark mode */
    --bg-base: #0f0f0f;
    --bg-elevated: #1a1a1a;
    --bg-sunken: #0a0a0a;
    
    --surface-primary: #1a1a1a;
    --surface-secondary: #141414;
    --surface-hover: #242424;
    
    --border-light: #262626;
    --border-default: #333333;
    --border-strong: #404040;
    
    --text-primary: #f5f5f5;
    --text-secondary: #a3a3a3;
    --text-disabled: #525252;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03);
    
    /* Card top-edge highlight for elevation */
    --card-highlight: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    
    background: #0f0f0f;
    color: var(--text-primary);
}

/* Dark mode content area - pure neutral, slightly more spacious */
body.dark-mode .content-area {
    background: var(--bg-base);
    padding: var(--space-10) calc(var(--space-10) + 8px);
}

/* Dark mode sidebar - elevated, card-like */
body.dark-mode .sidebar {
    background: #141414;
    border-right: 1px solid #262626;
    box-shadow: var(--card-highlight);
}

/* Dark mode header */
body.dark-mode .top-header {
    background: #141414;
    border-bottom: 1px solid #262626;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* Module container */
body.dark-mode .module-container {
    background: var(--surface-primary);
    border: 1px solid var(--border-default);
    box-shadow: 
        0 4px 24px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Navigation styles defined earlier in dark mode section */

/* Cards */
body.dark-mode .card,
body.dark-mode .brand-card,
body.dark-mode .template-card,
body.dark-mode .history-record,
body.dark-mode .content-variant {
    background: linear-gradient(135deg, #1f1f1f 0%, #151515 100%);
    border: 1px solid #2a2a2a;
}

body.dark-mode .card:hover,
body.dark-mode .brand-card:hover {
    border-color: #dc2626;
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.15);
}

/* Primary button - Red accent */
body.dark-mode .btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

body.dark-mode .btn-primary:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.5);
    transform: translateY(-2px);
}

/* Secondary button */
body.dark-mode .btn-secondary {
    background: #252525;
    color: #e0e0e0;
    border: 1px solid #3a3a3a;
}

body.dark-mode .btn-secondary:hover {
    background: #303030;
    border-color: #dc2626;
    color: #fff;
}

/* Form controls */
body.dark-mode .form-control,
body.dark-mode textarea.form-control,
body.dark-mode select.form-control,
body.dark-mode input[type="text"],
body.dark-mode input[type="url"],
body.dark-mode input[type="date"],
body.dark-mode input[type="number"] {
    background: #1a1a1a;
    border: 1px solid #333;
    color: #f0f0f0;
}

body.dark-mode .form-control:focus,
body.dark-mode textarea.form-control:focus,
body.dark-mode select.form-control:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
    background: #151515;
}

body.dark-mode .form-control::placeholder {
    color: #666;
}

body.dark-mode .form-label {
    color: #e0e0e0;
}

/* Tables - FIX WHITE TABLES */
body.dark-mode table,
body.dark-mode .planning-table,
body.dark-mode .schema-table table {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode table thead,
body.dark-mode .planning-table thead,
body.dark-mode .schema-table thead {
    background: #252525;
}

body.dark-mode table th,
body.dark-mode .planning-table th,
body.dark-mode .schema-table th {
    background: #252525;
    color: #999;
    border-color: #333;
}

body.dark-mode table td,
body.dark-mode .planning-table td,
body.dark-mode .schema-table td {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #e0e0e0;
}

body.dark-mode table tr:hover td,
body.dark-mode .planning-table tr:hover td {
    background: #222;
}

/* Settings tabs */
body.dark-mode .settings-tabs {
    border-bottom: 1px solid #2a2a2a;
}

body.dark-mode .settings-tab {
    color: #999;
}

body.dark-mode .settings-tab:hover {
    background: #252525;
    color: #ff6b6b;
}

body.dark-mode .settings-tab.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

/* Modals */
body.dark-mode .modal-overlay {
    background: rgba(0, 0, 0, 0.9);
}

body.dark-mode .modal-content {
    background: linear-gradient(135deg, #1f1f1f 0%, #151515 100%);
    border: 1px solid #2a2a2a;
}

body.dark-mode .modal-header {
    border-bottom-color: #2a2a2a;
}

body.dark-mode .modal-header h3 {
    color: #f5f5f5;
}

body.dark-mode .modal-footer {
    border-top-color: #2a2a2a;
}

/* Alerts */
body.dark-mode .alert {
    border: 1px solid;
}

body.dark-mode .alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

body.dark-mode .alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fcd34d;
}

body.dark-mode .alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

body.dark-mode .alert-danger {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
    color: #fca5a5;
}

/* Dashboard dark mode */
body.dark-mode .dashboard-hero {
    background: linear-gradient(135deg, #dc2626 0%, #450a0a 50%, #0d0d0d 100%);
}

body.dark-mode .status-card {
    background: linear-gradient(135deg, #1f1f1f 0%, #151515 100%);
    border: 1px solid #2a2a2a;
}

body.dark-mode .status-card.success {
    border-left: 4px solid #dc2626;
}

body.dark-mode .status-card.success .status-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

body.dark-mode .status-card.warning {
    border-left: 4px solid #F59E0B;
}

body.dark-mode .status-card.warning .status-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

body.dark-mode .status-card.neutral {
    border-left: 4px solid #444;
}

body.dark-mode .status-card.neutral .status-icon {
    background: #252525;
    color: #888;
}

body.dark-mode .status-icon {
    background: #252525;
    color: #888;
}

body.dark-mode .status-label {
    color: #777;
}

body.dark-mode .status-value {
    color: #f0f0f0;
}

body.dark-mode .status-action {
    color: #dc2626;
}

body.dark-mode .action-card {
    background: linear-gradient(135deg, #1f1f1f 0%, #151515 100%);
    border: 1px solid #2a2a2a;
}

body.dark-mode .action-card:hover {
    border-color: #dc2626;
    box-shadow: 0 12px 30px rgba(220, 38, 38, 0.2);
    transform: translateY(-3px);
}

body.dark-mode .action-card.primary {
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    border: none;
    box-shadow: 0 8px 25px rgba(185, 28, 28, 0.3);
}

body.dark-mode .action-card.primary:hover {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 12px 35px rgba(220, 38, 38, 0.4);
}

body.dark-mode .action-card.primary .action-icon {
    background: rgba(255,255,255,0.15);
    color: #fff;
}

body.dark-mode .action-icon {
    background: #252525;
    color: #dc2626;
}

body.dark-mode .action-content h3 {
    color: #f0f0f0;
}

body.dark-mode .action-content p {
    color: #888;
}

body.dark-mode .action-arrow {
    color: #666;
}

body.dark-mode .action-card:hover .action-arrow {
    color: #dc2626;
}

body.dark-mode .section-title h2 {
    color: #e0e0e0;
}

body.dark-mode .dashboard-section {
    background: linear-gradient(135deg, #1f1f1f 0%, #151515 100%);
    border: 1px solid #2a2a2a;
}

body.dark-mode .section-heading {
    color: #e0e0e0;
}

body.dark-mode .section-heading i {
    color: #dc2626;
}

body.dark-mode .tip-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .tip-card:hover {
    border-color: #3a3a3a;
}

body.dark-mode .tip-card.highlight {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(220, 38, 38, 0.25);
}

body.dark-mode .tip-number {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
}

body.dark-mode .tip-icon {
    background: #252525;
    color: #dc2626;
}

body.dark-mode .tip-content h4 {
    color: #f0f0f0;
}

body.dark-mode .tip-content p {
    color: #888;
}

body.dark-mode .tip-link {
    color: #dc2626;
}

body.dark-mode .activity-item {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .activity-icon {
    background: #252525;
    color: #888;
}

body.dark-mode .activity-platform {
    color: #e0e0e0;
}

body.dark-mode .activity-time {
    color: #666;
}

body.dark-mode .view-all-link {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #dc2626;
}

body.dark-mode .view-all-link:hover {
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

body.dark-mode .empty-activity {
    color: #666;
}

body.dark-mode .empty-activity i {
    color: #444;
}

body.dark-mode .start-link {
    color: #dc2626;
}

/* Content Planner dark mode fixes */
body.dark-mode .content-planner-container {
    background: linear-gradient(180deg, #0d0d0d 0%, #150808 100%);
}

body.dark-mode .content-planner-header {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .week-navigation .btn-icon {
    background: #252525;
    border-color: #3a3a3a;
    color: #e0e0e0;
}

body.dark-mode .week-navigation .btn-icon:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

body.dark-mode .planning-table-container,
body.dark-mode .content-toolbar,
body.dark-mode .content-planner-legend {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .toolbar-header {
    background: #222;
    border-color: #333;
}

body.dark-mode .toolbar-header h4 {
    color: #f0f0f0;
}

body.dark-mode .planning-table input,
body.dark-mode .planning-table select {
    background: #252525;
    border-color: #3a3a3a;
    color: #f0f0f0;
}

body.dark-mode .planning-table input:focus,
body.dark-mode .planning-table select:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.15);
}

body.dark-mode .planning-table tr.plan-row:hover {
    background: #222;
}

body.dark-mode .planning-table .btn-icon {
    color: #888;
}

body.dark-mode .planning-table .btn-icon:hover {
    background: #333;
    color: #dc2626;
}

body.dark-mode .table-actions {
    border-color: #2a2a2a;
}

body.dark-mode .content-type-item {
    background: rgba(40, 40, 40, 0.5) !important;
}

body.dark-mode .content-type-name {
    color: #e0e0e0;
}

body.dark-mode .legend-section h5 {
    color: #999;
}

body.dark-mode .legend-item {
    color: #ccc;
}

/* Debugger dark mode fixes */
body.dark-mode .debugger-info-bar {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .stage-navigator,
body.dark-mode .suite-navigator {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .stage-details-panel,
body.dark-mode .test-details-panel {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .stage-nav-item,
body.dark-mode .suite-nav-item {
    background: #222;
}

body.dark-mode .stage-nav-item:hover,
body.dark-mode .suite-nav-item:hover {
    background: #2a2a2a;
}

body.dark-mode .stage-nav-item.active,
body.dark-mode .suite-nav-item.active {
    border-color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
}

body.dark-mode .stage-nav-number {
    background: #dc2626;
}

body.dark-mode .suite-nav-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

body.dark-mode .stage-nav-title,
body.dark-mode .suite-nav-title {
    color: #e0e0e0;
}

body.dark-mode .code-block {
    background: #0d0d0d;
    border-color: #2a2a2a;
}

body.dark-mode .code-block pre {
    color: #d4d4d4;
}

body.dark-mode .schema-table th {
    background: #222;
    color: #999;
}

body.dark-mode .schema-table td {
    background: #1a1a1a;
}

body.dark-mode .schema-table code {
    background: rgba(220, 38, 38, 0.15);
    color: #ff6b6b;
}

body.dark-mode .test-item {
    background: #222;
}

body.dark-mode .test-input {
    color: #e0e0e0;
}

body.dark-mode .expectation-tag {
    background: rgba(220, 38, 38, 0.15);
    color: #ff6b6b;
}

body.dark-mode .stat-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .stat-value {
    color: #f0f0f0;
}

body.dark-mode .live-console {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .console-output {
    background: #0d0d0d;
}

body.dark-mode .console-message.user {
    background: rgba(59, 130, 246, 0.1);
    border-left-color: #3B82F6;
}

body.dark-mode .console-message.bot {
    background: rgba(248, 113, 113, 0.1);
    border-left-color: #f87171;
}

/* Category config dark mode */
body.dark-mode .category-config-card {
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
}

body.dark-mode .content-type-config {
    background: #222;
}

body.dark-mode .content-type-limit input {
    background: #1a1a1a;
    border-color: #333;
    color: #f0f0f0;
}

/* Empty states */
body.dark-mode .empty-state {
    color: #888;
}

body.dark-mode .empty-state h4 {
    color: #ccc;
}

body.dark-mode .empty-state i {
    color: #dc2626;
    opacity: 0.5;
}

/* Text utilities */
body.dark-mode .text-muted {
    color: #666 !important;
}

body.dark-mode .text-success {
    color: #f87171 !important;
}

body.dark-mode .text-error,
body.dark-mode .text-danger {
    color: #EF4444 !important;
}

/* Scrollbars */
body.dark-mode ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

body.dark-mode ::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Selection color */
body.dark-mode ::selection {
    background: rgba(220, 38, 38, 0.3);
    color: #fff;
}

/* ============================
   Notifications Dropdown
   ============================ */
.notifications-wrapper {
    position: relative;
}

.notifications-btn {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 480px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.notifications-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(5px);
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.notifications-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.notifications-header .btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
}

.notifications-header .btn-link:hover {
    text-decoration: underline;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notifications-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.notifications-empty i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.4;
    color: var(--primary-color);
}

.notifications-empty p {
    margin: 0;
    font-size: 13px;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.notification-item:hover {
    background: var(--bg-secondary);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.notification-item.brand_created .notification-icon,
.notification-item.brand_updated .notification-icon {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.notification-item.content_created .notification-icon,
.notification-item.plan_saved .notification-icon {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.notification-item.feedback_submitted .notification-icon {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.notification-item.error .notification-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}

.notification-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Notifications Dark Mode */
body.dark-mode .notifications-dropdown {
    background: #1a1a1a;
    border-color: #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

body.dark-mode .notifications-header {
    background: #222;
    border-color: #333;
}

body.dark-mode .notifications-header h4 {
    color: #f0f0f0;
}

body.dark-mode .notification-item {
    border-color: #2a2a2a;
}

body.dark-mode .notification-item:hover {
    background: #222;
}

body.dark-mode .notification-message {
    color: #e0e0e0;
}

body.dark-mode .notification-time {
    color: #888;
}

body.dark-mode .notifications-empty {
    color: #888;
}

body.dark-mode .notifications-empty i {
    color: #dc2626;
}

body.dark-mode .notification-badge {
    background: #dc2626;
}

body.dark-mode .notifications-header .btn-link {
    color: #dc2626;
}

body.dark-mode .notifications-header .btn-link:hover {
    color: #f87171;
}

/* Dark mode notification icon overrides - all use red/neutral palette */
body.dark-mode .notification-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

body.dark-mode .notification-item.navigation .notification-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

body.dark-mode .notification-item.brand_created .notification-icon,
body.dark-mode .notification-item.brand_updated .notification-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

body.dark-mode .notification-item.content_created .notification-icon,
body.dark-mode .notification-item.plan_saved .notification-icon,
body.dark-mode .notification-item.content_plan_saved .notification-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

body.dark-mode .notification-item.feedback_submitted .notification-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

body.dark-mode .notification-item.app_started .notification-icon {
    background: rgba(220, 38, 38, 0.15);
    color: #f87171;
}

body.dark-mode .notification-item.dark_mode_toggled .notification-icon {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

body.dark-mode .notification-item.analytics_viewed .notification-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

/* ============================
   Unified Debugger Styles
   ============================ */
.debugger-unified-module {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.debugger-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.debugger-header .header-left .module-title {
    margin: 0 0 5px;
}

.debugger-header .module-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.debugger-header .header-right {
    display: flex;
    gap: 10px;
}

/* Progress Bar Section */
.debugger-progress-section {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.progress-stats {
    font-size: 13px;
    color: var(--text-secondary);
}

.progress-bar-container {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4a4a4a, #dc2626);
    border-radius: 6px;
    transition: width 0.5s ease;
}

body.dark-mode .progress-bar-fill {
    background: linear-gradient(90deg, #333, #dc2626);
}

.progress-percent {
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
}

body.dark-mode .progress-percent {
    color: #f87171;
}

/* Status Cards */
.debugger-status-cards {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.status-mini-card {
    background: var(--white);
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color);
}

.status-mini-card i {
    font-size: 14px;
}

.status-mini-card.connected {
    border-color: #f87171;
}

.status-mini-card.connected i {
    color: #f87171;
}

.status-mini-card.disconnected {
    border-color: #EF4444;
}

.status-mini-card.disconnected i {
    color: #EF4444;
}

/* Tabs */
.debugger-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid var(--border-color);
}

.debugger-tab {
    background: none;
    border: none;
    padding: 14px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
}

.debugger-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.debugger-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.debugger-tab i {
    font-size: 16px;
}

.mini-progress {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.mini-progress.partial {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.mini-progress.complete {
    background: rgba(248, 113, 113, 0.15);
    color: #f87171;
}

/* Tab Content */
.debugger-tab-content {
    background: var(--white);
    border-radius: 0 0 12px 12px;
    border: 1px solid var(--border-color);
    border-top: none;
    min-height: 500px;
}

/* Content Debugger */
.debugger-content-section {
    padding: 25px;
}

.stage-progress-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    overflow-x: auto;
    padding-bottom: 10px;
}

.stage-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    flex: 1;
    min-width: 80px;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.stage-progress-item:hover {
    opacity: 1;
}

.stage-progress-item.active {
    opacity: 1;
}

.stage-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.stage-progress-item.active .stage-dot {
    border-color: #dc2626;
    background: #dc2626;
    color: white;
}

.stage-progress-item.passed .stage-dot {
    background: #f87171;
    border-color: #f87171;
    color: white;
}

.stage-progress-item.failed .stage-dot {
    background: #EF4444;
    border-color: #EF4444;
    color: white;
}

.stage-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
}

.stage-progress-item.active .stage-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Stage Detail Panel */
.stage-detail-panel {
    background: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
}

.stage-detail {
    padding: 20px;
}

.stage-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.stage-detail-header h3 {
    margin: 0 0 5px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stage-detail-header h3 i {
    color: #dc2626;
}

.stage-detail-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Payload Section */
.payload-section,
.test-result-section {
    margin-bottom: 20px;
}

.payload-section .section-header,
.test-result-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.payload-section h4,
.test-result-section h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    padding: 15px;
    font-size: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
    overflow-x: auto;
    max-height: 300px;
    overflow-y: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Test Result Section */
.test-result-section {
    border-radius: 8px;
    padding: 15px;
}

.test-result-section.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.test-result-section.error {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.result-status {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-result-section.success .result-status {
    color: #f87171;
}

.test-result-section.error .result-status {
    color: #EF4444;
}

.result-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.result-errors {
    margin-bottom: 15px;
}

.error-item {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 6px;
    font-size: 13px;
    color: #EF4444;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Chatbot Debugger */
.debugger-chatbot-section {
    display: flex;
    min-height: 500px;
}

.suite-nav {
    width: 220px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 15px;
    flex-shrink: 0;
}

.suite-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.suite-nav-item:hover {
    background: var(--white);
    color: var(--text-primary);
}

.suite-nav-item.active {
    background: var(--white);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.suite-nav-item span:first-of-type {
    flex: 1;
}

.suite-progress {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--bg-secondary);
}

.suite-nav-item.active .suite-progress {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

body.dark-mode .suite-nav-item.active .suite-progress {
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
}

/* Suite Tests Panel */
.suite-tests-panel {
    flex: 1;
    padding: 20px;
}

.suite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.suite-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.suite-header h3 i {
    color: var(--primary-color);
}

body.dark-mode .suite-header h3 i {
    color: #f87171;
}

.test-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.test-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.test-item.passed {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.05);
}

.test-item.failed {
    border-color: #EF4444;
    background: rgba(239, 68, 68, 0.05);
}

.test-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.test-item.passed .test-icon {
    background: #f87171;
    color: white;
}

.test-item.failed .test-icon {
    background: #EF4444;
    color: white;
}

.test-content {
    flex: 1;
    min-width: 0;
}

.test-input {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.test-response {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Dark Mode for Unified Debugger */
body.dark-mode .debugger-progress-section {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .progress-bar-container {
    background: #333;
}

body.dark-mode .status-mini-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .debugger-tabs {
    border-color: #333;
}

body.dark-mode .debugger-tab:hover {
    background: #252525;
}

body.dark-mode .debugger-tab.active {
    color: #dc2626;
    border-bottom-color: #dc2626;
}

body.dark-mode .debugger-tab-content {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .stage-detail-panel {
    background: #151515;
}

body.dark-mode .stage-detail-header h3 i {
    color: #f87171;
}

body.dark-mode .section-header h4 i {
    color: #f87171;
}

body.dark-mode .stage-dot {
    background: #252525;
    border-color: #333;
}

body.dark-mode .stage-progress-item.active .stage-dot {
    background: #dc2626;
    border-color: #dc2626;
    color: white;
}

body.dark-mode .code-block {
    background: #0d0d0d;
}

body.dark-mode .suite-nav {
    background: #151515;
    border-color: #2a2a2a;
}

body.dark-mode .suite-nav-item:hover {
    background: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .suite-nav-item.active {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid #dc2626;
    color: #f87171;
    font-weight: 600;
}

body.dark-mode .suite-nav-item.active i {
    color: #f87171;
}

body.dark-mode .test-item {
    background: #1f1f1f;
    border-color: #2a2a2a;
}

body.dark-mode .test-item.passed {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

body.dark-mode .test-item.passed .test-icon {
    background: #f87171;
    color: #000;
}

body.dark-mode .test-item.failed {
    border-color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

body.dark-mode .test-item.failed .test-icon {
    background: #f87171;
    color: #000;
}

body.dark-mode .test-icon {
    background: #252525;
}

body.dark-mode .mini-progress {
    background: #252525;
}

body.dark-mode .mini-progress.complete {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

body.dark-mode .mini-progress.partial {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* Dark mode for stage progress dots */
body.dark-mode .stage-progress-item.passed .stage-dot {
    background: #f87171;
    border-color: #f87171;
    color: #000;
}

body.dark-mode .stage-progress-item.failed .stage-dot {
    background: #f87171;
    border-color: #f87171;
    color: #000;
}

body.dark-mode .stage-progress-item .stage-label {
    color: #888;
}

body.dark-mode .stage-progress-item.active .stage-label {
    color: #f87171;
}

body.dark-mode .stage-progress-item.passed .stage-label {
    color: #f87171;
}

/* Dark mode test results */
body.dark-mode .test-result-section.success {
    background: rgba(52, 211, 153, 0.08);
    border-color: rgba(52, 211, 153, 0.3);
}

body.dark-mode .test-result-section.success .result-status {
    color: #f87171;
}

body.dark-mode .test-result-section.error {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.3);
}

body.dark-mode .test-result-section.error .result-status {
    color: #f87171;
}

/* Dark mode status cards in debugger */
body.dark-mode .status-mini-card.connected {
    border-color: #f87171;
}

body.dark-mode .status-mini-card.connected i {
    color: #f87171;
}

body.dark-mode .status-mini-card.disconnected {
    border-color: #f87171;
}

body.dark-mode .status-mini-card.disconnected i {
    color: #f87171;
}

/* Responsive Debugger */
@media (max-width: 900px) {
    .debugger-chatbot-section {
        flex-direction: column;
    }
    
    .suite-nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        display: flex;
        overflow-x: auto;
        padding: 10px;
        gap: 5px;
    }
    
    .suite-nav-item {
        white-space: nowrap;
        margin-bottom: 0;
    }
    
    .stage-progress-bar {
        overflow-x: auto;
    }
}

@media (max-width: 600px) {
    .debugger-unified-module {
        padding: 15px;
    }
    
    .debugger-header {
        flex-direction: column;
    }
    
    .debugger-tabs {
        overflow-x: auto;
    }
    
    .debugger-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
}

/* ============================
   Analytics Dashboard Styles
   ============================ */
.analytics-page {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.analytics-header .header-left .module-title {
    margin: 0 0 5px 0;
}

.analytics-header .module-subtitle {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.analytics-header .header-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.analytics-header .header-right select {
    min-width: 150px;
}

.analytics-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: var(--text-secondary);
}

.analytics-loading .loading-spinner {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.analytics-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quick-stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
}

.quick-stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.quick-stat-card .stat-content {
    flex: 1;
}

.quick-stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.quick-stat-card .stat-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.analytics-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.analytics-charts-grid.three-cols {
    grid-template-columns: repeat(3, 1fr);
}

.analytics-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.analytics-card.full-width {
    grid-column: 1 / -1;
}

.analytics-card .card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.analytics-card .card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.analytics-card .card-header h3 i {
    color: var(--primary-color);
}

.analytics-card .card-body {
    padding: 20px;
}

.chart-container {
    min-height: 200px;
}

/* Activity Chart */
.activity-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 180px;
    padding-bottom: 30px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar-stack {
    flex: 1;
    width: 100%;
    max-width: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
}

.bar {
    border-radius: 4px 4px 0 0;
    min-height: 0;
    transition: height 0.3s ease;
}

.bar.bar-plans {
    background: var(--primary-color);
}

.bar.bar-feedback {
    background: #F59E0B;
}

.bar-label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-top: 8px;
    text-transform: uppercase;
}

.chart-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.plans {
    background: var(--primary-color);
}

.legend-dot.feedback {
    background: #F59E0B;
}

/* Distribution */
.distribution-container {
    min-height: 200px;
}

.distribution-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-row .legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-row .legend-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.legend-row .legend-value {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Stats List */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-row .stat-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-row .stat-name {
    font-size: 13px;
    color: var(--text-primary);
}

.stat-row .stat-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.stat-bar-wrapper {
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.stat-bar.secondary {
    background: #3B82F6;
}

/* Feedback Summary */
.feedback-summary .empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.feedback-summary .empty-state i {
    font-size: 32px;
    margin-bottom: 10px;
    opacity: 0.5;
}

.feedback-stats {
    display: flex;
    gap: 20px;
    align-items: center;
}

.feedback-total {
    text-align: center;
    padding: 15px 25px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.feedback-total .number {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.feedback-total .label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.priority-breakdown {
    display: flex;
    gap: 15px;
    flex: 1;
}

.priority-item {
    text-align: center;
    padding: 10px 15px;
    border-radius: 8px;
    flex: 1;
}

.priority-item.high {
    background: rgba(239, 68, 68, 0.1);
}

.priority-item.medium {
    background: rgba(245, 158, 11, 0.1);
}

.priority-item.low {
    background: rgba(16, 185, 129, 0.1);
}

.priority-count {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.priority-item.high .priority-count { color: #EF4444; }
.priority-item.medium .priority-count { color: #F59E0B; }
.priority-item.low .priority-count { color: #f87171; }

.priority-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Planner Overview */
.planner-overview .empty-state {
    text-align: center;
    padding: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.planner-overview .empty-state i {
    font-size: 48px;
    color: var(--text-disabled);
    margin-bottom: 8px;
}

.planner-overview .empty-state p {
    margin: 0 0 16px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.planner-overview .empty-state .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, #991b1b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.planner-overview .empty-state .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.35);
}

body.dark-mode .planner-overview .empty-state i {
    color: #4a4a4a;
}

body.dark-mode .planner-overview .empty-state p {
    color: #888;
}

body.dark-mode .planner-overview .empty-state .btn {
    background: linear-gradient(135deg, #dc2626 0%, #7f1d1d 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

body.dark-mode .planner-overview .empty-state .btn:hover {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    box-shadow: 0 6px 24px rgba(220, 38, 38, 0.4);
}

.planner-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.planner-metric {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 15px;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.metric-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-progress {
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.metric-progress .progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.metric-progress .progress-fill.approval {
    background: #f87171;
}

.metric-progress .progress-fill.published {
    background: var(--primary-color);
}

/* Empty/Error States */
.empty-state,
.error-state {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
}

.error-state i {
    font-size: 40px;
    color: #EF4444;
    margin-bottom: 15px;
}

.error-state h3 {
    margin: 0 0 10px;
    color: var(--text-primary);
}

.empty-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: var(--text-secondary);
}

/* Analytics Dark Mode */
body.dark-mode .analytics-page {
    background: transparent;
}

body.dark-mode .quick-stat-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .quick-stat-card .stat-value {
    color: #f0f0f0;
}

body.dark-mode .analytics-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

body.dark-mode .analytics-card .card-header {
    background: #222;
    border-color: #333;
}

body.dark-mode .analytics-card .card-header h3 {
    color: #f0f0f0;
}

body.dark-mode .analytics-card .card-header h3 i {
    color: #f87171;
}

body.dark-mode .bar-label {
    color: #888;
}

body.dark-mode .chart-legend {
    border-color: #333;
}

body.dark-mode .legend-item {
    color: #aaa;
}

body.dark-mode .legend-row .legend-name {
    color: #e0e0e0;
}

body.dark-mode .legend-row .legend-value {
    color: #999;
}

body.dark-mode .stat-row .stat-name,
body.dark-mode .stat-row .stat-count {
    color: #e0e0e0;
}

body.dark-mode .stat-bar-wrapper {
    background: #333;
}

body.dark-mode .feedback-total {
    background: #222;
}

body.dark-mode .priority-item.high {
    background: rgba(239, 68, 68, 0.15);
}

body.dark-mode .priority-item.medium {
    background: rgba(245, 158, 11, 0.15);
}

body.dark-mode .priority-item.low {
    background: rgba(16, 185, 129, 0.15);
}

body.dark-mode .planner-metric {
    background: #222;
}

body.dark-mode .metric-label {
    color: #999;
}

body.dark-mode .metric-value {
    color: #f0f0f0;
}

body.dark-mode .metric-progress {
    background: #333;
}

/* Responsive Analytics */
@media (max-width: 1200px) {
    .analytics-charts-grid.three-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .analytics-charts-grid.three-cols .analytics-card:last-child {
        grid-column: 1 / -1;
    }
    
    .planner-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .analytics-page {
        padding: 15px;
    }
    
    .analytics-header {
        flex-direction: column;
    }
    
    .analytics-charts-grid,
    .analytics-charts-grid.three-cols {
        grid-template-columns: 1fr;
    }
    
    .analytics-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .planner-metrics {
        grid-template-columns: 1fr 1fr;
    }
    
    .feedback-stats {
        flex-direction: column;
    }
}

/* ============================================
   COMPREHENSIVE RESPONSIVE OPTIMIZATION
   Breakpoints: 1400px, 1200px, 1024px, 768px, 480px
   ============================================ */

/* Extra Large Screens (1400px+) */
@media (min-width: 1400px) {
    .content-area {
        padding: 40px 60px;
    }
    
    .cockpit-dashboard {
        max-width: 1600px;
    }
    
    .module-container {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Large Screens (1200px - 1400px) */
@media (max-width: 1400px) {
    .cockpit-grid {
        grid-template-columns: 300px 1fr 260px;
        gap: 16px;
    }
    
    .launch-btn {
        padding: 16px;
    }
    
    .launch-btn-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }
}

/* Medium-Large Screens (1024px - 1200px) */
@media (max-width: 1200px) {
    .content-area {
        padding: 24px 20px;
    }
    
    .cockpit-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .status-panel {
        grid-column: span 1;
    }
    
    .launch-panel {
        grid-column: span 1;
    }
    
    .access-panel {
        grid-column: span 2;
    }
    
    .subsystem-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .checklist-item {
        padding: 10px;
    }
    
    .analytics-charts-grid {
        grid-template-columns: 1fr;
    }
    
    .analytics-charts-grid.three-cols {
        grid-template-columns: 1fr 1fr;
    }
}

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    /* Sidebar collapses */
    .sidebar {
        width: 70px;
        overflow: hidden;
    }
    
    .sidebar .nav-item span,
    .sidebar .sidebar-footer {
        display: none;
    }
    
    .sidebar .nav-item a {
        justify-content: center;
        padding: 14px;
    }
    
    .sidebar .nav-item i {
        margin: 0;
        font-size: 20px;
    }
    
    .content-area {
        margin-left: 70px;
        padding: 20px 16px;
    }
    
    .cockpit-dashboard {
        padding: 0;
    }
    
    .cockpit-header {
        padding: 12px 16px;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .cockpit-title {
        font-size: 11px;
    }
    
    .cockpit-readiness {
        padding: 6px 12px;
    }
    
    .readiness-bar {
        width: 80px;
    }
    
    .panel-header {
        padding: 12px 16px;
        font-size: 10px;
    }
    
    .launch-btn {
        padding: 14px;
        gap: 12px;
    }
    
    .launch-btn-title {
        font-size: 14px;
    }
    
    .launch-btn-desc {
        font-size: 11px;
    }
    
    .subsystem-btn {
        padding: 12px 8px;
    }
    
    .subsystem-btn span {
        font-size: 11px;
    }
    
    .cockpit-statusbar {
        padding: 10px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .statusbar-item {
        font-size: 10px;
    }
    
    /* Settings */
    .settings-container {
        flex-direction: column;
    }
    
    .settings-tabs {
        flex-direction: row;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 0;
        gap: 0;
    }
    
    .settings-tab {
        padding: 12px 20px;
        border-bottom: 2px solid transparent;
        border-left: none;
        white-space: nowrap;
    }
    
    .settings-tab.active {
        border-bottom-color: var(--primary);
        border-left: none;
    }
    
    /* Analytics */
    .analytics-quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .planner-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Modals */
    .modal-content {
        width: 95%;
        max-width: 600px;
        margin: 20px auto;
        max-height: calc(100vh - 40px);
    }
}

/* Mobile Landscape / Small Tablet (768px and below) */
@media (max-width: 768px) {
    /* Header */
    .top-header {
        height: 55px;
        padding: 0 12px;
    }
    
    .app-title {
        font-size: 18px;
    }
    
    #global-search {
        display: none;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .icon-button {
        padding: 8px;
        font-size: 18px;
    }
    
    /* Sidebar becomes drawer */
    .sidebar {
        position: fixed;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        box-shadow: 4px 0 20px rgba(0,0,0,0.2);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar .nav-item span,
    .sidebar .sidebar-footer {
        display: block;
    }
    
    .sidebar .nav-item a {
        justify-content: flex-start;
        padding: 14px 20px;
    }
    
    .content-area {
        margin-left: 0;
        padding: 16px 12px;
        padding-top: 70px;
    }
    
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Cockpit Dashboard */
    .cockpit-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .status-panel,
    .launch-panel,
    .access-panel {
        grid-column: span 1;
    }
    
    .cockpit-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .cockpit-readiness {
        width: 100%;
        justify-content: center;
    }
    
    .checklist {
        padding: 12px;
        gap: 6px;
    }
    
    .checklist-item {
        padding: 10px;
        gap: 10px;
    }
    
    .checklist-indicator {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
    
    .checklist-label {
        font-size: 12px;
    }
    
    .checklist-value {
        font-size: 10px;
    }
    
    .launch-buttons {
        padding: 12px;
        gap: 10px;
    }
    
    .launch-btn {
        padding: 12px;
    }
    
    .launch-btn-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .subsystem-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 12px;
        gap: 8px;
    }
    
    .subsystem-btn {
        padding: 14px 10px;
    }
    
    .system-indicators {
        padding: 10px 12px;
        gap: 8px;
    }
    
    .indicator {
        padding: 6px 10px;
        font-size: 9px;
    }
    
    .cockpit-statusbar {
        padding: 10px 12px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    /* Cards */
    .card {
        padding: 16px;
    }
    
    .brand-card {
        padding: 16px;
    }
    
    /* Analytics */
    .analytics-page {
        padding: 12px;
    }
    
    .analytics-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .analytics-quick-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .quick-stat-card {
        padding: 14px;
    }
    
    .analytics-charts-grid.three-cols {
        grid-template-columns: 1fr;
    }
    
    /* Content Planner */
    .planner-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    
    .planner-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .planner-table {
        min-width: 800px;
    }
    
    /* Create Content - Enhanced Mobile */
    .content-form-container {
        grid-template-columns: 1fr;
    }
    
    .platform-selector {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .platform-btn {
        padding: 16px;
        font-size: 15px;
    }
    
    .platform-btn i {
        font-size: 22px;
    }
    
    .content-form {
        padding: 20px 16px;
    }
    
    .content-form h3 {
        font-size: 18px;
        margin-bottom: 16px;
    }
    
    .content-form .form-control {
        font-size: 16px;
        padding: 14px;
    }
    
    .content-form textarea.form-control {
        min-height: 120px;
        font-size: 16px;
    }
    
    .btn-large {
        width: 100%;
        padding: 18px 24px;
        font-size: 16px;
        border-radius: 12px;
    }
    
    .manual-selection-btn {
        width: 100%;
        padding: 16px;
        font-size: 15px;
    }
    
    /* Stage cards on mobile */
    .stage-card {
        padding: 16px;
    }
    
    .stage-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .stage-title {
        font-size: 15px;
    }
    
    .stage-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .stage-actions .btn {
        flex: 1;
        min-width: 120px;
        padding: 12px;
        font-size: 13px;
    }
    
    /* Brand dropdown on create content */
    .brand-selector-dropdown {
        width: 100%;
    }
    
    /* Create content hero section */
    .creation-hero {
        padding: 24px 16px;
        text-align: center;
    }
    
    .creation-hero h2 {
        font-size: 22px;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .creation-hero p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .idea-input-container {
        padding: 0;
    }
    
    .idea-input-container textarea {
        font-size: 15px;
        padding: 14px;
        min-height: 100px;
    }
    
    .creation-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .creation-actions .btn {
        width: 100%;
        padding: 16px;
        font-size: 15px;
    }
    
    /* Debugger */
    .debugger-container {
        flex-direction: column;
    }
    
    .debugger-sidebar {
        width: 100%;
        max-height: 200px;
        overflow-x: auto;
        flex-direction: row;
    }
    
    .debugger-main {
        padding: 16px;
    }
    
    /* Modals */
    .modal-content {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        max-height: 100vh;
    }
    
    .modal-header {
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .modal-footer {
        position: sticky;
        bottom: 0;
    }
    
    /* Chatbot */
    .chatbot-window {
        width: calc(100% - 20px);
        height: calc(100vh - 100px);
        right: 10px;
        bottom: 80px;
        max-height: none;
    }
    
    .chatbot-toggle {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
}

/* Mobile Portrait (480px and below) */
@media (max-width: 480px) {
    .mobile-menu-toggle {
        top: 8px;
        left: 8px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .top-header {
        height: 50px;
        padding: 0 10px 0 52px;
    }
    
    .app-title {
        font-size: 14px;
    }
    
    .header-actions {
        gap: 4px;
    }
    
    .icon-button {
        padding: 6px;
        font-size: 16px;
    }
    
    .content-area {
        padding: 12px 8px;
        padding-top: 58px;
    }
    
    /* Cockpit */
    .cockpit-header {
        padding: 10px 12px;
    }
    
    .cockpit-title {
        font-size: 10px;
        gap: 6px;
    }
    
    .cockpit-title i {
        font-size: 14px;
    }
    
    .readiness-label {
        font-size: 9px;
    }
    
    .readiness-bar {
        width: 60px;
        height: 5px;
    }
    
    .readiness-value {
        font-size: 12px;
    }
    
    .panel-header {
        padding: 10px 12px;
        font-size: 9px;
        letter-spacing: 1px;
    }
    
    .checklist {
        padding: 10px;
    }
    
    .checklist-item {
        padding: 8px;
        gap: 8px;
    }
    
    .checklist-indicator {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
    
    .checklist-label {
        font-size: 11px;
    }
    
    .checklist-value {
        font-size: 9px;
    }
    
    .checklist-action {
        margin: 0 10px 10px;
        padding: 10px;
        font-size: 12px;
    }
    
    .launch-buttons {
        padding: 10px;
        gap: 8px;
    }
    
    .launch-btn {
        padding: 10px;
        gap: 10px;
    }
    
    .launch-btn-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .launch-btn-title {
        font-size: 13px;
    }
    
    .launch-btn-desc {
        font-size: 10px;
    }
    
    .launch-btn-arrow {
        font-size: 12px;
    }
    
    .subsystem-grid {
        padding: 10px;
        gap: 6px;
    }
    
    .subsystem-btn {
        padding: 12px 8px;
        gap: 6px;
    }
    
    .subsystem-btn i {
        font-size: 18px;
    }
    
    .subsystem-btn span {
        font-size: 10px;
    }
    
    .system-indicators {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .indicator {
        padding: 5px 8px;
        font-size: 8px;
        gap: 5px;
    }
    
    .indicator i {
        font-size: 10px;
    }
    
    .cockpit-statusbar {
        padding: 8px 10px;
        gap: 6px;
    }
    
    .statusbar-item {
        font-size: 9px;
        gap: 5px;
    }
    
    /* Analytics */
    .analytics-quick-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .planner-metrics {
        grid-template-columns: 1fr;
    }
    
    /* Settings */
    .settings-tab {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .section-header h3 {
        font-size: 18px;
    }
    
    .section-header p {
        font-size: 13px;
    }
    
    .brands-grid {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-label {
        font-size: 13px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Platform selector */
    .platform-selector {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .platform-btn {
        padding: 14px;
        font-size: 14px;
    }
    
    /* Create Content */
    .creation-hero {
        padding: 20px 12px;
    }
    
    .creation-hero h2 {
        font-size: 20px;
    }
    
    .creation-hero p {
        font-size: 13px;
    }
    
    .idea-input-container textarea {
        font-size: 14px;
        padding: 12px;
    }
    
    .content-form {
        padding: 16px 12px;
    }
    
    .stage-card {
        padding: 14px;
    }
    
    .stage-actions .btn {
        min-width: 100px;
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* Chatbot */
    .chatbot-toggle {
        width: 48px;
        height: 48px;
        font-size: 18px;
        bottom: 12px;
        right: 12px;
    }
    
    .chatbot-window {
        width: calc(100% - 16px);
        right: 8px;
        bottom: 70px;
        height: calc(100vh - 90px);
    }
    
    .chatbot-header {
        padding: 12px 14px;
    }
    
    .chatbot-header-left {
        font-size: 14px;
    }
    
    .chatbot-messages {
        padding: 12px;
    }
    
    .chatbot-input-container {
        padding: 10px 12px;
    }
    
    .chatbot-quick-link {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .chatbot-quick-actions {
        padding: 8px 12px;
        gap: 6px;
    }
    
    .chatbot-quick-btn {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* Touch-friendly adjustments */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn, 
    .nav-item a, 
    .icon-button,
    .subsystem-btn,
    .launch-btn,
    .indicator.clickable {
        min-height: 44px;
    }
    
    .checklist-item,
    .brand-card {
        min-height: 48px;
    }
    
    /* Remove hover effects on touch */
    .btn:hover,
    .card:hover,
    .nav-item:hover a,
    .launch-btn:hover {
        transform: none;
    }
    
    /* Active states for touch feedback */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    .launch-btn:active {
        transform: scale(0.98);
    }
    
    .nav-item:active a {
        opacity: 0.8;
    }
}

/* Landscape orientation specific */
@media (max-height: 500px) and (orientation: landscape) {
    .cockpit-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
    
    .checklist {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .launch-buttons {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .chatbot-window {
        height: calc(100vh - 70px);
        max-height: 300px;
    }
    
    .modal-content {
        max-height: calc(100vh - 20px);
    }
}

/* ============================================
   CONTENT PLANNER RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .content-planner-body {
        flex-direction: column;
    }
    
    .content-toolbar {
        width: 100%;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .category-section {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .content-type-icon {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .content-planner-container {
        padding: 8px;
        min-height: auto;
    }
    
    .content-planner-header {
        padding: 14px;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        border-radius: 12px;
        margin-bottom: 12px;
    }
    
    .content-planner-header .header-left {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .content-planner-header .header-right {
        flex-direction: column;
        gap: 10px;
    }
    
    .content-planner-header .module-title {
        font-size: 1.1rem;
        justify-content: center;
        text-align: center;
    }
    
    .content-planner-header .week-navigation {
        width: 100%;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
    }
    
    .content-planner-header .week-display {
        flex: 0 1 auto;
        justify-content: center;
        font-size: 13px;
        padding: 10px 16px;
        min-width: auto;
        white-space: nowrap;
        background: var(--bg-secondary);
        border-radius: 8px;
        border: 1px solid var(--border-color);
    }
    
    body.dark-mode .content-planner-header .week-display {
        background: #252525;
        border-color: #3a3a3a;
    }
    
    .content-planner-header .brand-selector,
    .content-planner-header .btn {
        width: 100%;
    }
    
    /* Reorder planner body for mobile */
    .content-planner-body {
        flex-direction: column;
        gap: 12px;
        min-height: auto;
        overflow: visible;
    }
    
    /* Hide entire table container on mobile */
    .planning-table-container {
        display: none !important;
    }
    
    .planning-table-wrapper {
        display: none !important;
    }
    
    /* Show mobile cards on mobile */
    .planner-mobile-cards {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        padding: 0;
        order: 2;
    }
    
    .planner-card {
        background: var(--bg-primary);
        border-radius: 12px;
        padding: 16px;
        border: 1px solid var(--border-color);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    body.dark-mode .planner-card {
        background: #1f1f1f;
        border-color: #333;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    }
    
    .planner-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }
    
    body.dark-mode .planner-card-header {
        border-color: #333;
    }
    
    .planner-card-number {
        font-size: 11px;
        font-weight: 700;
        color: white;
        background: var(--primary);
        padding: 4px 12px;
        border-radius: 20px;
    }
    
    body.dark-mode .planner-card-number {
        background: #dc2626;
    }
    
    .planner-card-date {
        font-weight: 600;
        color: var(--text-primary);
        font-size: 14px;
    }
    
    body.dark-mode .planner-card-date {
        color: #f0f0f0;
    }
    
    .planner-card-body {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
    
    .planner-card-field {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
    
    .planner-card-field label {
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-secondary);
        letter-spacing: 0.5px;
    }
    
    body.dark-mode .planner-card-field label {
        color: #9ca3af;
    }
    
    .planner-card-field input,
    .planner-card-field select {
        padding: 12px 14px;
        border-radius: 10px;
        border: 1px solid var(--border-color);
        background: var(--background);
        font-size: 15px;
        color: var(--text-primary);
        -webkit-appearance: none;
        appearance: none;
    }
    
    body.dark-mode .planner-card-field input,
    body.dark-mode .planner-card-field select {
        background: #1a1a1a;
        border-color: #3a3a3a;
        color: #f0f0f0;
    }
    
    .planner-card-field input:focus,
    .planner-card-field select:focus {
        border-color: var(--primary);
        outline: none;
        box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
    }
    
    .planner-card-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .planner-card-actions {
        display: flex;
        gap: 10px;
        margin-top: 14px;
        padding-top: 14px;
        border-top: 1px solid var(--border-color);
    }
    
    body.dark-mode .planner-card-actions {
        border-color: #333;
    }
    
    .planner-card-actions .btn {
        flex: 1;
        padding: 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .planner-card-actions .btn-delete {
        flex: 0 0 auto;
        padding: 12px 16px;
        background: #fee2e2;
        color: #dc2626;
        border: none;
    }
    
    body.dark-mode .planner-card-actions .btn-delete {
        background: rgba(220, 38, 38, 0.2);
        color: #f87171;
    }
    
    /* Hide toolbar on mobile - not useful without drag-drop */
    .content-toolbar {
        display: none !important;
    }
    
    /* Hide legend on mobile */
    .content-planner-legend {
        display: none !important;
    }
    
    /* Add row button */
    .add-row-btn-mobile {
        width: 100%;
        padding: 16px;
        border-radius: 12px;
        font-size: 15px;
        margin-top: 8px;
        background: var(--primary);
        color: white;
        border: none;
        font-weight: 600;
    }
    
    body.dark-mode .add-row-btn-mobile {
        background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    }
    
    /* Mobile empty state */
    .planner-mobile-cards .empty-state {
        background: var(--bg-primary);
        border-radius: 12px;
        padding: 40px 20px;
        text-align: center;
        border: 1px solid var(--border-color);
    }
    
    body.dark-mode .planner-mobile-cards .empty-state {
        background: #1f1f1f;
        border-color: #333;
    }
    
    .planner-mobile-cards .empty-state i {
        font-size: 48px;
        color: var(--primary);
        margin-bottom: 16px;
        opacity: 0.7;
    }
    
    .planner-mobile-cards .empty-state h4 {
        color: var(--text-primary);
        font-size: 16px;
        margin: 0 0 8px 0;
    }
    
    body.dark-mode .planner-mobile-cards .empty-state h4 {
        color: #f0f0f0;
    }
    
    .planner-mobile-cards .empty-state p {
        color: var(--text-secondary);
        font-size: 13px;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .content-planner-container {
        padding: 4px;
    }
    
    .content-planner-header {
        padding: 12px;
        gap: 10px;
    }
    
    .content-planner-header .module-title {
        font-size: 1rem;
    }
    
    .content-planner-header .week-display {
        font-size: 11px;
        padding: 8px 10px;
        white-space: nowrap;
    }
    
    .content-planner-header .week-navigation {
        gap: 6px;
    }
    
    .content-planner-header .week-navigation .btn-icon {
        width: 32px;
        height: 32px;
        min-width: 32px;
    }
    
    .content-planner-header .week-navigation .btn-sm {
        padding: 8px 10px;
        font-size: 11px;
    }
    
    .content-planner-header .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .planner-card {
        padding: 12px;
        border-radius: 10px;
    }
    
    .planner-card-header {
        margin-bottom: 12px;
        padding-bottom: 10px;
    }
    
    .planner-card-number {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .planner-card-date {
        font-size: 13px;
    }
    
    .planner-card-body {
        gap: 12px;
    }
    
    .planner-card-field input,
    .planner-card-field select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .planner-card-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .planner-card-actions {
        gap: 8px;
        padding-top: 12px;
        margin-top: 12px;
    }
    
    .planner-card-actions .btn {
        padding: 10px;
        font-size: 12px;
    }
    
    .add-row-btn-mobile {
        padding: 14px;
        font-size: 14px;
    }
    
    .planner-mobile-cards .empty-state {
        padding: 30px 16px;
    }
    
    .planner-mobile-cards .empty-state i {
        font-size: 40px;
    }
    
    .planner-mobile-cards .empty-state h4 {
        font-size: 15px;
    }
}

/* ============================================
   DEBUGGER RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .debugger-module {
        padding: 16px;
    }
    
    .debugger-info-bar {
        padding: 10px 16px;
        gap: 12px;
    }
    
    .debugger-progress-container {
        flex-direction: column;
        gap: 12px;
    }
    
    .debugger-stages {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .debugger-container {
        flex-direction: column;
    }
    
    .debugger-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .debugger-tab {
        white-space: nowrap;
        padding: 12px 16px;
    }
    
    .debugger-main {
        padding: 16px;
    }
    
    .debugger-stages {
        grid-template-columns: 1fr;
    }
    
    .test-card {
        padding: 16px;
    }
    
    .test-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .stage-progress-bar {
        height: 6px;
    }
}

@media (max-width: 480px) {
    .debugger-module {
        padding: 10px;
    }
    
    .debugger-info-bar {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .debugger-sidebar {
        padding: 8px;
        gap: 6px;
    }
    
    .debugger-tab {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .debugger-main {
        padding: 12px;
    }
    
    .test-card {
        padding: 12px;
    }
    
    .test-title {
        font-size: 14px;
    }
}

/* ============================================
   NOTIFICATIONS RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .notifications-dropdown {
        width: calc(100vw - 20px);
        right: 10px;
        max-height: 60vh;
    }
    
    .notification-item {
        padding: 10px 12px;
    }
    
    .notification-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .notification-content h4 {
        font-size: 13px;
    }
    
    .notification-content p {
        font-size: 11px;
    }
}

/* ============================================
   FORMS RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
    .form-group {
        margin-bottom: 14px;
    }
    
    .form-label {
        font-size: 12px;
        margin-bottom: 4px;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    textarea.form-control {
        min-height: 80px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

/* Safe area insets for notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .top-header {
        padding-top: env(safe-area-inset-top);
    }
    
    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .content-area {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
    
    .chatbot-toggle {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
    
    .chatbot-window {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }
    
    .modal-footer {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* Print styles */
@media print {
    .sidebar,
    .top-header,
    .chatbot-widget,
    .mobile-menu-toggle,
    .btn,
    .notifications-dropdown {
        display: none !important;
    }
    
    .content-area {
        margin-left: 0;
        padding: 0;
    }
    
    .card,
    .cockpit-panel {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ============================================
   NAVI TUTORIAL - TERMINAL INTERFACE
   Retro-futuristic terminal with modern touches
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap');

.navi-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.navi-tutorial-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.navi-tutorial-overlay.closing {
    opacity: 0;
}

/* Dark backdrop */
.navi-tutorial-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    transition: all 0.5s ease;
}

/* Backdrop cutout for sidebar when revealed - shows both sidebar and content */
.navi-tutorial-overlay:not(.sidebar-hidden)::before {
    background: linear-gradient(
        to right,
        transparent 0%,
        transparent var(--sidebar-width, 240px),
        rgba(0, 0, 0, 0.5) var(--sidebar-width, 240px),
        rgba(0, 0, 0, 0.5) 100%
    );
    backdrop-filter: none;
}

/* Backdrop cutout for chatbot when highlighted */
.navi-tutorial-overlay.terminal-top-left::before {
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.6) 0%,
        rgba(0, 0, 0, 0.6) calc(100% - 120px),
        rgba(0, 0, 0, 0.3) calc(100% - 120px),
        rgba(0, 0, 0, 0.3) 100%
    );
    backdrop-filter: none;
}

/* Terminal Container - Base */
.navi-terminal {
    position: absolute;
    width: 90%;
    max-width: 700px;
    height: auto;
    max-height: 70vh;
    min-height: 420px;
    background: linear-gradient(180deg, #0d0d0d 0%, #0a0a0a 100%);
    border-radius: 16px;
    border: 1px solid rgba(220, 38, 38, 0.3);
    box-shadow: 
        0 0 0 1px rgba(0, 0, 0, 0.5),
        0 25px 80px rgba(0, 0, 0, 0.8),
        0 0 100px rgba(220, 38, 38, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    z-index: 2;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: terminalAppear 0.6s ease forwards;
    animation-delay: 0.2s;
}

/* Large screen font scaling for terminal */
@media (min-width: 1400px) {
    .navi-terminal {
        max-width: 800px;
        min-height: 480px;
    }
}

@media (min-width: 1920px) {
    .navi-terminal {
        max-width: 900px;
        min-height: 520px;
    }
}

/* Terminal Position: Center (Welcome/Completion) */
.navi-tutorial-overlay.terminal-center .navi-terminal,
.navi-tutorial-overlay.sidebar-hidden .navi-terminal {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
}

/* Terminal Position: Right (Sidebar items visible) - positioned closer to sidebar */
.navi-tutorial-overlay.terminal-right .navi-terminal {
    top: 50%;
    left: calc(var(--sidebar-width, 250px) + 40px);
    right: auto;
    transform: translateY(-50%);
    max-width: calc(100vw - var(--sidebar-width, 250px) - 100px);
    width: min(700px, calc(100vw - var(--sidebar-width, 250px) - 100px));
}

/* On very large screens, keep terminal closer to sidebar */
@media (min-width: 1600px) {
    .navi-tutorial-overlay.terminal-right .navi-terminal {
        left: calc(var(--sidebar-width, 250px) + 60px);
        max-width: 800px;
        width: min(800px, 50vw);
    }
}

@media (min-width: 1920px) {
    .navi-tutorial-overlay.terminal-right .navi-terminal {
        left: calc(var(--sidebar-width, 250px) + 80px);
        max-width: 900px;
    }
}

/* Terminal Position: Top-Left (Chatbot visible in bottom-right) */
.navi-tutorial-overlay.terminal-top-left .navi-terminal {
    top: 80px;
    left: calc(var(--sidebar-width, 240px) + 30px);
    right: auto;
    bottom: auto;
    transform: none;
    max-width: calc(100vw - var(--sidebar-width, 240px) - 180px);
    max-height: calc(100vh - 200px);
}

@keyframes terminalAppear {
    from {
        opacity: 0;
        scale: 0.95;
    }
    to {
        opacity: 1;
        scale: 1;
    }
}

/* Terminal Header */
.terminal-header {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-controls {
    display: flex;
    gap: 8px;
}

.terminal-controls .control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-controls .red {
    background: #ff5f57;
    box-shadow: 0 0 6px rgba(255, 95, 87, 0.5);
}

.terminal-controls .yellow {
    background: #ffbd2e;
    box-shadow: 0 0 6px rgba(255, 189, 46, 0.5);
}

.terminal-controls .green {
    background: #28c940;
    box-shadow: 0 0 6px rgba(40, 201, 64, 0.5);
}

.terminal-title {
    flex: 1;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

.terminal-skip {
    padding: 6px 14px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

.terminal-skip:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.8);
}

/* Terminal Body */
.terminal-body {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
    position: relative;
    font-family: 'JetBrains Mono', monospace;
}

@media (min-width: 1400px) {
    .terminal-body {
        padding: 32px;
    }
}

@media (min-width: 1920px) {
    .terminal-body {
        padding: 40px;
    }
}

.terminal-body::-webkit-scrollbar {
    width: 6px;
}

.terminal-body::-webkit-scrollbar-track {
    background: transparent;
}

.terminal-body::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 3px;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 38, 38, 0.5);
}

.terminal-output {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.terminal-line {
    font-size: 16px;
    line-height: 1.7;
    animation: lineAppear 0.3s ease;
}

@keyframes lineAppear {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved red on black readability - use lighter red with better contrast */
.terminal-line.system {
    color: #f87171; /* Brighter red for better readability on black */
    font-size: 14px;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(248, 113, 113, 0.3); /* Subtle glow for better visibility */
}

.terminal-line.navi {
    color: rgba(255, 255, 255, 0.95);
}

/* Large screen font scaling for terminal content */
@media (min-width: 1400px) {
    .terminal-line {
        font-size: 17px;
    }
    .terminal-line.system {
        font-size: 15px;
    }
}

@media (min-width: 1920px) {
    .terminal-line {
        font-size: 18px;
        line-height: 1.8;
    }
    .terminal-line.system {
        font-size: 16px;
    }
}

.navi-prefix {
    color: #f87171; /* Brighter red for better readability on dark background */
    font-weight: 600;
    margin-right: 10px;
    text-shadow: 0 0 12px rgba(248, 113, 113, 0.5);
}

@media (min-width: 1400px) {
    .navi-prefix {
        font-size: 17px;
    }
}

@media (min-width: 1920px) {
    .navi-prefix {
        font-size: 18px;
    }
}

.message-text {
    color: inherit;
}

/* Blinking Cursor */
.terminal-cursor {
    width: 10px;
    height: 20px;
    background: #dc2626;
    margin-top: 12px;
    animation: cursorBlink 1s step-end infinite;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Terminal Footer */
.terminal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.key-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    animation: keyGlow 2s ease-in-out infinite;
}

@keyframes keyGlow {
    0%, 100% {
        box-shadow: 0 2px 6px rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 2px 12px rgba(220, 38, 38, 0.7), 0 0 20px rgba(220, 38, 38, 0.3);
    }
}

.terminal-progress {
    display: flex;
    align-items: center;
}

.progress-dots {
    display: flex;
    gap: 6px;
}

.progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.progress-dot.active {
    background: #dc2626;
    box-shadow: 0 0 8px rgba(220, 38, 38, 0.6);
    transform: scale(1.2);
}

.progress-dot.completed {
    background: rgba(220, 38, 38, 0.5);
}

.progress-dot:hover {
    transform: scale(1.3);
}

/* Tutorial Sidebar States */
.sidebar.tutorial-hidden {
    transform: translateX(-100%);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

.sidebar.tutorial-visible {
    transform: translateX(0);
    opacity: 1;
    z-index: 100000;
    position: relative;
    transition: transform 0.6s ease, opacity 0.4s ease;
}

/* Tutorial Highlights for Sidebar */
.sidebar.tutorial-highlight {
    animation: sidebarReveal 1s ease forwards;
}

@keyframes sidebarReveal {
    0% {
        box-shadow: none;
    }
    30% {
        box-shadow: 
            inset 0 0 0 2px rgba(220, 38, 38, 0.8),
            0 0 60px rgba(220, 38, 38, 0.5),
            0 0 100px rgba(220, 38, 38, 0.3);
    }
    100% {
        box-shadow: 
            inset 0 0 0 2px rgba(220, 38, 38, 0.3),
            0 0 30px rgba(220, 38, 38, 0.2);
    }
}

.sidebar.tutorial-spotlight,
.nav-item.tutorial-spotlight {
    position: relative;
}

.sidebar.tutorial-spotlight::after,
.nav-item.tutorial-spotlight::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(220, 38, 38, 0.08);
    border: 2px solid rgba(220, 38, 38, 0.5);
    border-radius: inherit;
    pointer-events: none;
    animation: spotlightPulse 1.5s ease-in-out infinite;
}

.nav-item.tutorial-spotlight {
    z-index: 100001;
    background: rgba(220, 38, 38, 0.15) !important;
}

.nav-item.tutorial-spotlight > a {
    color: #f87171 !important;
}

.nav-item.tutorial-spotlight::after {
    border-radius: 8px;
}

@keyframes spotlightPulse {
    0%, 100% {
        box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
        border-color: rgba(220, 38, 38, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.5), 0 0 50px rgba(220, 38, 38, 0.2);
        border-color: rgba(220, 38, 38, 0.8);
    }
}

/* Chatbot Tutorial Spotlight */
.chatbot-toggle.tutorial-spotlight {
    z-index: 100001 !important;
    animation: chatbotSpotlight 1.5s ease-in-out infinite;
}

.chatbot-toggle.tutorial-spotlight::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid rgba(220, 38, 38, 0.6);
    border-radius: 50%;
    animation: spotlightPulse 1.5s ease-in-out infinite;
}

@keyframes chatbotSpotlight {
    0%, 100% {
        box-shadow: 
            0 4px 20px rgba(220, 38, 38, 0.5),
            0 0 0 0 rgba(220, 38, 38, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 6px 30px rgba(220, 38, 38, 0.7),
            0 0 0 15px rgba(220, 38, 38, 0);
        transform: scale(1.05);
    }
}

/* ============================================
   CHATBOT DISCLAIMER OVERLAY
   Shown when chatbot is first opened
   ============================================ */
.chatbot-disclaimer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(15, 10, 10, 0.98) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 10;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.chatbot-disclaimer:hover {
    background: linear-gradient(180deg, rgba(15, 10, 10, 0.98) 0%, rgba(20, 12, 12, 0.98) 100%);
}

.chatbot-disclaimer.hidden {
    opacity: 0;
    pointer-events: none;
}

.disclaimer-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    border: 2px solid rgba(220, 38, 38, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: disclaimerPulse 2s ease-in-out infinite;
}

.disclaimer-icon i {
    font-size: 24px;
    color: #dc2626;
}

@keyframes disclaimerPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.3);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
}

.disclaimer-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    text-align: center;
}

.disclaimer-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 280px;
}

.disclaimer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #f87171;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.disclaimer-continue {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: continueBlink 2s ease-in-out infinite;
}

.disclaimer-continue i {
    font-size: 10px;
}

@keyframes continueBlink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Scanline Effect for Terminal (Optional Retro Touch) */
.terminal-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 1;
}

.terminal-output {
    position: relative;
    z-index: 2;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .navi-tutorial-overlay.terminal-right .navi-terminal {
        max-width: calc(100vw - 280px);
        right: 20px;
    }
    
    .navi-tutorial-overlay.terminal-top-left .navi-terminal {
        left: calc(var(--sidebar-width, 240px) + 20px);
        max-width: calc(100vw - var(--sidebar-width, 240px) - 140px);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* On mobile, always use full-screen overlay */
    .navi-tutorial-overlay::before {
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
    }
    
    /* Hide sidebar on mobile during tutorial */
    .sidebar.tutorial-visible {
        display: none;
    }
    
    /* Terminal always centered on mobile */
    .navi-tutorial-overlay .navi-terminal,
    .navi-tutorial-overlay.terminal-center .navi-terminal,
    .navi-tutorial-overlay.terminal-right .navi-terminal,
    .navi-tutorial-overlay.terminal-top-left .navi-terminal,
    .navi-tutorial-overlay.sidebar-hidden .navi-terminal {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: 95% !important;
        max-width: none !important;
        margin: 0 auto !important;
        max-height: 80vh;
        min-height: 60vh;
    }
    
    .navi-tutorial-overlay {
        align-items: center;
        justify-content: center;
        padding: 20px 10px;
    }

    .terminal-header {
        padding: 12px 16px;
    }

    .terminal-title {
        font-size: 11px;
    }

    .terminal-body {
        padding: 16px;
        min-height: 200px;
    }

    .terminal-line {
        font-size: 14px;
    }

    .terminal-line.system {
        font-size: 12px;
    }

    .terminal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 12px;
    }

    .progress-dot {
        width: 6px;
        height: 6px;
    }
    
    /* Chatbot highlight still visible on mobile */
    .chatbot-toggle.tutorial-spotlight {
        z-index: 100001 !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .navi-tutorial-overlay .navi-terminal {
        width: 98% !important;
        max-height: 85vh;
        border-radius: 12px;
    }
    
    .terminal-body {
        padding: 12px;
    }
    
    .terminal-line {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .terminal-line.system {
        font-size: 11px;
    }
    
    .navi-prefix {
        display: block;
        margin-bottom: 4px;
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .navi-tutorial-overlay.terminal-right .navi-terminal {
        max-width: 700px;
    }
    
    .navi-tutorial-overlay.terminal-top-left .navi-terminal {
        max-width: 750px;
    }
}

/* Loading Screen Responsive Updates */
@media (max-width: 768px) {
    .loader-continue-options {
        gap: 12px;
    }

    .continue-option {
        padding: 10px 18px;
    }

    .key-badge {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .option-text {
        font-size: 13px;
    }
}

/* ============================================
   CONTENT PLANNER TOOLTIPS & CATEGORY INFO
   ============================================ */

.category-info-icon {
    font-size: 12px;
    opacity: 0.7;
    margin-left: auto;
    cursor: help;
    transition: opacity 0.2s ease;
}

.category-info-icon:hover {
    opacity: 1;
}

body.dark-mode .category-info-icon {
    color: rgba(255, 255, 255, 0.7);
}

/* Enhanced tooltip styling for content planner */
.toolbar-category[title],
.content-type-item[title] {
    position: relative;
}

/* Custom tooltip styles for better visibility */
[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    max-width: 300px;
    white-space: normal;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    animation: tooltipFadeIn 0.2s ease forwards;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ============================================
   BRAND LOGIN MODAL
   ============================================ */

.login-overlay {
    position: fixed !important;
    inset: 0 !important;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0a0f 30%, #2a0f15 50%, #1a0a0f 70%, #0a0a0f 100%) !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 100000 !important;
    transition: opacity 0.5s ease;
    overflow: hidden !important;
}

/* Ensure login overlay cannot be hidden when no session exists */
body:not(.logged-in) .login-overlay {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Allow hiding when logged in */
body.logged-in .login-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Animated background grid */
.login-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(213, 0, 50, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(213, 0, 50, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

/* Glowing orbs */
.login-overlay::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(213, 0, 50, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: orbPulse 8s ease-in-out infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

@keyframes orbPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.login-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.login-modal {
    position: relative;
    background: linear-gradient(145deg, rgba(30, 10, 15, 0.9) 0%, rgba(15, 5, 10, 0.95) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(213, 0, 50, 0.3);
    border-radius: 24px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(213, 0, 50, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: loginSlideIn 0.5s ease;
    z-index: 1;
}

/* Glowing border effect */
.login-modal::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 25px;
    background: linear-gradient(135deg, rgba(213, 0, 50, 0.5), transparent 50%, rgba(213, 0, 50, 0.3));
    z-index: -1;
    opacity: 0.5;
}

@keyframes loginSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 36px;
}

/* Responsive adjustments for smaller screen heights - scale down instead of scroll */
@media (max-height: 700px) {
    .login-modal {
        transform: scale(0.9);
        padding: 40px;
    }
    
    .login-header {
        margin-bottom: 28px;
    }
    
    .login-logo-img {
        width: 56px;
        height: 56px;
    }
    
    .login-logo h1 {
        font-size: 24px;
    }
}

@media (max-height: 600px) {
    .login-modal {
        transform: scale(0.85);
        padding: 32px;
    }
    
    .login-header {
        margin-bottom: 20px;
    }
    
    .login-logo {
        margin-bottom: 12px;
        gap: 8px;
    }
    
    .login-logo-img {
        width: 48px;
        height: 48px;
    }
    
    .login-logo h1 {
        font-size: 20px;
    }
    
    .login-subtitle {
        font-size: 12px;
    }
    
    .login-form {
        gap: 16px;
    }
    
    .login-form .form-label {
        font-size: 12px;
        margin-bottom: 6px;
    }
    
    .login-form .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 12px;
        font-size: 14px;
    }
}

@media (max-height: 500px) {
    .login-modal {
        transform: scale(0.75);
        padding: 24px;
    }
    
    .login-header {
        margin-bottom: 16px;
    }
    
    .login-logo {
        margin-bottom: 8px;
        gap: 6px;
    }
    
    .login-logo-img {
        width: 40px;
        height: 40px;
    }
    
    .login-logo h1 {
        font-size: 18px;
    }
    
    .login-subtitle {
        font-size: 11px;
    }
    
    .login-form {
        gap: 12px;
    }
    
    .login-form .form-label {
        font-size: 11px;
        margin-bottom: 4px;
    }
    
    .login-form .form-control {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .btn-login {
        padding: 10px;
        font-size: 13px;
    }
    
    .language-selector-login {
        margin-top: 12px;
    }
    
    .lang-btn-login {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.login-logo-img {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 0 25px rgba(213, 0, 50, 0.6));
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #D50032 0%, #ff4d6d 50%, #D50032 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    text-shadow: 0 0 30px rgba(213, 0, 50, 0.3);
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .form-group {
    margin-bottom: 0;
}

.login-form .form-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    display: block;
}

.login-form .form-control {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(213, 0, 50, 0.3);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 15px;
    color: #ffffff;
    font-weight: 400;
    transition: all 0.2s ease;
}

.login-form .form-control:focus {
    border-color: #D50032;
    box-shadow: 0 0 0 3px rgba(213, 0, 50, 0.15), 0 0 20px rgba(213, 0, 50, 0.1);
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.login-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.login-form .form-control:-webkit-autofill,
.login-form .form-control:-webkit-autofill:hover,
.login-form .form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.05) inset;
    transition: background-color 5000s ease-in-out 0s;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    padding: 12px 16px;
    color: #ef4444;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    margin-top: 8px;
    position: relative;
    background: linear-gradient(135deg, #D50032 0%, #ff1744 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 20px rgba(213, 0, 50, 0.4);
    transition: all 0.3s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(213, 0, 50, 0.5);
    background: linear-gradient(135deg, #ff1744 0%, #D50032 100%);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login .btn-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(213, 0, 50, 0.2);
}

.language-selector-login {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.lang-btn-login {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(213, 0, 50, 0.1);
    border: 1px solid rgba(213, 0, 50, 0.3);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn-login:hover {
    background: rgba(213, 0, 50, 0.2);
    border-color: rgba(213, 0, 50, 0.5);
    color: white;
    transform: translateY(-1px);
}

.lang-btn-login.active {
    background: rgba(213, 0, 50, 0.3);
    border-color: #D50032;
    color: white;
    box-shadow: 0 0 15px rgba(213, 0, 50, 0.3);
}

.lang-flag-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 14px;
    flex-shrink: 0;
}

.lang-flag-small svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Mobile responsiveness for login */
@media (max-width: 768px) {
    .login-overlay {
        padding: 16px;
    }
    
    .login-modal {
        padding: 32px 24px;
        margin: 16px;
        max-width: calc(100% - 32px);
        border-radius: 20px;
    }
    
    @media (max-height: 700px) {
        .login-modal {
            transform: scale(0.9);
        }
    }
    
    @media (max-height: 600px) {
        .login-modal {
            transform: scale(0.85);
        }
    }
    
    .login-logo-img {
        width: 56px;
        height: 56px;
    }
    
    .login-logo h1 {
        font-size: 26px;
    }
    
    .login-subtitle {
        font-size: 13px;
    }
    
    .language-selector-login {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .lang-btn-login {
        flex: 1;
        min-width: 100px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .login-modal {
        padding: 24px 16px;
        margin: 12px;
        max-width: calc(100% - 24px);
        border-radius: 16px;
    }
    
    @media (max-height: 600px) {
        .login-modal {
            transform: scale(0.85);
        }
    }
    
    @media (max-height: 500px) {
        .login-modal {
            transform: scale(0.75);
        }
    }
    
    .login-header {
        margin-bottom: 28px;
    }
    
    .login-logo-img {
        width: 48px;
        height: 48px;
    }
    
    .login-logo h1 {
        font-size: 22px;
    }
    
    .login-form {
        gap: 16px;
    }
    
    .login-form .form-control {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 14px;
        font-size: 15px;
    }
    
    .login-footer {
        margin-top: 24px;
        padding-top: 20px;
    }
    
    .lang-btn-login {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .lang-flag-small {
        width: 18px;
        height: 12px;
    }
}

/* ============================================
   VIDEO WORKFLOW - Individual Stage Selection
   ============================================ */

.individual-stages-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.individual-stages-section .section-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.individual-stage-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.btn-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    min-width: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-stage:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    transform: translateY(-2px);
}

.btn-stage i {
    font-size: 18px;
    color: var(--primary-color);
}

.btn-stage span {
    font-size: 11px;
    white-space: nowrap;
}

/* ============================================
   TREND RADAR QUADRANT ICONS - Integrated Ring Design
   ============================================ */

.radar-quadrant-icons {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.quadrant-icon {
    position: absolute;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: #10b981;
    font-size: 16px;
    z-index: 10;
    pointer-events: auto;
    cursor: help;
    transition: all 0.3s ease;
    text-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.quadrant-icon:hover {
    transform: scale(1.15);
    border-color: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* Position quadrant icons on the outer ring */
.quadrant-icon.quadrant-content {
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.quadrant-icon.quadrant-content:hover {
    transform: translateX(-50%) translateY(-50%) scale(1.15);
}

.quadrant-icon.quadrant-platform {
    right: 0;
    top: 50%;
    transform: translateY(-50%) translateX(50%);
}

.quadrant-icon.quadrant-platform:hover {
    transform: translateY(-50%) translateX(50%) scale(1.15);
}

.quadrant-icon.quadrant-technology {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(50%);
}

.quadrant-icon.quadrant-technology:hover {
    transform: translateX(-50%) translateY(50%) scale(1.15);
}

.quadrant-icon.quadrant-audience {
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-50%);
}

.quadrant-icon.quadrant-audience:hover {
    transform: translateY(-50%) translateX(-50%) scale(1.15);
}

/* Quadrant legend styling - icons with labels */
.quadrant-legend {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.quadrant-legend h4 {
    width: 100%;
    margin-bottom: 8px;
}

.quadrant-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 8px;
    cursor: default;
    transition: all 0.2s ease;
}

.quadrant-legend .legend-item:hover {
    background: rgba(16, 185, 129, 0.2);
}

.quadrant-legend .legend-item i {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.quadrant-legend .legend-item span {
    font-size: 13px;
    color: var(--text-secondary, #a0aec0);
}

/* Platform Selection Checkbox Styles */
.platform-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.platform-checkbox {
    display: flex;
    align-items: center;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.platform-checkbox:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.platform-checkbox.selected {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
}

.platform-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.platform-checkbox-content {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.platform-checkbox-content i {
    font-size: 18px;
}

.platform-checkbox-content span {
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   AUTCOMPLETE DROPDOWN STYLES
   ============================================ */

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.autocomplete-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s;
    font-size: 14px;
    color: var(--text-primary);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: var(--surface-hover);
}

.autocomplete-item:active {
    background-color: var(--primary-light);
}