:root {
  color-scheme: dark;
  --bg:#101418; --side:#11171a; --surface:#171d21; --well:#11171a;
  --line:#343d41; --line-soft:#2a3337; --text:#eef2f0; --muted:#aab7b5;
  --subtle:#8c9a99; --accent:#b9eb95; --accent-dark:#263327; --red:#ffb3ad;
  --sans:Inter, "Segoe UI", system-ui, sans-serif; --mono:"IBM Plex Mono", Consolas, monospace;
  font-family:var(--sans); background:var(--bg); color:var(--text); font-synthesis:none;
}
* {box-sizing:border-box}
body {margin:0; min-height:100vh; font-size:15px; line-height:1.5}
[hidden] {display:none!important}
button,input,textarea,select {font:inherit}
button,a,input,textarea,select {touch-action:manipulation}
button {cursor:pointer}
button:disabled {cursor:default; opacity:.48}
a {color:inherit; text-decoration:none}
button {color:inherit}
:focus-visible {outline:2px solid var(--accent); outline-offset:4px}
h1,h2,h3,p {margin:0}
h1 {font-size:clamp(2.15rem,4vw,3.2rem); line-height:1.08; letter-spacing:-.06em; font-weight:620}
h2 {font-weight:610; font-size:1.05rem; letter-spacing:-.025em; line-height:1.3}
h3 {font-weight:590; font-size:1.17rem; letter-spacing:-.03em}
p {color:var(--muted)}
strong,b {font-weight:610}
code,.code-field {font: .9rem/1.55 var(--mono)}
.shell {min-height:100vh; display:grid; grid-template-columns:228px minmax(0,1fr)}
.sidebar {min-height:100vh; height:100dvh; position:sticky; top:0; background:var(--side); border-right:1px solid var(--line-soft); display:flex; flex-direction:column; padding:32px 16px 20px}
.brand {display:inline-flex; align-items:center; gap:12px; width:max-content; margin:0 12px 46px; color:var(--text)}
.brand b,.brand small {display:block}
.brand b {letter-spacing:-.05em; font-size:1.25rem; font-weight:680; line-height:1.12}
.brand small {margin-top:3px; color:var(--muted); font: .7rem/1.2 var(--mono); letter-spacing:.09em; text-transform:uppercase}
.brand-mark {position:relative; display:block; width:38px; height:38px; background:var(--accent); border-radius:11px; overflow:hidden}
.brand-mark:before,.brand-mark:after,.brand-mark i {content:""; position:absolute; background:#18211b; border-radius:1px}
.brand-mark:before {width:5px; height:21px; left:12px; top:9px; transform:skew(-23deg)}
.brand-mark:after {width:5px; height:14px; left:21px; top:16px; transform:skew(23deg)}
.brand-mark i {width:8px; height:4px; left:15px; top:23px}
.sidebar nav {display:grid; gap:5px}
.sidebar nav a {display:flex; align-items:center; gap:12px; min-height:43px; padding:9px 14px; color:var(--muted); border-radius:7px; font-size:.9rem; font-weight:520}
.sidebar nav a:hover,.icon-button:hover,.text-button:hover {background:#222b2d; color:var(--text)}
.sidebar nav a[aria-current=page] {color:var(--accent); background:#23302a}
.account {display:flex; align-items:center; gap:9px; margin-top:auto; padding:18px 4px 0; border-top:1px solid var(--line-soft)}
.avatar {display:grid; place-items:center; flex:none; width:31px; height:31px; border:1px solid #52605a; background:#2b3832; border-radius:50%; font-size:.75rem; color:#deeadf}
.account-details {min-width:0; flex:1}
.account-details b,.account-details small {display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.account-details b {font-size:.8rem}
.account-details small {font-size:.72rem; color:var(--subtle)}
.account form {margin:0}
main {width:100%; min-width:0; max-width:1330px; padding:34px clamp(24px,5.2vw,84px) 6rem}
.topline {display:flex; align-items:center; gap:10px; color:var(--subtle); font-size:.79rem; font-weight:490; margin-bottom:clamp(40px,6vw,82px)}
.topline #crumb {color:#cbd4d1}
.slash {color:#61706e}
.server-dot {display:inline-block; width:8px; height:8px; border:2px solid #a0b1a4; border-radius:2px}
.view-header {display:flex; gap:24px; align-items:center; justify-content:space-between; margin-bottom:31px}
.view-header p {margin-top:10px; font-size:.97rem}
.panel {background:var(--surface); border:1px solid var(--line); border-radius:13px; overflow:hidden; margin-bottom:20px}
.panel-head {display:flex; align-items:center; justify-content:space-between; gap:16px; min-height:62px; padding:12px 23px; border-bottom:1px solid var(--line-soft)}
.head-group {display:flex; align-items:center; gap:11px}
.mcp-head {flex-wrap:wrap; row-gap:7px}
.panel-body {padding:24px}
.flow {display:grid; gap:20px}
.flow.compact {gap:12px}
.primary,.secondary,.danger,.icon-button,.text-button {display:inline-flex; align-items:center; justify-content:center; gap:9px; border-radius:7px; font-weight:600; line-height:1.25; font-size:.84rem}
.primary,.secondary,.danger {min-height:40px; padding:9px 15px; border:1px solid transparent}
.primary {background:var(--accent); color:#172013}
.primary:hover:not(:disabled) {background:#cbf1b1}
.secondary {background:#222b2e; color:#e3ebe7; border-color:#455053}
.secondary:hover:not(:disabled) {background:#2a3537; border-color:#69756d}
.danger {background:#4f2d2d; color:#ffd9d5; border-color:#87524f}
.danger:hover:not(:disabled) {background:#653635}
.text-button {min-height:34px; padding:6px 10px; background:transparent; border:0; color:var(--accent)}
.icon-button {width:34px; height:34px; padding:0; border:0; background:transparent; color:var(--muted)}
.ic {position:relative; display:inline-block; width:18px; height:18px; flex:none; font-style:normal; color:inherit}
.ic:before,.ic:after {position:absolute; content:""; box-sizing:border-box}
.ic.devices:before {inset:2px 1px 5px; border:1.5px solid; border-radius:2px}
.ic.devices:after {width:9px; bottom:2px; left:4.5px; border-top:1.5px solid}
.ic.install:before {top:0; left:8px; height:11px; border-left:1.5px solid}
.ic.install:after {left:4.5px; top:5px; width:8px; height:8px; transform:rotate(45deg); border-bottom:1.5px solid; border-right:1.5px solid}
.ic.install {border-bottom:1.5px solid; border-radius:2px}
.ic.plug:before,.ic.plug:after {width:11px; height:7px; border:1.5px solid; border-radius:5px; transform:rotate(-45deg)}
.ic.plug:before {top:2px; right:0}
.ic.plug:after {bottom:2px; left:0}
.ic.plus:before,.ic.plus:after,.ic.close:before,.ic.close:after {left:3px; top:8px; width:12px; height:2px; border-radius:2px; background:currentColor}
.ic.plus:after {transform:rotate(90deg)}
.ic.close:before {transform:rotate(45deg)}
.ic.close:after {transform:rotate(-45deg)}
.ic.arrow:before,.ic.exit:before {left:1px; right:2px; top:8px; height:1.5px; background:currentColor}
.ic.arrow:after,.ic.exit:after {right:2px; top:5px; width:7px; height:7px; border-right:1.5px solid; border-top:1.5px solid; transform:rotate(45deg)}
.ic.exit {border-left:1.5px solid; height:14px; width:15px}
.ic.exit:before {top:6px; left:4px}
.ic.exit:after {top:3px}
.ic.refresh:before {inset:2px; border:1.5px solid; border-right-color:transparent; border-radius:50%}
.ic.refresh:after {right:1px; top:2px; width:6px; height:6px; border-bottom:1.5px solid; border-right:1.5px solid}
.muted {color:var(--subtle)}
.count {display:inline-grid; place-items:center; min-width:23px; height:23px; border:1px solid var(--line); border-radius:6px; padding:0 5px; font:.76rem var(--mono); color:var(--muted)}
.feedback,.hint {font-size:.85rem; color:var(--muted)}
.feedback.error,.notice.error {color:var(--red)}
.feedback.success {color:var(--accent)}
.panel > .feedback {padding:12px 23px}
.notice {margin-bottom:20px; padding:12px 16px; border:1px solid var(--line); border-radius:7px; background:#262222}
.empty {display:flex; align-items:center; flex-direction:column; text-align:center; padding:44px 20px 48px}
.empty-icon,.dialog-icon {width:44px; height:44px; display:grid; place-items:center; background:#24302b; border:1px solid #3c4f41; border-radius:12px; color:var(--accent)}
.empty h3 {margin:14px 0 5px}
.empty p {font-size:.89rem; max-width:44ch}
.empty a {margin-top:19px}
table {width:100%; border-collapse:collapse; font-size:.85rem}
th,td {text-align:left; padding:14px 16px; vertical-align:middle}
th:first-child,td:first-child {padding-left:23px}
th:last-child,td:last-child {padding-right:23px; text-align:right}
th {font-weight:550; color:var(--subtle); background:#151b1f; white-space:nowrap; font-size:.75rem}
td {border-top:1px solid var(--line-soft)}
.device-meta {display:flex; align-items:center; gap:12px; min-width:0}
.machine-icon {width:33px; height:33px; flex:none; border-radius:8px; display:grid; place-items:center; color:#aebfb9; background:#25302f}
.device-meta b,.device-meta small {display:block; overflow-wrap:anywhere}
.device-meta small {color:var(--subtle); font-size:.76rem; margin-top:2px}
.status {display:inline-flex; gap:7px; align-items:center; white-space:nowrap; color:var(--muted); font-size:.8rem}
.status:before {content:""; width:7px; height:7px; border-radius:50%; background:#75817e}
.status.online {color:var(--accent)}
.status.online:before {background:var(--accent)}
.time {color:var(--muted); font-size:.82rem}
.quiet {padding:5px 8px; font-size:.77rem; font-weight:540; background:transparent; border:1px solid var(--line); border-radius:5px; color:#b9c4c1}
.quiet:hover {border-color:#8d5d5a; color:var(--red)}
label,legend,.code-label {display:block; margin-bottom:7px; font-size:.86rem; font-weight:550}
input:not([type=radio]):not([type=checkbox]),textarea,select {width:100%; color:var(--text); background:var(--well); border:1px solid #414d50; border-radius:7px; padding:10px 12px; min-height:42px}
input[type=checkbox] {accent-color:var(--accent); width:18px; height:18px; flex:none; margin:3px 0 0; cursor:pointer}
textarea {resize:vertical}
input::placeholder,textarea::placeholder {color:#8c9a97; opacity:1}
.command-field {overflow-wrap:anywhere}
fieldset {min-width:0; padding:0; border:0; margin:0}
legend {padding:0; margin-bottom:9px}
.choices {display:flex; gap:7px; flex-wrap:wrap}
.choices label {margin:0; cursor:pointer; font-weight:500; position:relative}
.choices input {position:absolute; width:1px; height:1px; opacity:0}
.choices span {display:block; padding:8px 13px; background:var(--well); color:var(--muted); border:1px solid var(--line); border-radius:6px}
.choices input:checked + span {background:var(--accent-dark); border-color:#70905f; color:#d4efc3}
.choices input:focus-visible + span {outline:2px solid var(--accent); outline-offset:3px}
.code-label,.code-row,.input-actions {display:flex; align-items:center; gap:8px}
.code-label,.code-row {justify-content:space-between}
.code-label label {margin:0}
.code-row {background:var(--well); border:1px solid var(--line); border-radius:7px; padding:6px 9px 6px 14px}
.input-actions input {min-width:0; flex:1}
.input-actions button {min-height:41px}
.steps {margin:0; padding-left:22px; color:var(--muted); font-size:.91rem}
.steps li {padding-left:3px; margin:7px 0}
.steps li::marker {color:var(--accent); font: .8rem var(--mono)}
.steps strong {color:var(--text)}
dialog {width:min(430px,calc(100% - 32px)); padding:0; color:var(--text); background:var(--surface); border:1px solid #495450; border-radius:14px; box-shadow:0 28px 85px #0007}
dialog::backdrop {background:#070b0dc7}
.dialog-body {padding:25px; margin:0}
.dialog-body h2 {font-size:1.35rem; margin-bottom:7px}
.dialog-head {display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:16px}
.dialog-body p {font-size:.9rem; margin-bottom:16px}
.dialog-body .feedback {margin:10px 0 0}
.dialog-actions {display:flex; justify-content:flex-end; gap:8px; margin-top:22px}
.pair-input {font:1.15rem var(--mono); letter-spacing:.08em}
.pair-review {padding:13px 15px; margin-top:13px; border-radius:7px; border:1px solid #485d4a; background:#202d25}
.pair-review small,.pair-review b {display:block}
.pair-review small {color:#b0bfaf; font-size:.77rem}
.pair-review b {overflow-wrap:anywhere}
.login-page {display:grid; min-height:100dvh; place-items:center; padding:20px}
.login-box {max-width:400px; padding:32px; background:var(--surface); border:1px solid var(--line); border-radius:15px}
.login-box .brand {margin:0 0 32px}
.login-box h1 {font-size:2.3rem}
.login-box > p {margin:8px 0 24px; font-size:.9rem}
.login-box .primary {margin-top:2px}
.skip,.sr-only {position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); border:0}
.skip:focus {width:auto; height:auto; margin:10px; padding:10px; clip-path:none; z-index:10; background:var(--well)}
@media (min-width:1450px){main {margin:0 auto}}
@media (max-width:900px) {
  .shell {grid-template-columns:190px minmax(0,1fr)}
  main {padding-left:26px; padding-right:26px}
  .sidebar {padding-left:12px; padding-right:12px}
  .view-header {gap:14px}
  th,td {padding-left:10px; padding-right:10px}
}
@media (max-width:740px) {
  .shell {display:block}
  .sidebar {position:static; display:grid; grid-template-columns:1fr auto; gap:12px; height:auto; min-height:0; padding:16px 18px 10px; border:0; border-bottom:1px solid var(--line-soft)}
  .brand {margin:0; gap:9px}
  .brand-mark {transform:scale(.9); transform-origin:center}
  .brand b {font-size:1.05rem}
  .brand small {font-size:.62rem}
  .sidebar nav {grid-row:2; grid-column:1/-1; display:flex; overflow:auto; gap:4px}
  .sidebar nav a {gap:7px; padding:7px 10px; min-height:35px; white-space:nowrap; font-size:.8rem}
  .sidebar nav a .ic {transform:scale(.85)}
  .account {grid-row:1; grid-column:2; border:0; margin:0; padding:0}
  .account-details {display:none}
  main {padding:21px 18px 3rem}
  .topline {margin-bottom:28px}
  .view-header {align-items:flex-start; flex-direction:column; margin-bottom:22px}
  .panel-head {min-height:55px; padding:10px 15px}
  .panel-body {padding:18px 15px}
  .panel > .feedback {padding:10px 15px}
  .table-wrap thead {position:absolute; height:1px; width:1px; overflow:hidden; clip-path:inset(50%)}
  .table-wrap tbody,.table-wrap table {display:block}
  .table-wrap tr {display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:7px; padding:13px 15px; border-bottom:1px solid var(--line-soft)}
  .table-wrap tr:last-child {border-bottom:0}
  .table-wrap td {padding:0; border:0; text-align:left}
  .table-wrap td:nth-child(2),.table-wrap td:last-child {text-align:right}
  .time:before {content:"Dernier contact · "}
  .input-actions {flex-wrap:wrap}
}
@media (max-width:370px) {
  .sidebar nav a {padding:7px 8px}
  .sidebar nav .ic {display:none}
  .account .avatar {display:none}
  .panel-body {padding:15px 12px}
}

.owner-feedback {margin:-10px 0 18px}
.device-actions {display:flex; align-items:center; justify-content:flex-end; gap:7px; flex-wrap:wrap}
.configure-button:hover {color:var(--accent); border-color:#70905f}
.inline-link {color:var(--accent); text-decoration:underline; text-underline-offset:3px}
.ic.history:before {inset:1px; border:1.5px solid; border-radius:50%}
.ic.history:after {top:4px; left:8px; height:6px; width:5px; border-left:1.5px solid; border-bottom:1.5px solid}
.history-head {flex-wrap:wrap}
.history-filter {display:flex; align-items:center; gap:10px; min-width:0}
.history-filter label {margin:0; color:var(--muted)}
.history-filter select {width:auto; max-width:320px; min-height:36px; padding:6px 10px; font-size:.83rem}
.history-wrap {overflow-x:auto}
.history-wrap table {min-width:620px}
.history-wrap td {vertical-align:top}
.audit-time,.audit-duration {white-space:nowrap; color:var(--muted); font-size:.78rem}
.audit-device {max-width:210px; overflow-wrap:anywhere}
.audit-reason {display:block; max-width:250px; margin-top:4px; color:var(--subtle); overflow-wrap:anywhere}
.status.failed {color:var(--red)}
.status.failed:before {background:var(--red)}
.history-note {border-top:1px solid var(--line-soft); padding-top:16px; padding-bottom:16px}
.config-dialog {width:min(860px,calc(100% - 32px)); max-height:calc(100dvh - 32px)}
.config-dialog .dialog-body {padding:28px}
.config-dialog .dialog-head {gap:20px; margin-bottom:0}
.config-dialog .dialog-head p {margin-bottom:8px; overflow-wrap:anywhere}
.config-dialog .dialog-head .icon-button {flex:none}
.config-editor {margin-top:20px}
.config-editor:disabled {opacity:.65}
.config-section {border-top:1px solid var(--line-soft); padding-top:22px; margin-top:22px}
.config-section:first-child {margin-top:0}
.config-section h3 {font-size:1rem; margin-bottom:9px}
.config-section p.hint {font-size:.8rem; margin-top:7px; margin-bottom:14px}
.section-actions {display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:9px}
.section-actions h3 {margin:0}
.section-actions .secondary {min-height:33px; padding:6px 10px; font-size:.78rem}
.operation-grid {display:grid; grid-template-columns:1fr 1fr; gap:10px}
.filesystem-options {display:grid; gap:10px; margin:0; padding:0; border:0}
.filesystem-options input[type=radio] {accent-color:var(--accent); width:18px; height:18px; flex:none; margin:3px 0 0; cursor:pointer}
.operation-option {display:flex; gap:10px; margin:0; padding:12px; background:var(--well); border:1px solid var(--line-soft); border-radius:7px; cursor:pointer}
.operation-option b,.operation-option small {display:block}
.operation-option b {font-size:.84rem}
.operation-option small {font-size:.76rem; line-height:1.45; color:var(--muted); font-weight:400; margin-top:4px}
.operation-option:has(input:checked) {border-color:#70905f; background:#1c2820}
.config-records {display:grid; gap:14px}
.config-record {padding:15px; background:var(--well); border:1px solid var(--line); border-radius:8px}
.config-record legend {margin:0; padding:0 6px; font-size:.78rem; color:var(--muted)}
.record-grid {display:grid; grid-template-columns:1fr 1fr; gap:12px}
.record-field {min-width:0}
.record-field label {font-size:.78rem; margin-bottom:5px}
.record-field input {font-family:var(--mono); font-size:.8rem}
.record-grid .wide {grid-column:1/-1}
.record-remove {margin-top:13px}
.check-row {display:flex; align-items:flex-start; gap:10px; cursor:pointer; font-size:.82rem; margin-top:14px}
.scope-note {border:1px solid #696044; background:#2d291f; padding:12px 14px; border-radius:7px; color:#e0d3ac; font-size:.84rem!important; line-height:1.5}
.policy-confirm-dialog {width:min(660px,calc(100% - 32px)); max-height:calc(100dvh - 32px)}
.policy-changes {padding-left:22px; margin:16px 0 20px; font-size:.86rem}
.policy-changes li {margin:9px 0; padding-left:2px; overflow-wrap:anywhere}
.policy-changes li::marker {color:var(--accent)}
@media (max-width:740px) {
  .device-actions {gap:5px}
  .history-filter {width:100%; align-items:flex-start; flex-direction:column; gap:4px}
  .history-filter select {width:100%; max-width:none}
  .config-dialog .dialog-body {padding:18px}
  .operation-grid {grid-template-columns:1fr}
  .config-dialog,.policy-confirm-dialog {width:calc(100% - 20px); max-height:calc(100dvh - 20px)}
}
@media (max-width:460px) {
  .record-grid {grid-template-columns:1fr}
  .record-grid .wide {grid-column:auto}
  .config-dialog .dialog-actions {flex-wrap:wrap}
}

