/* Base: the 'Rainbow-Web · Provisioning Admin' design (Claude Design artifact, 2026-09-23). */
:root {
    --background: #ffffff;
    --foreground: #09090b;
    --card: #ffffff;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --border: #e4e4e7;
    --input-border: #d4d4d8;
    --sidebar: #fafafa;
    --primary: #18181b;
    --primary-foreground: #fafafa;
    --ring: #a1a1aa;
    --accent-hover: #f4f4f5;

    --sky-bg: #f0f9ff;   --sky-fg: #0369a1;   --sky-bd: #bae6fd;
    --emerald-bg: #ecfdf5; --emerald-fg: #047857; --emerald-bd: #a7f3d0;
    --amber-bg: #fffbeb;  --amber-fg: #b45309;  --amber-bd: #fde68a;
    --red-bg: #fef2f2;    --red-fg: #b91c1c;    --red-bd: #fecaca;
    --zinc-bg: #f4f4f5;   --zinc-fg: #52525b;   --zinc-bd: #e4e4e7;

    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  }

  @media (prefers-color-scheme: dark) {
    :root {
      --background: #09090b; --foreground: #fafafa; --card: #18181b;
      --muted: #27272a; --muted-foreground: #a1a1aa; --border: #27272a;
      --input-border: #3f3f46; --sidebar: #101012; --primary: #fafafa;
      --primary-foreground: #18181b; --ring: #52525b; --accent-hover: #202023;
      --sky-bg: #0c1e2e; --sky-fg: #7dd3fc; --sky-bd: #0e3a55;
      --emerald-bg: #0b2318; --emerald-fg: #6ee7b7; --emerald-bd: #0f3d29;
      --amber-bg: #2a1e08; --amber-fg: #fcd34d; --amber-bd: #4a3510;
      --red-bg: #2a1212; --red-fg: #fca5a5; --red-bd: #4a1d1d;
      --zinc-bg: #27272a; --zinc-fg: #d4d4d8; --zinc-bd: #3f3f46;
    }
  }
  :root[data-theme="dark"] {
    --background: #09090b; --foreground: #fafafa; --card: #18181b;
    --muted: #27272a; --muted-foreground: #a1a1aa; --border: #27272a;
    --input-border: #3f3f46; --sidebar: #101012; --primary: #fafafa;
    --primary-foreground: #18181b; --ring: #52525b; --accent-hover: #202023;
    --sky-bg: #0c1e2e; --sky-fg: #7dd3fc; --sky-bd: #0e3a55;
    --emerald-bg: #0b2318; --emerald-fg: #6ee7b7; --emerald-bd: #0f3d29;
    --amber-bg: #2a1e08; --amber-fg: #fcd34d; --amber-bd: #4a3510;
    --red-bg: #2a1212; --red-fg: #fca5a5; --red-bd: #4a1d1d;
    --zinc-bg: #27272a; --zinc-fg: #d4d4d8; --zinc-bd: #3f3f46;
  }
  :root[data-theme="light"] {
    --background: #ffffff; --foreground: #09090b; --card: #ffffff;
    --muted: #f4f4f5; --muted-foreground: #71717a; --border: #e4e4e7;
    --input-border: #d4d4d8; --sidebar: #fafafa; --primary: #18181b;
    --primary-foreground: #fafafa; --ring: #a1a1aa; --accent-hover: #f4f4f5;
    --sky-bg: #f0f9ff; --sky-fg: #0369a1; --sky-bd: #bae6fd;
    --emerald-bg: #ecfdf5; --emerald-fg: #047857; --emerald-bd: #a7f3d0;
    --amber-bg: #fffbeb; --amber-fg: #b45309; --amber-bd: #fde68a;
    --red-bg: #fef2f2; --red-fg: #b91c1c; --red-bd: #fecaca;
    --zinc-bg: #f4f4f5; --zinc-fg: #52525b; --zinc-bd: #e4e4e7;
  }

  * { box-sizing: border-box; }
  @media (prefers-reduced-motion: reduce) { * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; } }
  body { margin: 0; }
  ::selection { background: var(--foreground); color: var(--background); }

  .app { background: var(--background); color: var(--foreground); font-family: var(--font-sans); font-size: 14px; line-height: 20px; min-height: 100vh; }
  svg.icon { display: block; flex-shrink: 0; }

  /* ---------------- Topbar ---------------- */
  .topbar {
    height: 52px; border-bottom: 1px solid var(--border); display: flex; align-items: center;
    padding: 0 14px; gap: 12px; position: sticky; top: 0; background: var(--background); z-index: 10;
  }
  .icon-btn {
    width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 6px; border: 1px solid transparent; background: transparent; color: var(--muted-foreground); cursor: pointer;
  }
  .icon-btn:hover { background: var(--muted); color: var(--foreground); }
  .icon-btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
  .breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-foreground); white-space: nowrap; }
  .breadcrumb b { color: var(--foreground); font-weight: 500; }
  .topbar-spacer { flex: 1; }
  .topbar-search {
    display: flex; align-items: center; gap: 8px; width: 320px; height: 32px; padding: 0 8px 0 9px;
    border: 1px solid var(--input-border); border-radius: 6px; background: var(--background); color: var(--muted-foreground);
  }
  .topbar-search input { border: none; outline: none; background: transparent; font: inherit; color: var(--foreground); width: 100%; }
  .topbar-search input::placeholder { color: var(--muted-foreground); }
  kbd { font-family: var(--font-mono); font-size: 11px; background: var(--muted); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--muted-foreground); line-height: 16px; }
  .avatar {
    width: 28px; height: 28px; border-radius: 999px; background: var(--muted); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; color: var(--muted-foreground); flex-shrink: 0;
  }

  /* ---------------- Shell ---------------- */
  .shell { display: grid; grid-template-columns: 224px 1fr; min-height: calc(100vh - 53px); }
  .sidebar { background: var(--sidebar); border-right: 1px solid var(--border); padding: 12px 8px; display: flex; flex-direction: column; gap: 16px; }

  .workspace {
    display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 6px; cursor: pointer; margin-bottom: 2px;
  }
  .workspace:hover { background: var(--muted); }
  .workspace-mark {
    width: 24px; height: 24px; border-radius: 6px; background: var(--foreground); color: var(--background);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; flex-shrink: 0;
  }
  .workspace-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
  .workspace-text strong { font-size: 13px; font-weight: 600; line-height: 16px; }
  .workspace-text span { font-size: 11px; color: var(--muted-foreground); line-height: 14px; }
  .workspace svg.chev { color: var(--muted-foreground); }

  .nav-group { display: flex; flex-direction: column; gap: 1px; }
  .nav-label { font-size: 11px; font-weight: 500; color: var(--muted-foreground); padding: 4px 8px 2px; }
  .nav-item {
    display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 6px; color: var(--muted-foreground);
    text-decoration: none; font-size: 13px; cursor: pointer; border: none; background: transparent; width: 100%; text-align: left;
  }
  .nav-item:hover { background: var(--muted); color: var(--foreground); }
  .nav-item:focus-visible { outline: 2px solid var(--ring); outline-offset: -1px; }
  .nav-item.active { background: var(--muted); color: var(--foreground); font-weight: 500; }
  .nav-item svg { color: inherit; opacity: 0.8; }
  .nav-count { margin-left: auto; font-family: var(--font-sans); font-size: 11.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
  .nav-pill { margin-left: auto; background: var(--red-fg); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 600; padding: 0 6px; height: 16px; line-height: 16px; }

  .foot-link { display: flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
  .foot-link:hover { color: var(--foreground); }
  .sidebar-foot { margin-top: auto; padding: 8px; font-size: 11.5px; color: var(--muted-foreground); display: flex; align-items: center; gap: 6px; border-top: 1px solid var(--border); }
  .status-dot-sm { width: 6px; height: 6px; border-radius: 999px; background: var(--emerald-fg); flex-shrink: 0; }

  /* ---------------- Main ---------------- */
  .main { padding: 24px 28px 48px; min-width: 0; }
  .page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
  .page-head h1 { font-size: 22px; line-height: 28px; font-weight: 600; margin: 0; letter-spacing: -0.015em; }
  .page-head .desc { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
  .page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

  .btn {
    font-family: var(--font-sans); font-size: 13px; font-weight: 500; height: 32px; padding: 0 12px;
    border-radius: 6px; border: 1px solid var(--input-border); background: var(--background); color: var(--foreground);
    cursor: pointer; display: inline-flex; align-items: center; gap: 6px; line-height: 1;
  }
  .btn:hover { background: var(--muted); }
  .btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }
  .btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
  .btn-primary:hover { opacity: 0.88; }
  .btn-sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
  .btn[disabled] { opacity: 0.5; cursor: not-allowed; }

  /* ---------------- Stat cards ---------------- */
  .stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
  .card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
  .stat-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
  .stat-card .row { display: flex; align-items: center; justify-content: space-between; }
  .stat-card .label { font-size: 12.5px; color: var(--muted-foreground); }
  .stat-card .label-icon { color: var(--muted-foreground); opacity: 0.7; }
  .stat-card .value { font-family: var(--font-sans); font-size: 26px; line-height: 32px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
  .stat-card .delta { font-size: 12px; line-height: 17px; display: flex; align-items: center; gap: 3px; color: var(--muted-foreground); }
  .delta.up { color: var(--emerald-fg); }
  .delta.down { color: var(--red-fg); }

  /* ---------------- Alert ---------------- */
  /* One inline notice for the whole tool. Amber is the default (something to
     read); the other colours are the badge's own names. A page that writes
     .red/.sky/.green/.zinc only changes the colour - the box stays the same. */
  .alert {
    display: flex; gap: 10px; align-items: flex-start; background: var(--amber-bg); border: 1px solid var(--amber-bd);
    border-radius: 8px; padding: 11px 13px; margin-bottom: 16px;
  }
  .alert svg { color: var(--amber-fg); margin-top: 1px; flex-shrink: 0; }
  .alert .title { font-size: 13px; font-weight: 500; color: var(--foreground); }
  .alert .desc { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
  .alert code { font-family: var(--font-mono); font-size: 11.5px; background: var(--background); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
  .alert .spacer { flex: 1; }
  .alert a { color: var(--foreground); }
  .alert.red { background: var(--red-bg); border-color: var(--red-bd); }
  .alert.red svg { color: var(--red-fg); }
  .alert.sky { background: var(--sky-bg); border-color: var(--sky-bd); }
  .alert.sky svg { color: var(--sky-fg); }
  .alert.green, .alert.emerald { background: var(--emerald-bg); border-color: var(--emerald-bd); }
  .alert.green svg, .alert.emerald svg { color: var(--emerald-fg); }
  .alert.zinc { background: var(--zinc-bg); border-color: var(--zinc-bd); }
  .alert.zinc svg { color: var(--zinc-fg); }

  /* ---------------- Toolbar / filter bar ---------------- */
  /* Every list filters the same way: tabs above, then one row with a search
     field, its filters and the submit at the right. */
  .toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
  .field {
    display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid var(--input-border);
    border-radius: 6px; background: var(--background); color: var(--muted-foreground); width: 300px;
  }
  .field input { border: none; outline: none; background: transparent; font: inherit; color: var(--foreground); width: 100%; }
  .field input::placeholder { color: var(--muted-foreground); }
  .popover-wrap { position: relative; }
  summary.btn { list-style: none; }
  summary.btn::-webkit-details-marker { display: none; }
  .popover {
    position: absolute; top: calc(100% + 6px); left: 0; background: var(--card); border: 1px solid var(--border);
    border-radius: 8px; box-shadow: 0 4px 20px -4px rgba(0,0,0,0.18); padding: 6px; min-width: 190px; z-index: 30;
  }
  .popover label { display: flex; align-items: center; gap: 7px; padding: 6px 7px; border-radius: 5px; font-size: 12.8px; cursor: pointer; }
  .popover label:hover { background: var(--muted); }
  .popover input[type="checkbox"] { accent-color: var(--foreground); width: 13px; height: 13px; }
  .toolbar-spacer { flex: 1; }
  .filter-count { background: var(--foreground); color: var(--background); border-radius: 999px; font-size: 10px; font-weight: 700; min-width: 15px; height: 15px; display: inline-flex; align-items: center; justify-content: center; padding: 0 3px; }

  /* ---------------- Table ---------------- */
  /* Every list is one .table-card around one .table-scroll around one table -
     in both themes the card is the surface, so a list and a card look alike. */
  .table-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { width: 100%; border-collapse: collapse; min-width: 720px; }
  thead th {
    text-align: left; font-size: 12px; font-weight: 500; color: var(--muted-foreground); padding: 0 12px; height: 38px;
    border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--muted) 55%, var(--card)); white-space: nowrap;
  }
  th.sortable { cursor: pointer; user-select: none; }
  th.sortable .th-inner { display: inline-flex; align-items: center; gap: 4px; }
  th.sortable:hover { color: var(--foreground); }
  th.sortable svg { opacity: 0.55; }
  th.col-check, td.col-check { width: 36px; padding-left: 12px; }
  tbody td { padding: 8px 12px; height: 52px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 13px; }
  table.plain tbody td { padding-top: 7px; padding-bottom: 7px; height: 44px; }
  tbody tr { transition: background-color 80ms ease; }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover { background: var(--accent-hover); }
  tbody tr[hidden] { display: none; }
  tbody tr[data-selected="true"] { background: var(--sky-bg); }
  input[type="checkbox"].row-check { width: 14px; height: 14px; accent-color: var(--foreground); cursor: pointer; }
  .col-hidden { display: none; }

  .id-cell { display: flex; align-items: center; gap: 5px; }
  .id-cell .id-text { display: flex; flex-direction: column; }
  .id-cell .id-text .oid { font-family: var(--font-mono); font-size: 12.5px; }
  .id-cell .id-text .kind { font-size: 11px; color: var(--muted-foreground); }
  .copy-btn { width: 20px; height: 20px; border: none; background: transparent; color: var(--muted-foreground); border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; }
  tr:hover .copy-btn { opacity: 1; }
  .copy-btn:hover { background: var(--border); color: var(--foreground); }
  .copy-btn:focus-visible { opacity: 1; outline: 2px solid var(--ring); }

  .cell-customer strong { display: block; font-size: 13px; font-weight: 500; }
  .cell-customer span { font-size: 12px; color: var(--muted-foreground); }
  .cell-domain { font-family: var(--font-mono); font-size: 12.5px; }
  .server-tag { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted-foreground); background: var(--muted); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; }
  .server-tag svg { color: var(--muted-foreground); opacity: 0.8; }
  .cell-updated { color: var(--muted-foreground); font-variant-numeric: tabular-nums; font-size: 12.5px; }

  .badge {
    display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 500; border: 1px solid transparent; white-space: nowrap;
  }
  /* The dot is part of the badge, not of its markup: a badge written by hand
     and one from the badge() macro look the same. Sky/blue and emerald/green
     are the same colour under two names (both are in older pages). */
  .badge::before { content: ""; width: 5px; height: 5px; border-radius: 999px; background: currentColor; flex-shrink: 0; }
  .badge.sky, .badge.blue { background: var(--sky-bg); color: var(--sky-fg); border-color: var(--sky-bd); }
  .badge.emerald, .badge.green { background: var(--emerald-bg); color: var(--emerald-fg); border-color: var(--emerald-bd); }
  .badge.amber { background: var(--amber-bg); color: var(--amber-fg); border-color: var(--amber-bd); }
  .badge.red { background: var(--red-bg); color: var(--red-fg); border-color: var(--red-bd); }
  .badge.zinc { background: var(--zinc-bg); color: var(--zinc-fg); border-color: var(--zinc-bd); }


  /* ---------------- Footer / pagination ---------------- */
  .table-footer { display: flex; align-items: center; justify-content: space-between; min-height: 46px; padding: 9px 16px; border-top: 1px solid var(--border); background: var(--card); font-size: 12.5px; color: var(--muted-foreground); }
  .pagination { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .pagination select { font: inherit; font-size: 12.5px; border: 1px solid var(--input-border); border-radius: 6px; background: var(--background); color: var(--foreground); height: 28px; padding: 0 4px; }
  .page-btns { display: flex; gap: 6px; }
  .page-btns button, .page-btns .btn { width: 28px; height: 28px; padding: 0; justify-content: center; }
  .page-btns button { border: 1px solid var(--input-border); background: var(--background); border-radius: 6px; color: var(--foreground); cursor: pointer; display: inline-flex; align-items: center; }
  .page-btns button:hover:not([disabled]) { background: var(--muted); }
  .page-btns button[disabled] { opacity: 0.4; cursor: not-allowed; }

  /* ---------------- Side panels ---------------- */
  .job { display: flex; gap: 9px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
  .job:last-child { border-bottom: none; }
  .job-status { padding-top: 4px; }
  .job-status .dot { width: 7px; height: 7px; border-radius: 999px; display: block; }
  .job-status .dot.ok { background: var(--emerald-fg); }
  .job-status .dot.warn { background: var(--amber-fg); }
  .job-name { font-size: 12.5px; font-weight: 500; }
  .job-desc { font-size: 11.5px; color: var(--muted-foreground); margin-top: 1px; }
  .job-meta { display: flex; justify-content: space-between; margin-top: 5px; font-size: 12px; color: var(--muted-foreground); font-family: var(--font-sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .plan-list { padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 6px; }
  .plan-chip { font-size: 11.5px; border: 1px solid var(--border); background: var(--muted); border-radius: 999px; padding: 3px 9px; }

  .toast {
    position: fixed; bottom: 18px; right: 20px; background: var(--card); border: 1px solid var(--border);
    box-shadow: 0 8px 30px -8px rgba(0,0,0,0.25); border-radius: 8px; padding: 10px 13px; font-size: 12.8px;
    display: flex; align-items: flex-start; gap: 9px; opacity: 0; transform: translateY(6px);
    transition: opacity 160ms ease, transform 160ms ease; pointer-events: none; z-index: 50; max-width: 300px;
  }
  .toast.show { opacity: 1; transform: translateY(0); }
  .toast svg { color: var(--emerald-fg); flex-shrink: 0; margin-top: 1px; }

  @media (max-width: 1040px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
  }

/* ---------------- Additions for the working tool ---------------- */
html, body { background: var(--background); color: var(--foreground); }
a { color: inherit; }
a.nav-item { text-decoration: none; }
.link { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 2px; }
.link:hover { text-decoration-color: var(--foreground); }
.muted { color: var(--muted-foreground); }
.small { font-size: 12px; line-height: 17px; }
.mono { font-family: var(--font-mono); font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.env-strip { background: var(--amber-bg); color: var(--amber-fg); border-bottom: 1px solid var(--amber-bd); font-size: 12px; text-align: center; padding: 3px 8px; }

.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu .popover { left: auto; right: 0; min-width: 200px; }
.user-menu .popover .who { padding: 6px 8px 8px; font-size: 12.5px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-btn { width: 100%; text-align: left; background: transparent; border: none; font: inherit; font-size: 12.8px; padding: 7px 9px; border-radius: 5px; cursor: pointer; color: var(--foreground); display: flex; align-items: center; gap: 8px; }
.menu-btn:hover { background: var(--muted); }

.btn-danger { color: var(--red-fg); border-color: var(--red-bd); }
.btn-danger:hover { background: var(--red-bg); }
a.btn { text-decoration: none; }
.btn-ghost { border-color: transparent; background: transparent; }

.flash { display: flex; gap: 10px; align-items: flex-start; border-radius: 8px; padding: 10px 13px; margin-bottom: 16px; font-size: 13px; border: 1px solid; }
.flash.success { background: var(--emerald-bg); border-color: var(--emerald-bd); color: var(--emerald-fg); }
.flash.error { background: var(--red-bg); border-color: var(--red-bd); color: var(--red-fg); }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; min-height: 46px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 13px; font-weight: 600; margin: 0; }
.card-body { padding: 14px 16px; }
.card-body > :first-child { margin-top: 0; }
.card-body > :last-child { margin-bottom: 0; }
.card + .card { margin-top: 0; }

.dl { display: grid; grid-template-columns: 130px 1fr; gap: 7px 12px; margin: 0; font-size: 13px; }
.dl dt { color: var(--muted-foreground); }
.dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.title-row h1 .mono { font-size: 19px; }

.input, .textarea, .select {
  font: inherit; font-size: 13px; color: var(--foreground); background: var(--background);
  border: 1px solid var(--input-border); border-radius: 6px; padding: 6px 9px; width: 100%;
}
.input { height: 32px; }
.textarea { min-height: 70px; resize: vertical; line-height: 19px; }
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--ring); outline-offset: 0; }
.form-stack { display: flex; flex-direction: column; gap: 8px; }
.form-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.form-inline .input { flex: 1; min-width: 160px; width: auto; }
label.lbl { font-size: 12px; color: var(--muted-foreground); display: block; margin-bottom: 4px; }
.hint { font-size: 12px; color: var(--muted-foreground); line-height: 17px; }

.action-block + .action-block { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.action-block h3 { font-size: 12.5px; font-weight: 600; margin: 0 0 6px; }
details.inline-form > summary { list-style: none; cursor: pointer; }
details.inline-form > summary::-webkit-details-marker { display: none; }
details.inline-form[open] > summary { margin-bottom: 8px; }

.dom-row { padding: 12px 14px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.dom-row:last-child { border-bottom: none; }
.dom-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dom-name { font-family: var(--font-mono); font-size: 13px; font-weight: 500; }
.dom-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 20px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: -2px; width: 1px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .tl-dot { position: absolute; left: 1px; top: 5px; width: 9px; height: 9px; border-radius: 999px; border: 2px solid var(--background); }
.tl-dot.emerald { background: var(--emerald-fg); } .tl-dot.sky { background: var(--sky-fg); } .tl-dot.amber { background: var(--amber-fg); }
.tl-dot.red { background: var(--red-fg); } .tl-dot.zinc { background: var(--zinc-fg); } .tl-dot.admin { background: var(--foreground); }
.tl-time { font-size: 11.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.tl-title { font-size: 13px; font-weight: 500; }
.tl-body { font-size: 12.5px; color: var(--muted-foreground); margin-top: 1px; }
.tl-note { white-space: pre-wrap; color: var(--foreground); background: var(--muted); border-radius: 6px; padding: 6px 8px; margin-top: 4px; font-size: 12.5px; }

.tabs { display: inline-flex; background: var(--muted); border-radius: 8px; padding: 3px; gap: 2px; }
.tabs a { text-decoration: none; font-size: 12.8px; padding: 4px 10px; border-radius: 6px; color: var(--muted-foreground); display: inline-flex; gap: 6px; align-items: center; }
.tabs a.active { background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgba(0,0,0,0.08); font-weight: 500; }
.tabs .count { font-family: var(--font-sans); font-size: 11.5px; font-variant-numeric: tabular-nums; }

tbody tr.clickable { cursor: pointer; }
tbody tr.row-danger td { background: var(--red-bg); }
.alert.green { background: var(--emerald-bg); border-color: var(--emerald-bd); }
.alert.green svg { color: var(--emerald-fg); }
td a.row-link { text-decoration: none; color: inherit; }
td a.row-link:hover .oid, td a.row-link:hover strong { text-decoration: underline; }
table.plain { min-width: 0; }
table.plain tbody td { height: 44px; }
.empty { padding: 28px 14px; text-align: center; color: var(--muted-foreground); font-size: 13px; }
.empty.ok { color: var(--emerald-fg); }

.light { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.light .dot { width: 8px; height: 8px; border-radius: 999px; }
.light.red .dot { background: var(--red-fg); } .light.amber .dot { background: var(--amber-fg); }
.light.emerald .dot { background: var(--emerald-fg); } .light.zinc .dot { background: var(--zinc-fg); }

.mail-draft textarea { font-family: var(--font-mono); font-size: 12px; line-height: 17px; min-height: 220px; }
.status-row { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-bottom: 1px solid var(--border); }
.status-row:last-child { border-bottom: none; }
.status-row .dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.dot.ok { background: var(--emerald-fg); } .dot.warn { background: var(--amber-fg); } .dot.bad { background: var(--red-fg); } .dot.off { background: var(--zinc-fg); }
.status-row .name { font-size: 13px; font-weight: 500; }
.status-row .desc { font-size: 12px; color: var(--muted-foreground); }
.status-row .meta { margin-left: auto; font-family: var(--font-sans); font-size: 12px; color: var(--muted-foreground); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.job-status .dot.bad { background: var(--red-fg); } .job-status .dot.off { background: var(--zinc-fg); }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .card-body { padding: 20px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-card h1 { font-size: 18px; margin: 0 0 4px; }
.qr { display: block; width: 200px; height: 200px; margin: 6px auto 10px; background: #fff; border-radius: 8px; padding: 6px; }
.secret { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; text-align: center; word-spacing: 6px; }
.code-input { font-family: var(--font-mono); font-size: 20px; letter-spacing: 0.3em; text-align: center; height: 44px; }

.sidebar-backdrop { display: none; }
@media (max-width: 1040px) {
  .detail-grid { grid-template-columns: 1fr; }
  body.nav-open .sidebar { display: flex; position: fixed; top: 53px; left: 0; bottom: 0; width: 240px; z-index: 40; overflow-y: auto; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 53px 0 0 0; background: rgba(0,0,0,0.3); z-index: 35; }
}
@media (max-width: 640px) {
  .main { padding: 18px 16px 40px; }
  .topbar-search { display: none; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .dom-actions { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { margin-top: 6px; }
  .table-footer { flex-direction: column; gap: 8px; align-items: flex-start; }
}
.status-dot-sm.warn-dot { background: var(--amber-fg); }
a.workspace { text-decoration: none; color: inherit; }
a.stat-card { text-decoration: none; color: inherit; }
a.stat-card:hover { border-color: var(--ring); }
.stat-card .label-icon svg { color: var(--muted-foreground); opacity: 0.7; }
label.btn input[type="checkbox"] { accent-color: var(--foreground); margin: 0; }
.id-cell .badge { margin-left: 4px; }
.id-cell a.row-link { display: flex; flex-direction: column; }
a.status-row { text-decoration: none; color: inherit; }
a.status-row:hover { background: var(--muted); }
.breadcrumb a { color: var(--muted-foreground); text-decoration: none; }
.breadcrumb a:hover { color: var(--foreground); }
.title-row .copy-btn { opacity: 1; }

/* Layout fixes after the first real-data preview */
.cell-domain, td.nowrap, .cell-updated { white-space: nowrap; }
.cell-customer strong, .cell-customer span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumb { min-width: 0; overflow: hidden; }
.breadcrumb .crumb-root { display: inline-flex; align-items: center; gap: 6px; }
.form-stack > .btn, .form-stack > form > .btn { align-self: flex-start; }
.nav-pill { color: var(--background); }
@media (max-width: 1040px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .breadcrumb .crumb-root { display: none; }
}
.job > div:last-child { flex: 1; min-width: 0; }
.job-meta { gap: 12px; }
.card-head--sub { border-top: 1px solid var(--border); }
.action-block .hint + .hint { margin-top: 6px; }

/* ⓘ hints (macro info in _ui.html): the explanation on hover/focus instead of on the page */
.info { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; margin-left: 4px;
  border: 1px solid var(--input-border); border-radius: 999px; font: 600 10px/1 var(--font-sans); font-style: italic;
  color: var(--muted-foreground); cursor: help; position: relative; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.info:hover, .info:focus { color: var(--foreground); border-color: var(--ring); outline: none; }
.info::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 6px); transform: translateX(-50%);
  width: max-content; max-width: 300px; padding: 7px 9px; border-radius: 6px; background: var(--primary); color: var(--primary-foreground);
  font: 400 12px/1.45 var(--font-sans); font-style: normal; white-space: normal; text-align: left; z-index: 50;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); display: none; pointer-events: none; }
/* display (not visibility): a hidden tooltip near the right edge must not widen the page */
.info:hover::after, .info:focus::after { display: block; }
th .info::after { left: 0; transform: none; }
.card-head .info::after { left: auto; right: -4px; transform: none; }

/* customers */
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; border: 1px solid var(--border);
  background: var(--muted); border-radius: 999px; padding: 1px 8px; margin: 1px 3px 1px 0; white-space: nowrap; }
.chip-sub { color: var(--muted-foreground); font-family: var(--font-sans); font-size: 10.5px; }
.import-strip { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -6px 0 14px; font-size: 12.5px; }
.import-item { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.import-item .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--zinc-fg); }
.import-item .dot.ok { background: var(--emerald-fg); } .import-item .dot.bad { background: var(--red-fg); }
.pkg { padding: 12px 16px; border-top: 1px solid var(--border); }
.pkg:first-of-type { border-top: 0; }
.pkg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pkg-domain { font-weight: 600; }
.pkg-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; font-size: 12.5px; color: var(--muted-foreground); }
.pkg-meta b { color: var(--foreground); font-weight: 500; }

/* cancellation checklist */
.steps { display: inline-flex; align-items: center; gap: 3px; cursor: default; }
.step-dot { width: 9px; height: 9px; border-radius: 999px; border: 1.5px solid var(--input-border); }
.step-dot.done { background: var(--emerald-fg); border-color: var(--emerald-fg); }
.steps-count { margin-left: 5px; font-size: 12px; color: var(--muted-foreground); }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px; border-top: 1px solid var(--border); }
.checklist li:first-child { border-top: 0; }
.check-btn { flex-shrink: 0; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--input-border); background: var(--card);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: transparent; padding: 0; }
.check-btn:hover { border-color: var(--ring); }
.check-btn.done { background: var(--emerald-fg); border-color: var(--emerald-fg); color: var(--card); }
.check-text { flex: 1; min-width: 0; }
.check-title { font-size: 13.5px; font-weight: 500; }
.check-sub { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }
.checklist form { margin: 0; }

/* mails to customers */
.mail-draft > summary { cursor: pointer; list-style: none; gap: 10px; padding: 2px 0; }
.mail-draft > summary::-webkit-details-marker { display: none; }
.mail-draft[open] > summary { margin-bottom: 10px; }
.mail-fields { display: grid; grid-template-columns: 60px 1fr; gap: 6px 10px; align-items: center; }
.mail-text { min-height: 280px; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5; }
.sent-mail { border-bottom: 1px solid var(--border); }
.sent-mail > summary { display: flex; align-items: center; gap: 9px; padding: 10px 16px; cursor: pointer; list-style: none; font-size: 13px; }
.sent-mail > summary::-webkit-details-marker { display: none; }
.sent-mail .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--emerald-fg); flex-shrink: 0; }
.mail-body { margin: 0 16px 12px; padding: 10px 12px; background: var(--muted); border-radius: 6px; white-space: pre-wrap;
  font: 12.5px/1.5 var(--font-mono); max-height: 360px; overflow: auto; }

/* multi-select, row menus */
.cell-check { width: 34px; padding-right: 0 !important; }
.row-check { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; cursor: pointer; }
.row-check input { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }
/* A column of empty boxes on every row is noise (Ben 2026-09-24): faint until
   the row is hovered, a box is focused, or anything in the table is selected. */
tbody .row-check input { opacity: .35; transition: opacity .12s; }
tbody tr:hover .row-check input, .row-check input:checked, .row-check input:focus-visible,
table:has(tbody .row-check input:checked) tbody .row-check input { opacity: 1; }
tr.selected td { background: var(--accent-hover); }
.cell-menu { width: 40px; text-align: right; }
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; width: 28px; height: 28px; font-size: 16px; line-height: 1; letter-spacing: 1px; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu .popover.menu { position: absolute; left: auto; right: 0; top: calc(100% + 4px); z-index: 40; min-width: 210px; padding: 4px;
  display: none; flex-direction: column; text-align: left; }
.row-menu[open] .popover.menu { display: flex; }
.row-menu .popover.menu form { margin: 0; }
.row-menu .menu-btn { display: block; width: 100%; text-align: left; white-space: nowrap; text-decoration: none; color: inherit; }
.bulk-bar { position: fixed; left: 50%; bottom: 18px; transform: translate(-50%, 140%); z-index: 60; display: flex; flex-wrap: wrap; width: max-content;
  align-items: center; gap: 8px; padding: 10px 12px; max-width: calc(100vw - 32px); background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.18); transition: transform .18s ease; }
.bulk-bar.show { transform: translate(-50%, 0); }
.bulk-bar:not(.show) { visibility: hidden; }
.bulk-count { font-size: 13px; font-weight: 600; padding: 0 4px; white-space: nowrap; }
.bulk-bar .input { height: 32px; width: auto; }
.bulk-note { min-width: 220px; }

/* top-bar search palette (admin.js): recent pages and "Go to" before typing, suggestions while typing */
.topbar-search { position: relative; }
.topbar-search .search-kbd { flex-shrink: 0; pointer-events: none; }
.topbar-search:focus-within .search-kbd { display: none; }
.topbar-search:focus-within { border-color: var(--ring, var(--foreground)); }
.search-pop { position: absolute; right: -1px; top: calc(100% + 6px); z-index: 70; width: max(calc(100% + 2px), 460px);
  max-width: calc(100vw - 24px); max-height: min(72vh, 620px); overflow: auto; background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.08);
  padding: 6px; }
.search-pop.loading { opacity: .8; }
/* the same suggestions under a list's filter field, left-aligned */
.suggest-field { position: relative; }
.search-pop-field { left: -1px; right: auto; width: max(calc(100% + 2px), 420px); }
.search-group-name { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted-foreground); padding: 10px 10px 4px; }
.search-group-name:first-child { padding-top: 6px; }
.search-hit { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 8px;
  border-radius: 8px; text-decoration: none; color: inherit; scroll-margin: 6px; }
.search-hit:hover, .search-hit.active { background: var(--accent-hover); }
.search-hit-icon { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--muted); border: 1px solid var(--border); color: var(--muted-foreground); }
.search-hit.active .search-hit-icon { color: var(--foreground); }
.search-hit-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.search-hit-title { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit-sub { font-size: 12px; color: var(--muted-foreground); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit mark { background: color-mix(in srgb, var(--amber-fg) 22%, transparent); color: inherit; font-weight: 600; border-radius: 3px; padding: 0 1px; }
.search-hit .badge { font-size: 11px; }
.search-all { margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; padding-top: 8px; }
.search-all .search-hit-title { color: var(--muted-foreground); font-weight: 500; }
.search-all.active .search-hit-title { color: var(--foreground); }
.search-none { padding: 14px 10px 6px; font-size: 12.5px; color: var(--muted-foreground); }
.search-foot { display: flex; gap: 14px; flex-wrap: wrap; padding: 8px 10px 6px; margin: 6px -6px -6px; border-top: 1px solid var(--border);
  font-size: 11.5px; color: var(--muted-foreground); position: sticky; bottom: -6px; background: var(--card); padding-left: 16px; }
.search-all + .search-foot { margin-top: 0; }
.search-group { margin-bottom: 14px; }
.field.wide { flex: 1; max-width: 520px; }
aside .info::after { left: auto; right: -4px; transform: none; }
/* menus in the last rows open upwards, so the table's scroll box does not cut them off */
tbody tr:nth-last-child(-n+3):not(:nth-child(-n+3)) .row-menu .popover.menu { top: auto; bottom: calc(100% + 4px); }
.id-cell .kind { white-space: nowrap; }
th.num, td.num { text-align: right; font-variant-numeric: tabular-nums; }
.dot-inline { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: var(--muted-foreground); opacity: .5; }
.dot-inline.ok { background: var(--emerald-fg); opacity: 1; }
form.inline-form { margin-top: 4px; }
.server-card h2 { display: flex; align-items: center; gap: 8px; }
.server-meta { font-size: 12.5px; color: var(--muted-foreground); margin-bottom: 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.metric-label { font-size: 11.5px; color: var(--muted-foreground); margin-bottom: 2px; }
.metric-value { font-size: 16px; font-weight: 500; margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.disk-row { margin-bottom: 6px; }
svg.spark { display: block; margin-top: 4px; }
svg.spark polyline { fill: none; stroke: var(--sky-fg); stroke-width: 1.5; }
svg.bar { display: block; margin-top: 3px; max-width: 100%; }
svg.bar .bar-bg { fill: var(--muted); }
svg.bar .bar-fg { fill: var(--emerald-fg); }
svg.bar.bar-warn .bar-fg { fill: var(--red-fg); }
.services { margin-top: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.service-list { margin-top: 6px; }
.chip.chip-bad { color: var(--red-fg); border-color: var(--red-bd); }
.chip.chip-off { opacity: .55; text-decoration: line-through; }
a.chip-link { color: inherit; text-decoration: none; cursor: pointer; }
a.chip-link:hover { border-color: var(--ring); background: var(--accent-hover); }
.section-title { font-size: 13px; font-weight: 600; margin: 20px 0 8px; }
.home .section-title { margin: 2px 0 -6px; }

/* ---------------- Polish (2026-09-24) ----------------
   The values this pass set now live in the rules above (page head, figures,
   tables, cards, detail grid). Here only what exists nowhere else: long
   values cut, chart widths, the narrower label column next to a card. */
.trunc { display: inline-block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.badges { display: flex; flex-wrap: wrap; gap: 4px; max-width: 230px; }
td.small div + div { margin-top: 3px; }

/* detail pages: a narrower label column, so e-mail addresses stay on one line */
aside .dl { grid-template-columns: 104px 1fr; }
.dl dd { overflow-wrap: break-word; }

/* server cards: charts and bars fill their column */
svg.spark, svg.bar { width: 100%; }
svg.spark { height: 36px; }
svg.spark polyline { vector-effect: non-scaling-stroke; stroke-width: 1.6; }
svg.bar.bar-amber .bar-fg { fill: var(--amber-fg); }

/* sidebar */
.nav-item.active { box-shadow: inset 2px 0 0 var(--foreground); }

/* domain upgrade: pick the package (order page) */
label.pick-row { cursor: pointer; align-items: flex-start; }
label.pick-row:hover { background: var(--accent-hover); }
label.pick-row input[type="radio"] { margin-top: 3px; accent-color: var(--foreground); }

/* inbox */
tr.unread .mail-subject { font-weight: 650; }
.mail-read { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.55; max-height: 640px; overflow: auto; }
.mail-card.from-us { border-left: 3px solid var(--sky-fg); }
.mail-card .card-head { align-items: flex-start; }
.mail-files { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.mail-images { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mail-images:empty { display: none; }
.mail-images img { max-width: min(100%, 420px); max-height: 320px; border: 1px solid var(--border); border-radius: 6px; display: block; }
.tabs-row { margin-bottom: 12px; }

/* cancellation: domains at the registrar */
.domain-row { flex-wrap: wrap; }
.domain-actions { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.domain-actions form.inline-form { margin-top: 0; display: flex; align-items: center; gap: 6px; }
.input-date { height: 28px; width: auto; font-size: 12.5px; padding: 0 8px; }
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid transparent; }
.notice.ok { background: var(--emerald-bg); border-bottom-color: var(--emerald-bd); }
.notice.bad { background: var(--red-bg); border-bottom-color: var(--red-bd); color: var(--red-fg); }
.notice .name { font-size: 13px; font-weight: 500; }
.notice .desc { font-size: 12px; color: var(--muted-foreground); margin-top: 2px; }
.select-all { user-select: all; font-size: 14px; padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--background, transparent); }

/* Cancellation process: one row per step, state in the icon */
.process { list-style: none; margin: 0; padding: 4px 0; }
.p-step { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.p-step:last-child { border-bottom: 0; }
.p-icon { width: 24px; height: 24px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; border: 1px solid var(--border); color: var(--zinc-fg); background: var(--zinc-bg); }
.p-num { font-size: 11.5px; font-weight: 600; }
.p-done .p-icon { background: var(--emerald-bg); color: var(--emerald-fg); border-color: var(--emerald-bd); }
.p-planned .p-icon { background: var(--sky-bg); color: var(--sky-fg); border-color: var(--sky-bd); }
.p-todo .p-icon { background: var(--amber-bg); color: var(--amber-fg); border-color: var(--amber-bd); }
.p-wait .p-icon { background: var(--red-bg); color: var(--red-fg); border-color: var(--red-bd); }
.p-none { opacity: .72; }
.p-body { flex: 1; min-width: 0; }
.p-title { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.p-text { font-size: 13px; margin-top: 2px; }
.p-why { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--amber-fg); }
.p-wait .p-why { color: var(--red-fg); }
.p-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.p-actions form.inline-form, .p-actions .form-inline { margin-top: 0; }
.p-actions .form-inline .input { min-width: 0; flex: 0 1 auto; }
.p-inline > summary { list-style: none; display: inline-flex; }
.p-inline > summary::-webkit-details-marker { display: none; }
.p-inline[open] { flex-basis: 100%; }
.p-inline[open] > summary { margin-bottom: 6px; }
.p-inline .form-inline .input { flex: 1; min-width: 180px; }
.p-carry { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.link-btn { background: none; border: 0; padding: 0; color: var(--sky-fg); cursor: pointer; font: inherit; text-decoration: underline; }
.plan-dots { display: inline-flex; gap: 3px; align-items: center; }
.plan-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--zinc-bd); }
.plan-dot.done { background: var(--emerald-fg); }
.plan-dot.planned { background: var(--sky-fg); }
.plan-dot.todo { background: var(--amber-fg); }
.plan-dot.wait { background: var(--red-fg); }
.plan-dot.none { background: transparent; border: 1px solid var(--zinc-bd); }
@media (max-width: 640px) {
  .p-step { padding: 12px; gap: 10px; }
  .p-actions .form-inline { width: 100%; }
}
.hint form.inline-form { display: inline; margin: 0; }

/* The wider aside of the detail pages (above) is for wide screens only: it
   came after the one-column rule and kept a 340px column on phones, which
   squeezed every order, customer and cancellation page to a sliver. */
@media (max-width: 1040px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}
.plan-person { color: var(--amber-fg); max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Native controls follow the theme: without this, checkboxes, radios and the
   date picker stayed light in the dark theme - white boxes next to grey
   inputs, a checked radio hard to tell from an unchecked one (Ben, 2026-09-24). */
:root { color-scheme: light; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: dark; } }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="light"] { color-scheme: light; }
label.pick-row:has(input:checked) { background: var(--muted); box-shadow: inset 3px 0 0 var(--foreground); }
.pick-done .name { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.pick-done .desc { font-size: 12px; color: var(--muted-foreground); margin-top: 3px; }
details.pick-change > summary { list-style: none; cursor: pointer; padding-top: 0; }
details.pick-change > summary::-webkit-details-marker { display: none; }
details.pick-change[open] > summary { display: none; }
.text-amber { color: var(--amber-fg); }

/* user menu: administration, theme */
.user-menu .popover a.menu-btn { text-decoration: none; }
.menu-theme { display: flex; gap: 4px; padding: 6px 8px; margin: 4px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.menu-chip { flex: 1; font: inherit; font-size: 12px; padding: 4px 6px; border-radius: 5px; border: 1px solid var(--border); background: transparent; color: var(--muted-foreground); cursor: pointer; }
.menu-chip:hover { color: var(--foreground); }
.menu-chip.active { background: var(--muted); color: var(--foreground); border-color: var(--input-border); }
/* administration: the one-time link or token */
.admin-once { margin-bottom: 16px; }
.admin-once .once-value { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); overflow-wrap: anywhere; }
.admin-actions { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* Forms with several fields (domain account, DNS editor): one grid, labels above their fields. */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; align-items: end; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted-foreground); }
.form-grid .btn { justify-self: start; }

/* Upgrade / downgrade (customer → Upgrade): one card per contract, the
   targets as big tap areas. Built for the phone first (Ben, 2026-09-26: "damit
   ich auch per Handy helfen kann") - one column, 44px targets, the send and
   copy buttons in a bar that stays at the bottom of the screen. */
.up-card { scroll-margin-top: 70px; }
.up-card.up-named { border-color: var(--sky-bd); box-shadow: inset 3px 0 0 var(--sky-fg); }
.up-facts { display: flex; flex-direction: column; gap: 6px; }
.up-facts > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; font-size: 13px; }
.up-k { color: var(--muted-foreground); }
.up-v { min-width: 0; overflow-wrap: anywhere; }
.up-note { font-size: 12.5px; line-height: 18px; padding: 8px 10px; border-radius: 6px; background: var(--muted); display: block !important; }
.up-note.amber { background: var(--amber-bg); color: var(--amber-fg); border: 1px solid var(--amber-bd); }
.up-pair summary { cursor: pointer; }
.up-pick { display: flex; gap: 8px; margin-top: 8px; }
.up-pick .select { flex: 1; min-width: 0; }
.up-targets { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 0 16px 14px; }
.up-target { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; min-height: 56px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: inherit; background: var(--card); }
.up-target:hover, .up-target:focus-visible { border-color: var(--ring); background: var(--muted); }
.up-target.upgrade { box-shadow: inset 3px 0 0 var(--emerald-fg); }
.up-target.downgrade { box-shadow: inset 3px 0 0 var(--amber-fg); }
.up-plan { font-weight: 600; font-size: 14px; }
.up-type { font-size: 12px; color: var(--muted-foreground); }
.up-link { overflow-wrap: anywhere; user-select: all; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--muted); }
.up-actionbar { display: flex; gap: 8px; margin-top: 12px; }
.up-actionbar .up-mobile { display: none; }
@media (max-width: 640px) {
  .up-facts > div { grid-template-columns: 92px minmax(0, 1fr); }
  .up-targets { grid-template-columns: 1fr; padding: 0 12px 12px; }
  .up-target { min-height: 60px; }
  .up-pick .btn, .up-pick .select { min-height: 44px; }
  .up-desktop { display: none; }
  .up-actionbar { position: sticky; bottom: 0; margin: 12px -16px -40px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--background); border-top: 1px solid var(--border); z-index: 20; }
  .up-actionbar .btn { flex: 1; justify-content: center; min-height: 44px; }
  .up-actionbar .up-mobile { display: inline-flex; }
}

/* Debug pass 2026-09-26 (browser crawl at 390 px): a wide table must not push
   the whole page sideways; the tab bars and buttons must not either. */
.btn { white-space: nowrap; }
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; flex: none; }
/* the customer note (sticky, on the customer page and the ticket card) */
.note-text { white-space: pre-line; }
.note-edit { margin: 0 0 16px; }
.note-edit summary { cursor: pointer; }
/* the domain check's Plesk command-line output */
.cli-output { white-space: pre-wrap; max-height: 20rem; overflow: auto; margin: 6px 0 0; }
/* the domain check's status list */
.finding-level { width: 2.5rem; }
.finding-area { width: 6rem; }

/* UI pass 2026-09-27 (screenshots at 1440 and 390 px) --------------------------- */
a.badge { text-decoration: none; }
/* the ticket list: the subject is what a person scans */
.ticket-subject { font-weight: 600; color: var(--foreground); text-decoration: none; }
.ticket-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; font-size: 12px; }
/* columns a phone can do without */
@media (max-width: 700px) { .hide-sm { display: none; } }
/* two form fields side by side (the ticket's properties) */
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; }
.field-pair > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
/* row actions as small buttons, never wrapped into the text */
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.show-sm { display: none; }
@media (max-width: 700px) { .show-sm { display: block; } }
@media (max-width: 700px) { table { min-width: 0; } }
/* Domains: a domain's subdomains under it, indented and quieter. */
.domain-table tr.sub-row td { padding-top: 5px; padding-bottom: 5px; border-top-color: transparent; }
.domain-table tr.sub-row .cell-domain { font-size: 12.5px; color: var(--muted-foreground); }
.sub-mark { color: var(--muted-foreground); margin: 0 6px 0 10px; }
tr.row-inactive .cell-domain { color: var(--muted-foreground); }
/* The selects in a toolbar keep their natural width, like the buttons. */
.toolbar .select { flex: 0 0 auto; width: auto; height: 32px; }

/* Prices (roadmap W13) */
.text-red { color: var(--red-fg); }
.break-all { word-break: break-all; }
.price-change { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }

/* ---------------- Home (roadmap W17) ---------------- */
.home { display: flex; flex-direction: column; gap: 18px; }
.home-head h1 { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.01em; }
.home-status { display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 13px; color: var(--foreground); text-decoration: none; }
.home-status .dot { width: 8px; height: 8px; border-radius: 999px; flex-shrink: 0; }
.home-status.bad { color: var(--red-fg); }
.home-status:hover span:first-of-type { text-decoration: underline; text-underline-offset: 3px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.home .card-head .link { margin-left: auto; }
.home .q-text { min-width: 0; flex: 1; }
.home .q-text .trunc, .agenda-item .trunc { display: block; max-width: none; }
.home .q-count { margin-left: auto; font-variant-numeric: tabular-nums; min-width: 26px; justify-content: center; }
.home .status-row .meta { margin-left: 0; min-width: 64px; }
.agenda-day { padding: 8px 14px 10px; border-bottom: 1px solid var(--border); }
.agenda-day:last-child { border-bottom: none; }
.agenda-date { font-size: 12px; font-weight: 600; color: var(--muted-foreground); margin-bottom: 4px; }
.agenda-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; color: var(--foreground); text-decoration: none; }
.agenda-item:hover .trunc:first-of-type { text-decoration: underline; text-underline-offset: 3px; }
.agenda-item .small { max-width: 160px; }
.agenda-kind { width: 8px; height: 8px; border-radius: 2px; background: var(--zinc-fg); }
.agenda-kind.suspend { background: var(--amber-fg); }
.agenda-kind.delete { background: var(--red-fg); }
.agenda-kind.ends { background: var(--sky-fg); }
.figure-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.figure { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 12px; color: var(--foreground); text-decoration: none; }
.figure:hover { border-color: var(--ring); }
.figure-label { font-size: 12.5px; color: var(--muted-foreground); }
.figure-value { font-size: 26px; line-height: 34px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figure-unit { font-size: 12.5px; font-weight: 400; letter-spacing: 0; color: var(--muted-foreground); }
.figure-compare { font-size: 12px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
svg.week-bars { display: block; width: 100%; height: 28px; margin-top: 10px; }
svg.week-bars rect { fill: var(--muted-foreground); opacity: .28; }
svg.week-bars rect.now { fill: var(--foreground); opacity: .85; }
.figure:hover svg.week-bars rect { opacity: .4; }
.figure:hover svg.week-bars rect.now { opacity: 1; }
@media (min-width: 1600px) { .figure-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .figure-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .figure { padding: 12px 12px 10px; }
  .figure-value { font-size: 22px; line-height: 28px; }
  .home .status-row .meta { display: none; }
}

/* "Carry out" on the cancellations list (W17) */
.row-carry { margin-top: 6px; }
.row-carry .btn { gap: 5px; }
