/* --- ARIAS ALPHA: COMMAND CONSOLE THEME v2.3 --- */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Titillium+Web:wght@300;400;700&display=swap');

:root {
    --gold: #D4AF37;
    --gold-dim: rgba(212, 175, 55, 0.15);
    --gold-glow: rgba(212, 175, 55, 0.6); /* Increased opacity for "Glowy" feel */
    --secondary-yellow: #FFD700; /* Brighter yellow for particles */
    
    --black-bg: #050505;
    --panel-bg: rgba(12, 12, 12, 0.95);
    --border-color: #333;
    --status-green: #00ff41;
    --status-red: #ff3333;
}

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

body {
    background-color: var(--black-bg);
    color: white;
    font-family: 'Titillium Web', sans-serif;
    height: 100vh;
    overflow: hidden;
    background-image: radial-gradient(circle at 50% 50%, #111 0%, #000 100%);
}

/* --- PARTICLE ORB ANIMATION (Fixed Geometry) --- */
@keyframes orb-trace {
    0%   { top: -3px; left: -3px; opacity: 1; }
    24%  { top: -3px; left: calc(100% - 3px); opacity: 1; }  /* Top Right */
    25%  { top: -3px; left: calc(100% - 3px); opacity: 0; }  /* Blink */
    
    26%  { top: -3px; left: calc(100% - 3px); opacity: 1; }
    49%  { top: calc(100% - 3px); left: calc(100% - 3px); opacity: 1; } /* Bottom Right */
    50%  { top: calc(100% - 3px); left: calc(100% - 3px); opacity: 0; }
    
    51%  { top: calc(100% - 3px); left: calc(100% - 3px); opacity: 1; }
    74%  { top: calc(100% - 3px); left: -3px; opacity: 1; }  /* Bottom Left */
    75%  { top: calc(100% - 3px); left: -3px; opacity: 0; }
    
    76%  { top: calc(100% - 3px); left: -3px; opacity: 1; }
    99%  { top: -3px; left: -3px; opacity: 1; }  /* Top Left */
    100% { top: -3px; left: -3px; opacity: 0; }
}
/* The Orb Particle */
.module::after {
    content: ''; position: absolute;
    width: 6px; height: 6px; 
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 8px 2px var(--secondary-yellow); /* Stronger Glow */
    z-index: 20;
    animation: orb-trace 8s infinite linear;
    opacity: 0; /* Start hidden */
    pointer-events: none;
}

/* Offset start times */
.module:nth-child(1)::after { animation-delay: 0s; }
.module:nth-child(2)::after { animation-delay: 2s; }
.module:nth-child(3)::after { animation-delay: 4s; }
.module:nth-child(4)::after { animation-delay: 1s; }
.module:nth-child(5)::after { animation-delay: 3s; }
/* --- MAIN LAYOUT --- */
.console-wrapper {
    display: flex; flex-direction: column; height: 100%;
    padding: 1rem; opacity: 0.2; transition: opacity 1s; pointer-events: none;
}
.console-active { opacity: 1; pointer-events: all; }

/* --- HEADER --- */
header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--gold-dim); padding-bottom: 0.5rem; margin-bottom: 1rem;
}
.header-controls { display: flex; gap: 1rem; align-items: center; }

/* --- GRID SYSTEM --- */
.console-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 15px; flex: 1;
    min-height: 0;
}

/* --- MODULE CARD --- */
.module {
    background: var(--panel-bg);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative; display: flex; flex-direction: column;
    transition: all 0.2s;
    overflow: hidden; /* Keep the particle inside the rounded corners */
}

/* 1. THE HOVER SPREAD EFFECT (Restored & Boosted) */
.module::before {
    content: ''; position: absolute; 
    top: 0; left: 0; width: 100%; height: 3px; /* Thicker */
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold); /* Strong Glow */
    transform: scaleX(0); transform-origin: left; 
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}
.module:hover::before { transform: scaleX(1); } /* Spreads on hover */

/* 2. THE ELECTRON PARTICLE (New Style) */
.module::after {
    content: ''; position: absolute;
    width: 4px; height: 4px; 
    border-radius: 50%; /* Round Orb */
    background: #fff; /* White Hot Core */
    box-shadow: 0 0 6px 2px var(--secondary-yellow); /* Yellow Aura */
    opacity: 0; 
    z-index: 2; pointer-events: none;
    animation: particle-travel 12s infinite linear; /* Slow, ambient speed */
}
/* Randomize starts so they don't look like a synchronized marching band */
.module:nth-child(1)::after { animation-delay: 0s; }
.module:nth-child(2)::after { animation-delay: 4s; }
.module:nth-child(3)::after { animation-delay: 8s; }
.module:nth-child(4)::after { animation-delay: 2s; }
.module:nth-child(5)::after { animation-delay: 6s; }

/* 3. MODULE HOVER STATE */
.module:hover { 
    border-color: rgba(212, 175, 55, 0.6); 
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.15); /* Ambient glow on the whole box */
}

.mod-header {
    padding: 10px 15px; background: rgba(255,255,255,0.03);
    display: flex; justify-content: space-between; align-items: center; cursor: grab;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.mod-header:active { cursor: grabbing; }

.mod-title {
    font-family: 'Rajdhani', sans-serif; text-transform: uppercase; letter-spacing: 1px;
    color: var(--gold); font-weight: 700; display: flex; align-items: center; gap: 10px;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}
.mod-body {
    flex: 1; padding: 15px; color: #ccc; font-size: 0.9rem;
    display: flex; flex-direction: column; font-family: 'Titillium Web', sans-serif;
    overflow: hidden;
}

/* --- BUTTONS --- */
.action-btn {
    margin-top: auto; background: transparent; border: 1px solid var(--gold-dim);
    color: var(--gold); padding: 8px; font-family: 'Rajdhani'; text-transform: uppercase;
    cursor: pointer; transition: 0.2s; text-align: center; text-decoration: none; display: block;
}
.action-btn:hover { background: var(--gold-dim); letter-spacing: 2px; color: white; box-shadow: 0 0 10px var(--gold-dim); }

/* --- HOLOGRAPHIC HEADER BUTTONS --- */
.header-btn {
    background: transparent; border: 1px solid var(--gold-dim); color: var(--gold);
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: 0.3s; border-radius: 4px; 
}
.header-btn:hover { background: var(--gold-dim); box-shadow: 0 0 15px var(--gold-dim); border-color: var(--gold); color: white; }
.header-btn.active { background: var(--gold); color: black; box-shadow: 0 0 15px var(--gold); }
.header-btn.logout-btn:hover { border-color: #ff3333; color: #ff3333; background: rgba(255, 51, 51, 0.1); box-shadow: 0 0 15px rgba(255, 51, 51, 0.2); }

/* --- UTILITIES --- */
.span-2-col { grid-column: span 2; }
.span-2-row { grid-row: span 2; }
.hidden { display: none !important; }

/* --- INITIALIZE OVERLAY --- */
#init-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; z-index: 9999;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    cursor: pointer;
}

/* --- RESPONSIVE --- */
@media(max-width: 1000px) {
    .console-grid { grid-template-columns: 1fr 1fr; overflow-y: auto; }
    .span-2-col, .span-2-row { grid-column: span 1; grid-row: span 1; }
}
/* --- SERVICE COUNTER STYLES --- */
.svc-badge {
    position: relative;
    min-width: 60px;
    justify-content: flex-end;
    padding-bottom: 5px;
}

/* The Manual Input Field */
.svc-count-input {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 1px solid; /* Color set inline */
    font-family: 'Rajdhani';
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
    width: 40px;
    margin-top: 2px;
    padding: 0;
}
.svc-count-input:focus {
    outline: none;
    background: rgba(255,255,255,0.1);
}
/* Hide Spinner Arrows on Number Input */
.svc-count-input::-webkit-outer-spin-button,
.svc-count-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* The Read-Only Counter */
.svc-count-read {
    font-family: 'Rajdhani';
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 2px;
    border-bottom: 1px solid transparent; /* To align with inputs */
}