:root {
  --gold: #ffbf3c;
  --gold-light: #ffe7a0;
  --orange: #ff7418;
  --green: #38f56b;
  --red: #ff542c;
  --bg: #080a0e;
  --panel: #11151b;
  --line: #70451d;
  --text: #f4ead4;
  --muted: #9b9488;
}
* { box-sizing: border-box; }
html { min-height:100%; background:var(--bg); }
body {
  margin:0; min-height:100vh; color:var(--text);
  background:
    radial-gradient(ellipse at 50% 18%,#3a210e 0,transparent 42%),
    radial-gradient(ellipse at 50% 70%,#17130e 0,transparent 50%),
    linear-gradient(135deg,#080a0e,#111319 48%,#08090c);
  font-family:"Rajdhani",Arial,sans-serif;
  overflow-x:hidden;
}
body::before {
  content:""; position:fixed; inset:0; pointer-events:none; z-index:0;
  opacity:.17;
  background-image:linear-gradient(#ffffff09 1px,transparent 1px),linear-gradient(90deg,#ffffff09 1px,transparent 1px);
  background-size:38px 38px;
  mask-image:linear-gradient(to bottom,#000,transparent 85%);
}
.ambient {
  position:fixed; width:700px; height:700px; left:50%; top:15%;
  transform:translateX(-50%); border-radius:50%; pointer-events:none;
  background:radial-gradient(circle,#ff8c1c12,transparent 68%);
}
.page { position:relative; z-index:1; width:min(1450px,96%); margin:auto; padding:24px 0 18px; }
.metal-panel {
  position:relative;
  background:linear-gradient(145deg,#1d2025 0%,#0c0f14 28%,#17191d 52%,#080a0e 100%);
  border:1px solid #88531e;
  box-shadow:0 0 0 2px #24180f,0 0 0 4px #5a3719,0 0 25px #f68a2220,inset 0 1px #fff2,inset 0 -2px #000;
}
.metal-panel::before {
  content:""; position:absolute; inset:4px; border:1px solid #d9953b55;
  pointer-events:none;
}
.topbar {
  min-height:112px; display:grid; grid-template-columns:110px 1fr 360px;
  align-items:center; padding:14px 26px; gap:22px; margin-bottom:24px;
  border-top:3px solid #ffb53c; border-bottom:3px solid #8b4b19;
}
.crest {
  height:76px; display:grid; place-items:center; font-size:55px; color:#ffbd3c;
  text-shadow:0 0 12px #ff9c22,0 0 28px #ff7a19;
  border-right:1px solid #9a632b;
}
.brand-kicker,.brand-sub,.national-sub,.section-name,.reactor-heading,.reactor-foot,
.group-caption,.schedule-date small,.schedule-bottom,footer,.timeline-legend {
  font-family:"Orbitron",sans-serif; letter-spacing:1.4px;
}
.brand-kicker { color:#ffb93d; font-size:10px; font-weight:700; }
.brand h1 {
  margin:0; font-family:"Orbitron",sans-serif; font-size:clamp(28px,4vw,46px);
  line-height:1.15; letter-spacing:5px; color:#ffe3a0;
  text-shadow:0 0 8px #ffb83e,0 0 25px #f07818,2px 3px #50250b;
}
.brand-sub { color:#d28b34; font-size:10px; margin-top:5px; }
.brand-sub i { display:inline-block; width:25px; height:2px; margin:0 8px 3px; background:#ff9b28; }
.national { position:relative; text-align:right; padding-right:82px; }
.national-title { font-family:"Orbitron",sans-serif; font-size:13px; font-weight:800; color:#ffc24d; }
.national-sub { font-size:9px; color:#b2a18a; margin-top:7px; }
.flag { position:absolute; right:0; top:0; width:62px; height:38px; transform:skew(-15deg); overflow:hidden; box-shadow:0 0 14px #1688ff44; }
.flag span { display:block; height:50%; background:#1685e9; }
.flag span+span { background:#ffda42; }
.main-card { padding:20px 26px 14px; border-top:2px solid #f8b43b; }
.section-top { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.section-name { color:#f7b83e; font-size:11px; font-weight:800; }
.live-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#52f17a; box-shadow:0 0 12px #52f17a; margin-right:8px; }
.system-state {
  padding:6px 13px; color:#8dffab; border:1px solid #2b8d49;
  background:#0c2718; font-family:"Orbitron",sans-serif; font-size:10px;
  letter-spacing:1px; box-shadow:inset 0 0 12px #21c44b22;
}
.system-state.off { color:#ffad6e; border-color:#a84924; background:#32140d; }
.group-row { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:17px 0 13px; border-bottom:1px solid #71451f66; }
.group-caption { color:#a68b68; font-size:9px; }
#groupSelect {
  color:#ffe0a0; background:#15100b; border:1px solid #bd7928; padding:8px 14px;
  font:700 13px "Orbitron",sans-serif; outline:none; min-width:100px;
}
.group-tabs { display:flex; flex-wrap:wrap; gap:5px; }
.group-tab {
  border:1px solid #51402d; color:#b8a58b; background:#111319;
  padding:7px 10px; cursor:pointer; font:700 11px "Orbitron",sans-serif;
}
.group-tab.active { color:#17100a; background:linear-gradient(#ffe18a,#e78b23); border-color:#ffd16b; box-shadow:0 0 12px #ff9d2b88; }
.reactor-heading { display:flex; justify-content:space-between; align-items:center; color:#a68a62; font-size:9px; padding:17px 8px 12px; }
.reactor-heading-center { color:#ffc04a; font-size:11px; text-shadow:0 0 12px #ff8b20; }
.reactor-heading-center b { color:#fff0b2; margin:0 8px; }
.reactor {
  display:grid; grid-template-columns:92px minmax(0,1fr) 92px;
  align-items:center; gap:0; padding:8px 0;
}
.reactor-port {
  height:146px; display:flex; flex-direction:column; justify-content:center; align-items:center;
  position:relative; background:linear-gradient(90deg,#0b0d11,#29251e,#0b0d11);
  border:2px solid #a36a2b; box-shadow:inset 0 0 15px #000,0 0 12px #ff9b2933;
}
.reactor-port small { font:700 9px "Orbitron",sans-serif; color:#d9a74c; letter-spacing:2px; }
.reactor-port b { font-size:35px; line-height:1.1; color:#ffe08a; text-shadow:0 0 12px #ffad2b,0 0 25px #ff7418; }
.reactor-port strong { color:#f4c66c; font:800 12px "Orbitron",sans-serif; }
.reactor-port i { width:35px; height:3px; margin-top:10px; background:#ff9b28; box-shadow:0 0 12px #ff9b28; }
.port-right b { color:#51dfff; text-shadow:0 0 12px #16caff,0 0 25px #168cff; }
.port-right i { background:#19c9ff; box-shadow:0 0 12px #19c9ff; }
.battery {
  height:178px; position:relative; padding:0 13px 0 10px;
  filter:drop-shadow(0 0 12px #ff9c2877) drop-shadow(0 0 28px #ff761c44);
}
.battery-outer-glow {
  position:absolute; inset:-5px 5px -5px 0; border-radius:25px;
  border:2px solid #ffb83f; box-shadow:0 0 10px #ffb83f,0 0 25px #ff6d18,inset 0 0 12px #ffb83f66;
}
.battery-shell {
  position:absolute; inset:0 10px 0 0; overflow:hidden; border-radius:18px;
  border:5px solid #c58a3c;
  background:linear-gradient(180deg,#080b10,#14171a 50%,#08090c);
  box-shadow:0 0 0 3px #4a2b13,inset 0 0 28px #000,inset 0 0 10px #ffc35b44;
}
.battery-shell::before {
  content:""; position:absolute; z-index:5; inset:5px; border:1px solid #ffe4a577;
  border-radius:10px; pointer-events:none; box-shadow:inset 0 0 14px #ffae3022;
}
.battery-fill {
  position:absolute; z-index:1; top:0; bottom:0; left:0; width:0%;
  transition:width .8s linear,background 1s ease;
  background:linear-gradient(90deg,#087b32,#13c94a 55%,#75ff82);
  box-shadow:0 0 18px #1fff57,0 0 40px #13e34b99,inset 0 0 18px #c5ffba77;
}
.battery.charging .battery-fill {
  background:linear-gradient(90deg,#087b32,#13c94a 55%,#75ff82);
}
.battery.off .battery-fill {
  background:linear-gradient(90deg,#65170f,#d93c1c 55%,#ff9b32);
  box-shadow:0 0 18px #ff522c,0 0 40px #ff6c1c99,inset 0 0 18px #ffd0a077;
}
.battery-cells {
  position:absolute; z-index:2; inset:0;
  background:repeating-linear-gradient(90deg,transparent 0,transparent calc(5% - 2px),#06080b 5%);
  opacity:.75; pointer-events:none;
}
.battery-scan {
  position:absolute; z-index:3; inset:0; pointer-events:none;
  background:linear-gradient(110deg,transparent 25%,#fff2 48%,transparent 60%);
  animation:scan 5s linear infinite;
}
@keyframes scan { from {transform:translateX(-100%)} to {transform:translateX(100%)} }
.battery-content {
  position:absolute; z-index:4; inset:0 8px 0 0; display:grid;
  grid-template-columns:minmax(100px,1fr) minmax(0,3.7fr) minmax(65px,.8fr);
  align-items:center; gap:8px; padding:8px 17px;
}
.battery-status { display:flex; flex-direction:column; align-items:center; gap:4px; text-align:center; }
.status-symbol { color:#ffe49a; font-size:30px; text-shadow:0 0 12px #fff1a0,0 0 28px #ff791b; }
.battery-state { color:#fff0d1; font:800 12px "Orbitron",sans-serif; letter-spacing:1px; }
.battery-caption { color:#ffd18a; font:700 9px "Orbitron",sans-serif; letter-spacing:1px; }
.reactor-clock { display:flex; min-width:0; flex-direction:column; align-items:center; justify-content:center; gap:5px; text-align:center; }
.reactor-clock-label { color:#ffd46d; font:800 clamp(10px,1.5vw,17px) "Orbitron",sans-serif; letter-spacing:2px; text-shadow:0 0 12px #ff851e; }
.countdown {
  color:#fff0ae; font:900 clamp(36px,7.4vw,78px) "Orbitron",monospace;
  line-height:1.08; letter-spacing:2px; white-space:nowrap; font-variant-numeric:tabular-nums;
  text-shadow:0 0 5px #fff6c8,0 0 13px #ffca54,0 0 28px #ff8e1d,0 0 48px #ff7418;
}
.countdown-note { color:#ffe2a2; font:700 clamp(8px,1vw,11px) "Orbitron",sans-serif; letter-spacing:1px; }
.charge-readout { display:flex; flex-direction:column; align-items:center; gap:4px; }
.charge-readout strong { color:#fff0bd; font:900 clamp(19px,2.8vw,31px) "Orbitron",sans-serif; text-shadow:0 0 12px #ff9e29,0 0 22px #ff7418; }
.charge-readout small { color:#d5a65d; font:700 8px "Orbitron",sans-serif; letter-spacing:2px; }
.battery.charging .charge-readout strong { color:#aaffb4; text-shadow:0 0 12px #28ff64,0 0 24px #19d84d; }
.battery-terminal {
  position:absolute; right:0; top:38%; width:14px; height:25%;
  background:linear-gradient(90deg,#70451d,#ffd16b,#a66b2a);
  border:1px solid #ffda83; box-shadow:0 0 12px #ff9d28;
}
.energy-scale { display:flex; align-items:center; gap:13px; padding:10px 7% 4px; color:#e8c37c; font:800 12px "Orbitron",sans-serif; }
.energy-segments { flex:1; display:grid; grid-template-columns:repeat(20,1fr); gap:4px; }
.energy-segments i { height:9px; background:#292a2a; border:1px solid #64513a; box-shadow:inset 0 0 4px #000; }
.energy-segments i:nth-child(-n+10) { background:#b77a24; box-shadow:0 0 7px #ff9b25; }
.reactor-foot { display:flex; justify-content:space-between; gap:10px; padding:13px 5px 2px; border-top:1px solid #87551f66; margin-top:9px; color:#a98c60; font-size:9px; }
.foot-pulse { display:inline-block; width:7px; height:7px; border-radius:50%; background:#44f47a; box-shadow:0 0 10px #44f47a; margin-right:7px; }
.schedule-card { margin-top:22px; padding:20px 25px 15px; border-top:2px solid #e99b30; }
.schedule-head { display:flex; justify-content:space-between; align-items:center; gap:12px; padding-bottom:15px; border-bottom:1px solid #a26a2b88; }
.schedule-title { display:flex; align-items:center; gap:13px; }
.index-box { border:2px solid #d9912b; padding:5px 9px; color:#ffcf66; font:800 17px "Orbitron",sans-serif; box-shadow:0 0 10px #ff9c2844; }
.schedule-title h2 { margin:0; color:#ffc04b; font:800 19px "Orbitron",sans-serif; letter-spacing:2px; text-shadow:0 0 12px #ff8c22; }
.schedule-title small { color:#9b8a71; font:700 8px "Orbitron",sans-serif; letter-spacing:1px; }
.schedule-date { text-align:right; }
.schedule-date small { display:block; color:#a38b68; font-size:8px; }
.schedule-date strong { display:block; margin-top:5px; color:#ffc65a; font:800 13px "Orbitron",sans-serif; }
.timeline-legend { display:flex; gap:25px; flex-wrap:wrap; padding:15px 0 12px; color:#ddd1bc; font-size:9px; }
.timeline-legend span { display:flex; align-items:center; gap:8px; }
.timeline-legend i { width:11px; height:11px; border-radius:50%; display:inline-block; }
.legend-on { background:#42ed35; box-shadow:0 0 9px #42ed35; }
.legend-off { background:#ff941f; box-shadow:0 0 9px #ff7418; }
.legend-now i { width:2px; height:13px; border-radius:0; background:#fff1b4; box-shadow:0 0 8px #ffb13b; }
.timeline-wrap { position:relative; padding-top:18px; }
.timeline {
  display:flex; width:100%; height:25px; overflow:hidden; border-radius:7px;
  border:1px solid #bd8c3e; background:#161719; box-shadow:0 0 12px #ff9a2433,inset 0 0 8px #000;
}
.segment { height:100%; min-width:0; border-right:1px solid #1117; }
.segment.light { background:linear-gradient(180deg,#6aff42,#18bb37 60%,#087c28); box-shadow:inset 0 1px #c6ff8c; }
.segment.off { background:linear-gradient(180deg,#ffbd36,#ff7b0b 60%,#b74313); box-shadow:inset 0 1px #ffe18b; }
.timeline-empty { width:100%; display:grid; place-items:center; color:#a38c69; font:10px "Orbitron",sans-serif; }
.now-marker { position:absolute; top:0; left:0; height:58px; width:1px; transform:translateX(-50%); z-index:4; }
.now-marker span { position:absolute; bottom:100%; left:50%; transform:translateX(-50%); color:#ffe8a5; font:800 10px "Orbitron",sans-serif; text-shadow:0 0 9px #ff9e26; white-space:nowrap; }
.now-marker i { display:block; height:55px; width:2px; background:#fff0a6; box-shadow:0 0 8px #ff9e26,0 0 18px #ff9e26; }
.hours { display:flex; justify-content:space-between; color:#c4b49b; font:700 10px "Orbitron",sans-serif; padding-top:9px; }
.schedule-bottom { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; border-top:1px solid #71451f66; padding-top:13px; margin-top:15px; color:#a98c60; font-size:8px; }
.schedule-bottom b { color:#ffc34b; }
.notice { display:flex; align-items:center; gap:12px; padding:13px 18px; margin-top:18px; color:#c7b18b; font:700 10px "Orbitron",sans-serif; letter-spacing:1px; }
.notice-icon { color:#ffc04a; font-size:20px; text-shadow:0 0 12px #ff8c1c; }
footer { display:flex; justify-content:space-between; gap:10px; padding:20px 5px 0; color:#796b57; font-size:8px; }
footer b { color:#ffac31; }

@media(max-width:760px) {
  .page { width:96%; padding-top:12px; }
  .topbar { grid-template-columns:55px 1fr; padding:12px; gap:12px; }
  .crest { height:60px; font-size:40px; }
  .national { display:none; }
  .brand h1 { font-size:27px; letter-spacing:3px; }
  .brand-kicker { font-size:8px; }
  .brand-sub { font-size:8px; }
  .main-card,.schedule-card { padding:14px 12px; }
  .reactor { grid-template-columns:43px minmax(0,1fr) 43px; }
  .reactor-port { height:125px; }
  .reactor-port b { font-size:25px; }
  .reactor-port small { font-size:7px; }
  .reactor-port strong { font-size:9px; }
  .battery { height:150px; padding-left:4px; }
  .battery-content { grid-template-columns:54px minmax(0,1fr) 40px; gap:3px; padding:5px 8px; }
  .status-symbol { font-size:23px; }
  .battery-state { font-size:8px; }
  .battery-caption { font-size:6px; }
  .countdown { font-size:clamp(24px,7.4vw,46px); letter-spacing:0; }
  .reactor-clock-label { font-size:8px; letter-spacing:1px; }
  .countdown-note { font-size:7px; letter-spacing:0; }
  .charge-readout strong { font-size:16px; }
  .charge-readout small { font-size:6px; }
  .reactor-heading { font-size:7px; padding-top:12px; }
  .reactor-heading-center { font-size:8px; }
  .energy-scale { padding-left:2%; padding-right:2%; gap:7px; font-size:9px; }
  .energy-segments { gap:2px; }
  .energy-segments i { height:6px; }
  .reactor-foot { font-size:7px; }
  .schedule-title h2 { font-size:14px; }
  .schedule-title small { font-size:6px; }
  .schedule-date strong { font-size:9px; }
  .timeline-legend { gap:12px; font-size:7px; }
  .hours { font-size:7px; }
  .schedule-bottom { font-size:6px; }
}
@media(max-width:390px) {
  .reactor { grid-template-columns:34px minmax(0,1fr) 34px; }
  .reactor-port { height:110px; }
  .reactor-port small { font-size:6px; }
  .reactor-port b { font-size:20px; }
  .battery { height:125px; }
  .battery-content { grid-template-columns:42px minmax(0,1fr) 32px; padding:3px; }
  .countdown { font-size:22px; }
  .reactor-clock-label { font-size:7px; }
  .countdown-note { font-size:6px; }
  .battery-caption { font-size:5px; }
  .charge-readout strong { font-size:13px; }
  .reactor-foot { font-size:6px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation:none !important; transition:none !important; }
}

/* ===== VOLTIK — GOLDEN TACTICAL SCHEDULE ===== */

/* Pannello grafico */
.schedule-card {
  border-color: rgba(255, 174, 48, .48) !important;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 153, 30, .10), transparent 65%),
    linear-gradient(145deg, #15100b, #090b12 55%, #130d08) !important;
  box-shadow:
    inset 0 0 35px rgba(255, 153, 30, .045),
    0 0 22px rgba(255, 143, 25, .10) !important;
}

/* Titoli e data */
.schedule-card .panel-title,
.schedule-card .schedule-date h2,
.schedule-card .schedule-date small {
  color: #ffd477 !important;
  text-shadow: 0 0 10px rgba(255, 166, 35, .38);
}

.schedule-card .panel-index {
  color: #ff9d28 !important;
  text-shadow: 0 0 10px rgba(255, 130, 20, .65);
}

/* Legenda */
.schedule-card .timeline-labels {
  color: #e8c995 !important;
}

.schedule-card .legend-light {
  background: #ffc52e !important;
  box-shadow: 0 0 7px #ffbd27, 0 0 15px #ff8c1b !important;
}

.schedule-card .legend-off {
  background: #e84b25 !important;
  box-shadow: 0 0 7px #ff5428, 0 0 13px #a92518 !important;
}

/* Sfondo timeline */
.schedule-card .timeline-frame {
  border-color: rgba(255, 173, 54, .38) !important;
  background: #090a0e !important;
  box-shadow:
    inset 0 0 18px rgba(0, 0, 0, .9),
    0 0 12px rgba(255, 146, 26, .08) !important;
}

/* Energia disponibile: oro luminoso, non verde */
.schedule-card .segment.light {
  background: linear-gradient(
    180deg,
    #fff5a6 0%,
    #ffd84a 24%,
    #ffad21 65%,
    #d96a13 100%
  ) !important;
  box-shadow:
    inset 0 1px 2px rgba(255,255,220,.8),
    0 0 8px rgba(255,190,42,.85),
    0 0 18px rgba(255,125,20,.42) !important;
}

/* Interruzione: rosso-arancio */
.schedule-card .segment.off {
  background: linear-gradient(
    180deg,
    #ff9a45 0%,
    #f04a24 55%,
    #8f1e18 100%
  ) !important;
  box-shadow:
    inset 0 1px 2px rgba(255,210,150,.35),
    0 0 8px rgba(255,75,35,.45) !important;
}

/* Indicatore ORA */
.schedule-card .current-time {
  color: #fff2b0 !important;
  text-shadow:
    0 0 5px #fff0a0,
    0 0 12px #ffb52e,
    0 0 22px #ff8518 !important;
}

.schedule-card .current-time::before {
  background: #fff0a0 !important;
  box-shadow:
    0 0 6px #fff2a0,
    0 0 14px #ffb52e,
    0 0 25px #ff8018 !important;
}

/* Ore e bordo inferiore */
.schedule-card .hours {
  color: #c9a66f !important;
}

.schedule-card .schedule-foot {
  color: #d69a4b !important;
  border-color: rgba(255, 166, 45, .25) !important;
}

/* Nessun verde residuo nel grafico */
.schedule-card .segment.light,
.schedule-card .legend-light {
  filter: saturate(1.15);
}


/* VOLTIK — AVAILABLE POWER: LUMINOUS GREEN */
.schedule-card .segment.light {
  background: linear-gradient(
    180deg,
    #d9ffb0 0%,
    #a8f56a 24%,
    #65d83b 62%,
    #278d25 100%
  ) !important;
  box-shadow:
    inset 0 1px 2px rgba(245,255,220,.85),
    0 0 8px rgba(150,255,90,.85),
    0 0 18px rgba(80,220,45,.55) !important;
}

.schedule-card .legend-light {
  background: #9cf45c !important;
  box-shadow:
    0 0 7px #9cf45c,
    0 0 15px #55d936 !important;
}


/* Ukrainian flag — Voltik golden energy style */
.national {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.national .flag {
    display: flex;
    flex-direction: column;
    width: 54px;
    height: 30px;
    margin-top: 9px;
    overflow: hidden;
    border: 1px solid rgba(255, 205, 75, .95);
    border-radius: 5px;
    box-shadow:
        0 0 5px rgba(255, 193, 45, .9),
        0 0 13px rgba(255, 166, 25, .55),
        inset 0 0 5px rgba(255, 255, 255, .25);
}

.national .flag span {
    display: block;
    flex: 1;
    width: 100%;
}

.national .flag span:first-child {
    background: linear-gradient(180deg, #39a9ff 0%, #0876df 100%);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, .45);
}

.national .flag span:last-child {
    background: linear-gradient(180deg, #fff16a 0%, #ffc629 55%, #e99a08 100%);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, .65);
}

