:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #203437;
  background: #f4f7f6;
  font-synthesis: none;
  line-height: 1.5;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #147567; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; background: #137a69; color: #fff; font-weight: 600; cursor: pointer; }
button:hover, .button:hover { background: #0c6356; }
button:disabled { opacity: 0.6; cursor: wait; }
button.quiet { background: transparent; color: #516767; padding-right: 0; padding-left: 0; }
button.danger { color: #a33d3d; background: #fff5f3; border-color: #f1d7d3; }
button.danger:hover { background: #fae5e1; }
.button.secondary { background: #ecf5f1; color: #17695c; }
input:not([type="checkbox"], [type="radio"]), select, textarea { display: block; width: 100%; min-height: 44px; padding: 10px 12px; margin: 6px 0 15px; border: 1px solid #cbd9d5; border-radius: 8px; background: #fff; color: #203437; }
textarea { resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #68b9a6; outline-offset: 3px; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: #137a69; }
label { font-weight: 600; font-size: 14px; }
fieldset { padding: 15px 0; border: 0; margin: 0 0 10px; }
legend { padding: 0; font-size: 14px; font-weight: 600; }
.choice { display: flex; align-items: center; gap: 9px; margin-top: 10px; font-weight: 400; }
.confirmation { font-size: 12px; color: #667571; margin-bottom: 10px; }
form { max-width: 560px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; letter-spacing: -1px; margin-bottom: 12px; }
h2 { font-size: 19px; letter-spacing: -0.3px; margin-bottom: 9px; }
h3 { font-size: 16px; margin-bottom: 4px; }
small { display: block; font-size: 12px; color: #697c78; }
.muted, .page-description { color: #6a7d78; }
.page-description { margin-bottom: 28px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1.8px; color: #6a8b80; font-weight: 700; margin-bottom: 12px; }
.footnote, .field-help { color: #71837e; font-size: 12px; }
.field-help { margin-top: -5px; margin-bottom: 18px; }
.footnote { margin-top: 20px; }
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 240px; flex-shrink: 0; background: #15352e; color: #d5e5de; padding: 32px 22px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 11px; align-items: center; font-size: 21px; font-weight: 700; color: inherit; letter-spacing: -0.6px; }
.brand-mark { display: grid; place-items: center; width: 33px; height: 33px; color: #15352e; background: #a3d7b8; border-radius: 10px; font-weight: 800; }
.sidebar-label { color: #81a395; text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px; margin: 48px 12px 12px; }
nav { display: flex; flex-direction: column; gap: 6px; }
nav a { display: block; padding: 11px 13px; border-radius: 8px; color: #afc8bd; font-size: 14px; }
nav a:hover { background: #21483c; color: #fff; }
nav a[aria-current="page"] { background: #2d5144; color: #e3f8ea; font-weight: 600; }
.sidebar-bottom { margin-top: auto; padding-top: 36px; font-size: 12px; }
.sidebar-bottom .quiet { color: #bad0c4; font-size: 12px; }
.service-state { display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #a4d5ac; }
.version { display: block; color: #80a18f; margin-top: 6px; }
.workspace { width: 100%; max-width: 1400px; padding: 45px 48px 80px; min-width: 0; }
.page-header { margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat, .panel { background: #fff; border: 1px solid #e0e8e3; border-radius: 14px; }
.stat { display: flex; flex-direction: column; padding: 23px 24px; }
.stat span { font-size: 13px; color: #637b72; }
.stat strong { font-size: 38px; font-weight: 600; letter-spacing: -1.5px; margin: 10px 0 7px; }
.stat small { font-size: 11px; }
.panel { padding: 27px; margin-bottom: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 20px; }
.section-heading .muted { font-size: 13px; margin-bottom: 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th { font-size: 11px; color: #7d8e87; font-weight: 500; padding: 0 12px 13px 0; }
td { border-top: 1px solid #e9efeb; padding: 17px 12px 17px 0; vertical-align: top; }
td small { margin-top: 4px; }
.badge { display: inline-flex; padding: 4px 9px; background: #eef1ee; color: #60726a; border-radius: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.online { color: #227b54; background: #eaf5ed; }
.badge.connecting { color: #776522; background: #fcf5db; }
.badge.error, .badge.unauthorized { color: #a34b3d; background: #fff0eb; }
.empty { text-align: center; padding: 38px 20px; color: #6f8179; }
.empty h2, .empty h3 { color: #344f43; }
.empty p { max-width: 450px; margin: 10px auto 22px; font-size: 14px; }
.empty.compact { padding: 23px 16px; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; }
.account-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.account-heading h2 { margin: 0; }
.account-heading p { margin: 2px 0 0; font-size: 12px; overflow-wrap: anywhere; }
.account-heading .badge { margin-left: auto; }
.avatar { display: grid; flex-shrink: 0; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #e4efe8; color: #36765d; font-size: 20px; text-transform: uppercase; }
.details { font-size: 13px; margin: 0 0 25px; }
.details div { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; }
dt { color: #6a7e74; }
dd { margin: 0; text-align: right; }
.connect-panel { max-width: 780px; }
.alert, .notice { border-radius: 9px; padding: 13px 16px; font-size: 14px; overflow-wrap: anywhere; }
.alert { color: #973f36; background: #fff0eb; border: 1px solid #f3d9d2; }
.notice { color: #26734d; background: #eaf5ed; border: 1px solid #d4e9da; }
.login-flow { max-width: 660px; }
.login-flow h2 { margin-bottom: 16px; }
.login-flow p { font-size: 14px; }
.qr { display: block; width: 276px; max-width: 100%; height: auto; border-radius: 12px; margin: 24px 0; border: 1px solid #dce6df; }
.cancel-form { margin-top: 22px; }
.issued { border-color: #8ec9ad; }
.issued textarea { font-family: monospace; font-size: 14px; overflow-wrap: anywhere; }
.token-row { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 0; border-top: 1px solid #e9efeb; }
.token-row p { font-size: 13px; margin-bottom: 6px; }
.token-row form { flex-shrink: 0; }
.token-row .field-help { margin: 6px 0; }
.token-row .token-warning { color: #973f36; }
.token-create { max-width: 780px; }
details { margin: 8px 0 22px; }
details .field-help { margin-top: 12px; }
summary { font-size: 14px; color: #34795e; cursor: pointer; }
.sign-in { width: min(100% - 36px, 430px); margin: 10vh auto; }
.sign-in .brand { margin-bottom: 32px; }
.sign-in .panel { padding: 32px; }
.sign-in h1 { font-size: 30px; }
.sign-in .muted { font-size: 14px; margin-bottom: 27px; }
.sign-in button { width: 100%; margin-top: 6px; }
.sign-in .footnote { text-align: center; }

@media (width <= 1100px) {
  .workspace { padding: 32px 26px; }
  .sidebar { width: 205px; padding: 28px 16px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (width <= 700px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; padding: 18px; }
  .sidebar-label, .sidebar-bottom .version, .service-state { display: none; }
  .sidebar .brand { font-size: 18px; }
  .sidebar nav { flex-direction: row; gap: 4px; margin-top: 18px; }
  nav a { font-size: 12px; padding: 9px 12px; }
  .sidebar-bottom { padding-top: 8px; margin: 0; position: absolute; right: 20px; top: 15px; }
  .workspace { padding: 28px 18px; }
  .stats { gap: 10px; }
  .stat { padding: 16px; }
  .stat strong { font-size: 31px; }
  .stat small { font-size: 10px; }
  .panel { padding: 20px; }
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  .section-heading { gap: 12px; }
  .section-heading .button { font-size: 12px; min-width: 96px; }
  .token-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .sign-in { margin-top: 6vh; }
}
