:root{color-scheme:dark;--bg:#111316;--surface:#181b1f;--raised:#20242a;--line:#353a42;--text:#e2e5e9;--muted:#a5adb7;--focus:#b6c6d8;--mono:Consolas,"SFMono-Regular",monospace}

*{box-sizing:border-box}
html{scroll-padding-top:24px}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
a{color:inherit;text-underline-offset:3px}
a:hover{color:#fff}
button,input,select,textarea{font:inherit}
button,.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:7px 13px;background:#d3d9df;color:#15191d;border:1px solid #d3d9df;border-radius:3px;font-weight:600;text-decoration:none;cursor:pointer;white-space:nowrap}
button:hover,.button:hover{background:#e8ecf0;color:#101215}
.secondary{background:transparent;color:var(--text);border-color:#5b636e}
.secondary:hover{background:#2b3037;color:#fff;border-color:#828c98}
.danger{color:#efb2ad;border-color:#71524f}
.danger:hover{color:#ffe1df;background:#342422}
button:disabled{cursor:default;opacity:.5}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--focus);outline-offset:3px}
.site-header{height:64px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1344px)/2))}
.brand{font:600 20px var(--mono);letter-spacing:2px;text-decoration:none}
.brand span{font-size:11px;color:var(--muted);letter-spacing:1px;margin-left:13px}
.environment{font-size:12px;color:var(--muted)}
.site-main{max-width:1392px;padding:34px 24px 48px;margin:auto}
.site-footer{display:flex;gap:20px;justify-content:space-between;max-width:1344px;margin:0 auto;padding:18px 0 26px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
h1,h2,h3,p{margin-top:0}
h1{font-size:28px;line-height:1.25;font-weight:600;margin-bottom:8px;letter-spacing:-.3px}
h2{font-size:17px;line-height:1.4;font-weight:600;margin:0}
h3{font-size:15px;font-weight:600}
.page-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:24px}
.eyebrow{font:11px var(--mono);letter-spacing:1.6px;color:var(--muted);margin-bottom:10px}
.subtitle{color:var(--muted);margin-bottom:0}
.section-nav{display:flex;gap:24px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding:0 0 14px;margin-bottom:24px}
.section-nav a{text-decoration:none;color:#bbc2cb}
.section-nav a:hover{text-decoration:underline}
.panel,.settings-group{border:1px solid var(--line);background:var(--surface);border-radius:3px;padding:20px;margin-bottom:20px}
.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}
.meta,.help,.muted{color:var(--muted)}
.help{font-size:12px;line-height:1.6}
.mono,code,pre{font-family:var(--mono);font-size:12px}
.nowrap{white-space:nowrap}
.status{display:inline-block;font-size:12px;color:#c8ced6}
.revision{font-size:12px;white-space:nowrap;color:var(--muted);margin-top:3px}
.revision code{color:var(--text)}
.table-scroll{position:relative;overflow:auto;border:1px solid var(--line);border-radius:2px}
table{width:100%;border-collapse:collapse;font-size:13px}
th{text-align:left;font-size:11px;font-weight:600;letter-spacing:.3px;color:var(--muted);background:#1d2126;white-space:nowrap}
th,td{padding:12px 14px;border-bottom:1px solid var(--line);vertical-align:middle}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover{background:#1e2227}
.client-name{font-weight:600;text-decoration:none;white-space:nowrap}
.client-name:hover{text-decoration:underline}
.client-table td:last-child{width:1%;position:sticky;right:0;background:var(--surface);border-left:1px solid var(--line)}
.empty-state{padding:20px 0 8px;color:var(--muted)}
.empty-state h3{color:var(--text);margin-bottom:5px}
.empty-state p{margin-bottom:0}
.workflow{padding-left:20px;color:#c5cbd3;font-size:13px;line-height:1.8;margin:0 0 15px}
.technical-details{margin:12px 0 20px}
.technical-details summary,.identity-details summary{cursor:pointer;color:var(--muted);font-size:12px}
.technical-details pre{background:var(--bg);padding:14px;border:1px solid var(--line);overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.release-form{grid-template-columns:minmax(120px,.55fr) minmax(180px,1fr) minmax(180px,1fr);margin:20px 0}
.field{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#c7ced7;min-width:0}
:where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){display:block;width:100%;min-width:0;min-height:36px;background:#101317;border:1px solid #48505c;border-radius:3px;color:var(--text);padding:7px 10px}
input[type=file]{font-size:12px;padding:5px!important}
input[type=file]::file-selector-button{background:var(--raised);color:var(--text);border:0;border-right:1px solid var(--line);padding:6px 10px;margin:-5px 9px -5px -10px}
input::placeholder,textarea::placeholder{color:#7d8794}
input[type=checkbox],input[type=radio]{accent-color:#b7c5d3;width:15px;height:15px;margin:0;flex-shrink:0}
textarea{font-family:var(--mono);font-size:12px;min-height:170px;resize:vertical;line-height:1.6}
.form-actions{grid-column:1/-1;display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:5px}
.inline-form{display:flex;gap:12px;align-items:flex-end;max-width:700px}
.inline-form>.field{flex:1}
.minor-action{margin-top:16px}
.checkbox-row{display:flex;align-items:center;gap:9px;font-size:13px;margin:10px 0;color:var(--text)}
.policy-form .checkbox-row{display:inline-flex;margin:0 30px 15px 0}
.configuration-layout{display:grid;grid-template-columns:185px minmax(0,1fr);gap:24px;align-items:start}
.config-nav{position:sticky;top:24px;display:flex;flex-direction:column;border-left:1px solid var(--line);padding-left:17px}
.config-nav a{padding:8px 0;color:#bbc2cb;font-size:13px;text-decoration:none}
.config-nav a:hover{color:#fff;text-decoration:underline}
.nav-caption{font:10px var(--mono);letter-spacing:1px;color:#838e9b;margin-bottom:10px}
.configuration-content{min-width:0}
.settings-group{padding:0}
.settings-group>summary{padding:16px 20px;font-size:15px;font-weight:600;cursor:pointer;border-bottom:1px solid transparent}
.settings-group[open]>summary{border-bottom-color:var(--line)}
.settings-group>div,.settings-group>p,.settings-group>label,.settings-group>table{margin:16px 20px}
.settings-group .field-grid{padding:0}
.settings-group .field{margin:0}
.settings-group table{width:calc(100% - 40px)}
.settings-group .help{font-size:12px}
.settings-group .checkbox-row{margin:12px 20px}
.settings-group .field-grid .checkbox-row{margin:0}
.settings-group .field-grid label:has(input[type=checkbox]){align-items:center}
.settings-group .field-grid label{overflow-wrap:anywhere}
.settings-group table.band-table{display:table;width:100%;min-width:650px;margin:0}
.settings-group>.table-scroll{max-width:calc(100% - 40px)}
.band-table th,.band-table td{padding:7px 8px}
.band-table input[type=number]{width:95px;min-width:78px;font-family:var(--mono)}
.band-table input[type=checkbox]{display:block;margin:auto}
.band-table button{min-height:30px;padding:4px 8px;font-size:12px}
.band-table td:nth-child(n+3){text-align:center}
.band-table tbody tr:hover{background:transparent}
.identity-details{border-top:1px solid var(--line);padding-top:10px}
.identity-details code{display:block;overflow-wrap:anywhere;margin-top:8px}
.status-grid{display:grid;grid-template-columns:.7fr 1.3fr 1fr 1fr;gap:20px;margin:0 0 10px}
.status-grid dt{font-size:11px;color:var(--muted);margin-bottom:6px}
.status-grid dd{margin:0}
.device-short-id{padding:6px 10px;border:1px solid var(--line);border-radius:3px;color:#c7ced7}
.back-link{display:inline-block;margin-bottom:20px;font-size:12px;color:var(--muted)}
.device-status .help{margin-bottom:10px}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.site-main>h2{margin-bottom:20px}
.site-main>form{max-width:430px;border:1px solid var(--line);padding:24px;background:var(--surface)}
.site-main>form label{display:block;font-size:12px;color:var(--muted);margin-bottom:18px}
.site-main>form input{margin-top:7px}
.device-config-form>.form-actions{position:static;background:#20242a;border:1px solid #59616c;border-radius:3px;padding:14px;z-index:2}
.device-config-form>p{color:var(--muted);font-size:12px}
.notice{padding:12px 16px;border:1px solid var(--line);background:var(--surface);margin-bottom:20px;font-size:13px}

@media(max-width:950px){.status-grid{grid-template-columns:1fr 1fr}
.configuration-layout{grid-template-columns:1fr;gap:16px}
.config-nav{position:static;flex-direction:row;flex-wrap:wrap;gap:4px 20px;border-left:0;border-bottom:1px solid var(--line);padding:0 0 12px}
.nav-caption{width:100%;margin-bottom:2px}
.release-form{grid-template-columns:1fr}
.site-footer{margin:0 24px}
.client-table{min-width:900px}
}

@media(max-width:600px){.site-header{height:56px;padding:0 16px}
.environment{display:none}
.site-main{padding:24px 16px}
.site-footer{margin:0 16px;flex-direction:column;gap:6px}
.page-heading{margin-bottom:20px}
h1{font-size:23px}
.section-nav{gap:12px 18px;font-size:12px}
.panel{padding:16px}
.panel-heading{align-items:flex-start;flex-direction:column;gap:5px}
.field-grid{grid-template-columns:1fr}
.inline-form{align-items:stretch;flex-direction:column}
.inline-form>button{align-self:flex-start}
.form-actions{align-items:flex-start;flex-direction:column;gap:9px}
.status-grid{gap:15px}
.policy-form .checkbox-row{display:flex;margin-right:0}
.settings-group>summary{padding:14px 16px}
.settings-group>div,.settings-group>p,.settings-group>label,.settings-group>table{margin-left:16px;margin-right:16px}
.settings-group table{width:calc(100% - 32px)}
.device-config-form>.form-actions{position:static}
.brand{font-size:18px}
}


.settings-group>button{margin:0 20px 16px}
.notice.error{border-color:#79524e;color:#f3c7c3}

/* The receiver configuration keeps the original application's compact,
   single-column control hierarchy; the surrounding control panel is unchanged. */
.native-settings{color-scheme:light;color:#171b20;background:#e9ebee;border:1px solid #8793a0;padding:4px;max-width:1060px}
.native-title{font-size:18px;font-weight:700;padding:3px 4px 9px}
.native-settings .device-config-form>.help{font-size:12px;line-height:1.4;color:#47515e;margin:4px 5px 7px}
.native-settings .settings-group{background:transparent;border:0;border-radius:0;padding:0;margin:3px 0}
.native-settings .settings-group>summary{border:0;background:#c2cfde;color:#111820;padding:4px 9px;font-size:16px;line-height:1.45;font-weight:700;cursor:pointer}
.native-settings .settings-group[open]>summary{border:0}
.native-settings .settings-group>div,.native-settings .settings-group>p,.native-settings .settings-group>label,.native-settings .settings-group>table{margin:4px}
.native-settings .help,.native-settings .muted{color:#4b5562;font-size:12px;line-height:1.4}
.native-settings .checkbox-row{color:#171b20;font-size:14px;font-weight:600;min-height:25px;margin:4px;gap:6px}
.native-settings input[type=checkbox],.native-settings input[type=radio]{accent-color:#3e82cb;width:19px;height:19px}
.native-settings :where(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){background:#fff;border:1px solid #a6afbb;color:#111820;border-radius:0;min-height:29px;padding:3px 7px;font-size:14px;font-weight:600}
.native-settings input::placeholder{color:#66717e;font-weight:400}
.native-settings .field-grid{grid-template-columns:1fr;gap:4px}
.native-settings .field{color:#171b20;font-size:14px;font-weight:600;gap:3px}
.native-settings .native-field{display:grid;grid-template-columns:minmax(120px,1fr) minmax(130px,1fr);align-items:center;gap:5px;font-size:14px;font-weight:600;margin:3px 4px;min-width:0}
.native-settings .native-field>span{min-width:0;overflow-wrap:anywhere}
.native-settings .native-field>input,.native-settings .native-field>select{order:0}
.native-settings .native-field>output{order:1;white-space:nowrap;font:600 13px var(--mono);padding:2px 4px}
.native-settings .native-field>span{order:2}
.native-settings .native-field>small{order:3;grid-column:1/-1;font-weight:400}
.native-settings .native-field:has(>output){grid-template-columns:minmax(110px,1fr) auto minmax(130px,1fr)}
.native-settings .native-field>input,.native-settings .native-field>select{width:100%;min-width:0}
.native-settings .native-range{display:grid;grid-template-columns:minmax(140px,1fr) minmax(130px,1fr);gap:5px;align-items:center;margin:3px 4px;font-weight:600}
.native-settings input[type=range]{accent-color:#4c90d5;padding:0!important;min-height:27px!important;border:0!important;background:#fff!important}
.native-settings .native-radio-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;padding:2px 4px}
.native-settings .native-radio-row label{display:flex;gap:5px;align-items:center;font-size:14px;font-weight:600}
.native-settings .table-scroll{border:0;border-radius:0;background:transparent;max-width:calc(100% - 8px)}
.native-settings table{color:#171b20;border-collapse:collapse;font-size:14px;font-weight:600;width:100%;margin:0}
.native-settings th{color:#111820;background:#cbd7e6;font-size:14px;letter-spacing:0;font-weight:700}
.native-settings th,.native-settings td{border:1px solid #a4adba;padding:2px 4px}
.native-settings tbody tr:hover{background:transparent}
.native-settings td{background:#f4f5f7}
.native-settings .band-table{min-width:650px}
.native-settings .band-table input[type=number]{width:100%;min-width:70px;text-align:left;border:0;font:600 14px/1.4 var(--mono)}
.native-settings button,.native-settings .button{background:#b7cbe3;border:1px solid #dce6f2;color:#111820;font-size:14px;font-weight:700;min-height:31px;padding:3px 10px;border-radius:0}
.native-settings button:hover,.native-settings .button:hover{background:#9fbadc;color:#0c1219}
.native-settings button:disabled{color:#5e6570;background:#d4d8de;opacity:1}
.native-settings .settings-group>button{margin:3px 4px;width:calc(50% - 8px)}
.native-settings .stepper{display:grid;grid-template-columns:minmax(65px,1fr) 28px 28px;gap:2px;align-items:center;min-width:125px}
.native-settings .stepper button{min-height:28px;width:28px;padding:0;font-size:17px}
.native-settings .native-stepper{display:grid;grid-template-columns:minmax(65px,1fr) 28px 28px;gap:2px;align-items:center;min-width:125px}
.native-settings .native-stepper button{min-height:28px;width:28px;padding:0;font-size:17px}
.native-settings .chat-table{min-width:650px}
.native-settings .chat-table input[type=text]{min-width:100px;width:100%;border:0}
.native-settings .chat-table input[type=checkbox]{display:block;margin:auto}
.native-settings .chat-table button{min-height:27px;white-space:nowrap}
.native-settings .device-config-form>.form-actions{background:transparent;border:0;border-radius:0;padding:5px 0;margin:5px 0;display:flex;gap:5px}
.native-settings .device-config-form>.form-actions>button{width:48%;min-height:42px}
.native-settings .panel{background:transparent;border:0;border-top:1px solid #9aa5b1;border-radius:0;margin:5px 0;padding:6px;color:#2b343f}
.native-settings .panel summary{font-size:12px;cursor:pointer}
.native-settings pre{white-space:pre-wrap;overflow-wrap:anywhere;margin:7px 0}
.native-settings .native-subheading{border-bottom:1px solid #a4adba;padding:4px;margin:5px 4px;font-weight:700}
.native-settings [hidden]{display:none!important}
.native-settings tr[data-selected=true] td{background:#dde7f2}
.native-settings>form.native-settings{border:0;padding:0;max-width:none}
.native-settings .native-management{display:flex;flex-wrap:wrap;gap:2px 13px;border:1px solid #a7b0bc;padding:5px;margin:4px 0 8px!important;background:#dce1e8}
.native-settings .native-management .checkbox-row{font-size:11px;min-height:20px;margin:0;gap:4px}
.native-settings .native-management input{width:14px;height:14px}
.native-settings .native-inline{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
.native-settings .native-inline>.native-field{flex:1;min-width:300px}
.native-settings .native-inline>.checkbox-row{flex:0 1 auto;margin-right:12px}
.native-settings .native-paired-buttons{display:grid;grid-template-columns:1fr 1fr;gap:4px;align-items:center;margin:4px}
.native-settings .native-paired-buttons>.native-field{margin:0}
.native-settings .native-actions{border-top:1px solid #919da9;padding-top:5px;margin-top:7px}
.native-settings .native-actions h3{font-size:16px;border-bottom:1px solid #9aa5b0;margin:6px 4px;padding:2px 0;font-weight:700}
.native-settings .native-actions p{margin:3px 4px;font-size:14px;font-weight:600}
.native-settings .warning{color:#a02323;font-size:12px;font-weight:600;margin:4px}
.native-settings .native-nested{margin:3px 0 0!important}
.native-settings .native-table input[type=number]{width:100%;min-width:65px}
.native-settings .native-table input[type=color]{min-width:45px;max-width:100px;height:29px;padding:0}
.native-settings .native-field:has([name=telegram_jpeg_quality_percent])>span,.native-settings .native-field:has([name=sound_level_percent])>span,.native-settings .native-field:has([name=telegram_auto_send_jpeg_interval_sec])>span{display:none}
.native-settings .native-field:has([name=telegram_jpeg_quality_percent]),.native-settings .native-field:has([name=sound_level_percent]),.native-settings .native-field:has([name=telegram_auto_send_jpeg_interval_sec]){grid-template-columns:minmax(100px,1fr) auto}
.native-settings .native-field:has([name=sound_level_percent]){max-width:52%}
.native-settings table.native-table:has([data-chat-rows]){min-width:650px}
.native-settings table.native-table:has([data-attention-rows]){min-width:390px}
.native-settings #sound table.native-table{min-width:500px}
@media(max-width:600px){.native-settings .native-inline>.native-field{min-width:0;width:100%;flex-basis:100%}.native-settings .native-field:has(>output){grid-template-columns:minmax(90px,1fr) auto minmax(90px,1fr)}.native-settings .native-paired-buttons{gap:3px}.native-settings .native-paired-buttons button{white-space:normal;font-size:12px}.native-settings .native-actions h3{font-size:14px}}
@media(max-width:600px){
  .native-settings .native-actions .native-paired-buttons{grid-template-columns:1fr}
  .native-settings .native-field:has(>output){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .native-settings .native-field:has(>output)>input{grid-column:1;grid-row:1}
  .native-settings .native-field:has(>output)>output{grid-column:1;grid-row:2;white-space:normal;overflow-wrap:anywhere;font-size:11px}
  .native-settings .native-field:has(>output)>span{grid-column:2;grid-row:1/span 2}
  .native-settings .native-field:has([name=sound_level_percent]),.native-settings .native-field:has([name=telegram_jpeg_quality_percent]),.native-settings .native-field:has([name=telegram_auto_send_jpeg_interval_sec]){grid-template-columns:1fr;max-width:100%}
}

/* ImGui-style slider: rectangular white track, narrow blue handle and its
   formatted value centred over the control rather than beside it. */
.native-settings .native-field:has(>input[type=range]){grid-template-columns:minmax(120px,1fr) minmax(130px,1fr)}
.native-settings .native-field>input[type=range]{grid-column:1;grid-row:1;appearance:none;-webkit-appearance:none;height:28px;min-height:28px!important;border:0!important;border-radius:0;background:#fff!important;padding:0!important}
.native-settings input[type=range]::-webkit-slider-runnable-track{height:28px;background:#fff;border:0;border-radius:0}
.native-settings input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:10px;height:26px;margin-top:1px;background:#5b9fed;border:0;border-radius:0}
.native-settings input[type=range]::-moz-range-track{height:28px;background:#fff;border:0;border-radius:0}
.native-settings input[type=range]::-moz-range-thumb{width:10px;height:26px;background:#5b9fed;border:0;border-radius:0}
.native-settings .native-field:has(>input[type=range])>output{grid-column:1;grid-row:1;z-index:1;pointer-events:none;text-align:center;line-height:28px;padding:0 3px;color:#111820;font:600 13px/28px var(--mono);white-space:nowrap;overflow:hidden;max-width:100%}
.native-settings .native-field:has(>input[type=range])>span{grid-column:2;grid-row:1}
.native-settings .native-field:has([name=telegram_jpeg_quality_percent]),.native-settings .native-field:has([name=sound_level_percent]),.native-settings .native-field:has([name=telegram_auto_send_jpeg_interval_sec]){grid-template-columns:1fr}
@media(max-width:600px){.native-settings .native-field:has(>input[type=range]){grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.native-settings .native-field:has(>input[type=range])>output{font-size:11px}.native-settings .native-field:has([name=telegram_jpeg_quality_percent]),.native-settings .native-field:has([name=sound_level_percent]),.native-settings .native-field:has([name=telegram_auto_send_jpeg_interval_sec]){grid-template-columns:1fr}}
@media(max-width:600px){.native-settings{padding:3px}.native-settings .settings-group>summary{font-size:14px;padding:4px 6px}.native-settings .native-field,.native-settings .native-range{grid-template-columns:minmax(105px,1fr) minmax(110px,1fr);font-size:12px}.native-settings .checkbox-row,.native-settings .field,.native-settings .native-radio-row label{font-size:12px}.native-settings .device-config-form>.form-actions{flex-direction:row}.native-settings .device-config-form>.form-actions>button{width:auto;flex:1;white-space:normal}.native-settings .settings-group>.table-scroll{max-width:calc(100% - 8px)}}
