:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --card: #ffffff;
  --panel: #ffffff;
  --sunken: #f9fafb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #111827;
  --text-2: #374151;
  --muted: #6b7280;
  --faint: #9ca3af;
  --green: #16a34a;
  --green-strong: #15803d;
  --green-soft: #dcfce7;
  --green-line: #86efac;
  --bar: #22a559;
  --orange: #d97706;
  --orange-soft: #fef3c7;
  --orange-line: #fcd34d;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --red-line: #fca5a5;
  --blue: #2563eb;
  --blue-soft: #dbeafe;
  --blue-line: #93c5fd;
  --gray-soft: #f3f4f6;
  --none: #e5e7eb;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.05), 0 4px 16px rgb(16 24 40 / 0.06);
  --overlay: rgb(17 24 39 / 0.45);
  --focus: 0 0 0 3px rgb(37 99 235 / 0.3);
  --radius: 14px;
  --brand: #081f46;
  --brand-hover: #0c44ac;
  --lsk: #1b47a2;
  --aizen: #2196f3;
  --brand-soft: #eaf2fc;
  --brand-ink: #1b47a2;
  --font-brand: 'Montserrat', var(--font);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, 'Helvetica Neue', Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    color-scheme: dark;
    --bg: #0b1220;
    --card: #111a2b;
    --panel: #142034;
    --sunken: #0f1828;
    --border: #22304a;
    --border-strong: #2f3f5c;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --muted: #94a3b8;
    --faint: #64748b;
    --green: #22c55e;
    --green-strong: #4ade80;
    --green-soft: rgb(34 197 94 / 0.14);
    --green-line: rgb(34 197 94 / 0.45);
    --bar: #22c55e;
    --orange: #f59e0b;
    --orange-soft: rgb(245 158 11 / 0.14);
    --orange-line: rgb(245 158 11 / 0.45);
    --red: #f87171;
    --red-soft: rgb(248 113 113 / 0.14);
    --red-line: rgb(248 113 113 / 0.45);
    --blue: #60a5fa;
    --blue-soft: rgb(96 165 250 / 0.14);
    --blue-line: rgb(96 165 250 / 0.45);
    --gray-soft: #1c2940;
    --none: #22304a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 6px 20px rgb(0 0 0 / 0.25);
    --overlay: rgb(2 6 23 / 0.7);
    --brand: #2563eb;
    --brand-hover: #3b82f6;
    --lsk: #e2ebf8;
    --aizen: #3fa9f5;
    --brand-soft: rgb(63 169 245 / 0.12);
    --brand-ink: #8cc8f8;
  }
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/montserrat-var.woff2') format('woff2');
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ─── Boutons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--card);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

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

.btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

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

.btn-admin {
  border-color: transparent;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 700;
}

.btn-admin:hover {
  background: color-mix(in srgb, var(--brand-soft) 70%, var(--aizen) 16%);
}

.topbar-sep {
  width: 1px;
  height: 24px;
  margin: 0 4px;
  background: var(--border-strong);
}

/* Logo « LSKAIZEN Status » composé en texte (net à toutes les tailles). */
.lockup {
  display: inline-flex;
  align-items: center;
  margin: 0;
  font-family: var(--font-brand);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.lk-lsk {
  color: var(--lsk);
  font-weight: 800;
}

.lk-aizen {
  color: var(--aizen);
  font-weight: 800;
}

.lk-status {
  margin-left: 0.3em;
  color: var(--text);
  font-weight: 500;
}

.lk-dot {
  align-self: flex-start;
  width: 0.3em;
  height: 0.3em;
  margin: 0.1em 0 0 0.25em;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0.12em color-mix(in srgb, var(--green) 22%, transparent);
}

.lockup-sm {
  font-size: 17px;
}

.lockup-lg {
  font-size: 26px;
}

.lockup-lg .brand-mark {
  width: 34px;
  height: auto;
  margin-right: 12px;
}

.btn-danger {
  color: var(--red);
  border-color: var(--red-line);
}

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

.btn-sm {
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12.5px;
  border-radius: 8px;
}

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

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--faint);
}

.icon-btn:hover {
  color: var(--text-2);
  background: var(--sunken);
}

.spin .icon {
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ─── Page publique ──────────────────────────────────────────────────────── */

.page {
  max-width: 1540px;
  margin: 0 auto;
  padding: 28px 24px 48px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  min-width: 0;
}

.brand .brand-mark {
  width: 40px;
  height: auto;
  flex: none;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--green-line);
  border-radius: var(--radius);
  background: var(--green-soft);
  color: var(--green-strong);
}

.banner strong {
  font-size: 16px;
}

.banner-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.banner.is-degraded,
.banner.is-partial {
  border-color: var(--orange-line);
  background: var(--orange-soft);
  color: var(--orange);
}

.banner.is-major {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red);
}

.banner.is-maintenance {
  border-color: var(--blue-line);
  background: var(--blue-soft);
  color: var(--blue);
}

.banner.is-pending,
.banner.is-offline {
  border-color: var(--border);
  background: var(--card);
  color: var(--muted);
}

.banner-dot {
  position: relative;
  width: 12px;
  height: 12px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.banner-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: ring 2.4s ease-out infinite;
}

.admin-view-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -6px 0 16px;
  color: var(--brand-ink);
  font-size: 12.5px;
  font-weight: 600;
}

.announcements {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.announcement {
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: var(--card);
}

.announcement.kind-incident {
  border-left-color: var(--red);
}

.announcement.kind-info {
  border-left-color: var(--muted);
}

.announcement.is-resolved {
  opacity: 0.7;
  border-left-color: var(--green);
}

.announcement header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.announcement h3 {
  margin: 0;
  font-size: 14.5px;
}

.announcement time {
  color: var(--faint);
  font-size: 12px;
}

.announcement p {
  margin: 6px 0 0;
  color: var(--text-2);
  white-space: pre-line;
}

.tag {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--gray-soft);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr));
  gap: 18px;
  align-items: start;
}

.hidden-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12.5px;
}

.page-footer {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 36px;
  color: var(--faint);
  font-size: 12.5px;
}

.page-footer a {
  color: var(--muted);
  text-decoration: none;
}

.page-footer a:hover {
  text-decoration: underline;
}

.empty {
  padding: 40px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* ─── Carte de service ───────────────────────────────────────────────────── */

.card {
  --accent: var(--green);
  position: relative;
  padding: 18px 16px 14px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  scroll-margin-top: 16px;
}

.card.is-degraded {
  --accent: var(--orange);
}

.card.is-down {
  --accent: var(--red);
}

.card.is-maintenance {
  --accent: var(--blue);
}

.card.is-paused,
.card.is-pending {
  --accent: var(--faint);
}

.card.is-target {
  box-shadow: var(--shadow), 0 0 0 3px var(--blue-line);
}

.card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pulse {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  margin: 1px 0 0 -2px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.pulse::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
}

.pulse::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  animation: ring 2.4s ease-out infinite;
}

.is-paused .pulse::after,
.is-pending .pulse::after {
  animation: none;
}

.is-down .pulse::after {
  animation-duration: 1.2s;
}

@keyframes ring {
  0% {
    transform: scale(0.6);
    opacity: 0.7;
  }
  80%,
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulse::after,
  .banner-dot::after,
  .incident.is-open .incident-dot {
    animation: none;
  }
}

.card-title {
  flex: 1;
  min-width: 0;
}

.card-title h2 {
  margin: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.card-title a {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title a:hover {
  text-decoration: underline;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 11px;
  border: 1px solid var(--green-line);
  border-radius: 7px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.badge.sm {
  height: 20px;
  padding: 0 7px;
  border-radius: 5px;
  font-size: 10px;
}

.badge.orange {
  border-color: var(--orange-line);
  background: var(--orange-soft);
  color: var(--orange);
}

.badge.red {
  border-color: var(--red-line);
  background: var(--red-soft);
  color: var(--red);
}

.badge.blue {
  border-color: var(--blue-line);
  background: var(--blue-soft);
  color: var(--blue);
}

.badge.gray {
  border-color: var(--border-strong);
  background: var(--gray-soft);
  color: var(--muted);
}

.card-head .badge {
  margin-top: 3px;
}

.maintenance-note {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 9px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12.5px;
}

.card-body {
  margin-top: 16px;
}

.is-collapsed .card-body {
  display: none;
}

.collapsed-line {
  display: none;
  margin: 10px 0 0 42px;
  color: var(--muted);
  font-size: 12.5px;
}

.is-collapsed .collapsed-line {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.metric {
  padding: 11px 6px 9px;
  text-align: center;
}

.metric + .metric {
  border-left: 1px solid var(--border);
}

.metric b {
  display: block;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric span {
  display: block;
  margin-top: 1px;
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.c-green {
  color: var(--green) !important;
}

.c-orange {
  color: var(--orange) !important;
}

.c-red {
  color: var(--red) !important;
}

.c-muted {
  color: var(--faint) !important;
}

.panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}

.panel-icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.panel-main {
  flex: 1;
  min-width: 0;
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.panel-sub {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-days {
  min-width: 48px;
  text-align: right;
}

.panel-days b {
  display: block;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.panel-days span {
  color: var(--faint);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-days .dash {
  display: block;
  width: 22px;
  height: 3px;
  margin-left: auto;
  border-radius: 2px;
  background: var(--border-strong);
}

.progress {
  margin-top: 12px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
}

.progress-labels b {
  font-weight: 600;
}

.progress-labels span {
  color: var(--muted);
}

.progress-track {
  height: 5px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--none);
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: currentColor;
}

.section-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 16px 0 7px;
  color: var(--faint);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label.strong {
  color: var(--text-2);
  font-weight: 700;
}

.section-label b {
  font-size: 13px;
  letter-spacing: 0;
}

.history {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 2px;
  height: 36px;
  overflow: hidden;
}

.history i {
  flex: 0 0 7px;
  min-height: 6px;
  border-radius: 2px 2px 1px 1px;
  background: var(--bar);
}

.history i.slow {
  background: var(--orange);
}

.history i.fail {
  height: 100% !important;
  background: var(--red);
  opacity: 1 !important;
}

.history-empty {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 6px;
  background: var(--sunken);
  color: var(--faint);
  font-size: 12px;
}

.days {
  display: flex;
  gap: 3px;
  height: 28px;
}

.days i {
  flex: 1;
  border-radius: 3px;
  background: var(--none);
}

.days i.up {
  background: var(--green);
}

.days i.minor {
  background: var(--orange);
}

.days i.down {
  background: var(--red);
}

.incidents {
  display: grid;
  gap: 6px;
  max-height: 150px;
  margin: 12px 0 0;
  padding: 0 4px 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-width: thin;
}

.incident {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  font-size: 12.5px;
}

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

.incident.is-open {
  border-color: var(--red-line);
  background: var(--red-soft);
}

.incident.is-open .incident-dot {
  background: var(--red);
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.3;
  }
}

.incident time {
  font-weight: 700;
  white-space: nowrap;
}

.incident .duration {
  color: var(--muted);
  white-space: nowrap;
}

.incident .cause {
  margin-left: auto;
  overflow: hidden;
  color: var(--faint);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.no-incident {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--sunken);
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

.card-foot p {
  margin: 0;
}

.card-foot .btn-sm {
  font-weight: 500;
}

/* Survol des barres, des jours et des incidents */
.history i,
.days i {
  transition: transform 0.12s ease, filter 0.12s ease, opacity 0.12s ease;
}

.history i.is-tipped {
  opacity: 1 !important;
  filter: brightness(1.15) saturate(1.2);
  box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px color-mix(in srgb, var(--text) 35%, transparent);
}

.days i {
  transform-origin: bottom;
}

.days i.is-tipped {
  transform: scaleY(1.14);
  filter: brightness(1.08);
  box-shadow: 0 0 0 1.5px var(--card), 0 0 0 3px color-mix(in srgb, var(--text) 35%, transparent);
}

.incident.is-tipped {
  border-color: var(--border-strong);
}

.tooltip {
  position: fixed;
  z-index: 200;
  max-width: 260px;
  padding: 8px 11px;
  border-radius: 8px;
  background: #111827;
  color: #f9fafb;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.22);
}

.tooltip::first-line {
  font-weight: 700;
}

.tooltip::after {
  content: '';
  position: absolute;
  left: calc(var(--arrow, 50%) - 5px);
  border: 5px solid transparent;
}

.tooltip[data-side='top']::after {
  top: 100%;
  border-top-color: #111827;
}

.tooltip[data-side='bottom']::after {
  bottom: 100%;
  border-bottom-color: #111827;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .tooltip {
    background: #f1f5f9;
    color: #0f172a;
  }

  :root:not([data-theme='light']) .tooltip[data-side='top']::after {
    border-top-color: #f1f5f9;
  }

  :root:not([data-theme='light']) .tooltip[data-side='bottom']::after {
    border-bottom-color: #f1f5f9;
  }
}

/* ─── Fenêtres, formulaires, notifications ───────────────────────────────── */

dialog {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.25);
}

dialog.wide {
  width: min(720px, calc(100vw - 32px));
}

dialog::backdrop {
  background: var(--overlay);
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
}

.dialog-head h2 {
  margin: 0;
  font-size: 17px;
}

.dialog-body {
  padding: 14px 20px 4px;
}

.dialog-body > p:first-child {
  margin-top: 0;
}

.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 20px 18px;
}

.dialog-foot .left {
  margin-right: auto;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: var(--sunken);
  border: 1px solid var(--border);
}

.tabs button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.tabs button[aria-selected='true'] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}

.field {
  display: grid;
  gap: 5px;
  margin: 14px 0;
}

.field > span,
.field-label {
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
}

.field small,
.hint {
  color: var(--muted);
  font-size: 12px;
}

input[type='text'],
input[type='email'],
input[type='url'],
input[type='password'],
input[type='number'],
select,
textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--card);
  font-size: 14px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 6px 0;
  font-size: 13.5px;
  cursor: pointer;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--text);
}

.check small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.service-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0 14px;
  max-height: 220px;
  margin: 2px 0 6px;
  padding: 6px 12px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.service-choices[aria-disabled='true'] {
  opacity: 0.5;
}

.callout {
  margin: 12px 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: var(--sunken);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 13px;
}

.callout.ok {
  background: var(--green-soft);
  border-color: var(--green-line);
  color: var(--green-strong);
}

.callout.warn {
  background: var(--orange-soft);
  border-color: var(--orange-line);
  color: var(--orange);
}

.callout.error {
  background: var(--red-soft);
  border-color: var(--red-line);
  color: var(--red);
}

.toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 100;
  display: grid;
  justify-items: end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: 420px;
  padding: 11px 15px;
  border-radius: 10px;
  background: var(--text);
  color: var(--card);
  font-size: 13.5px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
  pointer-events: auto;
  animation: toast-in 0.2s ease-out;
}

.toast.error {
  background: var(--red);
  color: #fff;
}

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

@media (max-width: 560px) {
  .page {
    padding: 18px 16px 40px;
  }

  .banner {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .banner strong {
    flex: 1;
    min-width: 0;
  }

  .banner-time {
    width: 100%;
    margin-left: 26px;
    white-space: normal;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    flex: 1;
  }

  .topbar-sep {
    display: none;
  }

  .topbar-actions .btn-admin {
    flex: 0 0 auto;
  }

  .btn-admin span {
    display: none;
  }

  .lockup {
    font-size: 21px;
  }

  .metric b {
    font-size: 14px;
  }

  .card-foot {
    flex-wrap: wrap;
  }
}
