/* ==========================================================================
   TECNAC PREMIUM THEME (DARK & GLASSMORPHISM)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body.theme-premium {
    /* Color Palette - Premium Dark Tech */
    --bg-base: #0a0f1c; /* Very deep blue/black */
    --panel-bg: rgba(15, 23, 42, 0.65); /* Translucent slate */
    --panel-border: rgba(14, 165, 233, 0.2); /* Subtle cyan border */
    
    --primary: #0ea5e9; /* Cyan / Sky Blue */
    --primary-hover: #0284c7;
    --primary-glow: rgba(14, 165, 233, 0.3);
    
    --accent: #38bdf8; 
    --accent-glow: rgba(56, 189, 248, 0.4);
    
    --text-main: #f8fafc; /* Crisp white */
    --text-muted: #94a3b8; /* Soft blue-grey */
    
    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.2);
    
    --warning: #f59e0b;
    --warning-glow: rgba(245, 158, 11, 0.2);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255,255,255,0.05);
    
    --glass-blur: blur(20px);

    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-base);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(14, 165, 233, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(56, 189, 248, 0.05), transparent 25%);
    color: var(--text-main);
}

/* Base Overrides */
body.theme-premium .tech-bg-overlay {
    background: radial-gradient(circle at top right, #0f172a, #020617);
    opacity: 0.95;
}

body.theme-premium header {
    background: rgba(10, 15, 28, 0.8);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body.theme-premium .main-logo {
    filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

/* Buttons */
body.theme-premium .tech-btn {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.theme-premium .tech-btn:hover {
    background: var(--primary);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--primary-glow);
    transform: translateY(-2px);
}

body.theme-premium .tech-btn.btn-demo-glow {
    background: linear-gradient(135deg, #0284c7, #0ea5e9) !important;
    border: 1px solid #38bdf8 !important;
    color: white !important;
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4) !important;
}

/* Sidebar & Panels */
body.theme-premium .sidebar,
body.theme-premium .canvas-area {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    box-shadow: var(--shadow-lg);
}

body.theme-premium h2 {
    color: var(--accent);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-shadow: 0 0 10px var(--primary-glow);
    font-weight: 600;
}

/* Inputs & Selects */
body.theme-premium input, 
body.theme-premium select, 
body.theme-premium .tech-textarea {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

body.theme-premium input:focus, 
body.theme-premium select:focus, 
body.theme-premium .tech-textarea:focus {
    background: rgba(14, 165, 233, 0.05);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--primary-glow), inset 0 2px 4px rgba(0,0,0,0.2);
}

body.theme-premium select option {
    background: #0f172a;
    color: #f8fafc;
}

/* Results HUD */
body.theme-premium .results-box {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 0.9));
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

body.theme-premium .result-item {
    border-bottom-color: rgba(255,255,255,0.05);
}

body.theme-premium .result-header::after {
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

/* Project Top Bar */
body.theme-premium #proyecto-top-bar input {
    border-bottom-color: rgba(255,255,255,0.2) !important;
    color: var(--accent) !important;
    font-weight: 500 !important;
}

body.theme-premium #proyecto-top-bar input:focus {
    border-bottom-color: var(--accent) !important;
    box-shadow: none !important;
}

/* Kit Preview in Canvas */
body.theme-premium #kit-preview-wrapper > div {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(14, 165, 233, 0.3) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6) !important;
    backdrop-filter: blur(20px);
}
body.theme-premium #kit-preview-wrapper h2 {
    color: var(--text-main) !important;
    text-shadow: none;
}
body.theme-premium #kit-preview-wrapper tr {
    border-bottom-color: rgba(255,255,255,0.1) !important;
}
body.theme-premium #kit-preview-wrapper td {
    color: var(--text-muted) !important;
}
body.theme-premium #kit-preview-wrapper td[style*="font-weight: 600"] {
    color: var(--text-main) !important;
}

/* Modal and Summary (when NOT printed) */
body.theme-premium .modal-box {
    background: #0f172a;
    border: 1px solid rgba(14, 165, 233, 0.4);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* Keep print modal readable but dark themed on screen */
@media screen {
    body.theme-premium #project-summary-modal .modal-box {
        background: rgba(15, 23, 42, 0.95) !important;
        color: #f8fafc !important;
        border: 1px solid rgba(14, 165, 233, 0.3) !important;
        backdrop-filter: blur(20px);
    }
    
    body.theme-premium #project-summary-modal .window-card {
        background: rgba(0, 0, 0, 0.2) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        color: #f8fafc !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }

    body.theme-premium #project-summary-modal .window-card .card-canvas {
        background: rgba(255,255,255,0.03) !important;
        border: 1px solid rgba(255,255,255,0.05) !important;
        border-right: 1px solid rgba(255,255,255,0.05) !important;
    }
    
    body.theme-premium #project-summary-modal .card-details {
        background: transparent !important;
        color: #f8fafc !important;
    }

    body.theme-premium #project-summary-modal .card-header {
        border-bottom: 2px solid rgba(14, 165, 233, 0.4) !important;
        color: var(--accent) !important;
    }

    body.theme-premium #project-summary-modal .card-details tr {
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }
    
    body.theme-premium #project-summary-modal .card-details td {
        color: #cbd5e1 !important;
    }
    
    body.theme-premium #project-summary-modal .card-details span[style*="color:#1a2744"] {
        color: #f8fafc !important;
    }

    body.theme-premium #project-summary-modal h3 {
        color: var(--accent) !important;
    }
    
    body.theme-premium #project-summary-modal .tech-btn {
        background: rgba(14, 165, 233, 0.1) !important;
        color: var(--accent) !important;
        border-color: rgba(14, 165, 233, 0.3) !important;
    }
    
    body.theme-premium #project-summary-modal .tech-btn:hover {
        background: var(--primary) !important;
        color: white !important;
        box-shadow: 0 0 15px var(--primary-glow) !important;
    }
}

/* SVG Rendering Overrides for Dark Mode */
body.theme-premium svg polygon,
body.theme-premium svg rect {
    stroke: rgba(255,255,255,0.4) !important;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
}
/* Allow inner hardware to shine */
body.theme-premium svg .hardware-piece, 
body.theme-premium svg .f-body {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}

/* Scrollbars */
body.theme-premium ::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2);
}
body.theme-premium ::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.5);
    border-radius: 10px;
}
body.theme-premium ::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* Fix text colors that were inline hardcoded */
body.theme-premium [style*="color: #1565C0"],
body.theme-premium [style*="color:#1565C0"] {
    color: var(--accent) !important;
}
body.theme-premium [style*="color: #1a2744"],
body.theme-premium [style*="color:#1a2744"] {
    color: #f8fafc !important;
}
body.theme-premium [style*="color: #64748b"] {
    color: #94a3b8 !important;
}

/* Add some subtle glows to the active hardware items */
body.theme-premium .hardware-info-chip {
    background: linear-gradient(to right, rgba(14, 165, 233, 0.1), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 0 15px rgba(14, 165, 233, 0.1);
}

/* Form headers and labels */
body.theme-premium label {
    color: var(--text-muted);
}
body.theme-premium .bom-item {
    color: var(--text-main);
    border-color: rgba(255,255,255,0.05);
}
body.theme-premium .bom-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(14, 165, 233, 0.2);
}

/* Canvas Area Empty State */
body.theme-premium .empty-state {
    background: rgba(0,0,0,0.3);
    border-color: rgba(255,255,255,0.1);
    color: var(--text-muted);
}
