:root{font-family:system-ui,sans-serif;color:#182c3b;background:#f4f7f9;font-size:16px}*{box-sizing:border-box}main{max-width:850px;margin:32px auto;padding:24px;background:white;border-radius:16px}h1{font-size:30px}h2{font-size:21px}label{display:block;margin:16px 0}input,select{display:block;width:100%;max-width:360px;margin-top:8px;padding:12px;border:1px solid #8a9ba6;border-radius:6px;font:inherit}button{font:inherit;padding:12px 18px;border:0;border-radius:7px;background:#126b79;color:white;cursor:pointer}button:disabled{opacity:.45;cursor:default}table{width:100%;border-collapse:collapse;margin-top:24px}td,th{padding:12px 5px;text-align:left;border-bottom:1px solid #dbe2e7}p,li{line-height:1.6}#notice{color:#8b2d14;min-height:1.6em}dialog{max-width:90%;border:1px solid #9baab5;border-radius:12px;padding:24px}dialog::backdrop{background:#182c3b88}[hidden]{display:none!important}@media(max-width:500px){main{margin:0;border-radius:0;padding:18px}h1{font-size:26px}td,th{padding:10px 3px}}

input[type=checkbox]{display:inline-block;width:auto;margin-right:10px}fieldset{border:1px solid #dbe2e7;border-radius:8px;margin:16px 0;padding:12px}
:root{background:#eef3f5;color:#16323b}main{max-width:1120px;padding:32px}h1{letter-spacing:-.04em;margin:0 0 4px}h2{margin:0 0 8px}h3{margin:0;font-size:19px}.muted{color:#607580;font-size:14px;margin:6px 0}.account-bar{display:flex;align-items:center;justify-content:flex-end;gap:14px}.quiet{background:#eaf1f3;color:#234854;border:1px solid #d4e2e6}.view-tabs{display:flex;gap:6px;border-bottom:1px solid #d9e4e7;margin:20px 0 28px;padding-bottom:10px}.view-tabs button{background:transparent;color:#526b75}.view-tabs button[aria-pressed=true]{background:#164e63;color:white}#notice:empty{display:none}#notice:not(:empty){padding:12px 16px;border-radius:10px;background:#fff4df;color:#704318;position:sticky;top:8px;z-index:3}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:22px 0}.summary-card{background:#f0f6f7;border:1px solid #deeaed;border-radius:12px;padding:18px;display:flex;align-items:baseline;gap:12px}.summary-card strong{font-size:29px;color:#126b79}.summary-card span{font-size:14px;color:#607580}.admin-toolbar{display:flex;gap:16px;align-items:end;margin-bottom:20px}.admin-toolbar label{margin:0}.search-label{flex:1}.search-label input{max-width:none}.filter-label select{min-width:150px}.device-list{display:grid;gap:18px}.device-card{border:1px solid #d9e4e7;border-radius:14px;background:#fff;overflow:hidden}.device-heading{display:flex;gap:16px;align-items:center;padding:20px}.device-info{flex:1;min-width:0;overflow-wrap:anywhere}.badge{display:inline-block;background:#edf0f2;color:#607580;border-radius:20px;padding:5px 10px;font-size:12px;white-space:nowrap}.badge.active{background:#dcf3e9;color:#176647}.channel-summary{cursor:pointer;padding:15px 20px;background:#f7fafb;border-top:1px solid #e2eaed;color:#45626c;font-size:14px}.channel-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px}.channel-card{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:14px;border:1px solid #e0e7ea;border-radius:10px;background:#fafcfc;min-width:0}.channel-card.selected{background:#f0faf6;border-color:#a8d8c5}.channel-title{min-width:0;display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}.channel-number{font-size:12px;color:#6b818a}.switch-label{display:flex;align-items:center;gap:7px;position:relative;margin:0;min-height:44px;cursor:pointer;flex-shrink:0}.switch-label input[type=checkbox]{position:absolute;opacity:0;width:44px;height:44px;margin:0;left:0;top:0;cursor:pointer}.switch-track{display:block;width:38px;height:23px;border-radius:20px;background:#abbac0;transition:background .15s;pointer-events:none}.switch-track:after{content:'';display:block;width:17px;height:17px;border-radius:50%;background:white;position:relative;top:3px;left:3px;transition:transform .15s}.switch-label input:checked+.switch-track{background:#218563}.switch-label input:checked+.switch-track:after{transform:translateX(15px)}.switch-label input:focus-visible+.switch-track{outline:3px solid #79adbd;outline-offset:3px}.switch-label input:disabled~span{opacity:.5}.switch-copy{font-size:12px;color:#607580;pointer-events:none}.disabled-hint{margin:12px 20px 0;color:#7a6539;font-size:14px}.utility-panel{border:1px solid #d9e4e7;border-radius:12px;margin-top:28px}.utility-panel>summary{cursor:pointer;padding:18px;font-weight:600}.panel-body{padding:0 20px 20px}.candidate-row{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #e2eaed;padding:14px 0;gap:12px}.candidate-row p{overflow-wrap:anywhere}#register-panel{margin-top:20px}#register-panel>summary{cursor:pointer;color:#126b79;padding:12px 0}#register-device{max-width:640px}#register-device input{max-width:none}.empty-state{padding:32px;text-align:center;background:#f5f8fa;border-radius:12px;color:#607580}#history{padding-left:20px}#history li{margin:10px 0}td{overflow-wrap:anywhere}#operate-view{padding-top:4px}
@media(max-width:800px){.channel-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.summary-card{display:block}.summary-card span{display:block;margin-top:4px}}
@media(max-width:500px){main{padding:20px 16px}.account-bar{margin-top:18px}.view-tabs{margin-top:16px}.summary-grid{gap:7px}.summary-card{padding:12px 8px}.summary-card strong{font-size:25px}.summary-card span{font-size:11px}.section-heading{align-items:flex-start}.section-heading h2{font-size:22px}.admin-toolbar{display:block}.admin-toolbar label{margin-top:12px}.filter-label select{width:100%;max-width:none}.device-heading{padding:16px;gap:8px;flex-wrap:wrap}.device-info{flex-basis:calc(100% - 80px)}.device-heading>.switch-label{margin-left:auto}.channel-grid{grid-template-columns:1fr;padding:12px}.channel-card{padding:10px 14px}.panel-body{padding:0 14px 14px}.utility-panel>summary{padding:16px;font-size:15px}.channel-summary{padding:14px 16px}.candidate-row button{padding:10px 14px}.view-tabs button{flex:1}}
@media(prefers-reduced-motion:reduce){.switch-track,.switch-track:after{transition:none}}
.section-heading>.quiet{flex-shrink:0;white-space:nowrap}

/* Mobile control layout: large targets, concise hierarchy, no hidden actions. */
:root{background:#f3f6f7;color:#213a42}main{max-width:960px;margin:24px auto;padding:28px;background:transparent}h1{font-size:26px}#device-name{font-size:13px;color:#61757d;margin:4px 0}button,input,select,summary{touch-action:manipulation}button,input,select{min-height:48px;border-radius:12px}button{font-weight:600}button:focus-visible,summary:focus-visible{outline:3px solid #3396b0;outline-offset:3px}input,select{background:white;border-color:#ccdadd}select{max-width:none}button:active:not(:disabled){filter:brightness(.92)}.account-bar{margin-top:8px;font-size:14px}.account-bar button{min-height:44px;padding:8px 14px}.view-tabs{position:sticky;top:0;z-index:2;background:#f3f6f7;padding:12px 0;margin:12px 0 20px;border:0;gap:8px}.view-tabs button{flex:1;border:1px solid #d7e1e4;background:white}.view-tabs button[aria-pressed=true]{background:#164e63;border-color:#164e63}#controls{padding:22px;background:white;border:1px solid #dce5e8;border-radius:18px;margin-bottom:26px}#controls h2{font-size:18px}#controls label{margin:18px 0}#controls p,#updated{font-size:13px;color:#61757d}#controls p{margin-bottom:0}.action-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px}.action-pair button{min-height:56px;font-size:18px}#on{background:#176d59}#off{background:#e7edf0;color:#283f49;border:1px solid #cbd8dd}.status-title{font-size:18px;margin:0 0 12px}table{margin-top:0}thead{display:none}#rows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#rows tr{display:grid;grid-template-columns:1fr auto;background:white;border:1px solid #dce5e8;border-radius:14px;padding:16px;gap:6px 12px}#rows td{padding:0;border:0}#rows td:first-child{font-size:12px;color:#61757d}#rows td:nth-child(2){font-size:12px;color:#61757d;text-align:right}#rows td:nth-child(2):before{content:'第 '}#rows td:nth-child(2):after{content:' 路'}#rows td:nth-child(3){font-weight:650;font-size:19px}#rows td:last-child{font-size:14px;align-self:center;background:#edf3f5;border-radius:20px;padding:4px 12px}.history-panel{margin-top:24px;border-top:1px solid #d6e1e4}.history-panel summary{padding:18px 0;min-height:52px;font-weight:600;cursor:pointer}#history{font-size:14px}#history li{padding:12px 0;border-bottom:1px solid #dce5e8}.summary-grid{margin:18px 0;gap:8px}.summary-card{padding:12px;border:0;background:#e8eff1;display:block}.summary-card strong{font-size:24px}.summary-card span{display:block;font-size:12px;margin-top:4px}.admin-toolbar{gap:12px}.channel-grid{gap:8px}.channel-card{background:white;min-height:72px}.switch-label{min-height:48px;padding:4px}.switch-track{width:46px;height:28px}.switch-track:after{width:22px;height:22px}.switch-label input:checked+.switch-track:after{transform:translateX(18px)}.switch-label input[type=checkbox]{width:100%;height:100%}.switch-copy{font-size:13px}.device-heading>.badge{display:none}.channel-summary{min-height:48px}.utility-panel{background:white}.section-heading h2{font-size:20px}.section-heading .muted{font-size:13px}.candidate-row{flex-wrap:wrap}dialog{width:420px;max-width:calc(100% - 32px);padding:24px;border:0;border-radius:20px}#confirmation{font-size:20px;font-weight:650;line-height:1.5}#login{max-width:420px;margin:32px auto;padding:24px;background:white;border-radius:18px}#login input{max-width:none}#login button{width:100%}#notice:not(:empty){position:relative;top:auto;overflow-wrap:anywhere}
@media(max-width:600px){main{margin:0;padding:20px 16px calc(24px + env(safe-area-inset-bottom));border-radius:0}h1{font-size:24px}.view-tabs{margin-bottom:16px}#controls{padding:18px}#rows{grid-template-columns:1fr}.admin-toolbar{display:grid;grid-template-columns:minmax(0,1fr) 120px;gap:10px}.admin-toolbar label{margin:0;font-size:13px}.filter-label select{min-width:0;font-size:15px}.search-label input{min-width:0;font-size:16px}.device-heading{flex-wrap:nowrap;padding:16px}.device-info{flex-basis:auto}.device-info h3{font-size:18px}.channel-grid{grid-template-columns:1fr}.channel-card{padding:10px 12px}.switch-copy{font-size:13px}.summary-card span{font-size:12px}.section-heading{align-items:center}.section-heading>.quiet{padding:10px 14px}dialog .action-pair button{font-size:16px}.utility-panel>summary{line-height:1.7}}

/* Direct channel actions */
#rows.light-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.light-card{background:white;border:1px solid #dce5e8;border-radius:16px;padding:18px}.light-heading{display:flex;justify-content:space-between;gap:8px}.light-card h2{font-size:23px;margin-top:8px}.light-state{color:#61757d}.light-state.is-on{color:#176d59;font-weight:650}.light-action.on{background:#176d59}.light-action.off{background:#e7edf0;color:#283f49}.light-action{min-height:56px}.edit-name{font-size:13px;min-height:44px;padding:8px 12px;margin-top:6px;align-self:flex-start}.channel-title .edit-name{margin-top:0}#cooldown{min-height:24px;color:#526b75;font-size:14px}#rename-name{max-width:none}#rename-error{color:#8b2d14}@media(max-width:600px){#rows.light-grid{grid-template-columns:1fr}.light-card{padding:16px}}
/* Compact channel overview with touch-sized actions. */
#rows.light-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.light-card{padding:12px;border-radius:12px;min-width:0}.light-heading{gap:4px;flex-wrap:wrap}.light-heading .muted{font-size:12px;margin:0;overflow-wrap:anywhere}.light-card h2{font-size:18px;margin:8px 0 4px;overflow-wrap:anywhere}.light-state{font-size:13px;margin:4px 0 10px}.light-card .action-pair{gap:6px}.light-card .light-action{min-height:44px;padding:8px 4px;font-size:15px;border-radius:9px}#updated{margin:6px 0}#cooldown{margin:6px 0 12px;font-size:13px}.light-grid .empty-state{grid-column:1/-1}@media(max-width:600px){#rows.light-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.light-card{padding:10px}.light-heading{display:block}.light-heading .muted{display:block}.light-card h2{font-size:18px}.light-card .light-action{font-size:14px}}@media(max-width:340px){#rows.light-grid{grid-template-columns:1fr}}
main{position:relative}.account-bar{position:absolute;right:28px;top:24px;margin:0;gap:8px}.account-bar button{padding:8px 10px;font-size:13px}main>h1{padding-right:180px}.view-tabs{margin:12px 0;padding:8px 0}@media(max-width:600px){.account-bar{right:16px;top:18px;font-size:12px;gap:6px}main>h1{font-size:22px;padding-right:160px}.account-bar button{font-size:12px;padding:8px}}

#rows.light-grid{display:grid;grid-template-columns:1fr;gap:10px}.control-device{border:1px solid #dce5e8;border-radius:12px;background:white;overflow:hidden}.control-device-heading{min-height:56px;padding:16px;cursor:pointer}.control-device-heading strong{margin-right:12px}.sample-time{margin:0;padding:0 14px 10px;font-size:12px;color:#61757d}.device-light-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:0 12px 12px}.device-light-grid .light-card{background:#f6f9fa;padding:10px}.state-switch{width:100%;min-height:48px;font-size:13px;padding:8px 4px;background:#e2e9ed;color:#29434e}.state-switch.is-on{background:#176d59;color:white}.device-light-grid h2{margin:6px 0 10px}@media(max-width:600px){.device-light-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:340px){.device-light-grid{grid-template-columns:1fr}}

.device-light-grid .light-card{position:relative;padding-top:32px}.channel-badge{position:absolute;right:8px;top:7px;border-radius:6px;padding:3px 6px;background:#e3ebef;color:#526973;font-size:11px;line-height:1.4}.device-mac{font-size:12px;color:#607580;overflow-wrap:anywhere;margin:4px 0}.user-row{display:flex;align-items:center;gap:8px;padding:12px 0;border-bottom:1px solid #e0e7ea}.user-row>div{flex:1;min-width:0;overflow-wrap:anywhere}.user-row button{font-size:13px;padding:8px 10px}.user-row p{margin:4px 0}#user-form{margin-top:20px}#user-error{color:#8b2d14}#user-form input{max-width:none}@media(max-width:400px){.user-row{flex-wrap:wrap}.user-row>div{flex-basis:100%}}

.schedule-row{border-bottom:1px solid #dce5e8;padding:14px 0}#schedule-message{color:#704318}#schedule-time{max-width:none}

/* Timer: centered modal on wide screens, bottom sheet on compact screens. */
.schedule-toolbar{display:flex;justify-content:flex-end}.schedule-toolbar:has(button[hidden]){display:none}.schedule-toolbar button{min-height:44px;padding:8px 16px}#schedule-dialog{box-sizing:border-box;width:560px;max-width:calc(100% - 32px);max-height:85dvh;padding:0;overflow:auto;overscroll-behavior:contain}#schedule-dialog::backdrop{background:rgb(15 35 44 / .45)}.schedule-header{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;background:white;padding:16px 20px;z-index:1;border-bottom:1px solid #e1e8eb}.schedule-header h2{font-size:20px;margin:0}.schedule-header button{min-height:44px;padding:8px 14px}#schedule-dialog .panel-body{padding:0 20px 24px}#schedule-dialog input,#schedule-dialog select{box-sizing:border-box;width:100%;min-width:0}#schedule-save{width:100%}#schedule-refresh{margin-top:16px}
@media(max-width:767px){#schedule-dialog{position:fixed;inset:auto 0 0;margin:0;width:100%;max-width:100%;max-height:90dvh;border-radius:22px 22px 0 0;padding-bottom:env(safe-area-inset-bottom);animation:timer-sheet-in .2s ease-out}.schedule-header{padding:14px 16px}#schedule-dialog .panel-body{padding:0 16px 20px}@keyframes timer-sheet-in{from{transform:translateY(100%)}to{transform:translateY(0)}}}
@media(prefers-reduced-motion:reduce){#schedule-dialog{animation:none}}

.channel-timer{position:absolute;left:4px;top:0;display:flex;align-items:center;justify-content:center;width:44px;min-height:44px;padding:0;background:transparent;color:#426573;border:0;border-radius:10px}.device-light-grid .light-card:has(.channel-timer){padding-top:40px}

/* Two-row touch cards. */
.device-light-grid .light-card,.device-light-grid .light-card:has(.channel-timer){padding:12px;background:#fff;border:1px solid #e0e8eb;border-radius:14px;box-shadow:0 2px 5px rgb(26 55 68 / .03)}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px;min-height:28px}.card-heading h2{margin:0;font-size:17px;line-height:1.4}.card-heading .channel-badge{position:static;flex-shrink:0;min-width:24px;text-align:center;font-size:12px;padding:4px;border-radius:7px}.card-actions{display:flex;align-items:stretch;gap:8px}.card-actions .channel-timer{position:static;flex:0 0 44px;width:44px;min-height:48px;background:#eee8fa;color:#7052a0;border-radius:10px}.card-actions .state-switch{flex:1;width:auto;min-width:0;min-height:48px;font-size:13px;border-radius:10px}.device-light-grid{background:#f6f8fa;padding-top:10px}.sample-time{background:#f6f8fa;padding-top:8px;margin:0}#schedule-dialog{width:500px}#schedule-dialog label{margin:10px 0;font-size:14px}#schedule-dialog .muted{font-size:12px;margin:12px 0}#schedule-dialog input,#schedule-dialog select{min-height:44px;padding:9px 12px}#schedule-message:empty{display:none}#schedule-weekdays{border:0;padding:0;margin:10px 0;display:flex;gap:5px}#schedule-weekdays[hidden]{display:none}#schedule-weekdays legend{font-size:13px;margin-bottom:5px}#schedule-weekdays label{flex:1;margin:0;position:relative}#schedule-weekdays input{position:absolute;opacity:0;width:100%;height:100%;margin:0}#schedule-weekdays span{display:flex;align-items:center;justify-content:center;min-height:44px;background:#edf1f3;border-radius:9px}#schedule-weekdays input:checked+span{background:#164e63;color:white}#schedule-weekdays input:focus-visible+span{outline:3px solid #3396b0}.schedule-row{padding:10px 0}.schedule-row p{line-height:1.5}#schedule-dialog .panel-body{padding-bottom:16px}@media(max-width:767px){#schedule-dialog{width:100%}.device-light-grid .light-card{padding:10px}.card-actions{gap:6px}.card-heading h2{font-size:16px}}

#schedule-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:12px}#schedule-form>label,#schedule-form>fieldset,#schedule-form>button,#schedule-form>p{grid-column:1/-1}#schedule-form>label.schedule-half{grid-column:auto}#schedule-form>label{margin:8px 0}

#schedule-channel-name{font-size:18px;font-weight:650;color:#213a42;margin:4px 0 12px;padding:10px 0;border-bottom:1px solid #e0e8eb}

.view-tabs[hidden]{display:none}

.schedule-item{border:1px solid #dce5e8;border-left:4px solid #527fba;border-radius:12px;padding:12px;margin-top:10px;background:#f8fafc}.schedule-item-heading,.schedule-item-footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.schedule-item-heading{justify-content:space-between}.schedule-status{display:inline-flex;align-items:center;gap:5px;font-size:12px;line-height:1.5;font-weight:600;border-radius:7px;padding:4px 8px;background:#e8f0ff;color:#305b95}.schedule-status.status-running{background:#eee7ff;color:#69449c}.schedule-status.status-done{background:#dcf3e7;color:#176344}.schedule-status.status-expired{background:#fff0d1;color:#875608;border:1px dashed #b78832}.schedule-status.status-failed,.schedule-status.status-unknown{background:#fde6e6;color:#942f35}.schedule-status.status-cancelled{background:#e9edef;color:#5a6970}.schedule-item.status-done{border-left-color:#34875f;background:#f7fbf8}.schedule-item.status-expired{border-left-color:#bc8b28;background:#fffcf5}.schedule-item.status-failed,.schedule-item.status-unknown{border-left-color:#b64c54}.schedule-item.status-cancelled{border-left-color:#a2afb5;background:#f6f7f8}.schedule-item.status-running{border-left-color:#815caf}#schedule-dialog .schedule-when{font-size:15px;margin:8px 0;color:#314b55;font-variant-numeric:tabular-nums}.schedule-item-footer .muted{margin:0!important}.schedule-item-footer button{margin-left:auto;min-height:44px;padding:6px 12px;font-size:13px;background:transparent}.schedule-item-footer .schedule-status{font-size:11px}

#schedule-list{overflow:hidden;padding-bottom:4px}.schedule-item{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:3px 6px;margin-top:6px;white-space:nowrap;border-radius:9px;min-height:46px;overflow:hidden}.schedule-item>strong{font-size:13px;flex:0 0 auto}.schedule-item .schedule-when{font-size:13px!important;margin:0!important;min-width:0;overflow:hidden;text-overflow:ellipsis}.schedule-repeat-label{font-size:12px;color:#607580;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis}.schedule-item>.schedule-status{font-size:11px;padding:3px 6px;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.schedule-item-footer{margin-left:auto;display:inline-flex;gap:2px;flex:0 0 auto}.schedule-icon-button{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;padding:0!important;margin:0;background:transparent}.schedule-icon-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.schedule-refresh-button{display:inline-flex;align-items:center;justify-content:center;width:40px;min-width:40px;height:40px;padding:0!important}.schedule-refresh-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.sort-handle{touch-action:none;cursor:grab;flex:0 0 36px;min-width:36px;min-height:44px;padding:0!important;margin:0;font-size:24px;color:#79909a;background:transparent;user-select:none}.sort-handle:disabled{cursor:default;opacity:.35}.sorting{outline:2px solid #3887a0;opacity:.75}.device-heading .sort-handle{align-self:flex-start}.channel-card .channel-title{flex:1}.channel-card{gap:4px}.device-heading{gap:8px}

main>h1{padding-right:0;font-size:25px;line-height:1.4}.account-bar{position:static;justify-content:flex-end;margin:4px 0 8px;min-height:44px}#cooldown:empty{display:none}@media(max-width:600px){main>h1{font-size:22px;padding-right:0}.account-bar{position:static;margin:0 0 8px}}

.schedule-creator{font-size:11px;color:#627681}

#system-alerts{background:#fff3df;border:1px solid #e6a33b;border-radius:12px;padding:10px;margin:8px 0;color:#713f12}.schedule-alert{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0}.schedule-alert span{min-width:0}.schedule-alert button{flex-shrink:0;min-height:44px}

.account-icon{font-size:22px!important;min-width:44px}.account-bar{gap:6px;flex-wrap:wrap}.log-toolbar{display:flex;gap:8px;margin:10px 0}.log-toolbar select{flex:1}.log-row{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid #e2eaed;overflow-wrap:anywhere}.log-row small{color:#607580}#logs-panel{margin:12px 0 20px}#password-dialog input{width:100%;max-width:none}

.account-bar .account-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:10px}.account-bar .account-icon[hidden]{display:none}.account-icon svg{flex-shrink:0}

.system-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.system-header h1{margin:0;padding:0;white-space:nowrap;font-size:25px;line-height:1.4}.system-header .account-bar{position:static;margin:0;min-height:44px;flex-wrap:nowrap;flex-shrink:0;gap:6px}.system-header #actor{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.system-header .account-bar:has(#actor:empty){display:none}@media(max-width:600px){.system-header{gap:6px}.system-header h1{font-size:19px}.system-header .account-bar{gap:2px}.system-header #actor{max-width:64px;font-size:12px}.system-header .account-icon{width:44px;min-width:44px;padding:10px}}@media(max-width:380px){.system-header h1{font-size:17px}.system-header #actor{max-width:42px}.system-header{gap:2px}}

.account-icon.has-alert{position:relative}.account-icon.has-alert:after{content:'';position:absolute;right:4px;top:4px;width:9px;height:9px;border-radius:50%;background:#d43838;border:2px solid #fff}.log-toolbar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.log-toolbar input,.log-toolbar select{width:100%;min-width:0;max-width:none}.log-pages{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:12px}@media(max-width:600px){.log-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.log-toolbar input,.log-toolbar select{font-size:14px}}

.log-toolbar{align-items:end}.log-date{margin:0;font-size:12px;color:#607580}.log-date input{margin-top:4px}

.control-toolbar{display:flex;gap:8px;margin:10px 0}.control-toolbar input{flex:1;min-width:0;margin:0}.control-toolbar select{width:auto;min-width:94px;margin:0}.next-schedule{font-size:12px;color:#64748b;margin:8px 0 0;line-height:1.4}.card-actions .channel-timer{position:relative;left:auto;top:auto}.channel-timer.has-schedule::after{content:"";position:absolute;right:6px;top:6px;width:6px;height:6px;background:#d97706;border-radius:50%}

.control-tools{margin:0 0 8px;border:0;background:transparent}.control-tools>summary{list-style:none;display:flex;align-items:center;justify-content:center;margin-left:auto;width:44px;height:44px;cursor:pointer;color:#426573;border-radius:10px}.control-tools>summary::-webkit-details-marker{display:none}.control-tools[open]>summary{background:#eaf0f3}.control-tools .control-toolbar{margin-top:4px}#cooldown:empty{display:none}
.stats-toolbar{display:flex;align-items:end;gap:8px;margin:8px 0}.stats-toolbar label{flex:1;margin:0;font-size:12px;color:#607580}.stats-toolbar input{width:100%;margin-top:4px;box-sizing:border-box}.stats-toolbar button{min-height:44px;padding:8px 12px}.stats-total{margin:8px 0;padding:10px 12px;background:#edf4f5;border-radius:10px;color:#294751;font-size:13px}.stats-device{padding:8px 0;border-bottom:1px solid #e2eaed}.stats-device:last-child{border-bottom:0}.stats-device>strong{display:block;margin-bottom:4px}.stats-row{display:flex;justify-content:space-between;gap:8px;padding:5px 0;font-size:13px}.stats-row span:last-child{color:#607580;text-align:right;white-space:nowrap}@media(max-width:400px){.stats-row{display:block}.stats-row span:last-child{display:block;text-align:left;margin-top:2px}}

/* Read-only reconnect stays beside the collapsed device heading. */
.control-device-heading{display:flex;align-items:center;gap:8px;list-style:none;padding:6px 12px;min-height:56px}.control-device-heading::-webkit-details-marker{display:none}.control-device-heading::before{content:'';width:6px;height:6px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;color:#71838c;flex:0 0 6px;margin-right:4px;transform:rotate(-45deg);transition:transform .15s}.control-device[open]>.control-device-heading::before{transform:rotate(45deg)}.control-device-heading strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-right:0}.control-device-heading>.muted,.device-link-state{flex-shrink:0;white-space:nowrap;font-size:12px}.device-link-state{color:#9b6518}.device-reconnect{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;background:#edf3f5;color:#356476;border-radius:10px}.device-reconnect svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.device-reconnect.is-loading svg{animation:device-reconnect-spin 1s linear infinite}.device-reconnect.is-loading:disabled{opacity:1}@keyframes device-reconnect-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.device-reconnect.is-loading svg{animation:none}.control-device-heading::before{transition:none}}

.device-address{display:flex;align-items:center;gap:6px;min-width:0}.device-address>span{overflow-wrap:anywhere}.edit-address{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-height:44px;padding:0;flex-shrink:0}.edit-address svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#address-host{width:100%;max-width:none}#address-target{overflow-wrap:anywhere}#address-dialog .muted{font-size:12px;line-height:1.6}#address-error:empty{display:none}

.device-address>span{white-space:nowrap;font-size:12px}.device-edit-tools{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin-top:6px}.device-edit-tools .edit-name{margin:0}.edit-address{font-size:13px;font-weight:650;margin:0}

.device-edit-tools .edit-name{width:44px;min-width:44px;padding:6px;flex-shrink:0}#address-dialog .action-pair button{font-size:16px;padding:12px 8px;white-space:nowrap}

.schedule-delete-button{color:#ad4545}.schedule-delete-button:disabled{opacity:.4}

@media(max-width:360px){.schedule-item:has(.schedule-item-footer button:nth-child(3)){gap:3px}.schedule-item:has(.schedule-item-footer button:nth-child(3))>.schedule-repeat-label{display:none}.schedule-item:has(.schedule-item-footer button:nth-child(3))>.schedule-status{font-size:0;gap:0;padding:4px;flex:0 0 auto}.schedule-item:has(.schedule-item-footer button:nth-child(3))>.schedule-status>span{font-size:12px}}
