:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bg: #eceef1;
  --surface: #ffffff;
  --surface-2: #f6f7f8;
  --surface-3: #eef0f2;
  --line: #d5d9de;
  --line-strong: #c4c9d0;
  --text: #1f2328;
  --muted: #666e79;
  --muted-2: #8a929c;
  --accent: #1f2328;
  --accent-strong: #000000;
  --accent-soft: #eceef1;
  --accent-text: #ffffff;
  --ok: #1c7a53;
  --ok-soft: #eef6f1;
  --warn: #966000;
  --warn-soft: #fbf5e8;
  --danger: #b23838;
  --danger-soft: #fbefef;
  --sidebar: #ffffff;
  --sidebar-2: #f3f4f6;
  --sidebar-text: #1f2328;
  --sidebar-muted: #666e79;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 18px 50px rgba(16, 24, 40, 0.18);
  --radius: 9px;
  --radius-sm: 7px;
}

:root[data-theme="dark"] {
  --bg: #1b1d21;
  --surface: #22252a;
  --surface-2: #272b31;
  --surface-3: #2d3239;
  --line: #343a42;
  --line-strong: #454c55;
  --text: #eef1f4;
  --muted: #9aa3ae;
  --muted-2: #737c87;
  --accent: #eef1f4;
  --accent-strong: #ffffff;
  --accent-soft: #2d3239;
  --accent-text: #1b1d21;
  --ok: #6cc79e;
  --ok-soft: #1d322a;
  --warn: #d5a85d;
  --warn-soft: #332a1c;
  --danger: #e58989;
  --danger-soft: #382224;
  --sidebar: #1f2227;
  --sidebar-2: #272b31;
  --sidebar-text: #eef1f4;
  --sidebar-muted: #9aa3ae;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.strong {
  font-weight: 650;
}

.truncate {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nowrap {
  white-space: nowrap;
}

.right {
  text-align: right;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--text);
  color: var(--surface);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-mark svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: var(--surface);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.boot-card {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.boot-card p {
  margin: 0;
}

.login-simple {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 24px;
  background: var(--bg);
}

.login-simple .login-card {
  width: min(380px, 100%);
}

.login-simple .brand-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
}

.login-simple .brand-mark svg {
  width: 28px;
  height: 28px;
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-align: center;
}

.login-card > p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  text-align: center;
}

.login-form {
  display: grid;
  gap: 13px;
  margin-top: 24px;
}

.login-submit {
  width: 100%;
  height: 38px;
  margin-top: 4px;
}

.login-alt {
  margin: 16px 0 0;
  text-align: center;
}

.login-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.login-foot {
  margin: 24px 0 0;
  text-align: center;
  color: var(--muted-2);
  font-size: 11.5px;
}

.login-error {
  color: var(--danger);
  font-size: 13px;
}

.link-button {
  background: none;
  border: 0;
  color: var(--text);
  padding: 0;
  font-weight: 600;
  text-align: left;
}

.link-button:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
}

.sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-name {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.015em;
}

.nav {
  display: grid;
  gap: 2px;
  padding: 14px 10px;
}

.nav-label {
  padding: 10px 9px 5px;
  color: var(--muted-2);
  font-size: 11.5px;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border-radius: 7px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
}

.nav-link:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.nav-link.active {
  background: var(--surface-3);
  color: var(--text);
  font-weight: 600;
}

.nav-count {
  margin-left: auto;
  min-width: 19px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.sidebar-foot {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
  flex: none;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-meta {
  min-width: 0;
}

.user-name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-email {
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-org {
  color: var(--muted-2);
  font-size: 10.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-actions {
  display: flex;
  gap: 6px;
}

.sidebar-actions .btn {
  flex: 1;
  justify-content: center;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 30px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.content {
  width: 100%;
  max-width: 1320px;
  padding: 26px 30px 64px;
  display: grid;
  gap: 20px;
  align-content: start;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat {
  min-width: 0;
  padding: 15px 16px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-label {
  color: var(--muted);
  font-size: 12.5px;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--muted);
}

.stat-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-ok .stat-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.stat-danger .stat-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-warn .stat-icon {
  background: var(--warn-soft);
  color: var(--warn);
}

.stat-value {
  margin-top: 9px;
  font-size: 27px;
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.stat-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}

.fleet-summary {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.fleet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
  flex: none;
}

.fleet-warn .fleet-dot {
  background: var(--warn);
  box-shadow: 0 0 0 4px var(--warn-soft);
}

.fleet-title {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.fleet-sub {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11.5px;
}

.fleet-summary .btn {
  margin-left: auto;
  flex: none;
}

.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
}

.card-head h2,
.card-head h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-body {
  padding: 17px;
}

.card-body.flush {
  padding: 0;
}

.settings-form {
  display: grid;
  gap: 14px;
  max-width: 380px;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar.full {
  width: 100%;
}

.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 550;
}

.field-hint {
  color: var(--muted-2);
  font-size: 11.5px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
}

input[type="text"],
input[type="search"],
input[type="date"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  min-width: 0;
  height: 35px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

textarea {
  height: auto;
  min-height: 84px;
  padding: 9px 10px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--text);
  outline: 0;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  padding-right: 26px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.search {
  min-width: 270px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 35px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.btn:hover {
  background: var(--surface-2);
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn-danger {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-soft);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
}

.btn-ghost:hover {
  background: var(--surface-2);
}

.btn-sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 99px;
  background: currentColor;
}

.badge-ok {
  color: var(--ok);
  border-color: color-mix(in srgb, var(--ok) 35%, var(--line));
}

.badge-warn {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
}

.badge-danger {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 35%, var(--line));
}

.badge-accent {
  color: var(--text);
}

.badge-plain::before {
  display: none;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

thead th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: var(--surface-2);
}

.cell-main {
  min-width: 0;
  font-weight: 550;
}

.cell-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  padding: 44px 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
  font-size: 14px;
}

.bars {
  display: grid;
  gap: 13px;
}

.bar-row {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
}

.bar-label span:last-child {
  color: var(--muted);
}

.bar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-3);
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.pager {
  display: flex;
  gap: 6px;
}

.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
}

.toast {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: start;
  gap: 10px;
  padding: 12px 12px 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
  font-size: 13px;
  line-height: 1.45;
  animation: toast-in 180ms ease-out both;
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--muted);
}

.toast-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.toast-ok .toast-icon {
  background: var(--ok-soft);
  color: var(--ok);
}

.toast-error .toast-icon {
  background: var(--danger-soft);
  color: var(--danger);
}

.toast-message {
  min-width: 0;
  padding-top: 2px;
  overflow-wrap: anywhere;
}

.toast-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  opacity: 0.65;
}

.toast-close:hover {
  background: var(--surface-3);
  color: var(--text);
  opacity: 1;
}

.toast-out {
  animation: toast-out 160ms ease-in both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(4px);
  }
}

@media (max-width: 560px) {
  .toasts {
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast-out {
    animation: none;
  }
}

dialog {
  width: 100%;
  max-width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}

dialog::backdrop {
  background: rgba(9, 14, 20, 0.55);
}

.modal-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.deployment-modal {
  border-radius: 12px;
}

.deployment-modal .modal-head {
  padding: 20px 22px 17px;
  background: var(--surface-2);
}

.deployment-modal .modal-body {
  padding: 20px 22px 22px;
}

.deployment-modal .modal-foot {
  padding: 14px 22px;
}

.deployment-form {
  display: grid;
  gap: 15px;
  min-width: 0;
}

.deployment-form .field {
  min-width: 0;
}

.deployment-input {
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.deployment-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.deployment-summary span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.deployment-summary strong {
  display: block;
  margin-top: 1px;
  font-size: 13px;
  font-weight: 650;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.modal-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.icon-btn:hover {
  background: var(--surface-3);
}

.code {
  max-width: 100%;
  padding: 13px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: break-all;
  user-select: all;
}

.code-note {
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.list-row {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child {
  border-bottom: 0;
}

.min0 {
  min-width: 0;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--muted-2);
  flex: none;
}

.dot-ok {
  background: var(--ok);
}

.dot-warn {
  background: var(--warn);
}

.dot-danger {
  background: var(--danger);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.notice {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
}

.notice-warn {
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
  background: var(--warn-soft);
}

.details {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 14px;
  font-size: 13px;
}

.details dt {
  color: var(--muted);
}

.details dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.section-title {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.reason {
  padding: 2px 0;
}

.alert-detail {
  margin: 0;
  line-height: 1.65;
}

.pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: static;
    height: auto;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .sidebar-head {
    padding: 14px 16px;
  }
  .nav {
    display: flex;
    gap: 4px;
    padding: 8px 10px 12px;
    overflow-x: auto;
  }
  .nav-label,
  .nav-count {
    display: none;
  }
  .nav-link {
    padding: 7px 10px;
    white-space: nowrap;
  }
  .sidebar-foot {
    display: none;
  }
  .topbar {
    position: static;
    padding: 18px 18px 16px;
  }
  .content {
    padding: 18px 18px 48px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .search {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .split {
    grid-template-columns: minmax(0, 1fr);
  }
  .details {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .details dt {
    margin-top: 8px;
  }
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .fleet-summary {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .fleet-summary .btn {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
