:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: #222722;
  background: #f6f7f5;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: #f6f7f5; color: #222722; font-size: 13px; line-height: 1.5; }
button, input { font: inherit; }
.shell { min-height: 100vh; }
main { max-width: 1320px; margin: 0 auto; padding: 30px 30px 64px; }
.view { display: none; }
.view.active { display: block; }
.page-heading, .section-heading, .import-band { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
h1 { margin: 0; font-size: 22px; line-height: 1.25; letter-spacing: 0; }
h2 { margin: 0; font-size: 15px; letter-spacing: 0; }
p { margin: 5px 0 0; color: #697069; font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 0 13px; border: 1px solid #aeb6ae; border-radius: 5px; background: #fff; color: #262c26; text-decoration: none; cursor: pointer; transition: background .12s ease, border-color .12s ease, color .12s ease; }
.button:hover { border-color: #818b81; background: #f5f7f5; }
.button:focus-visible { outline: 2px solid #cfe0eb; outline-offset: 2px; }
.button.primary { border-color: #174f78; background: #174f78; color: #fff; }
.button.primary:hover { border-color: #103f62; background: #103f62; }
.button.wide { width: 100%; }
.button.disabled { border-color: #d8ddd7; background: #eef1ee; color: #8a908a; cursor: not-allowed; pointer-events: none; }
.button.compact { min-height: 30px; padding: 0 10px; font-size: 12px; }
.button.danger { border-color: #d7aaa4; color: #922e24; }
.button.danger:hover { border-color: #bd756c; background: #fff2f0; color: #7f2118; }
.button:disabled { cursor: wait; opacity: .55; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)); overflow: hidden; margin-top: 24px; border: 1px solid #d8ddd7; border-radius: 6px; background: #fff; }
.metric { min-width: 0; padding: 18px; border-right: 1px solid #d8ddd7; }
.metric:last-child { border-right: 0; }
.metric span { display: block; color: #727a72; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.metric strong { display: block; margin-top: 7px; font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
.section-block { overflow: hidden; margin-top: 22px; border: 1px solid #d8ddd7; border-radius: 6px; background: #fff; }
.section-heading { padding: 15px 17px; border-bottom: 1px solid #d8ddd7; background: #fbfcfb; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #e9ece8; }
th { color: #697169; font-size: 10px; font-weight: 650; text-transform: uppercase; background: #f7f9f7; }
tbody tr:hover td { background: #fafcfb; }
tr:last-child td { border-bottom: 0; }
.actions-heading { width: 190px; text-align: right; }
.device-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; min-width: 165px; }
.device-actions-note { display: block; color: #858b85; font-size: 11px; text-align: right; }
.empty-state-cell { padding: 28px 18px; color: #697069; text-align: center; }
.pill { display: inline-block; padding: 3px 7px; border-radius: 4px; background: #e9eeeb; color: #46504a; font-size: 10px; font-weight: 600; }
.pill.completed, .pill.active { background: #dff2e5; color: #176236; }
.pill.failed, .pill.revoked { background: #f8e2df; color: #9a2c20; }
.pill.leased { background: #fff0cc; color: #7b5700; }
.import-band { padding: 18px; }
.auto-pool-band { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px; }
.pool-metrics { display: flex; align-self: stretch; }
.pool-metrics span { min-width: 86px; padding: 2px 15px; border-left: 1px solid #d8ddd7; }
.pool-metrics small { display: block; color: #727a72; font-size: 10px; font-weight: 600; text-transform: uppercase; }
.pool-metrics strong { display: block; margin-top: 5px; font-size: 18px; font-variant-numeric: tabular-nums; }
#jobFile { display: none; }
.status-line { display: block; min-height: 30px; padding: 9px 0; color: #4f554f; font-size: 13px; }
.status-line.success { color: #176236; }
.status-line.error { color: #962e22; }
.pairing-band { margin: 0 0 22px; padding: 14px 16px; border: 1px solid #9dcaaa; border-radius: 5px; background: #edf8f0; color: #176236; }
.pairing-band.error { border-color: #e1aaa3; background: #fff1ef; color: #962e22; }
.pairing-band span, .pairing-band small { display: block; color: inherit; }
.pairing-band strong { display: block; margin: 8px 0; font: 700 28px Consolas, monospace; letter-spacing: 0; }
.download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.download-card { display: flex; min-width: 0; min-height: 310px; padding: 20px; border: 1px solid #d8ddd7; border-radius: 6px; background: #fff; flex-direction: column; }
.download-card-heading { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: start; gap: 12px; }
.download-card-heading h2 { margin-top: 2px; }
.download-card-heading p { line-height: 1.4; }
.platform-mark { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid transparent; border-radius: 5px; font-size: 16px; font-weight: 700; }
.platform-mark.windows { border-color: #bad4e5; background: #eaf5fb; color: #15577f; }
.platform-mark.macos { border-color: #cbd0cb; background: #f0f2f0; color: #303630; }
.platform-mark.chrome { border-color: #bfd9c7; background: #ecf7ef; color: #21643a; }
.release-status { display: inline-flex; align-items: center; min-height: 24px; padding: 0 7px; border-radius: 4px; font-size: 10px; font-weight: 650; }
.release-status.loading { background: #eef1ee; color: #697069; }
.release-status.ready { background: #dff2e5; color: #176236; }
.release-status.unavailable { background: #f1f2f0; color: #747a74; }
.release-details { display: grid; gap: 0; margin: 22px 0 18px; border-top: 1px solid #e4e8e3; }
.release-details > div { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; min-height: 42px; padding: 11px 0 8px; border-bottom: 1px solid #e4e8e3; }
.release-details dd { margin: 0; text-align: right; }
.release-details .checksum-row dd { overflow: hidden; color: #616861; text-overflow: ellipsis; white-space: nowrap; }
.download-card > .button { margin-top: auto; }
.download-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: auto; }
.download-actions .button { justify-content: center; min-width: 0; padding-inline: 10px; }
.setup-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-top: 28px; }
.setup-panel { min-width: 0; }
.setup-panel h2 { padding-bottom: 10px; border-bottom: 1px solid #d8ddd7; }
.setup-panel ol { margin: 12px 0 0; padding-left: 20px; color: #454b45; font-size: 13px; line-height: 1.75; }
dt { color: #727772; font-size: 11px; text-transform: uppercase; }
dd { margin: 6px 0 0; font: 12px Consolas, monospace; overflow-wrap: anywhere; }
.instructions { max-width: 820px; margin-top: 28px; }
.instructions h2 { margin-top: 24px; }
.instructions ol { padding-left: 22px; color: #454b45; font-size: 13px; line-height: 1.85; }
code { padding: 2px 5px; background: #e9ece8; border-radius: 3px; }
.login-page { display: grid; place-items: center; background: #f0f3ef; }
.login-shell { width: min(380px, calc(100vw - 32px)); padding: 34px; border: 1px solid #d4dad3; border-radius: 7px; background: #fff; box-shadow: 0 16px 40px rgba(35, 45, 35, .08); text-align: center; }
.login-shell .brand-mark { display: block; width: 44px; height: 44px; margin: 0 auto 16px; object-fit: contain; }
.login-shell h1 { font-size: 25px; }
.login-shell > p { margin-bottom: 24px; }
.login-form { display: grid; gap: 8px; text-align: left; }
.login-form label { color: #4f554f; font-size: 12px; font-weight: 600; }
.login-form input { width: 100%; height: 40px; margin-bottom: 6px; padding: 0 11px; border: 1px solid #b8c0b7; border-radius: 5px; background: #fff; color: #202124; }
.login-form input:focus { border-color: #174f78; outline: 2px solid #d4e4ee; outline-offset: 0; }
.login-form .button { margin-top: 4px; }
.login-form .button:disabled { cursor: wait; opacity: .65; }
.login-error { margin: 0 0 4px; color: #9a2c20; font-size: 12px; }
.login-security { color: #777c77; font-size: 11px; text-align: center; }
.login-note { display: block; margin-top: 14px; color: #777c77; font-size: 11px; }
@media (max-width: 1080px) {
  .download-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  main { padding: 20px 12px 40px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric { border-bottom: 1px solid #d8dad5; }
  .download-grid, .setup-grid { grid-template-columns: 1fr; }
  .download-card { min-height: 290px; }
  .table-scroll { overflow-x: auto; }
  .auto-pool-band { align-items: flex-start; flex-direction: column; }
  .pool-metrics { width: 100%; overflow-x: auto; }
  .pool-metrics span:first-child { border-left: 0; padding-left: 0; }
}
