/* ── tw-patch.css ─────────────────────────────────────────────────
   Utilities used by templates/JS but ABSENT from the prebuilt vendor
   Tailwind file (vendor/styles.css was purged against a different
   codebase, so classes only we use are missing — e.g. grid-cols-4
   stacked the Errors panel stats vertically, Jul 11 2026).

   Rule of thumb: before using a new Tailwind class, grep
   vendor/styles.css; if absent, add it HERE with the standard
   definition. Loaded after vendor/styles.css, before css/main.css.

   Audit source: scripted diff of every class= in templates/*.html +
   static/js/main.js against the three shipped stylesheets.
   ────────────────────────────────────────────────────────────────── */

/* ── Semantic surfaces / colors ── */
.card { background-color: var(--card); border-radius: var(--radius); }
.bg-card { background-color: var(--card); }
.bg-accent { background-color: var(--accent); }
.bg-accent\/20 { background-color: color-mix(in oklab, var(--accent) 20%, transparent); }
.bg-accent\/30 { background-color: color-mix(in oklab, var(--accent) 30%, transparent); }
.bg-accent\/40 { background-color: color-mix(in oklab, var(--accent) 40%, transparent); }
.bg-border\/40 { background-color: color-mix(in oklab, var(--border) 40%, transparent); }
.bg-primary\/15 { background-color: color-mix(in oklab, var(--primary) 15%, transparent); }
.bg-success { background-color: #22c55e; }
.border-border\/40 { border-color: color-mix(in oklab, var(--border) 40%, transparent); }
.text-foreground\/80 { color: color-mix(in oklab, var(--foreground) 80%, transparent); }
.text-destructive\/80 { color: color-mix(in oklab, var(--destructive) 80%, transparent); }
.text-muted-foreground\/70 { color: color-mix(in oklab, var(--muted-foreground) 70%, transparent); }
.text-amber-400 { color: #fbbf24; }
.text-\[\#60a5fa\] { color: #60a5fa; }

/* Status text tokens — GLOBAL (promoted from #err-stats-card per STYLE_GUIDE
   "Status text"; the follow-up the guide lists for a batch with a live walk).
   Colors come from the vendor vars, never a new hex. */
.text-warning { color: var(--color-orange-400); }
.text-success { color: var(--color-green-500); }
/* Tinted badge surfaces built from the same two tokens. */
.bg-warning\/10 { background-color: color-mix(in oklab, var(--color-orange-400) 10%, transparent); }
.bg-warning\/15 { background-color: color-mix(in oklab, var(--color-orange-400) 15%, transparent); }
.border-warning\/20 { border-color: color-mix(in oklab, var(--color-orange-400) 20%, transparent); }
.border-warning\/30 { border-color: color-mix(in oklab, var(--color-orange-400) 30%, transparent); }
.bg-success\/10 { background-color: color-mix(in oklab, var(--color-green-500) 10%, transparent); }
.bg-success\/15 { background-color: color-mix(in oklab, var(--color-green-500) 15%, transparent); }
.border-success\/20 { border-color: color-mix(in oklab, var(--color-green-500) 20%, transparent); }
/* `danger` aliases to the existing destructive token (overview.js overage chip
   used text-danger/bg-danger which the vendor build never shipped). */
.text-danger { color: var(--destructive); }
.bg-danger\/15 { background-color: color-mix(in oklab, var(--destructive) 15%, transparent); }

/* VPS status card — the vendor .kt-badge-warning is white on yellow-400 (~1.6:1).
   Same tinted treatment the site gives its success/danger badges, built from the
   STYLE_GUIDE warning token. */
#vps-status-card .kt-badge-warning {
  background-color: color-mix(in oklab, var(--color-orange-400) 18%, transparent) !important;
  color: var(--color-orange-400) !important;
  border: 1px solid color-mix(in oklab, var(--color-orange-400) 30%, transparent) !important;
}

/* ── Typography ── */
.font-bold { font-weight: 700; }
.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.text-\[9px\] { font-size: 9px; }

/* ── Layout: responsive grids ── */
@media (width >= 48rem) {
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (width >= 64rem) {
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ── Spacing ── */
.ml-1 { margin-left: 0.25rem; }
.ml-1\.5 { margin-left: 0.375rem; }
.ml-auto { margin-left: auto; }
.mr-1\.5 { margin-right: 0.375rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.py-12 { padding-block: 3rem; }
.space-y-0\.5 > :not(:last-child) { margin-bottom: 0.125rem; }
.space-y-1 > :not(:last-child) { margin-bottom: 0.25rem; }
.space-y-1\.5 > :not(:last-child) { margin-bottom: 0.375rem; }

/* ── Sizing / misc ── */
.w-0 { width: 0; }
.w-px { width: 1px; }
.wrap-anywhere { overflow-wrap: anywhere; }
.max-h-\[220px\] { max-height: 220px; }
.rounded { border-radius: 0.25rem; }
.shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }
.opacity-70 { opacity: 0.7; }
.overflow-y-auto { overflow-y: auto; }
.resize-y { resize: vertical; }
.select-none { user-select: none; }

/* ── State variants ── */
.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:text-foreground:hover { color: var(--foreground); }
.hover\:text-white:hover { color: #fff; }
.hover\:bg-accent\/40:hover { background-color: color-mix(in oklab, var(--accent) 40%, transparent); }
.hover\:bg-background\/10:hover { background-color: color-mix(in oklab, var(--background) 10%, transparent); }
.hover\:\!bg-destructive\/10:hover { background-color: color-mix(in oklab, var(--destructive) 10%, transparent) !important; }
.last\:border-0:last-child { border-width: 0; }

/* ── Alpha-modifier fixes for classes the vendor build DOES ship but
      compiled WITHOUT the alpha (e.g. .bg-muted\/30 = solid muted).
      Redefined here (this file loads later, same specificity → wins). ── */
.bg-muted\/30 { background-color: color-mix(in oklab, var(--muted) 30%, transparent); }
.text-muted-foreground\/50 { color: color-mix(in oklab, var(--muted-foreground) 50%, transparent); }
.text-muted-foreground\/60 { color: color-mix(in oklab, var(--muted-foreground) 60%, transparent); }
