:root {
  color-scheme: light;
  --ink: #173b31;
  --muted: #71827b;
  --line: #dce8e2;
  --green: #16815f;
  --green-dark: #0f634b;
  --green-soft: #e2f4ec;
  --amber-soft: #fff5d9;
  --red-soft: #ffeded;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--ink); background: linear-gradient(180deg, #f4faf7, #edf5f1); }
button, select, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.page-glow { position: fixed; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(4px); }
.page-glow-one { width: 470px; height: 470px; right: 3%; top: -260px; background: rgba(74, 191, 139, .16); }
.page-glow-two { width: 360px; height: 360px; left: -200px; bottom: 5%; background: rgba(73, 149, 226, .08); }
.page-shell { width: min(1460px, calc(100% - 48px)); margin: 0 auto; padding: 24px 0 34px; }
.topbar, .top-actions, .brand, .hero, .section-heading, .rack-header, .footer, dialog header, dialog footer { display: flex; align-items: center; }
.topbar { justify-content: space-between; gap: 20px; min-height: 58px; }
.brand { gap: 12px; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 21px; letter-spacing: -.03em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.brand-mark { position: relative; width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(145deg, #137656, #1b9770); box-shadow: 0 9px 20px rgba(22,129,95,.24); }
.brand-mark i { position: absolute; width: 12px; height: 17px; top: 9px; background: white; }
.brand-mark i:first-child { left: 10px; border-radius: 12px 2px 12px 2px; transform: rotate(-18deg); }
.brand-mark i:last-child { right: 9px; border-radius: 2px 12px 2px 12px; transform: rotate(18deg); }
.top-actions { gap: 10px; }
#languageSelect { padding: 9px 11px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.88); }
.primary-button, .secondary-button, .rack-action, .slot-action { border: 0; border-radius: 11px; padding: 10px 14px; font-weight: 750; }
.primary-button, .rack-action, .slot-action { color: white; background: var(--green); }
.secondary-button { color: var(--green-dark); background: var(--green-soft); }
.connection-pill { display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.8); font-size: 12px; font-weight: 700; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #a5b0ab; }
.connection-pill.is-online { color: var(--green-dark); background: var(--green-soft); border-color: #bfe4d5; }
.connection-pill.is-online .connection-dot { background: #20a779; box-shadow: 0 0 0 4px rgba(32,167,121,.12); }
.connection-pill.is-offline { color: #a13939; background: var(--red-soft); border-color: #efc9c9; }
.hero { justify-content: space-between; gap: 25px; padding: 74px 0 44px; }
.eyebrow, .rack-kicker { margin: 0 0 8px; color: var(--green); font-size: 11px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(42px, 7vw, 84px); line-height: .98; letter-spacing: -.055em; }
.hero-subtitle { margin: 16px 0 0; color: var(--muted); }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 36px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,255,255,.87); box-shadow: 0 16px 40px rgba(27,70,56,.06); }
.summary div { padding: 18px 22px; }
.summary div + div { border-left: 1px solid var(--line); }
.summary strong { display: block; font-size: 27px; }
.summary span { color: var(--muted); font-size: 12px; }
.notice { margin-bottom: 24px; padding: 14px 16px; border-radius: 13px; color: #934040; background: var(--red-soft); }
.section-heading { justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 30px; }
.section-heading > p { max-width: 560px; margin: 0; color: var(--muted); text-align: right; }
.racks-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(520px, 1fr)); gap: 18px; }
.rack-card { overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: rgba(255,255,255,.94); box-shadow: 0 17px 42px rgba(27,70,56,.07); }
.rack-header { justify-content: space-between; padding: 20px 22px 16px; }
.rack-header h3 { margin: 0; font-size: 24px; }
.rack-action { font-size: 12px; }
.telemetry { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8fbf9; }
.telemetry span { padding: 11px 13px; color: var(--muted); font-size: 12px; }
.telemetry span + span { border-left: 1px solid var(--line); }
.telemetry b { color: var(--ink); }
.rack-photo { position: relative; margin: 0; border-bottom: 1px solid var(--line); background: #e7eeea; aspect-ratio: 16 / 9; overflow: hidden; }
.rack-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.rack-photo figcaption { position: absolute; right: 9px; bottom: 8px; padding: 5px 8px; border-radius: 8px; color: white; background: rgba(9, 35, 27, .68); font-size: 10px; }
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 16px; }
.slot { min-height: 172px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: #f8fbf9; }
.slot.is-available { border-color: #a8dac6; background: #eff9f5; }
.slot.is-growing, .slot.is-ready { border-color: #c3dfd3; background: #f3faf7; }
.slot.is-maintenance { background: var(--amber-soft); }
.slot.is-occupied { background: #f1f3f2; }
.slot-number { display: block; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.slot strong { display: block; min-height: 38px; margin: 9px 0 3px; font-size: 14px; }
.slot small { display: block; min-height: 30px; color: var(--muted); font-size: 11px; }
.slot-action { width: 100%; margin-top: 11px; padding: 8px 7px; font-size: 11px; }
.slot:not(.is-available) .slot-action { color: var(--green-dark); background: var(--green-soft); }
.loading-card { grid-column: 1 / -1; padding: 60px; color: var(--muted); text-align: center; border: 1px solid var(--line); border-radius: 20px; background: white; }
.footer { justify-content: space-between; gap: 20px; margin-top: 38px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
dialog { width: min(520px, calc(100% - 30px)); max-height: calc(100vh - 40px); overflow: auto; padding: 0; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 28px 90px rgba(16,52,42,.3); }
dialog::backdrop { background: rgba(11,34,28,.48); backdrop-filter: blur(2px); }
dialog form, dialog > section { padding: 23px; }
dialog header { justify-content: space-between; gap: 15px; }
dialog h2 { margin: 0; }
.close-button { border: 0; padding: 2px 8px; color: var(--ink); background: transparent; font-size: 27px; }
dialog label { display: grid; gap: 6px; margin-top: 15px; font-size: 13px; font-weight: 700; }
dialog input, dialog select { width: 100%; padding: 11px 12px; border: 1px solid #ccd9d3; border-radius: 11px; color: var(--ink); background: white; }
dialog footer { justify-content: flex-end; gap: 10px; margin-top: 21px; }
.text-button { margin-right: auto; border: 0; color: var(--green); background: transparent; font-weight: 700; }
.form-error { color: #a13939; font-size: 12px; }
.shared-warning { padding: 11px 13px; border-radius: 11px; color: #775b26; background: var(--amber-soft); font-size: 12px; }
.account-dialog { width: min(760px, calc(100% - 30px)); }
.account-group { margin-top: 25px; }
.account-group h3 { margin: 0 0 10px; }
.account-list { display: grid; gap: 8px; }
.account-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbf9; }
.account-item span { color: var(--muted); font-size: 12px; }
.account-item button { flex: none; }
@media (max-width: 800px) {
  .page-shell { width: min(100% - 28px, 700px); }
  .topbar { align-items: flex-start; }
  .top-actions { flex-wrap: wrap; justify-content: flex-end; }
  .connection-pill { display: none; }
  .hero { align-items: flex-start; flex-direction: column; padding-top: 48px; }
  .summary { grid-template-columns: repeat(2, 1fr); }
  .summary div:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
  .summary div:nth-child(4) { border-top: 1px solid var(--line); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > p { text-align: left; }
  .racks-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .slots { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 10px; }
  .slot { padding: 9px; }
  .slot-action { padding: 7px 4px; font-size: 10px; }
  .telemetry { grid-template-columns: repeat(3, 1fr); }
  .footer { align-items: flex-start; flex-direction: column; }
}