@font-face {
  font-family: 'Geist';
  src: url('/geist-sans-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  font-family: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #23312f;
  background: #f5f6f3;
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  --border: #e2e7e3;
  --muted: #697570;
  --accent: #167565;
  --shadow: 0 2px 3px -2px #1d332a0a, 0 8px 24px -16px #1d332a14;
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--accent); text-decoration: none; }
button, input, select { font: inherit; }
button, a, input, summary, .table-scroll { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); }
.app-header { display: flex; align-items: center; gap: 36px; min-height: 72px; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--border); }
.brand-lockup { display: flex; align-items: center; gap: 10px; }
.app-header strong { font-size: 15px; font-weight: 650; letter-spacing: -.35px; white-space: nowrap; }
.product-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #167565; box-shadow: inset 0 1px 0 #ffffff29, 0 2px 4px #16756518; flex: none; }
.product-mark svg { width: 21px; height: 21px; fill: #e5f5ee; }
.product-mark .mark-accent { fill: #edca7e; }
nav { display: flex; gap: 3px; padding: 4px; border: 1px solid #ebeeea; border-radius: 9px; background: #f5f7f4; }
nav a { display: flex; align-items: center; padding: 7px 12px; border: 1px solid transparent; border-radius: 6px; color: #697570; font-size: 12px; font-weight: 500; transition: color 140ms, background 140ms, box-shadow 140ms; }
nav a:hover { color: #23312f; background: #eef1ed; }
nav a[aria-current="page"] { color: #23312f; border-color: #e2e7e0; background: #fff; box-shadow: 0 1px 3px #263d2710; font-weight: 600; }
.installation-label { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; border: 1px solid var(--border); padding: 5px 9px; border-radius: 6px; }
.installation-label::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #9da99f; }
main { max-width: 1480px; padding: 30px 32px 40px; margin: 0 auto; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; }
h1 { font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -.9px; margin: 0 0 7px; }
h2 { font-size: 14px; line-height: 1.4; font-weight: 600; letter-spacing: -.2px; margin: 0; }
h3 { font-size: 13px; font-weight: 600; letter-spacing: -.15px; }
p { color: var(--muted); line-height: 1.6; }
.page-heading p { margin: 0; font-size: 12px; }
.refresh-status, .count-label { color: var(--muted); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
#connection::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 6px 1px 0; border-radius: 50%; background: #9ba79f; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.stats article { flex: 1 1 160px; min-width: 0; padding: 18px 20px; border: 1px solid var(--border); background: #fff; border-radius: 10px; box-shadow: var(--shadow); }
.stats span { display: block; font-size: 12px; color: #53625b; font-weight: 500; }
.stats strong { display: block; font-size: 31px; font-weight: 550; letter-spacing: -1.2px; line-height: 1.2; margin: 12px 0 9px; font-variant-numeric: tabular-nums; }
.stats article:nth-child(-n+2) strong { color: #166b5b; }
.stats small { display: block; color: var(--muted); font-size: 11px; line-height: 1.5; }
.health-bar { display: flex; align-items: center; gap: 22px; padding: 13px 18px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 10px; background: #f9faf7; }
.health-label { color: #53625b; font-size: 11px; font-weight: 600; white-space: nowrap; }
#health { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.service-status { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; }
.service-status::before { content: ''; height: 5px; width: 5px; border-radius: 50%; background: #738092; }
.service-status.healthy::before { background: #248364; box-shadow: 0 0 0 3px #2483640c; }
.service-status.unhealthy::before { background: #b3423d; }
.service-state { color: var(--muted); }
.card { padding: 21px 22px; margin-bottom: 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; box-shadow: var(--shadow); min-width: 0; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.card-title p { font-size: 11px; margin: 4px 0 0; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.muted { color: var(--muted); font-size: 12px; }
.table-scroll { overflow: auto; border: 1px solid #e8ece7; border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; }
th { background: #f7f9f5; color: #68756c; font-size: 11px; font-weight: 500; white-space: nowrap; border-bottom: 1px solid var(--border); }
th, td { padding: 12px; }
td { border-bottom: 1px solid #edf0eb; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcf9; }
code { font-family: ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace; font-size: 11px; }
.gpu-table { min-width: 740px; }
.gpu-table th:first-child { width: 25%; }
.gpu-table td:first-child code { display: block; max-width: 250px; overflow-wrap: anywhere; }
.gpu-table small { display: block; margin-top: 4px; font-size: 11px; }
.gpu-detail { min-width: 150px; max-width: 260px; color: var(--muted); line-height: 1.5; }
.numeric { white-space: nowrap; font-variant-numeric: tabular-nums; }
.gpu-status, .session-status { display: inline-block; font-size: 10px; font-weight: 550; padding: 4px 7px; border-radius: 5px; background: #edf5ee; color: #347450; white-space: nowrap; }
.gpu-status.pending, .session-status.pending { background: #faf3e5; color: #916522; }
.gpu-status.busy, .session-status.busy { background: #edf2fc; color: #3c659a; }
.gpu-status.error, .session-status.error { background: #fbeceb; color: #a63b36; }
.session-status.neutral { background: #f1f3ef; color: #697570; }
.worker-readiness { color: var(--muted); }
.fleet-empty { padding: 26px 12px; color: var(--muted); font-weight: 400; }
.fleet-policy { border-top: 1px solid var(--border); margin: 18px 0 0; padding-top: 13px; color: #53625b; font-size: 12px; }
.fleet-explanation { font-size: 11px; margin: 6px 0 0; }
.fleet-error { color: #a63b36; font-size: 12px; overflow-wrap: anywhere; }
.removed-gpus { font-size: 12px; color: var(--muted); margin-top: 12px; }
summary { cursor: pointer; line-height: 1.5; transition: color 140ms; }
summary:hover { color: #23312f; }
.removed-gpus summary { padding: 4px 0; }
.removed-gpu { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid #edf0eb; }
.removed-gpu code { overflow-wrap: anywhere; }
.removed-gpu span { white-space: nowrap; font-size: 11px; }
.chart-value { font-size: 23px; font-weight: 550; letter-spacing: -.5px; color: #167565; font-variant-numeric: tabular-nums; }
.chart-frame { display: flex; gap: 10px; margin-top: 24px; }
.chart-scale { display: flex; flex-direction: column; justify-content: space-between; width: 30px; flex: none; color: var(--muted); font-size: 10px; padding: 1px 0; }
#chart { width: 100%; min-width: 0; height: 150px; }
.chart-times { display: flex; justify-content: space-between; margin: 10px 0 0 40px; color: var(--muted); font-size: 10px; }
.section-note { font-size: 11px; margin: 18px 0 0; }
label { display: block; color: #53625b; font-size: 11px; font-weight: 550; }
input, select { display: block; width: 100%; border: 1px solid #cfd9d0; border-radius: 7px; background: #fff; color: #23312f; padding: 9px 11px; margin: 7px 0 6px; min-height: 37px; box-shadow: 0 1px 2px #1b332807; transition: border-color 140ms, box-shadow 140ms; }
input:hover, select:hover { border-color: #aabcb0; }
input:focus, select:focus { border-color: #579888; box-shadow: 0 0 0 3px #1675650a; }
input[readonly] { background: #f6f8f4; color: var(--muted); }
input::placeholder { color: #697570; }
input[type="file"] { padding: 5px 7px; }
input::file-selector-button { font: inherit; border: 1px solid #e1e7df; border-radius: 4px; background: #f5f7f2; color: #53625b; padding: 4px 8px; margin-right: 10px; cursor: pointer; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-help { display: block; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.5; }
.advanced-settings { border-top: 1px solid #edf0eb; padding-top: 13px; margin: 18px 0; color: var(--muted); font-size: 11px; }
.advanced-settings .fields { margin-top: 14px; }
button { border: 1px solid #126454; border-radius: 7px; background: var(--accent); color: #fff; padding: 9px 13px; font-size: 11px; font-weight: 550; min-height: 36px; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 2px #12352818, inset 0 1px 0 #ffffff14; transition: background 140ms, border-color 140ms, box-shadow 140ms, transform 100ms; }
button:hover { background: #126454; box-shadow: 0 2px 4px #1235281c; }
button:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
button:disabled { opacity: .55; cursor: not-allowed; }
.secondary { border-color: #d5ded5; color: #53625b; background: #fff; font-weight: 500; box-shadow: 0 1px 2px #1b332807; }
.secondary:hover { background: #f5f7f2; border-color: #b8c8bb; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 2px; }
.check { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.check input { width: 14px; min-height: 0; height: 14px; margin: 0; accent-color: var(--accent); box-shadow: none; }
.save-status { display: block; font-size: 11px; color: #347450; margin-top: 10px; }
.save-status:empty { display: none; }
.session-table { min-width: 600px; }
.session-table td { white-space: nowrap; }
.time-cell { color: var(--muted); font-variant-numeric: tabular-nums; }
.event-table { min-width: 420px; }
.event-table th:first-child { width: 120px; }
.event-table td:last-child { color: var(--muted); overflow-wrap: anywhere; }
.events { max-height: 310px; }
.events th { position: sticky; top: 0; }
.empty-row { color: var(--muted); padding: 24px 12px; }
.login { max-width: 380px; padding: 26px; }
.login h2 { margin-bottom: 21px; }
.login button { margin-top: 15px; width: 100%; }
.loading-state { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; padding: 12px 0; }
.loading-indicator { width: 14px; height: 14px; border: 1.5px solid #d9e2da; border-top-color: var(--accent); border-radius: 50%; animation: spin 900ms linear infinite; }
#notice { color: #a63b36; background: #fff3f1; border: 1px solid #edc4c1; border-radius: 7px; padding: 11px 13px; white-space: pre-wrap; font-size: 12px; }
#notice:empty { display: none; }
.upload { display: flex; align-items: flex-end; gap: 16px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.upload label { flex: 1; min-width: 0; }
.upload input { margin-bottom: 0; }
.avatar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.avatar { border: 1px solid var(--border); border-radius: 9px; padding: 18px; background: #fdfefb; }
.avatar img { width: 88px; height: 88px; object-fit: cover; border: 1px solid var(--border); border-radius: 8px; }
.avatar h3 { margin: 14px 0 6px; }
.avatar p { font-size: 11px; margin: 0 0 16px; text-transform: capitalize; }
.avatar .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.avatar button { font-size: 11px; padding: 7px 10px; min-height: 31px; }
.video-shell { background: #162521; min-height: 300px; display: grid; place-items: center; overflow: hidden; border-radius: 9px; }
.video-shell .muted { color: #d7e2da; }
.video-shell video { max-width: 100%; max-height: 65vh; }
#session-controls { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Slot colors have the same meaning in the allocation rail, legend and GPU cards. */
.capacity-map-title { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #53625b; margin-bottom: 11px; }
.capacity-track { display: flex; gap: 5px; min-height: 38px; }
.capacity-segment { flex-basis: 0; min-width: 0; display: flex; justify-content: center; align-items: center; gap: 7px; padding: 8px 11px; border: 1px solid var(--slot-border); border-radius: 6px; font-size: 11px; }
.capacity-segment span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.capacity-segment svg { width: 16px; height: 16px; flex: none; }
.slot-ready { --slot-border: #b6d7c1; background: #edf7ee; color: #347450; }
.slot-occupied { --slot-border: #ccd9ef; background: #edf3ff; color: #376498; }
.capacity-segment.slot-occupied { background: #4978b5; color: #fff; border-color: #3e6ca5; }
.slot-warming { --slot-border: #e7d4ab; color: #916522; background: repeating-linear-gradient(135deg, #fcf6e9, #fcf6e9 7px, #f8efdc 7px, #f8efdc 14px); }
.slot-draining { --slot-border: #dbccba; background: #f7f2ec; color: #856345; }
.slot-stopping { --slot-border: #d5dcd7; background: #f2f5f0; color: #697570; }
.slot-unavailable { --slot-border: #e5b8b3; background: #fbedeb; color: #a63b36; }
.slot-unallocated { --slot-border: #d2dbd3; background: #fafbf7; color: #697570; }
.capacity-segment.slot-unallocated { border-style: dashed; }
.capacity-zero { width: 100%; padding: 11px 13px; border: 1px dashed #d2dbd3; color: var(--muted); font-size: 12px; border-radius: 6px; }
.slot-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; list-style: none; margin: 14px 0 22px; padding: 0; font-size: 11px; color: #697570; }
.slot-legend li { display: flex; align-items: center; gap: 6px; }
.slot-legend strong { color: #23312f; font-weight: 600; font-variant-numeric: tabular-nums; margin-left: 2px; }
.slot-swatch { width: 10px; height: 10px; border: 1px solid var(--slot-border); border-radius: 3px; }
.slot-swatch.slot-occupied { background: #4978b5; border-color: #3e6ca5; }
.slot-swatch.slot-unallocated { border-style: dashed; }
.gpu-capacity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.gpu-capacity-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 9px; background: #fff; }
.gpu-capacity-header { display: flex; align-items: center; gap: 11px; margin-bottom: 15px; }
.gpu-chip { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #dfe5dc; border-radius: 8px; background: #f5f7f2; color: #8a968c; flex: none; }
.gpu-chip svg { width: 23px; height: 23px; }
.gpu-chip.ready { color: #347450; background: #eef7ef; border-color: #c8dfd0; }
.gpu-chip.busy { color: #376498; background: #edf3ff; border-color: #ccd9ef; }
.gpu-chip.pending { color: #916522; background: #fcf6e9; border-color: #e7d4ab; }
.gpu-chip.error { color: #a63b36; background: #fbedeb; border-color: #edc4c1; }
.gpu-capacity-identity { min-width: 0; }
.gpu-capacity-identity code { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; color: #33473b; }
.gpu-capacity-identity strong { font-size: 12px; font-weight: 500; }
.gpu-capacity-identity small { display: block; color: var(--muted); margin-top: 5px; font-size: 10px; }
.gpu-capacity-status { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 11px; }
.gpu-capacity-status .muted { font-size: 11px; }
.gpu-slot-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.slot-block { display: flex; align-items: center; gap: 11px; flex: 1 1 110px; min-height: 64px; padding: 12px; border: 1px solid var(--slot-border); border-radius: 7px; }
.slot-block svg { width: 23px; height: 23px; flex: none; }
.slot-text small { display: block; font-size: 10px; opacity: .85; margin-bottom: 5px; }
.slot-text strong { display: block; font-weight: 550; font-size: 12px; }
.slot-block.slot-unallocated { border-style: dashed; }
.gpu-utilization { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; margin-top: 13px; }
.gpu-utilization > span { white-space: nowrap; }
.gpu-meter { height: 4px; flex: 1; background: #edf1e9; border-radius: 3px; overflow: hidden; }
.gpu-meter > div { height: 100%; background: #7297c8; }
.gpu-capacity-detail { font-size: 11px; line-height: 1.5; margin: 10px 0 0; overflow-wrap: anywhere; }
.unprovisioned-gpu { border-style: dashed; background: #fcfdf9; }
.unprovisioned-gpu .gpu-capacity-header { margin-bottom: 18px; }
.capacity-map-footer { display: flex; align-items: center; gap: 12px; padding-top: 15px; margin-top: 18px; border-top: 1px solid #edf0eb; color: var(--muted); font-size: 11px; line-height: 1.5; }
.queue-count { border: 1px solid var(--border); padding: 4px 8px; border-radius: 5px; white-space: nowrap; color: #697570; background: #fafbf7; }
.queue-count.waiting { color: #916522; border-color: #e7d4ab; background: #fcf6e9; }
.capacity-report-note { color: var(--muted); font-size: 10px; margin: 8px 0 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 1000px) {
  .grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-header { padding: 0 22px; gap: 22px; }
  .installation-label { display: none; }
  main { padding: 24px 22px; }
  .health-bar { align-items: flex-start; gap: 14px; }
  #health { gap: 8px 16px; }
  .card { padding: 19px; }
  .count-label { white-space: normal; text-align: right; }
  .upload { flex-wrap: wrap; }
  .upload label { flex-basis: calc(50% - 8px); }
  .removed-gpu { flex-direction: column; gap: 5px; }
}
@media (max-width: 600px) {
  .capacity-map-title { flex-wrap: wrap; }
  .capacity-map-footer { align-items: flex-start; }
  .capacity-segment { gap: 4px; padding: 7px; }
  .capacity-segment svg { display: none; }
  .gpu-capacity-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .app-header { flex-wrap: wrap; gap: 12px; padding: 16px; }
  .brand-lockup { width: 100%; }
  nav { width: 100%; }
  nav a { flex: 1; justify-content: center; }
  main { padding: 22px 14px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .stats { gap: 10px; }
  .stats article { flex-basis: 140px; padding: 16px; }
  .health-bar { flex-direction: column; }
  .card-title { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .count-label { text-align: left; }
  .form-actions { flex-wrap: wrap; }
  .upload { display: block; }
  .upload label { margin-bottom: 14px; }
}
