:root {
    --bg-dark: #0a0d14;
    --panel-bg: #111622;
    --card-border: #1f293d;
    --neon-blue: #00d2ff;
    --neon-green: #00ff88;
    --neon-yellow: #ffb703;
    --neon-red: #ff0055;
    --text-muted: #6b7a99;
}

body {
    background-color: var(--bg-dark);
    color: #e2e8f0;
    font-family: 'Rajdhani', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.main-rack {
    width: 100%;
    max-width: 700px;
    background: var(--panel-bg);
    border: 2px solid var(--card-border);
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    padding: 22px;
}

.rack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.rack-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #fff;
}

.rack-plus {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.rack-status-capsule {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    background: rgba(0, 210, 255, 0.08);
    color: var(--neon-blue);
    border: 1px solid rgba(0, 210, 255, 0.3);
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 1px;
}

.oled-screen {
    background: #06090e;
    border: 2px solid #162033;
    border-radius: 10px;
    padding: 14px 18px 8px 18px;
    margin-bottom: 16px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.9);
}

.oled-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'Orbitron', monospace;
}
.oled-sub .highlight { color: #fff; }

.oled-tg {
    font-family: 'Orbitron', monospace;
    font-size: 2.2rem;
    font-weight: 900;
    color: var(--neon-blue);
    text-shadow: 0 0 15px rgba(0, 210, 255, 0.5);
    letter-spacing: 1px;
}

.tot-container {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1rem;
}
.tot-label { color: var(--text-muted); margin-right: 4px; }
.tot-time { color: var(--neon-yellow); font-weight: 700; }

.spectrum-box {
    width: 100%;
    height: 46px;
    background: #020408;
    border-radius: 6px;
    border: 1px solid #10192a;
    margin-top: 8px;
    overflow: hidden;
}

.spectrum-box canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.status-pill {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 1px;
}
.status-offline { background: rgba(255, 0, 85, 0.15); color: var(--neon-red); border: 1px solid var(--neon-red); }
.status-online { background: rgba(0, 255, 136, 0.15); color: var(--neon-green); border: 1px solid var(--neon-green); }

.dsp-module {
    background: #0c101a;
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 12px;
}

.module-header {
    font-family: 'Orbitron', monospace;
    font-size: 0.78rem;
    color: #adb5bd;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.clip-led {
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 3px;
    background: rgba(255, 0, 0, 0.1);
    color: #441111;
    border: 1px solid #331111;
}
.clip-active {
    background: #ff0055 !important;
    color: #fff !important;
    box-shadow: 0 0 10px #ff0055;
}

.gate-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--neon-yellow);
}

.vu-wrapper { width: 100%; }
.vu-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.vu-tag {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    width: 65px;
    color: #a0aec0;
}
.vu-bar-container {
    flex-grow: 1;
    height: 12px;
    background: #05080e;
    border-radius: 3px;
    border: 1px solid #1a2336;
    overflow: hidden;
    position: relative;
}
.vu-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88 0%, #ffb703 75%, #ff0055 95%);
    transition: width 0.04s ease-out;
}
.vu-rx-color {
    background: linear-gradient(90deg, #00d2ff 0%, #00ff88 80%, #ffb703 98%);
}
.vu-db {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    width: 58px;
    text-align: right;
    color: #a0aec0;
}

.param-label {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 4px;
}
.param-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--neon-blue);
}

.studio-input, .studio-select {
    background: #080c14;
    border: 1px solid var(--card-border);
    color: #fff;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
}
.studio-input:focus, .studio-select:focus {
    background: #0d1422;
    border-color: var(--neon-blue);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.3);
}

.eq-faders {
    display: flex;
    justify-content: space-between;
    gap: 4px;
    padding-top: 8px;
}
.fader-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
.fader-slider {
    -webkit-appearance: slider-vertical;
    writing-mode: bt-lr;
    width: 18px;
    height: 90px;
    margin: 6px 0;
    accent-color: var(--neon-blue);
    cursor: pointer;
}
.fader-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--neon-blue);
}
.fader-freq {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
}

.btn-connect {
    background: linear-gradient(180deg, #162947 0%, #0d1a30 100%);
    border: 1px solid var(--neon-blue);
    color: var(--neon-blue);
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 10px;
}
.btn-connect:hover { background: var(--neon-blue); color: #000; }

.btn-disconnect {
    background: rgba(255, 0, 85, 0.2);
    border: 1px solid var(--neon-red);
    color: var(--neon-red);
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 10px;
}

.ptt-button {
    width: 100%;
    height: 75px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(180deg, #2a0b14 0%, #17050b 100%);
    border: 2px solid #5a1226;
    cursor: pointer;
    position: relative;
    user-select: none;
    outline: none;
    transition: all 0.08s ease;
}
.ptt-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: #333;
}
.ptt-main-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 900;
    color: #ff3366;
    letter-spacing: 2px;
}
.ptt-sub-text {
    font-size: 0.72rem;
    color: #883a4c;
    letter-spacing: 1px;
    margin-top: 2px;
}
.ptt-active {
    background: linear-gradient(180deg, #d90429 0%, #ef233c 100%) !important;
    border-color: #ff4d6d !important;
    box-shadow: 0 0 25px rgba(239, 35, 60, 0.7);
    transform: translateY(2px);
}
.ptt-active .ptt-main-text { color: #fff !important; }
.ptt-active .ptt-sub-text { color: #ffe5ec !important; }


/* Regola specifica per visibilità perfetta di Callsign e DMR ID */
input#callsign, input#dmr-id, input[disabled], input:disabled {
    color: #00ffff !important;
    background-color: #0d1527 !important;
    border: 1px solid #1e3a5f !important;
    font-weight: bold !important;
    opacity: 1 !important;
    text-shadow: 0 0 4px rgba(0, 255, 255, 0.4) !important;
}
