:root {
  color-scheme: dark;
  --bg: #09131c; --panel: #101b25; --panel2: #15222d; --line: #2b3945;
  --text: #e7edf1; --muted: #87939c; --green: #2bd576; --red: #ff515a;
  --yellow: #f5c451; --orange: #ff8b3d; --blue: #74b9ea; --accent: #f31325;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background-color: var(--bg); background-image: radial-gradient(circle at 50% -20%, #20313eaa 0, transparent 48%), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='108' height='62' viewBox='0 0 108 62'%3E%3Cg fill='none' stroke='%23dce8ef' stroke-opacity='.032' stroke-width='1'%3E%3Cpath d='M-36 0-18-31H18L36 0 18 31H-18ZM18 31 36 0H72L90 31 72 62H36ZM72 0 90-31h36l18 31-18 31H90ZM-36 62-18 31h36l18 31-18 31h-36ZM72 62l18-31h36l18 31-18 31H90Z'/%3E%3C/g%3E%3C/svg%3E"); color: var(--text); min-height: 100vh; }
body::before { content: ""; position: fixed; inset: -30%; pointer-events: none; z-index: 0; background: radial-gradient(circle, #8fc8e90d 0, #f3132508 12%, transparent 28%); animation: hex-scan 24s ease-in-out infinite alternate; }
#app { position: relative; z-index: 1; }
@keyframes hex-scan { 0% { transform: translate(-24%,-18%); } 48% { transform: translate(18%,8%); } 100% { transform: translate(-2%,25%); } }
button, input, select { font: inherit; }
button { cursor: pointer; transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease, opacity .16s ease; }
button:not(:disabled):hover { transform: translateY(-1px); }
button:not(:disabled):active { transform: translateY(0) scale(.98); }
input, select { transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease; }
[hidden] { display: none !important; }
.shell { min-height: 100vh; }
.topbar { height: 70px; padding: 0 24px; border-bottom: 1px solid #4a2630; display: flex; align-items: center; justify-content: space-between; background: rgba(7,16,24,.96); position: sticky; top: 0; z-index: 5; box-shadow: 0 5px 25px #0008; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent 28%, transparent 72%, var(--accent)); opacity: .65; }
.lite-expired-banner { position:sticky; top:70px; z-index:4; display:flex; align-items:center; justify-content:center; gap:24px; padding:13px 24px; border-bottom:1px solid #a83b44; background:linear-gradient(90deg,#32151a,#551a23,#32151a); box-shadow:0 6px 22px #0008,0 0 24px #f3132520 inset; }
.lite-expired-banner div { display:flex; align-items:baseline; gap:7px; }
.lite-expired-banner b { color:#fff; font-size:13px; }
.lite-expired-banner span { color:#ffc7ca; font-size:12px; }
.lite-expired-banner a { text-decoration:none; white-space:nowrap; }
.brand { display: flex; align-items: center; gap: 14px; }
.brandmark { width: 42px; height: 42px; object-fit: contain; }
.brand h1 { font-size: 19px; margin: 0; letter-spacing: .12em; }
.brand small { color: #9ba9b4; display: block; font-size: 8px; letter-spacing: .14em; margin-top: 3px; }
.statusline { display: flex; gap: 18px; align-items: center; font-size: 12px; color: var(--muted); }
.statusline b { color: var(--text); font-weight: 600; }
.listener-count { display: inline-flex; align-items: center; gap: 5px; color: var(--blue); }
.headphone-icon { font-style: normal; filter: grayscale(1); }
.connected-clients { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 7px; min-width: 92px; padding: 9px 12px; border: 1px solid #36566b; border-radius: 7px; background: #0b1821; color: var(--blue); text-align: right; }
.connected-clients .headphone-icon { grid-row: 1 / 3; font-size: 20px; }
.connected-clients strong { font: 700 17px Consolas, monospace; }
.connected-clients small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; background: var(--muted); }
.dot.green { background: var(--green); box-shadow: 0 0 8px #2bd57688; }
.dot.orange { background: var(--orange); }
.layout { display: grid; grid-template-columns: 210px 1fr; min-height: calc(100vh - 70px); }
.sidebar { padding: 24px 14px; border-right: 1px solid var(--line); background: #09121ae8; }
.nav { width: 100%; display:flex; align-items:center; gap:10px; text-align: left; color: var(--muted); padding: 10px 12px; background: transparent; border: 1px solid transparent; border-radius: 8px; margin-bottom: 5px; transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease; }
.nav:hover { transform:translateX(3px); color: var(--text); border-color:#293b48; background:#101d27; }
.nav.active { color: #fff; background: linear-gradient(90deg, #451720, #162733); border-color:#62303a; box-shadow:0 0 18px #f3132518; }
.nav-icon { width:23px; height:23px; display:grid; place-items:center; flex:0 0 23px; border:1px solid #304450; border-radius:6px; color:#8ab8d1; background:#0b1720; font-size:12px; }
.nav.active .nav-icon { color:#fff; border-color:#ad3440; background:#651b26; box-shadow:0 0 10px #f3132540; }
.sidefoot { margin-top: 42px; padding: 12px; color: var(--muted); font-size: 11px; border-top: 1px solid var(--line); line-height: 1.7; }
main { padding: 26px 30px 50px; max-width: 1500px; width: 100%; margin: 0 auto; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; }
.pagehead h2 { margin: 0 0 5px; font-size: 22px; }
.pagehead p { margin: 0; color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; }
.btn { border: 1px solid #34414b; color: var(--text); background: #171e24; padding: 9px 13px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.btn:hover { border-color: #52616c; }
.btn.primary { background: #5a1520; border-color: #b82837; color: #fff; }
.btn.primary:hover { border-color: #f34b58; background: #711a27; }
.btn.danger { background: #37181b; border-color: #793238; color: #ffb9bd; }
.btn.small { padding: 6px 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); padding: 15px; border-radius: 8px; }
.stat label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.stat strong { display: block; margin-top: 6px; font-size: 20px; }
.patch { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; margin-bottom: 14px; overflow: hidden; }
.patch.running { border-color: #7b303b; box-shadow: 0 0 0 1px #421e26 inset, 0 8px 30px #0005; }
.patchhead { padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; background: linear-gradient(90deg, #151c21, #10151a); }
.patchtitle { display: flex; gap: 12px; align-items: center; }
.patchtitle h3 { margin: 0; font-size: 15px; }
.patchmeta { color: var(--muted); font-size: 11px; margin-top: 5px; }
.state { min-width: 78px; min-height: 29px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; flex: none; }
.state.healthy, .state.connected { color: var(--green); border-color: #246844; }
.state.connecting { color: var(--yellow); border-color: #745d27; }
.state.warning, .state.error { color: var(--orange); border-color: #75401e; }
.endpoints { padding: 10px; display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); gap: 10px; }
.endpoint { background: var(--panel2); border: 1px solid #27313a; border-radius: 7px; padding: 13px; min-width: 0; position: relative; }
.endpoint, .patch, .card, .stat, .schedule-card { transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, opacity .2s ease; }
.endpoint.receiving { border-color: var(--green); box-shadow: 0 0 0 1px #2bd57655 inset, 0 0 20px #2bd57624; }
.endpoint.transmitting { border-color: var(--red); box-shadow: 0 0 0 1px #ff515a66 inset, 0 0 22px #ff515a2b; }
.endpointtop { display: flex; justify-content: space-between; gap: 8px; }
.endpoint-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.protocol-logo { width: 62px; height: 42px; flex: none; padding: 1px 3px; display: grid; place-items: center; border: 0; background: transparent; overflow: visible; }
.protocol-logo img { display: block; width: 100%; height: 100%; object-fit: contain; transform: translateY(-5px); }
.protocol-logo.p25 img { filter: drop-shadow(0 0 5px #438cff) drop-shadow(0 0 11px #438cff66); }
.protocol-logo.dmr img { filter: drop-shadow(0 0 5px #17c9c9) drop-shadow(0 0 11px #17c9c966); }
.protocol-logo.ysf img { filter: drop-shadow(0 0 5px #ff7a32) drop-shadow(0 0 11px #ff7a3266); }
.protocol-logo.dstar img { filter: drop-shadow(0 0 5px #ffc247) drop-shadow(0 0 11px #ff9f2866); }
.protocol-logo.allstar img { filter: drop-shadow(0 0 5px #35d878) drop-shadow(0 0 11px #35d87866); }
.endpoint h4 { margin: 0; font-size: 13px; }
.kind { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .11em; margin-top: 4px; }
.address { margin: 13px 0; font: 600 13px Consolas, monospace; color: #bcd0dc; }
.signal { display: grid; grid-template-columns: repeat(3,1fr); gap: 5px; margin: 10px 0; }
.lamp { padding: 5px; border: 1px solid var(--line); border-radius: 3px; color: #65717a; text-align: center; font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.lamp.on.rx { background: #19492d; border-color: #37a667; color: #75ffa9; box-shadow: 0 0 13px #2bd57655; animation: activity-pulse-green 1.4s ease-in-out infinite alternate; }
.lamp.on.tx { background: #592126; border-color: #c0444d; color: #ff9298; box-shadow: 0 0 14px #ff515a66; animation: activity-pulse-red 1.4s ease-in-out infinite alternate; }
.lamp.on.wait { background: #44391c; border-color: #7b652a; color: var(--yellow); }
@keyframes activity-pulse-green { to { box-shadow: 0 0 19px #2bd57688; } }
@keyframes activity-pulse-red { to { box-shadow: 0 0 20px #ff515a99; } }
.identity { min-height: 31px; border-top: 1px solid var(--line); padding-top: 9px; color: var(--muted); font-size: 10px; display: flex; justify-content: space-between; }
.identity b { color: var(--text); font-family: Consolas, monospace; }
.controlrow { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.controlrow input[type=range] { min-width: 70px; flex: 1; accent-color: var(--green); }
.audio-control { display: grid; grid-template-columns: 82px 1fr 38px; gap: 8px; align-items: center; margin-top: 8px; color: var(--muted); font-size: 10px; }
.audio-control input[type=range] { width: 100%; min-width: 70px; accent-color: var(--blue); }
.audio-control output { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.toggle { width: 31px; height: 17px; border-radius: 10px; background: #343e45; border: none; position: relative; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; background: #89949b; border-radius: 50%; transition: .15s; }
.toggle.on { background: #226641; }
.toggle.on::after { left: 17px; background: var(--green); }
.patchfoot { display: flex; gap: 18px; align-items: center; padding: 10px 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.patchfoot input[type=range] { width: 100px; accent-color: var(--blue); }
.blank { text-align: center; padding: 70px 20px; border: 1px dashed #2b353d; border-radius: 9px; color: var(--muted); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 18px; margin-bottom: 14px; }
.card h3 { margin: 0 0 15px; font-size: 14px; }
.span2 { grid-column: 1 / -1; }
.safety-card { padding: 0; overflow: hidden; }
.safety-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg,#14212b,#101923); }
.safety-heading h3 { margin: 3px 0 0; font-size: 16px; }
.eyebrow,.section-label { color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .14em; }
.safety-summary,.integration-state { padding: 6px 9px; border: 1px solid #315443; border-radius: 5px; color: var(--green); background: #10251c; font: 700 9px Consolas,monospace; letter-spacing: .1em; }
.safety-summary.armed { color: #ffb5ba; border-color: #8d343c; background: #2b1519; box-shadow: 0 0 18px #f3132524; }
.safety-options { display: grid; gap: 9px; padding: 14px; }
.safety-option { width: 100%; min-height: 68px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); text-align: left; border: 1px solid #2c3c48; border-radius: 8px; background: #0c1720; }
.safety-option:hover { border-color: #466072; background: #111f29; }
.safety-option.active { border-color: #7d6630; background: #251f13; box-shadow: 0 0 0 1px #6f592544 inset; }
.safety-option.critical.active { border-color: #a63843; background: #2b1519; box-shadow: 0 0 20px #f3132524; }
.safety-icon { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #3b4c59; border-radius: 7px; color: var(--blue); background: #14232e; font-size: 15px; }
.safety-option.critical.active .safety-icon { color: var(--red); border-color: #8f343c; background: #38171c; }
.safety-copy { min-width: 0; }
.safety-copy b,.safety-copy small { display: block; }
.safety-copy b { margin-bottom: 5px; font-size: 12px; }
.safety-copy small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.switch { width: 40px; height: 22px; border-radius: 14px; background: #34424d; position: relative; box-shadow: inset 0 0 0 1px #ffffff0b; }
.switch::after { content:""; position:absolute; width:16px; height:16px; top:3px; left:3px; border-radius:50%; background:#93a0a9; transition:left .18s ease,background .18s ease,box-shadow .18s ease; }
.switch.on { background: #744029; }
.switch.on::after { left:21px; background:var(--orange); box-shadow:0 0 9px #ff8b3d88; }
.safety-option.critical .switch.on { background:#762832; }
.safety-option.critical .switch.on::after { background:var(--red); box-shadow:0 0 10px #ff515aaa; }
.discord-card .card-titlebar { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.integration-state { color:var(--muted); border-color:var(--line); background:#0d161e; }
.integration-state.on { color:var(--green); border-color:#315443; background:#10251c; }
.section-label { margin: 10px 0; }
.alert-event-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:8px; margin-bottom:20px; }
.alert-choice { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:start; padding:11px; border:1px solid var(--line); border-radius:7px; background:#0c161e; cursor:pointer; }
.alert-choice:hover { border-color:#465c6c; }
.alert-choice input { margin-top:2px; accent-color:var(--accent); }
.alert-choice b,.alert-choice small { display:block; }
.alert-choice b { font-size:11px; margin-bottom:3px; }
.alert-choice small,.field-help { color:var(--muted); font-size:9px; line-height:1.35; }
.live-status-list { display:grid; gap:10px; }
.live-status-row { display:grid; grid-template-columns:minmax(180px,1fr) auto minmax(280px,1.5fr) auto; gap:14px; align-items:center; padding:14px; border:1px solid var(--line); border-radius:8px; background:#0b161e; }
.live-patch b,.live-patch small { display:block; }
.live-patch b { margin-bottom:5px; font-size:12px; }
.live-patch small { color:var(--muted); font-size:9px; line-height:1.4; }
.live-webhook { margin:0; }
.compact-switch { display:flex; align-items:center; gap:7px; padding:7px 9px; border:1px solid var(--line); border-radius:6px; color:var(--muted); font-size:10px; cursor:pointer; }
.compact-switch input { accent-color:var(--green); }
@media (max-width: 900px) { .live-status-row { grid-template-columns:1fr auto; } .live-webhook { grid-column:1 / -1; } .live-status-row .actions { grid-column:1 / -1; justify-content:flex-end; } }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 12px; }
.field label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.field input, .field select { width: 100%; background: #0c1115; border: 1px solid #303c45; color: var(--text); border-radius: 5px; padding: 9px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--green); }
.field input:focus, .field select:focus { box-shadow: 0 0 0 3px #2bd57612; }
.directory-picker { position: relative; }
.directory-options { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); max-height: 270px; overflow-y: auto; padding: 5px; border: 1px solid #425563; border-radius: 7px; background: #0a1117; box-shadow: 0 14px 35px #000c; }
.directory-options button { width: 100%; display: grid; grid-template-columns: 70px 1fr; gap: 3px 9px; padding: 9px 10px; border: 0; border-bottom: 1px solid #1e2b34; background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.directory-options button:hover,.directory-options button:focus { background: #142631; outline: 1px solid #31566c; }
.directory-options button b { color: var(--blue); font: 700 12px Consolas,monospace; }
.directory-options button span { font-size: 11px; }
.directory-options button small { grid-column: 2; color: var(--muted); font-size: 9px; }
.directory-empty { padding: 14px; color: var(--muted); text-align: center; }
.endpoint-edit:not([data-type="p25"]) .only-p25 { display: none; }
.endpoint-edit:not([data-type="allstar"]) .only-allstar,
.endpoint-edit:not([data-type="allstar"]) .only-direct { display: none; }
.endpoint-edit:not([data-type="dmr"]) .only-dmr { display: none; }
.endpoint-edit:not([data-type="ysf"]) .only-ysf { display: none; }
.endpoint-edit:not([data-type="dstar"]) .only-dstar { display: none; }
.endpoint-edit[data-dstar-mode="custom"] .dstar-directory-field { display: none; }
.endpoint-edit:not([data-dstar-mode="custom"]) .dstar-custom-field { display: none; }
.audio-matrix{border-top:1px solid var(--line);display:grid;gap:12px;padding-top:18px;margin-top:18px}.audio-route{border:1px solid var(--line);border-radius:12px;padding:12px;background:#08131caa}.audio-route-title{display:flex;align-items:center;gap:10px;color:var(--text);margin-bottom:10px}.audio-route-title span{color:var(--blue)}.audio-route-controls{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));gap:12px}.audio-route-controls label{display:grid;grid-template-columns:1fr auto;gap:5px;font-size:11px;color:var(--muted)}.audio-route-controls input{grid-column:1/-1;width:100%;accent-color:var(--blue)}.audio-route-controls output{color:var(--text)}@media(max-width:900px){.audio-route-controls{grid-template-columns:1fr 1fr}}
.endpoint-audio-action{display:flex;align-items:center;gap:10px;margin-top:12px;padding-top:11px;border-top:1px solid var(--line)}.endpoint-audio-action small{color:var(--muted);font-size:10px}.audio-route-button{border-color:#31566f;background:linear-gradient(180deg,#142b3a,#0c1c27)}.audio-route-button:hover{border-color:var(--blue);box-shadow:0 0 14px #74b9ea25}.audio-wave{display:inline-flex;width:20px;height:14px;color:var(--blue)}.audio-wave svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.audio-modal{max-width:1180px}
.endpoint-audio-action.public{margin-top:12px;padding-top:10px;border-top:1px solid var(--line)}.public-audio-modal input:disabled{opacity:.85;cursor:default}.public-audio-modal .audio-matrix{margin-top:0}
.endpoint-edit[data-type="allstar"]:not([data-auth="direct"]) .only-direct { display: none; }
.schedule-modal:not([data-mode="once"]) .only-once { display: none; }
.schedule-modal:not([data-mode="weekly"]) .only-weekly { display: none; }
.table { width: 100%; border-collapse: collapse; font-size: 11px; }
.table th { text-align: left; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: 9px; padding: 9px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px 9px; border-bottom: 1px solid #20282e; }
.tag { padding: 3px 6px; border-radius: 3px; background: #1c252b; color: #a9b6be; font-size: 9px; }
.history-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: -5px 0 12px; }
.history-tab { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 5px; border: 1px solid var(--line); background: #101b24; color: var(--muted); font-size: 11px; }
.diagnostic-output { max-height: 360px; overflow: auto; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #071017; color: #9fc6db; font: 10px/1.5 Consolas,monospace; white-space: pre-wrap; }
.history-tab b { min-width: 20px; padding: 2px 6px; border-radius: 10px; background: #24313b; color: var(--text); font-size: 9px; text-align: center; }
.history-tab.active { color: #fff; border-color: #a72c39; background: #491923; box-shadow: 0 0 16px #f3132518; }
.history-tab.active b { background: var(--accent); color: #fff; }
.schedule-guide { display: flex; align-items: center; gap: 12px; padding: 12px 15px; margin-bottom: 13px; border: 1px solid var(--line); border-radius: 7px; background: #0d1821; color: var(--muted); font-size: 11px; }
.schedule-guide b { color: var(--text); margin-right: auto; text-transform: uppercase; letter-spacing: .08em; }
.schedule-guide i { color: var(--accent); font-style: normal; font-size: 18px; }
.schedule-list { display: grid; gap: 10px; }
.schedule-card { display: grid; grid-template-columns: 70px 1fr auto; gap: 15px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.schedule-card.disabled { opacity: .55; }
.schedule-card h3 { margin: 0 0 5px; font-size: 14px; }
.schedule-card p { margin: 0; color: var(--muted); font-size: 11px; }
.schedule-action { padding: 8px; border-radius: 5px; text-align: center; font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.schedule-action.start { color: #baffd4; border: 1px solid #287448; background: #153c28; }
.schedule-action.stop { color: #ffc3c7; border: 1px solid #86343b; background: #461d23; }
.schedule-controls { display: flex; align-items: center; gap: 8px; }
.day-picker { display: grid; grid-template-columns: repeat(7,1fr); gap: 7px; }
.day-picker label input { position: absolute; opacity: 0; pointer-events: none; }
.day-picker label span { display: block; padding: 10px 5px; border: 1px solid #34434e; border-radius: 5px; background: #0b141b; color: var(--muted); text-align: center; cursor: pointer; font-size: 10px; }
.day-picker label input:checked + span { border-color: #b62e3c; background: #531923; color: #fff; }
.dashboard-apply { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.dashboard-addresses { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: var(--muted); font-size: 11px; }
.dashboard-addresses span { color: var(--muted); font-size: 8px; letter-spacing: .13em; }
.dashboard-addresses b { color: var(--blue); font-family: Consolas, monospace; font-weight: 500; overflow-wrap: anywhere; }
.card-titlebar { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.card-titlebar h3 { margin-bottom: 4px; }
.card-titlebar p { margin: 0; color: var(--muted); font-size: 10px; }
.blank.compact { padding: 38px 20px; }
.file-button { display: inline-flex; align-items: center; cursor: pointer; transition: transform .16s ease, border-color .16s ease, background-color .16s ease; }
.file-button:hover { transform: translateY(-1px); border-color: #f34b58; background: #711a27; }
.tone-help { border-color: #385168; background: #101f2b; color: #b9d5e8; }
.table-select { min-width: 165px; padding: 7px 9px; color: var(--text); background: #0c1115; border: 1px solid #303c45; border-radius: 5px; }
.table-select:disabled { opacity: .45; }
.tone-name-input { width: 170px; padding: 7px 9px; color: var(--text); background: #0c1115; border: 1px solid #303c45; border-radius: 5px; font-weight: 600; }
.tone-assignment { background: #0d171f; margin-top: 4px; }
.tone-assignment p { margin: -3px 0 0; color: var(--muted); font-size: 10px; }
.permission-grid { display: grid; gap: 9px; }
.permission { display: grid; grid-template-columns: 1fr auto; gap: 3px 15px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #0c151c; cursor: pointer; }
.permission b { font-size: 12px; }
.permission span { color: var(--muted); font-size: 10px; }
.permission input { grid-column: 2; grid-row: 1 / 3; width: 18px; }
.console-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; }
.console-head .actions { justify-self: end; }
.console-tools { justify-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.console-listeners { min-width: 58px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 10px; border: 1px solid #36566b; border-radius: 7px; background: #0b1821; color: var(--blue); box-shadow: inset 0 0 14px #0004; }
.console-listeners strong { font: 700 16px Consolas, monospace; }
.console-clock { justify-self: center; text-align: center; min-width: 165px; padding: 7px 18px 6px; border: 1px solid #374854; border-radius: 7px; background: #0b151d; box-shadow: inset 0 0 18px #0005; }
.console-clock span { display: block; color: #80919e; font-size: 8px; letter-spacing: .22em; }
.console-clock strong { display: block; margin-top: 2px; color: #fff; font: 600 19px Consolas, monospace; letter-spacing: .08em; text-shadow: 0 0 11px #f3132555; }
.public-visibility { display: flex; align-items: center; gap: 11px; margin: 2px 0 16px; padding: 11px 13px; border: 1px solid #334653; border-radius: 7px; background: #0c171f; cursor: pointer; text-align: left; }
.public-visibility input { width: 18px; height: 18px; accent-color: var(--green); }
.public-visibility span { display: flex; flex-direction: column; gap: 2px; }
.public-visibility b { font-size: 11px; }
.public-visibility small { color: var(--muted); font-size: 9px; }
.modalback { position: fixed; inset: 0; background: #000b; display: grid; place-items: center; z-index: 10; padding: 25px; }
.modal { width: min(820px, 100%); height:auto; max-height: 90vh; display:flex; flex-direction:column; overflow:hidden; background: linear-gradient(180deg,#121c24,#0d151b); border: 1px solid #3b4f5c; border-radius: 12px; box-shadow: 0 24px 90px #000,0 0 0 1px #ffffff05 inset; }
.modalhead { flex:0 0 auto; z-index:8; padding: 18px 20px; border-bottom: 1px solid #344650; background:linear-gradient(90deg,#14232d,#101820); box-shadow:0 8px 22px #0006; }
.modalhead h2 { margin: 0 0 4px; font-size: 18px; }
.modalhead p { margin: 0; color: var(--muted); font-size: 11px; }
.modalbody { min-height:0; padding: 20px; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.modalfoot { flex:0 0 auto; z-index:8; padding: 14px 20px; border-top: 1px solid #344650; display: flex; justify-content: flex-end; gap: 8px; background:#101920; box-shadow:0 -8px 22px #0006; }
.modal-guide { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:16px; padding:9px; border:1px solid #304552; border-radius:9px; background:#09141c; }
.modal-guide span { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:10px; }
.modal-guide b { width:22px; height:22px; display:grid; place-items:center; border-radius:50%; color:#fff; background:#64202a; box-shadow:0 0 10px #f3132533; }
.endpoint-edit { padding:0; overflow:visible; border-radius:10px; }
.endpoint-edit > .grid2 { padding:16px; }
.endpoint-edit-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 14px; border-bottom:1px solid #2e414d; border-radius:10px 10px 0 0; background:linear-gradient(90deg,#142531,#0d1820); }
.endpoint-edit-head div { display:flex; align-items:center; gap:10px; min-width:0; }
.endpoint-edit-head span { color:var(--blue); font:700 9px Consolas,monospace; letter-spacing:.12em; }
.endpoint-edit-head b { overflow:hidden; color:var(--text); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.credential-banner { display:grid; grid-template-columns:34px 1fr; gap:11px; align-items:center; margin-bottom:16px; padding:11px 13px; border:1px solid #315543; border-radius:8px; background:#10231b; }
.credential-banner > span { width:30px; height:30px; display:grid; place-items:center; border-radius:50%; color:var(--green); background:#173c2a; font-weight:800; }
.credential-banner b,.credential-banner small { display:block; }
.credential-banner b { margin-bottom:3px; font-size:11px; }
.credential-banner small { color:var(--muted); font-size:9px; line-height:1.4; }
.credential-banner.warning { border-color:#805026; background:#2b1e13; }
.credential-banner.warning > span { color:var(--orange); background:#4b2d16; }
@media (max-width:700px) { .modal-guide { grid-template-columns:1fr; } .endpoint-edit-head div { flex-direction:column; align-items:flex-start; gap:3px; } }
.notice { border: 1px solid #70421f; background: #2d1e13; color: #ffc08f; padding: 9px 11px; font-size: 11px; border-radius: 5px; margin-bottom: 12px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: #1b242a; border: 1px solid #42505a; padding: 11px 14px; border-radius: 6px; font-size: 11px; z-index: 20; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } .sidebar { display:none; } .summary { grid-template-columns: 1fr 1fr; } .statusline span:nth-of-type(-n+2) { display:none; } .console-head { grid-template-columns: 1fr auto; } .console-clock { grid-row: 2; justify-self: start; margin-top: 14px; } .console-tools { grid-column: 2; grid-row: 2; } .schedule-card { grid-template-columns: 60px 1fr; } .schedule-controls { grid-column: 1 / -1; justify-content: flex-end; } .dashboard-apply { align-items: stretch; flex-direction: column; } }
@media (max-width: 650px) { .lite-expired-banner,.lite-expired-banner div { flex-direction:column; text-align:center; gap:7px; } }
@media (max-width: 700px) {
  .topbar { height: auto; min-height: 70px; padding: 12px 14px; flex-direction: column; justify-content: center; gap: 10px; text-align: center; }
  .brand, .statusline, .actions, .patchhead .actions { justify-content: center; }
  .statusline { width: 100%; gap: 12px; flex-wrap: wrap; }
  main { padding: 20px 12px 42px; text-align: center; }
  .pagehead, .card-titlebar { flex-direction: column; align-items: center; text-align: center; gap: 12px; }
  .console-head { display: flex; flex-direction: column; align-items: center; text-align: center; }
  .console-clock { order: 2; justify-self: center; margin: 4px auto 0; }
  .console-tools { order: 3; justify-self: center; justify-content: center; flex-wrap: wrap; }
  .console-head .actions { justify-self: center; }
  .summary, .grid2 { grid-template-columns: 1fr; }
  .patchhead { grid-template-columns: 1fr; text-align: center; }
  .patchtitle { flex-direction: column; justify-content: center; }
  .endpoints { grid-template-columns: minmax(0,1fr); }
  .endpointtop, .endpoint-heading { flex-direction: column; align-items: center; text-align: center; }
  .address { text-align: center; overflow-wrap: anywhere; }
  .identity { flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
  .controlrow, .patchfoot, .history-tabs, .schedule-guide, .schedule-controls { justify-content: center; }
  .controlrow, .patchfoot, .schedule-guide { flex-wrap: wrap; }
  .field label, .table th, .table td { text-align: center; }
  .dashboard-addresses { align-items: center; text-align: center; }
  .dashboard-apply { align-items: center; }
  .connected-clients { margin: 0 auto; }
  .schedule-card { grid-template-columns: 1fr; text-align: center; }
  .schedule-controls { grid-column: 1; }
  .card { overflow-x: auto; }
  .modalback { padding: 10px; }
  .modalhead, .modalbody, .modalfoot { text-align: center; }
  .public-visibility { justify-content: center; text-align: left; }
  .modalfoot { justify-content: center; flex-wrap: wrap; }
  .toast { left: 12px; right: 12px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
