:root { --blue:#1F4E79; --blue2:#2E6DA4; --light:#DCE6F1; --bg:#EEF2F6; --txt:#1d1d1f; --muted:#6b7280; --red:#C00000; --green:#2E7D32; --orange:#E46C0A; }
* { box-sizing:border-box; }
html,body { margin:0; height:100%; background:var(--bg); color:var(--txt); font-family:Arial, "Nirmala UI", "Mangal", sans-serif; font-size:14px; }
header.top { height:66px; background:var(--blue); color:#fff; display:flex; align-items:center; padding:0 16px; gap:16px; position:sticky; top:0; z-index:10; }
.brand { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }
.logo { width:40px; height:40px; border-radius:10px; background:rgba(255,255,255,.15); display:flex; align-items:center; justify-content:center; flex:none; }
.logo svg { width:26px; height:26px; fill:#fff; } .logo.big { width:70px; height:70px; margin:0 auto 6px; background:var(--blue); } .logo.big svg { width:44px; height:44px; }
.t1 { font-weight:bold; font-size:17px; letter-spacing:.4px; } .t2 { font-size:12px; color:var(--light); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.clockbox { text-align:center; } #clock { font-size:30px; font-weight:bold; font-variant-numeric:tabular-nums; letter-spacing:1px; }
.hdr-right { flex:1; display:flex; justify-content:flex-end; align-items:center; gap:10px; }
.pill { padding:4px 10px; border-radius:20px; font-size:12px; background:rgba(255,255,255,.18); }
.pill.ok { background:#2E7D32; } .pill.warn { background:#E46C0A; }
.layout { display:flex; min-height:calc(100% - 66px); }
nav.side { width:210px; background:#fff; border-right:1px solid #dde3ea; padding:10px 8px; flex:none; position:sticky; top:66px; height:calc(100vh - 66px); overflow:auto; }
nav.side button { display:block; width:100%; text-align:left; border:0; background:none; padding:11px 12px; border-radius:8px; font-size:14px; color:#333; margin-bottom:2px; cursor:pointer; font-family:inherit; }
nav.side button:hover { background:var(--light); }
nav.side button.on { background:var(--blue); color:#fff; font-weight:bold; }
nav.side button.em { color:var(--red); font-weight:bold; } nav.side button.em.on { background:var(--red); color:#fff; }
.side-foot { font-size:11px; color:var(--muted); padding:16px 12px; }
main { flex:1; padding:16px 18px 40px; min-width:0; }
.tab { display:none; } .tab.on { display:block; }
.card { background:#fff; border-radius:12px; padding:14px 16px; margin-bottom:14px; box-shadow:0 1px 3px rgba(0,0,0,.07); }
.card.nopad { padding:0; overflow:hidden; }
h2 { margin:0; color:var(--blue); font-size:19px; } h3 { margin:0 0 10px; color:var(--blue); font-size:15px; }
.cards { display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; margin-bottom:14px; }
.stat .lbl { font-size:12px; color:var(--muted); font-weight:bold; text-transform:uppercase; }
.stat .val { font-size:24px; font-weight:bold; color:var(--blue); margin:4px 0; } .stat .val.sm { font-size:17px; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.small { font-size:12px; } .muted { color:var(--muted); } .err { color:var(--red); margin-top:8px; font-weight:bold; }
button { font-family:inherit; font-size:13px; padding:8px 12px; border-radius:8px; border:1px solid #c5ced8; background:#fff; color:var(--blue); font-weight:bold; cursor:pointer; }
button:hover { border-color:var(--blue); } button:disabled { opacity:.5; cursor:default; }
button.primary { background:var(--blue); color:#fff; border-color:var(--blue); } button.primary:hover { background:var(--blue2); }
button.danger { background:var(--red); color:#fff; border-color:var(--red); }
button.big { padding:12px 18px; font-size:15px; } .big-stop { padding:10px 18px; font-size:14px; }
button.mini { padding:4px 8px; font-size:12px; border-radius:6px; }
input, select, textarea { font-family:inherit; font-size:13px; padding:7px 8px; border:1px solid #c5ced8; border-radius:7px; background:#fff; color:var(--txt); }
textarea { width:100%; resize:vertical; } input:focus, select:focus, textarea:focus { outline:2px solid var(--light); border-color:var(--blue); }
.lbl { display:block; font-size:12px; font-weight:bold; color:var(--blue); margin:10px 0 4px; } .lbl.inline { display:inline; margin:0; } .w90 { width:90px; }
.row { display:flex; align-items:center; flex-wrap:wrap; } .row.gap { gap:8px; margin-top:10px; } .row.center { justify-content:center; }
.check { display:flex; align-items:center; gap:6px; margin-top:8px; font-size:13px; } .switch-row { display:flex; gap:6px; align-items:center; font-size:13px; margin-top:6px; }
.num { width:64px; }
.rng { display:flex; align-items:center; gap:10px; font-size:13px; margin:8px 0; } .rng input { flex:1; }
.toolbar { display:flex; align-items:center; gap:8px; margin-bottom:12px; flex-wrap:wrap; } .grow { flex:1; }
.tt-tabs { display:flex; gap:6px; flex-wrap:wrap; }
.tt-tabs button.on { background:var(--blue); color:#fff; }
.tt-tabs button .today { background:#2E7D32; color:#fff; font-size:10px; border-radius:8px; padding:1px 5px; margin-left:4px; }
.tblwrap { overflow-x:auto; }
table { border-collapse:collapse; width:100%; }
table.edit th { background:var(--blue); color:#fff; font-size:12px; text-align:left; padding:8px 6px; white-space:nowrap; position:sticky; top:0; }
table.edit td { padding:5px 6px; border-bottom:1px solid #edf0f4; vertical-align:top; }
table.edit tr.off td { background:#f6f6f6; color:#999; } table.edit tr.off input, table.edit tr.off select, table.edit tr.off textarea { color:#999; }
table.edit tr.next td { background:#FFF8E1; }
table.edit input[type=text], table.edit textarea { width:100%; min-width:140px; } table.edit textarea { min-height:34px; height:34px; font-size:13px; }
table.edit input[type=time] { width:100px; } table.edit input[type=number] { width:56px; } table.edit select { max-width:170px; }
td.sr { font-weight:bold; text-align:center; color:var(--blue); width:34px; } td.acts { white-space:nowrap; }
table.list td, table.list th { padding:7px 8px; border-bottom:1px solid #edf0f4; text-align:left; } table.list th { font-size:12px; color:var(--muted); }
table.list tr.past td { color:#aaa; } table.list tr.next td { background:#FFF8E1; font-weight:bold; } table.list tr.off td { color:#bbb; text-decoration:line-through; }
.tog { position:relative; display:inline-block; width:40px; height:22px; } .tog input { opacity:0; width:0; height:0; }
.tog span { position:absolute; inset:0; background:#c7ccd3; border-radius:22px; transition:.2s; cursor:pointer; }
.tog span:before { content:""; position:absolute; width:16px; height:16px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.2s; }
.tog input:checked + span { background:var(--green); } .tog input:checked + span:before { transform:translateX(18px); }
.days { display:flex; gap:2px; } .days label { font-size:11px; display:flex; flex-direction:column; align-items:center; }
.seg { display:inline-flex; border:1px solid var(--blue); border-radius:8px; overflow:hidden; margin-bottom:8px; }
.seg button { border:0; border-radius:0; } .seg button.on { background:var(--blue); color:#fff; }
.mic { text-align:center; font-size:26px; font-weight:bold; padding:16px; border-radius:12px; margin-bottom:6px; }
.mic.off { background:#f1f3f5; color:#999; } .mic.on { background:var(--red); color:#fff; animation:pulse 1.4s infinite; }
@keyframes pulse { 50% { opacity:.75; } }
.meter { height:10px; background:#eee; border-radius:6px; overflow:hidden; margin:8px 0; } #micMeter { height:100%; width:0; background:linear-gradient(90deg,#2E7D32,#E46C0A,#C00000); transition:width .08s; }
.qa { display:grid; grid-template-columns:1fr 1fr; gap:8px; } .qa button { padding:14px; font-size:14px; }
.player { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.sirens { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:10px; }
.sirens button { padding:22px 8px; font-size:16px; background:#fff0f0; color:var(--red); border:2px solid #f3b4b4; border-radius:12px; }
.sirens button small { display:block; font-size:11px; font-weight:normal; color:#a55; margin-top:4px; }
.sirens button.active { background:var(--red); color:#fff; animation:pulse .8s infinite; }
.em-card { border-top:4px solid var(--red); }
.chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; } .chip { background:var(--light); color:var(--blue); border-radius:14px; padding:4px 6px 4px 10px; font-size:12px; display:flex; gap:6px; align-items:center; }
.chip button { padding:0 6px; border:0; background:none; color:var(--red); font-size:14px; }
.overlay { position:fixed; inset:0; background:rgba(15,30,50,.75); display:flex; align-items:center; justify-content:center; z-index:50; }
.overlay[hidden] { display:none; }
.ovbox { background:#fff; border-radius:16px; padding:28px; width:420px; max-width:92vw; text-align:center; }
.ovbox input { width:100%; padding:11px; font-size:15px; margin:10px 0; }
.toast { position:fixed; left:50%; bottom:26px; transform:translateX(-50%); background:#222; color:#fff; padding:10px 18px; border-radius:22px; opacity:0; transition:opacity .3s; z-index:60; pointer-events:none; }
.toast.on { opacity:.95; }
@media (max-width: 1000px) { .cards { grid-template-columns:1fr 1fr; } .grid2 { grid-template-columns:1fr; } .sirens { grid-template-columns:repeat(2,1fr); } nav.side { width:170px; } }
