:root {
  --navy: #003b73;
  --navy-deep: #00264d;
  --azure: #0084ff;
  --azure-deep: #0066cc;
  --azure-soft: #e8f3ff;
  --orange: #ff7a00;
  --gold: #ffb800;
  --ink: #0b1b2b;
  --slate: #555555;
  --paper: #f5f7fb;
  --white: #ffffff;
  --line: #d7dee8;
  --up: #0f7b5a;
  --down: #c62828;
  --degraded: #e65100;
  --pending: #5c6b7a;
  --shadow: 0 10px 30px rgba(11, 27, 43, 0.06);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  background:
    radial-gradient(1200px 420px at 8% -10%, rgba(0, 132, 255, 0.08), transparent 55%),
    radial-gradient(900px 380px at 100% 0%, rgba(255, 122, 0, 0.06), transparent 50%),
    var(--paper);
  color: var(--ink);
  line-height: 1.5;
  font-size: 16px;
}

a { color: var(--azure); text-decoration: none; }
a:hover { color: var(--azure-deep); }

.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}

.auth-card img.logo {
  display: block;
  width: min(280px, 100%);
  height: auto;
  margin: 0 auto 16px;
}

h1 {
  font-size: 1.65rem;
  letter-spacing: -0.03em;
  color: var(--navy);
  margin: 0 0 8px;
  font-weight: 700;
}

h2 {
  color: var(--navy);
  font-size: 1.05rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

label {
  display: block;
  font-weight: 650;
  margin-bottom: 4px;
  color: var(--ink);
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="url"],
input[type="file"],
select,
textarea,
.field-control {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 16px;
  font: inherit;
  background: var(--white);
  color: var(--ink);
}

.field .field-control,
.field input,
.field select,
.field textarea {
  margin-bottom: 0;
}

input:focus,
select:focus,
textarea:focus,
.field-control:focus {
  outline: 2px solid rgba(0, 132, 255, 0.28);
  border-color: var(--azure);
}

button, .button, a.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--azure);
  color: var(--white);
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(0, 132, 255, 0.18);
}

button:hover, .button:hover { background: var(--azure-deep); color: #fff; }

.button-secondary,
button.button-secondary,
a.button-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: none;
}

.button-secondary:hover,
button.button-secondary:hover,
a.button-secondary:hover {
  background: var(--azure-soft);
  color: var(--navy);
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.alert p { margin: 0; }

.alert-error {
  background: #fdecea;
  color: var(--down);
}

.alert-info {
  background: var(--azure-soft);
  color: var(--navy);
}

.assist-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff3e8;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 650;
}
.assist-banner form { margin: 0; }
.assist-banner .button-secondary {
  background: #fff;
  color: var(--navy);
}

.fleet-overall { margin: 10px 0 4px; }
.skip-mfa { margin-top: 12px; }

.muted { color: var(--slate); font-size: 0.9rem; }

.stack { display: flex; flex-direction: column; gap: 12px; }

.codes {
  font-family: ui-monospace, Consolas, monospace;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  word-break: break-all;
}

.qr {
  display: flex;
  justify-content: center;
  margin: 16px 0;
}
.qr img {
  width: 220px;
  height: 220px;
  background: #fff;
  image-rendering: pixelated;
}

.app-header {
  background: var(--navy);
  color: var(--white);
  padding: 12px 20px;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(0, 59, 115, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.app-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 10px;
  padding: 5px 10px;
}

.app-header .brand img { height: 36px; width: auto; display: block; }

.app-nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.app-nav a {
  color: #fff;
  text-decoration: none;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
}
.app-nav a:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.app-nav a[aria-current="page"],
.nav-dropdown.is-current > a {
  background: rgba(255, 255, 255, 0.16);
}

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 210px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 30;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}
.nav-dropdown-menu a {
  display: block;
  color: var(--navy);
  border-radius: 8px;
  padding: 8px 10px;
}
.nav-dropdown-menu a:hover {
  background: var(--azure-soft);
  color: var(--navy);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid #ffffff55;
}
.profile-chip:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.profile-chip img,
.table-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--azure);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
}
.avatar-fallback-lg { width: 64px; height: 64px; font-size: 1.2rem; }
.profile-preview {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}
.profile-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.org-name { margin-right: 12px; font-weight: 600; color: #d7e8ff; }
.org-switch select {
  margin-right: 8px;
  margin-bottom: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid #ffffff55;
  background: var(--navy-deep);
  color: #fff;
  width: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.app-main { padding: 28px 20px 48px; max-width: 1080px; margin: 0 auto; width: 100%; flex: 1; }

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--azure-deep);
}

.lede {
  margin: 0;
  color: var(--slate);
  max-width: 46rem;
}

.settings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -6px 0 22px;
}
.settings-nav a {
  color: var(--navy);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
}
.settings-nav a:hover {
  border-color: var(--azure);
  color: var(--azure-deep);
  background: var(--azure-soft);
}
.settings-nav a[aria-current="page"] {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.settings-nav a[aria-current="page"]:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
  color: #fff;
}

.explain-card {
  background: var(--azure-soft);
  border: 1px solid #c5ddf5;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
}
.explain-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--navy);
}
.explain-card p {
  margin: 0 0 8px;
  color: var(--slate);
}
.explain-card p:last-child { margin: 0; }

.panel,
.setup-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 20px;
}

.setup-card-muted { background: #fbfcfe; }

.panel { padding: 0; overflow: hidden; }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.type-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  color: var(--ink);
  min-height: 118px;
}
.type-card strong { color: var(--navy); font-size: 1rem; }
.type-card span { color: var(--slate); font-size: 0.9rem; }
.type-card:hover { border-color: var(--azure); color: var(--ink); }
.type-card.is-selected {
  border-color: var(--azure);
  background: var(--azure-soft);
  box-shadow: inset 0 0 0 1px var(--azure);
}

.field { margin-bottom: 18px; }
.field-help {
  margin: 0 0 8px;
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 400;
}
.field-error { margin: 6px 0 0; color: var(--down); font-size: 0.88rem; }
.field.has-error .field-control,
.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--down);
}
.errorlist { color: var(--down); margin: 0 0 12px; padding-left: 1.1rem; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 4px 0 16px;
  font-weight: 400;
}
.check-row .field-help { margin: 4px 0 0; }
.check-row strong { display: block; }
.field-check { margin-top: 4px; width: auto; }

.check-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.check-list li label,
.check-list .check-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 400;
  margin: 0;
}
.tag-suggest { margin: 0 0 16px; }
.tag-suggest .chip { cursor: pointer; }
.col-check { width: 36px; }
code {
  font-size: 0.9em;
  background: var(--chip, #eef3f8);
  padding: 1px 6px;
  border-radius: 4px;
}

.status-page {
  min-height: 100vh;
  background:
    radial-gradient(1200px 420px at 8% -10%, rgba(0, 132, 255, 0.08), transparent 55%),
    radial-gradient(900px 380px at 100% 0%, rgba(255, 122, 0, 0.06), transparent 50%),
    var(--paper);
  color: var(--ink);
}
.status-page .status { text-transform: none; }
.status-page-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 40px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.status-hero {
  text-align: center;
  margin-bottom: 22px;
}
.status-clock {
  margin: 0 0 16px;
  color: var(--slate);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.status-customer-logo {
  display: inline-block;
  margin: 0 0 12px;
}
.status-customer-logo img {
  display: block;
  margin: 0 auto;
  max-height: 72px;
  max-width: min(280px, 100%);
  width: auto;
  height: auto;
}
.status-page-brand {
  display: inline-block;
  color: inherit;
  text-decoration: none;
}
.status-page-brand h1 {
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: -0.03em;
}
.status-page-brand:hover { color: var(--azure-deep, #005bb5); }
.status-banner {
  text-align: center;
  font-weight: 700;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 0 0 20px;
  box-shadow: var(--shadow);
}
.status-banner-up { background: #e6f6ef; color: var(--up); }
.status-banner-down { background: #fdecea; color: var(--down); }
.status-banner-suspected_down { background: #fff3e8; color: var(--degraded); }
.status-banner-unknown,
.status-banner-pending,
.status-banner-paused { background: #eef2f6; color: var(--pending); }
.status-latest { text-align: center; margin: 0 0 20px; max-width: none; }
.status-uptime {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 28px;
  text-align: center;
}
.status-uptime-cell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 12px 18px;
  box-shadow: var(--shadow);
}
.status-uptime-value {
  margin: 0 0 8px;
  font-size: 2rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  line-height: 1.1;
  color: var(--navy);
}
.status-uptime-label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--slate);
  letter-spacing: 0.01em;
}
.status-uptime-compact {
  margin: 16px 0 8px;
}
.status-uptime-compact .status-uptime-value { font-size: 1.55rem; }
.status-overall {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 16px 0 28px;
}
.status-monitor {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.status-monitor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.status-monitor-head h1,
.status-monitor-head h2 { margin: 0; }
.status-detail-head { margin-bottom: 18px; }
.status-monitor-uptime {
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 650;
}
.status-back { margin: 0 0 12px; }
.status-feed {
  margin-top: 12px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.status-feed h2 { margin-top: 0; }
.status-feed h3 { margin: 16px 0 4px; font-size: 0.92rem; color: var(--slate); }
.status-feed article {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.status-feed article:last-child { border-bottom: 0; }
.status-history {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--slate);
}
.status-unlock {
  max-width: 420px;
  margin: 8px auto 24px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.status-powered {
  margin-top: auto;
  padding-top: 36px;
  text-align: center;
}
.status-powered a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--slate);
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}
.status-powered a:hover { color: var(--navy); }
.status-powered img {
  height: 22px;
  width: auto;
  display: block;
}
.status-logo-preview {
  display: block;
  max-height: 56px;
  width: auto;
  margin: 0 0 12px;
}
.chart-strip-bars { border-radius: 8px; overflow: visible; }
@media (max-width: 640px) {
  .status-uptime { grid-template-columns: 1fr; }
  .status-uptime-value { font-size: 1.7rem; }
}

.setup-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 24px;
}

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--navy);
  background: var(--white);
  font-size: 0.88rem;
  font-weight: 650;
}
.chip:hover { border-color: var(--azure); color: var(--azure-deep); }

.status {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: capitalize;
  background: #eef2f6;
  color: var(--pending);
}
.status-up, .status-active, .status-resolved, .status-low { background: #e6f6ef; color: var(--up); }
.status-down, .status-open, .status-urgent { background: #fdecea; color: var(--down); }
.status-suspected_down, .status-degraded, .status-high { background: #fff3e8; color: var(--degraded); }
.status-pending, .status-unknown, .status-paused, .status-normal { background: #eef2f6; color: var(--pending); }

.fleet-card { margin-bottom: 20px; }
.fleet-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.stat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.stat-pill {
  background: #e6f6ef;
  color: var(--up);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.88rem;
}
.stat-pill-down { background: #fdecea; color: var(--down); }
.stat-pill-warn { background: #fff3e8; color: var(--degraded); }
.device-dots { display: flex; flex-wrap: wrap; gap: 8px; }
.device-dot {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
}
.device-dot.status-up { background: #e6f6ef; color: var(--up); }
.device-dot.status-down { background: #fdecea; color: var(--down); }
.device-dot.status-suspected_down { background: #fff3e8; color: var(--degraded); }
.device-dot.status-paused,
.device-dot.status-pending,
.device-dot.status-unknown { background: #eef2f6; color: var(--pending); }

.chart { margin: 8px 0 18px; }
.chart figcaption {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate);
  margin-bottom: 6px;
}
.chart-svg { display: block; }
.chart-axis { font-size: 11px; fill: var(--slate); }
.chart-legend { margin: 6px 0 0; color: var(--slate); font-size: 0.8rem; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 4px; vertical-align: middle; }
.swatch-up { background: var(--up); }
.swatch-down { background: var(--down); }
.swatch-mixed { background: var(--degraded); }
.swatch-empty { background: var(--line); }

.host-grid { display: grid; gap: 16px; }
.host-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fbfcfe;
}
.host-card-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 8px; }
.host-card-head h3 { margin: 0; color: var(--navy); font-size: 1rem; }
.health-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(15, 123, 90, 0.12);
}
.health-green { background: #1aa36a; box-shadow: 0 0 0 3px rgba(15, 123, 90, 0.16); }
.health-yellow { background: #e6a100; box-shadow: 0 0 0 3px rgba(230, 161, 0, 0.18); }
.health-red { background: var(--down); box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.16); }

.num { font-variant-numeric: tabular-nums; }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: transparent;
  margin: 0;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
table.data th {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--slate);
  font-weight: 700;
}
table.data tr:last-child td { border-bottom: 0; }
table.data select { margin-right: 8px; margin-bottom: 0; width: auto; }
.row-muted td { background: #fbfcfe; }

.meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.meta dt { font-size: 0.8rem; color: var(--slate); }
.meta dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions form { display: inline; }
.header-actions button,
.button-ghost {
  background: transparent;
  border: 1px solid #ffffff55;
  box-shadow: none;
  color: #fff;
}
.header-actions button:hover,
.button-ghost:hover { background: var(--azure); color: #fff; }

.app-subnav { display: flex; gap: 12px; margin-bottom: 16px; }
.app-subnav a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.app-subnav a[aria-current="page"] { background: var(--navy); color: #fff; }

.site-footer {
  margin-top: auto;
  text-align: center;
  font-size: 0.75rem;
  color: var(--slate);
  padding: 16px 12px 24px;
}

.changelog-release { margin: 24px 0 40px; }
.changelog-release h2 { margin-bottom: 8px; }
.changelog-release h3 { margin: 20px 0 8px; }
.changelog-release ul { margin: 0 0 8px; padding-left: 1.25rem; }
.changelog-release li { margin-bottom: 6px; }

form.inline { display: inline; }
.inline-assign {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.inline-assign .field-control,
.inline-assign select,
.inline-assign input {
  width: auto;
  min-width: 180px;
  margin-bottom: 0;
}

.empty {
  text-align: center;
  padding: 36px 16px;
  color: var(--slate);
}
.empty strong { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; }
.empty p { margin: 0 0 14px; }

.plain-list { list-style: none; padding: 0; margin: 16px 0 0; }
.group-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.danger-link { margin: 8px 0 32px; }
.danger-link a { color: var(--down); font-weight: 650; }

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.ticket-msg {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.ticket-msg header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}
.ticket-msg header time { color: var(--slate); }
.ticket-msg p { margin: 0; }
.ticket-msg.is-staff { border-color: #b9d7f5; background: #f4f9ff; }
.ticket-msg.is-internal { border-color: #f0c48a; background: #fff8ee; }
.ticket-shots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.ticket-shots img {
  width: 140px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  display: block;
}
.catalog-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 16px;
}
.catalog-row .field-control { width: auto; min-width: 160px; margin: 0; }
.catalog-row .check-row { margin: 0; align-items: center; }

.button-danger, button.button-danger {
  background: var(--down);
  box-shadow: none;
}
.button-danger:hover, button.button-danger:hover { background: #9b1c1c; }

@media (max-width: 800px) {
  .type-grid, .field-row, .fleet-grid { grid-template-columns: 1fr; }
  .app-header-inner { align-items: flex-start; }
}
