/* ============================================================ design tokens
   Two themes share one token set. Dark is applied either by the OS
   preference or by an explicit data-theme, which always wins so the
   in-app toggle can override the system in both directions. */

:root {
  --bg: #f5f6f8;
  --bg-accent: radial-gradient(1200px 600px at 50% -10%, #e8ecff 0%, transparent 70%);
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --surface-3: #f1f3f7;
  --border: #e4e7ec;
  --border-strong: #d3d8e0;
  --text: #101828;
  --text-2: #475467;
  --muted: #8b93a4;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;
  --accent-text: #ffffff;

  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --info: #4f46e5;
  --info-soft: #eef2ff;

  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-md: 0 2px 4px -1px rgba(16, 24, 40, 0.06), 0 4px 12px -2px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 8px 24px -4px rgba(16, 24, 40, 0.12), 0 20px 48px -12px rgba(16, 24, 40, 0.18);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, "Helvetica Neue", sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "tnum";
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0c11;
    --bg-accent: radial-gradient(1200px 600px at 50% -10%, #1a1f3a 0%, transparent 70%);
    --surface: #12151d;
    --surface-2: #171b25;
    --surface-3: #1d2230;
    --border: #232936;
    --border-strong: #323a4b;
    --text: #e9ecf1;
    --text-2: #a4adbe;
    --muted: #7b8496;

    --accent: #6366f1;
    --accent-hover: #7c7ff5;
    --accent-soft: #1c1f3d;
    --accent-text: #ffffff;

    --success: #34d399;
    --success-soft: #0c2a22;
    --danger: #f87171;
    --danger-soft: #2d1418;
    --warning: #fbbf24;
    --warning-soft: #2b2010;
    --info: #818cf8;
    --info-soft: #1c1f3d;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 2px 4px -1px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 20px 48px -12px rgba(0, 0, 0, 0.7);

    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0c11;
  --bg-accent: radial-gradient(1200px 600px at 50% -10%, #1a1f3a 0%, transparent 70%);
  --surface: #12151d;
  --surface-2: #171b25;
  --surface-3: #1d2230;
  --border: #232936;
  --border-strong: #323a4b;
  --text: #e9ecf1;
  --text-2: #a4adbe;
  --muted: #7b8496;

  --accent: #6366f1;
  --accent-hover: #7c7ff5;
  --accent-soft: #1c1f3d;
  --accent-text: #ffffff;

  --success: #34d399;
  --success-soft: #0c2a22;
  --danger: #f87171;
  --danger-soft: #2d1418;
  --warning: #fbbf24;
  --warning-soft: #2b2010;
  --info: #818cf8;
  --info-soft: #1c1f3d;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 2px 4px -1px rgba(0, 0, 0, 0.5), 0 4px 12px -2px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 8px 24px -4px rgba(0, 0, 0, 0.6), 0 20px 48px -12px rgba(0, 0, 0, 0.7);

  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: var(--bg-accent);
  background-repeat: no-repeat;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: currentColor;
}

/* ================================================================= navbar */

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #06b6d4));
  box-shadow: var(--shadow-sm);
}

.navbar-tabs {
  display: flex;
  gap: 2px;
  flex: 1;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 10px;
  width: fit-content;
  flex-grow: 0;
  margin-left: auto;
}

.nav-tab {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
}

.nav-tab:hover { color: var(--text); }

.nav-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ================================================================= layout */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.view { display: flex; flex-direction: column; gap: 20px; }
.view.hidden, .subview.hidden, .hidden { display: none !important; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-head {
  padding: 18px 22px 0;
}

.panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.panel-hint {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 68ch;
}

.panel-hint code {
  font-size: 12px;
}

/* ============================================================= stat cards */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 14px;
  overflow: hidden;
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  flex: none;
}

.stat-icon.indigo  { background: var(--accent-soft);  color: var(--accent); }
.stat-icon.red     { background: var(--danger-soft);  color: var(--danger); }
.stat-icon.amber   { background: var(--warning-soft); color: var(--warning); }
.stat-icon.green   { background: var(--success-soft); color: var(--success); }

.stat-body { min-width: 0; }

.stat-value {
  font-size: 22px;
  font-weight: 660;
  letter-spacing: -0.02em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat-value.small { font-size: 14px; font-weight: 580; }

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

/* ================================================================= forms */

input[type="text"],
input[type="url"],
input[type="time"],
select {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

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

input[type="text"]:hover,
input[type="time"]:hover,
select:hover { border-color: var(--border-strong); }

input:focus, select:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

button:focus-visible, a:focus-visible, .icon-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.add-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 22px 20px;
}

.settings-form { padding: 16px 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.form-actions { display: flex; justify-content: flex-end; }

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field-group {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 16px;
  margin: 4px 0 0;
  background: var(--surface-2);
}

.field-group legend {
  padding: 0 8px;
  font-size: 12px;
  font-weight: 560;
  color: var(--text-2);
}

.radio-group { display: flex; flex-wrap: wrap; gap: 8px 20px; }

.radio-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
}

input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); cursor: pointer; }

.weekday-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
}

.weekday-picker label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 11px;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.weekday-picker label:hover { border-color: var(--border-strong); }
.weekday-picker label:has(input:checked) {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  color: var(--accent);
  font-weight: 560;
}

.filters-panel { padding: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 16px; padding: 16px 22px; }

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 190px;
}

.field-inline > span { font-size: 12px; color: var(--muted); font-weight: 530; }

/* ================================================================ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 570;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.1s, box-shadow 0.15s;
}

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

.btn.primary {
  background: var(--accent);
  color: var(--accent-text);
  box-shadow: var(--shadow-sm);
}
.btn.primary:hover { background: var(--accent-hover); }

.btn.secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
.btn.secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }

.btn:disabled, .icon-btn:disabled { opacity: 0.45; cursor: not-allowed; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.icon-btn:hover { background: var(--surface-3); color: var(--text); border-color: var(--border-strong); }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.ghost:hover { background: var(--surface-3); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.icon-btn.go:hover { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); }
.icon-btn.stop { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }

/* ============================================================ domain list */

.domain-list { display: flex; flex-direction: column; }

/* Three explicit, aligned sections per row: domain info | status & dates |
   actions. Grid (not flex) so every row lines up in the same columns
   instead of content clustering to the left. */
.domain-card {
  display: grid;
  grid-template-columns: minmax(210px, 1.1fr) minmax(230px, 1.2fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  border-top: 1px solid var(--border);
  transition: background 0.15s;
}

.domain-card:first-child { border-top: none; }
.domain-card:hover { background: var(--surface-2); }

.domain-id { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.domain-name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-url {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.15s;
}
.domain-url:hover { color: var(--accent); text-decoration: underline; }

.domain-meta { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--text-2); min-width: 0; }
.domain-meta-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.domain-meta .icon { width: 14px; height: 14px; color: var(--muted); }

.domain-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* ================================================================ badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 570;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}

.badge.success   { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.badge.failed    { background: var(--danger-soft);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.badge.cancelled { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.badge.running   { background: var(--info-soft);    color: var(--info);    border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.badge.none      { background: var(--surface-3);    color: var(--muted);   border-color: var(--border); }

.badge.running::before { animation: pulse 1.4s var(--ease) infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.75); }
}

.count-pill {
  font-size: 12px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.count-pill strong { color: var(--danger); font-weight: 620; }
.count-pill.clean strong { color: var(--success); }

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

code {
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* ================================================================ tables */

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

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

th, td {
  text-align: left;
  padding: 11px 22px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 570;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }

td a { color: var(--accent); text-decoration: none; }
td a:hover { text-decoration: underline; }

/* ================================================= empty & loading states */

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 44px 24px;
  text-align: center;
  color: var(--muted);
}

.state-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--surface-3);
  color: var(--muted);
}
.state-icon .icon { width: 22px; height: 22px; }

.state-title { font-size: 14px; font-weight: 570; color: var(--text-2); }
.state-text { font-size: 13px; max-width: 46ch; }

td .state, .domain-list .state { width: 100%; }

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-top: 1px solid var(--border);
}
.skeleton-row:first-child { border-top: none; }

.skeleton {
  height: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* =============================================================== subtabs */

.subtabs {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: fit-content;
}

.subtab {
  appearance: none;
  background: transparent;
  border: none;
  color: var(--text-2);
  padding: 7px 15px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 550;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.subtab:hover { color: var(--text); }
.subtab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ================================================================= modals
   Layout: the dialog is a fixed-size flex column (2/3 of the viewport width
   on desktop, capped so it never gets absurdly wide; near-full width on
   mobile). Its content is always a header (title + ✕, never scrolls), a body
   (the only scrollable part — vertically only, long text/URLs wrap instead
   of forcing horizontal scroll), and where needed a footer. */

dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  width: 66vw;
  max-width: 900px;
  max-height: 85vh;
  overflow: hidden;
}

dialog.compact { width: 420px; max-width: 92vw; }

dialog[open] {
  display: flex;
  flex-direction: column;
  animation: dialog-in 0.22s var(--ease);
}

dialog form { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }

dialog::backdrop {
  background: rgba(8, 11, 18, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.22s var(--ease);
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.modal-header h3 { margin: 0; font-size: 15px; font-weight: 620; letter-spacing: -0.01em; }

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Tables inside a modal must wrap rather than scroll sideways. */
.modal-body .table-wrap { overflow-x: hidden; }
.modal-body table { table-layout: fixed; width: 100%; }
.modal-body th, .modal-body td { padding-left: 10px; padding-right: 10px; overflow-wrap: anywhere; }
.modal-body th:first-child, .modal-body td:first-child { padding-left: 0; }
.modal-body th:last-child, .modal-body td:last-child { padding-right: 0; }
.modal-body thead th { background: var(--surface); }

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.scan-started { display: flex; align-items: center; gap: 14px; }
.scan-started p { margin: 0; font-size: 13.5px; color: var(--text-2); }

.pulse-ring {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  flex: none;
}

.pulse-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1.4s var(--ease) infinite;
}

.scan-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-bottom: 2px;
}

.scan-error {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  color: var(--danger);
  font-size: 13px;
  overflow-wrap: anywhere;
}

/* ================================================================= toast */

#toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 100;
  display: none;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--success);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  color: var(--text);
}

#toast.visible { display: flex; animation: toast-in 0.28s var(--ease); }
#toast.error { border-left-color: var(--danger); }

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

/* ============================================================ responsive */

@media (max-width: 860px) {
  .navbar-inner { padding: 10px 16px; flex-wrap: wrap; }
  .brand-text { display: none; }
  .navbar-tabs { order: 3; width: 100%; flex-grow: 1; margin-left: 0; }
  .nav-tab { flex: 1; text-align: center; }
  main { padding: 20px 16px 56px; }

  .add-form { grid-template-columns: 1fr; }

  .domain-card { grid-template-columns: 1fr; gap: 12px; padding: 16px; }
  .domain-actions { justify-content: flex-start; }

  th, td { padding-left: 16px; padding-right: 16px; }

  dialog { width: 92vw; max-height: 90vh; }
  .field-row { grid-template-columns: 1fr; }
  #toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
