/* ==========================================================================
   ELEKTROTEKNIA VDE — HIGH-VOLTAGE COPPER & CYBER-INDUSTRIAL DESIGN SYSTEM
   ========================================================================== */

:root {
    --bg-obsidian: #030711;
    --bg-navy: #07101f;
    --bg-card: rgba(11, 23, 42, 0.78);
    --bg-card-hover: rgba(15, 31, 56, 0.9);
    --copper-300: #f3b582;
    --copper-400: #e59352;
    --copper-500: #c87533;
    --copper-600: #a6581e;
    --copper-700: #7f3f12;
    --cyan-400: #38bdf8;
    --cyan-500: #00d2ff;
    --emerald-400: #34d399;
    --border-subtle: rgba(148, 163, 184, 0.14);
    --border-copper: rgba(200, 117, 51, 0.42);
    --border-cyan: rgba(0, 210, 255, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-obsidian);
    color: #f1f5f9;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-obsidian);
    color: #f1f5f9;
    overflow-x: hidden;
}

h1, h2, h3, .font-display {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
}

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

/* --------------------------------------------------------------------------
   BACKGROUNDS & GRADIENTS
   -------------------------------------------------------------------------- */
.copper-gradient {
    background: linear-gradient(135deg, #c87533 0%, #ea9a56 50%, #964916 100%);
}

.copper-text-gradient {
    background: linear-gradient(135deg, #fbd3a7 0%, #e59352 45%, #c87533 80%, #ffdfb8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cyan-text-gradient {
    background: linear-gradient(135deg, #7dd3fc 0%, #00d2ff 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cyber-grid-bg {
    background-color: #030711;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(0, 210, 255, 0.09) 0%, transparent 38%),
        radial-gradient(circle at 84% 22%, rgba(200, 117, 51, 0.12) 0%, transparent 42%),
        radial-gradient(circle at 50% 80%, rgba(0, 114, 255, 0.07) 0%, transparent 50%),
        linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 44px 44px, 44px 44px;
}

/* --------------------------------------------------------------------------
   GLASSMORPHISM CARDS & GLOWS
   -------------------------------------------------------------------------- */
.card-glass {
    background: rgba(10, 21, 38, 0.78);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.16);
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.card-glass:hover {
    border-color: rgba(56, 189, 248, 0.34);
}

.card-glass-copper {
    background: linear-gradient(165deg, rgba(22, 31, 48, 0.88) 0%, rgba(12, 20, 34, 0.92) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(200, 117, 51, 0.4);
    box-shadow: 0 12px 35px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

.glow-copper {
    box-shadow: 0 0 32px rgba(200, 117, 51, 0.25);
}

.glow-cyan {
    box-shadow: 0 0 32px rgba(0, 210, 255, 0.22);
}

/* --------------------------------------------------------------------------
   THREE.JS 3D STAGE & HUD TELEMETRY
   -------------------------------------------------------------------------- */
.three-stage-wrapper {
    position: relative;
    width: 100%;
    height: 540px;
    border-radius: 1.25rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 42%, rgba(200, 117, 51, 0.16) 0%, rgba(0, 210, 255, 0.08) 38%, rgba(3, 7, 17, 0.98) 78%);
    border: 1px solid rgba(200, 117, 51, 0.45);
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 40px rgba(0, 210, 255, 0.08);
}

@media (max-width: 640px) {
    .three-stage-wrapper {
        height: 440px;
    }
}

#elk-three-canvas-container {
    width: 100%;
    height: 100%;
    cursor: grab;
    position: relative;
    z-index: 1;
}

#elk-three-canvas-container:active {
    cursor: grabbing;
}

.hud-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 10;
}
.hud-corner-tl { top: 12px; left: 12px; border-top: 2px solid #00d2ff; border-left: 2px solid #00d2ff; }
.hud-corner-tr { top: 12px; right: 12px; border-top: 2px solid #c87533; border-right: 2px solid #c87533; }
.hud-corner-bl { bottom: 12px; left: 12px; border-bottom: 2px solid #c87533; border-left: 2px solid #c87533; }
.hud-corner-br { bottom: 12px; right: 12px; border-bottom: 2px solid #00d2ff; border-right: 2px solid #00d2ff; }

.three-mode-btn {
    background: rgba(7, 16, 31, 0.82);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: #cbd5e1;
    transition: all 0.2s ease;
}

.three-mode-btn:hover {
    border-color: #e59352;
    color: #ffffff;
    background: rgba(200, 117, 51, 0.22);
}

.three-mode-btn.active {
    background: linear-gradient(135deg, #c87533 0%, #964916 100%);
    border-color: #f3b582;
    color: #ffffff;
    box-shadow: 0 0 16px rgba(200, 117, 51, 0.45);
}

.three-mode-btn.active-cyan {
    background: linear-gradient(135deg, #0284c7 0%, #00d2ff 100%);
    border-color: #bae6fd;
    color: #030711;
    font-weight: 800;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.55);
}

/* --------------------------------------------------------------------------
   ANIMATIONS & PULSES
   -------------------------------------------------------------------------- */
@keyframes pulseGlow {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}

.animate-pulse-glow {
    animation: pulseGlow 3s infinite ease-in-out;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(500%); }
}

.hud-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, rgba(0, 210, 255, 0.06), transparent);
    animation: scanline 6s linear infinite;
    pointer-events: none;
    z-index: 2;
}

/* --------------------------------------------------------------------------
   SCROLLBARS
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #040914;
}
::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c87533;
}

/* --------------------------------------------------------------------------
   PRINT STYLESHEET (FOR COTIZACIONES, OC, PRE-FACTURA SII & EIVT)
   -------------------------------------------------------------------------- */
@media print {
    .no-print {
        display: none !important;
    }
    html, body {
        background: #ffffff !important;
        color: #0f172a !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #view-web {
        display: none !important;
    }
    #view-erp {
        display: block !important;
        background: #ffffff !important;
        padding: 0 !important;
    }
    .print-container {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 18px !important;
    }
}
