:root{--ink:#18333d;--text:#1d2c32;--muted:#627079;--bg:#f5f7f8;--surface:#fff;--line:#dce3e6;--green:#2c745e;--green-dark:#225e4b;--green-soft:#e6f2eb;--danger:#a53532;--danger-soft:#fcf0ee;--amber:#865c13;--amber-soft:#fcf5df;--radius:14px}
*{box-sizing:border-box}body{margin:0;color:var(--text);background:var(--bg);font:16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}a{color:var(--green);text-underline-offset:4px}a:hover{text-decoration-thickness:2px}h1,h2,h3,p{margin-top:0}h1{font-size:30px;line-height:1.2;letter-spacing:-.025em;margin-bottom:10px}h2{font-size:20px;line-height:1.35;letter-spacing:-.015em;margin-bottom:16px}h3{font-size:16px;margin-bottom:8px}p{max-width:72ch}svg{width:22px;height:22px;flex-shrink:0;vertical-align:middle}::selection{background:#c6dfd2;color:#12372c}:focus-visible{outline:3px solid #b57928;outline-offset:3px;border-radius:5px}input,textarea{caret-color:var(--green)}[hidden]{display:none!important}
.shell{min-height:100vh;display:grid;grid-template-columns:224px minmax(0,1fr)}.sidebar{background:var(--ink);color:#eef5f5;padding:34px 20px 24px;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;width:224px;z-index:5}.brand{font-size:28px;font-weight:750;letter-spacing:-.03em;text-decoration:none;color:inherit;padding:0 12px}.server-label{display:flex;align-items:center;gap:8px;color:#d2dfe1;font-size:12px;margin:10px 12px 34px;white-space:nowrap}.status-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:#77c89c;flex:none}.navigation{display:grid;gap:6px}.navigation a{display:flex;align-items:center;gap:12px;color:#d7e1e4;text-decoration:none;padding:13px 14px;border-radius:9px;font-size:15px;font-weight:550;min-height:48px}.navigation a:hover{background:#24454f}.navigation a.active{background:#31564f;color:#fff}.navigation span{display:flex}.sidebar-bottom{margin-top:auto;border-top:1px solid #36515a;padding:20px 12px 0;font-size:12px;color:#bdcfd4}.logout{margin-top:10px;border:0;background:none;color:#e1e9eb;padding:8px 0;display:flex;align-items:center;gap:10px;font-size:14px}.mobile-header{display:none}main{grid-column:2;padding:46px clamp(24px,4vw,64px);max-width:1510px;width:100%}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:28px}.page-head p{margin:0;color:var(--muted);font-size:14px}.page-head .button{margin-top:2px;flex-shrink:0}.button{min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid var(--line);border-radius:9px;padding:10px 15px;font-weight:600;font-size:14px;background:#fff;color:var(--text);text-decoration:none;transition:background .16s ease,border-color .16s ease}.button:hover{background:#edf2f3;border-color:#b9c9cf;text-decoration:none}.button.primary{background:var(--green);border-color:var(--green);color:#fff}.button.primary:hover{background:var(--green-dark);border-color:var(--green-dark)}.button.danger{color:var(--danger);background:#fff}.button.danger:hover{background:var(--danger-soft);border-color:#e2b6b0}.button.quiet{background:transparent}.button.wide{width:100%}.button.small-button{min-height:38px;padding:7px 12px;font-size:13px}.icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;background:none;border:1px solid transparent;border-radius:8px;color:var(--muted)}.icon-button:hover{background:#edf2f3}.muted{color:var(--muted)}.small{font-size:13px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:28px;align-items:start}.toolbar{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:18px}.search{display:flex;align-items:center;gap:10px;flex:1;max-width:410px;border:1px solid #c7d2d7;border-radius:9px;background:#fff;padding:0 13px;min-height:46px;color:var(--muted)}.search:focus-within{outline:2px solid #8ab7a5;outline-offset:1px}.search input{border:0;outline:none;background:none;width:100%;min-width:0;padding:10px 0;color:var(--text)}.count{font-size:13px;color:var(--muted);white-space:nowrap}.device-list{display:grid;gap:14px}.device-row{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:20px}.device-top{display:flex;gap:14px;align-items:flex-start}.device-icon{width:44px;height:44px;background:#edf2f4;border-radius:10px;display:grid;place-items:center;color:var(--ink);flex:none}.device-icon svg{width:25px;height:25px}.device-title{flex:1;min-width:0}.device-name{font-size:17px;font-weight:700;margin:0 0 4px;overflow-wrap:anywhere}.permission{font-size:12px;font-weight:600;color:#256246;display:inline-flex;align-items:center;gap:6px}.permission.off{color:var(--muted)}.permission .dot{width:6px;height:6px;border-radius:50%;background:currentColor}.current-tag{font-size:11px;background:#edf2f4;color:#53656e;padding:2px 7px;border-radius:4px;margin-left:7px;white-space:nowrap}.state-switch{border:0;width:42px;height:25px;background:var(--green);border-radius:18px;padding:3px;position:relative;margin-top:3px;flex:none}.state-switch:after{content:"";display:block;background:#fff;width:19px;height:19px;border-radius:50%;margin-left:17px}.state-switch.off{background:#a5b1b7}.state-switch.off:after{margin-left:0}.device-facts{display:flex;gap:6px 20px;flex-wrap:wrap;font-size:12px;color:var(--muted);padding:13px 0 15px;margin-top:5px;font-variant-numeric:tabular-nums}.device-actions{display:flex;gap:9px;border-top:1px solid #e6ecee;padding-top:14px}.device-actions .button{flex:1;font-size:13px;min-height:40px;padding:8px 10px}.device-actions .button:last-child{flex:1.15}.revision{margin:12px 0 0;background:var(--amber-soft);color:#79530f;padding:9px 12px;border-radius:7px;font-size:12px}.billing-summary{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px}.billing-summary h2{font-size:18px;margin-bottom:16px}.billing-value{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-variant-numeric:tabular-nums;margin:0 0 8px}.billing-value strong{font-size:26px;line-height:1.3;letter-spacing:-.025em}.billing-value span{font-size:13px;color:var(--muted)}.billing-summary p{font-size:13px}.billing-summary .button{margin-top:12px;width:100%;font-size:13px}.summary-reminder{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);display:flex;gap:9px;align-items:flex-start;color:var(--muted);font-size:12px}.summary-reminder svg{width:18px;height:18px}.section-note{font-size:12px;line-height:1.55;color:var(--muted);margin:14px 4px 0}.empty{padding:36px 22px;background:#fff;border:1px dashed #cbd7dc;border-radius:12px;text-align:center}.empty h2{font-size:18px}.empty p{font-size:14px;color:var(--muted);margin:0 auto}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:26px;margin-bottom:24px}.panel p:last-child{margin-bottom:0}.panel.narrow{max-width:740px}.panel-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px}.back-link{display:inline-flex;align-items:center;gap:7px;text-decoration:none;font-size:13px;margin-bottom:20px}.back-link svg{width:18px;height:18px}.field{margin-bottom:20px}.field label,.field-label{display:block;font-size:14px;font-weight:600;margin-bottom:7px}.field input,.field select,.field textarea{width:100%;background:#fff;border:1px solid #bdcbd2;color:var(--text);border-radius:8px;min-height:46px;padding:10px 12px}.field textarea{min-height:126px;resize:vertical;line-height:1.55}.field input:focus,.field textarea:focus,.field select:focus{outline:2px solid #8ab7a5;outline-offset:1px}.field small,.help{display:block;color:var(--muted);font-size:12px;margin-top:7px;line-height:1.55}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.form-actions{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding-top:6px}.form-error{color:var(--danger);font-size:13px;min-height:0}.form-error:empty{display:none}.mode-options{border:0;padding:0;margin:0 0 20px}.mode-options legend{font-size:14px;font-weight:600;padding:0 0 8px}.mode-choice{display:flex;gap:12px;padding:13px 14px;margin-bottom:8px;border:1px solid var(--line);border-radius:9px;cursor:pointer}.mode-choice:has(input:checked){background:#eef6f1;border-color:#7da893}.mode-choice input{accent-color:var(--green);width:18px;height:18px;margin-top:3px;flex:none}.mode-choice strong{display:block;font-size:14px}.mode-choice small{display:block;color:var(--muted);font-size:12px;line-height:1.5;margin-top:2px}.checkbox{display:flex;gap:10px;align-items:flex-start;font-size:14px;margin-bottom:14px}.checkbox input{accent-color:var(--green);width:18px;height:18px;margin-top:2px;flex:none}.notice{border:1px solid #e4d4b3;background:#fffbf2;color:#735622;border-radius:9px;padding:15px;font-size:13px;line-height:1.6;margin-bottom:22px}.notice.neutral{border-color:var(--line);background:#f6f8f9;color:var(--muted)}.detail-export{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.detail-meta{font-size:12px;color:var(--muted);display:flex;gap:8px 20px;flex-wrap:wrap;font-variant-numeric:tabular-nums;margin-bottom:20px}.divider{border:0;border-top:1px solid var(--line);margin:26px 0}.audit-list{list-style:none;margin:0;padding:0}.audit-list li{padding:13px 0;border-bottom:1px solid #e6ecee;display:flex;justify-content:space-between;gap:16px;font-size:13px}.audit-list li:last-child{border-bottom:0}.audit-list time{white-space:nowrap;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}.audit-list span small{display:block;color:var(--muted)}.definition-list{margin:0;display:grid;grid-template-columns:1fr 1fr;gap:0 20px}.definition-list dt,.definition-list dd{padding:12px 0;border-bottom:1px solid #e6ecee;font-size:14px;margin:0}.definition-list dt{color:var(--muted)}.definition-list dd{text-align:right;font-variant-numeric:tabular-nums}.loading{padding:40px 0;color:var(--muted)}.toast{position:fixed;bottom:26px;left:50%;transform:translateX(-50%);background:var(--ink);color:#fff;padding:13px 20px;border-radius:10px;max-width:min(520px,calc(100vw - 32px));z-index:20;font-size:14px;box-shadow:0 6px 22px #18333d25}.login-screen{min-height:100vh;display:grid;align-content:center;justify-items:center;padding:32px 20px;background:#edf2f3}.login-brand{font-size:30px;font-weight:750;letter-spacing:-.025em;margin-bottom:24px;color:var(--ink);text-align:center}.login-brand span{display:block;font-size:13px;font-weight:400;letter-spacing:0;color:var(--muted);margin-top:5px}.login-box{width:100%;max-width:420px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:30px}.login-box h1{font-size:24px}.login-box p{font-size:14px;color:var(--muted);margin-bottom:22px}.login-box label{font-size:14px;font-weight:600;display:block;margin-bottom:7px}.login-box input{width:100%;border:1px solid #bdcbd2;border-radius:8px;padding:12px;min-height:48px;margin-bottom:16px}.login-box .small{margin:18px 0 0;font-size:12px}.qr-dialog{width:min(560px,calc(100vw - 28px));border:0;border-radius:16px;padding:24px;color:var(--text);box-shadow:0 16px 50px #102b3240}.qr-dialog::backdrop{background:#102b3270}.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.dialog-head h2{margin:0;overflow-wrap:anywhere}.qr-dialog>p{font-size:13px;margin-top:15px}.qr-body{text-align:center;min-height:120px;background:#fff}.qr-body img{width:100%;height:auto;max-width:480px;display:block;margin:auto}.qr-body .notice{text-align:left}.table-note{margin-top:14px;font-size:12px;color:var(--muted)}.badge{font-size:12px;padding:4px 8px;border-radius:5px;background:var(--green-soft);color:#256246;display:inline-flex;align-items:center;gap:6px}.danger-text{color:var(--danger)}.billing-due{font-size:16px;margin-bottom:16px}.billing-total{font-size:30px;letter-spacing:-.025em;font-weight:700;font-variant-numeric:tabular-nums}.payment-log{font-size:13px}.payment-log p{margin:0;padding:10px 0;border-bottom:1px solid var(--line)}
@media(min-width:1500px){main{padding-top:56px}}@media(max-width:1180px){.shell{grid-template-columns:192px minmax(0,1fr)}.sidebar{width:192px;padding-left:12px;padding-right:12px}.layout{grid-template-columns:minmax(0,1fr) 270px;gap:20px}main{padding:36px 26px}.device-actions{flex-wrap:wrap}.device-actions .button{flex:1 1 42%}.device-actions .button:last-child{flex:1 1 100%}.panel-grid{grid-template-columns:1fr}}
@media(max-width:900px){.layout{grid-template-columns:1fr}.billing-summary{margin-top:4px}.billing-summary .button{width:auto}.summary-reminder{margin-top:14px}.page-head{gap:18px}.page-head .button{font-size:13px}}
@media(max-width:680px){body{font-size:15px}.shell{display:block;min-height:100dvh}.sidebar{padding:0;position:fixed;inset:auto 0 0;width:100%;height:calc(66px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--ink)}.sidebar>.brand,.sidebar>.server-label,.sidebar-bottom{display:none}.navigation{display:flex;height:66px;padding:4px 8px;gap:4px;align-items:center;justify-content:space-around}.navigation a{flex:1;flex-direction:column;gap:3px;padding:7px 2px;min-height:54px;font-size:11px;border-radius:8px}.navigation a svg{width:20px;height:20px}.navigation a.active{background:#31564f}.mobile-header{display:flex;align-items:center;justify-content:space-between;gap:14px;background:var(--ink);color:#e7f0f1;padding:16px 20px;min-height:68px}.mobile-header>a{color:#fff;text-decoration:none;font-size:24px;font-weight:750;letter-spacing:-.025em}.mobile-header>span{font-size:12px;display:flex;gap:7px;align-items:center}main{padding:26px 16px calc(94px + env(safe-area-inset-bottom));max-width:none}h1{font-size:27px}.page-head{display:block;margin-bottom:22px}.page-head p{font-size:13px}.page-head .button{width:100%;margin-top:20px;font-size:15px;min-height:48px}.toolbar{gap:10px;margin-bottom:15px}.search{max-width:none;min-height:46px}.search input{font-size:16px}.count{font-size:11px}.device-row{padding:17px}.device-name{font-size:16px}.device-icon{width:38px;height:40px}.device-icon svg{width:24px;height:24px}.device-top{gap:11px}.current-tag{display:block;width:fit-content;margin:4px 0 0}.permission{font-size:11px}.device-facts{font-size:11px;gap:5px 14px;padding-bottom:13px}.device-actions{gap:8px}.device-actions .button{font-size:12px;padding:8px 7px;min-height:43px}.device-actions .button svg{width:18px;height:18px}.device-actions .button:last-child{flex-basis:100%}.billing-summary{padding:19px}.billing-summary .button{width:100%}.billing-value strong{font-size:26px}.panel{padding:20px 17px;margin-bottom:18px}.panel-grid,.form-grid{grid-template-columns:1fr;gap:0}.field input,.field select,.field textarea{font-size:16px}.mode-choice strong{font-size:14px}.mode-choice{padding:12px}.panel h2{font-size:19px}.form-actions .button{flex:1;min-height:46px}.back-link{margin-bottom:16px}.detail-export .button{flex:1;font-size:12px}.detail-meta{gap:5px 12px}.audit-list li{gap:10px}.audit-list time{font-size:11px}.definition-list dt,.definition-list dd{font-size:12px}.toast{bottom:calc(82px + env(safe-area-inset-bottom));font-size:13px;width:max-content}.qr-dialog{padding:20px 14px}.login-box{padding:25px 22px}.notice{font-size:12px;padding:12px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}
/* Server fleet and reversible access deletion use the existing visual tokens. */
.server-card{min-width:0}.server-active{border-color:var(--green)}.server-card-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}.server-card-head h2{margin-bottom:4px}.server-card-head p{margin-bottom:12px}.server-card-head .badge{flex:none}.neutral-badge{background:var(--bg);color:var(--muted)}.server-status{display:flex;gap:8px;align-items:center;font-weight:600;font-size:14px}.status-off{background:var(--danger)}.traffic-summary{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:22px 0}.traffic-summary div{min-width:0}.traffic-summary div:last-child{grid-column:1/-1;padding-top:14px;border-top:1px solid var(--line)}.traffic-summary span{display:block;color:var(--muted);font-size:12px}.traffic-summary strong{font-size:22px;letter-spacing:-.02em;font-variant-numeric:tabular-nums}.traffic-summary div:last-child strong{font-size:28px}.automation-panel{display:flex;gap:24px;align-items:center;justify-content:space-between}.automation-panel h2{margin-bottom:8px}.automation-panel p{margin:0;max-width:65ch}.auto-control{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:600;white-space:nowrap;min-height:44px;cursor:pointer}.auto-control input{width:22px;height:22px;accent-color:var(--green)}.archive-row{display:flex;gap:20px;align-items:center;justify-content:space-between}.archive-row h2{font-size:17px;margin:0 0 6px}.archive-row p{margin:0}.server-label [data-active-server]{overflow:hidden;text-overflow:ellipsis}.relay-summary .badge{margin-right:10px}
@media(max-width:680px){.automation-panel{display:block}.auto-control{margin-top:16px}.server-card-head{gap:10px}.server-card-head h2{font-size:17px}.server-card .definition-list{gap:0 10px}.traffic-summary strong{font-size:21px}.toolbar{flex-wrap:wrap}.toolbar .search{flex-basis:100%}.toolbar .count{margin-left:auto}.archive-row{display:block}.archive-row .button{margin-top:15px;width:100%}.mobile-header [data-active-server]{display:block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.server-grid{display:block}}
