/* IMS Pracoda platform console — design tokens taken from the approved
   Super_admin design set. Nothing here is Tailwind; the project has no
   Node build step on purpose. */

:root {
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-muted: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;

  --text: #09090b;
  --text-muted: #5b5b66;
  --text-soft: #71717a;
  --nav-text: #3f3f46;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-fg: #ffffff;
  --primary-tint: #eff4ff;

  --success: #15803d;
  --success-bg: #eaf6ee;
  --warning: #a16207;
  --warning-bg: #fef6e7;
  --danger: #b91c1c;
  --danger-bg: #fdecec;
  --info: #1e40af;
  --info-bg: #eaf0fd;

  --radius: 8px;
  --radius-lg: 12px;
  --sidebar-w: 232px;

  --shadow-sm: 0 1px 2px rgba(9, 9, 11, 0.06);
  --shadow-md: 0 4px 16px rgba(9, 9, 11, 0.09);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans Devanagari", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

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

h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
p { margin: 0 0 12px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- shell */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 18px;
}
.brand-mark {
  width: 30px; height: 30px;
  border-radius: var(--radius);
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; display: block; }
.brand-sub { font-size: 11px; color: var(--text-muted); display: block; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  min-height: 40px; padding: 0 12px;
  border-radius: var(--radius);
  color: var(--nav-text);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
}
.nav a:hover { background: var(--surface-muted); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--primary-tint); color: var(--primary-hover); font-weight: 600; }
.nav svg { flex-shrink: 0; }

.nav-group-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-soft);
  padding: 14px 12px 6px;
}

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }

.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 999px;
  background: var(--primary-tint); color: var(--primary-hover);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px; flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 600; display: block; }
.user-role { font-size: 11px; color: var(--text-muted); display: block; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.page-head {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 28px;
}
.crumb { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.crumb a { color: var(--text-muted); }
.page-head-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head-row > div:first-child { flex: 1; min-width: 220px; }
.page-blurb { color: var(--text-muted); margin: 4px 0 0; font-size: 13px; }

.content { padding: 24px 28px 56px; flex: 1; }
.content-narrow { max-width: 880px; }

/* ----------------------------------------------------------------- tabs */

.tabs {
  display: flex; gap: 20px; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  background: var(--surface);
}
.tabs a {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 2px;
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent;
  text-decoration: none;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--primary); font-weight: 600; }

/* ---------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.card-head > div:first-child { flex: 1; min-width: 180px; }
.card-head h2 { font-size: 15px; }
.card-sub { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }
.card-body { padding: 18px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.stat { padding: 18px; }
.stat-label { font-size: 12px; color: var(--text-muted); }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.stat-note { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* --------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-weight: 600; font-size: 12px;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
  white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafafa; }
.cell-strong { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-muted); }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; }

/* -------------------------------------------------------------- badges */

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 999px;
  background: currentColor; flex-shrink: 0;
}
.badge-plain::before { display: none; }
.badge-active  { background: var(--success-bg); color: var(--success); }
.badge-pending { background: var(--warning-bg); color: var(--warning); }
.badge-draft   { background: var(--surface-muted); color: var(--text-muted); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-info    { background: var(--info-bg); color: var(--info); }

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); color: #fff; }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-muted); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-muted); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: #f3c6c6; }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 13px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------- forms */

.field { margin-bottom: 16px; }
.field label, .label {
  display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px;
}
.hint { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.input, select.input, textarea.input {
  width: 100%; min-height: 40px; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--text);
}
textarea.input { min-height: 90px; resize: vertical; }
.input:disabled { background: var(--surface-muted); color: var(--text-muted); }
.input-error { border-color: #dc2626; }
.error-text { color: var(--danger); font-size: 12px; margin-top: 6px; }

.switch {
  appearance: none; -webkit-appearance: none;
  width: 40px; height: 22px; border-radius: 999px;
  background: var(--border-strong); position: relative;
  cursor: pointer; flex-shrink: 0; margin: 0;
  transition: background 0.15s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.switch:checked { background: var(--primary); }
.switch:checked::after { left: 21px; }

.switch-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.switch-row:last-child { border-bottom: 0; }
.switch-row > div { flex: 1; min-width: 0; }

.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end;
  margin-bottom: 16px;
}
.filter-bar .field { margin: 0; }
.filter-bar .input { min-width: 180px; width: auto; }

/* --------------------------------------------------------- notices */

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-success { background: var(--success-bg); color: #14532d; border-color: #bfe3cd; }
.alert-error { background: var(--danger-bg); color: #7f1d1d; border-color: #f3c6c6; }
.alert-info { background: var(--info-bg); color: #1e3a8a; border-color: #c7d6f7; }
.alert-warn { background: var(--warning-bg); color: #713f12; border-color: #f0dcb4; }

.empty { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.empty h3 { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto 16px; font-size: 13px; }

/* ------------------------------------------------------------ dns rows */

.dns-row {
  display: grid;
  grid-template-columns: 70px 150px 1fr auto;
  gap: 12px; align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--surface);
}
.dns-row .mono { word-break: break-all; }
@media (max-width: 720px) {
  .dns-row { grid-template-columns: 1fr; gap: 6px; }
}

.steps { display: flex; gap: 0; flex-wrap: wrap; margin: 4px 0 18px; }
.step {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 0; font-size: 13px; color: var(--text-muted);
}
.step-dot {
  width: 22px; height: 22px; border-radius: 999px;
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.step-done .step-dot { background: var(--success); border-color: var(--success); color: #fff; }
.step-done { color: var(--success); font-weight: 600; }
.step-current .step-dot { border-color: var(--primary); color: var(--primary); }
.step-current { color: var(--primary); font-weight: 600; }

/* ------------------------------------------------------------- numbered */

.numbered-step { display: flex; gap: 14px; margin-bottom: 24px; }
.numbered-step > .n {
  width: 26px; height: 26px; border-radius: 999px;
  background: var(--text); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.numbered-step > div:last-child { flex: 1; min-width: 0; }

/* ------------------------------------------------------------ swatches */

.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 12px; background: var(--surface);
}
.swatch-chip { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); }

.template-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.template-card {
  border: 2px solid var(--border); border-radius: var(--radius);
  padding: 12px; cursor: pointer; background: var(--surface);
  display: block;
}
.template-card:hover { border-color: var(--border-strong); }
.template-card input { position: absolute; opacity: 0; pointer-events: none; }
.template-card.selected { border-color: var(--primary); background: var(--primary-tint); }
.template-name { font-weight: 600; font-size: 13px; }
.template-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.photo-tile { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.photo-tile img { width: 100%; height: 120px; object-fit: cover; display: block; background: var(--surface-muted); }
.photo-meta { padding: 10px; }

/* --------------------------------------------------------------- login */

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--bg);
}
.login-card { width: 100%; max-width: 400px; }
.login-card .card-body { padding: 26px; }

/* -------------------------------------------------------------- misc */

.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.stack > * + * { margin-top: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center; gap: 8px;
    overflow-x: auto; padding: 10px 12px;
  }
  .brand { padding: 0 10px 0 0; }
  .brand-sub, .nav-group-label { display: none; }
  .nav { flex-direction: row; }
  .sidebar-foot { margin: 0 0 0 auto; padding: 0; border: 0; }
  .user-name, .user-role { display: none; }
  .page-head, .content, .tabs { padding-left: 16px; padding-right: 16px; }
}

/* ----------------------------------------------------- layout previews

   Miniature wireframes of the five site layouts, drawn in the tenant's own
   theme colours. They are built from divs rather than screenshots so they
   restyle instantly when the theme changes and never go stale against the
   real templates.                                                         */

.lp {
  --lp-p: #14284b;   /* primary  */
  --lp-a: #c9a24a;   /* accent   */
  --lp-s: #ffffff;   /* surface  */
  --lp-bg: #fbf8f1;  /* page bg  */
  --lp-t: #1f2430;   /* ink      */
  aspect-ratio: 16 / 11;
  width: 100%;
  background: var(--lp-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  font-size: 0;
  user-select: none;
}

.lp-bar { height: 9%; background: var(--lp-p); flex-shrink: 0; display: flex;
  align-items: center; gap: 2px; padding: 0 5%; }
.lp-bar i { display: block; height: 2px; width: 7px; background: var(--lp-s);
  opacity: .55; border-radius: 1px; }
.lp-bar .lp-dot { width: 5px; height: 5px; border-radius: 50%;
  background: var(--lp-a); opacity: 1; margin-right: auto; }

.lp-body { flex: 1; padding: 7% 7% 0; display: flex; flex-direction: column; gap: 4px;
  min-height: 0; }

.lp-line { height: 3px; border-radius: 2px; background: var(--lp-t); opacity: .8; }
.lp-line.sm { height: 2px; opacity: .3; }
.lp-line.accent { background: var(--lp-a); opacity: 1; }

.lp-row { display: flex; gap: 4px; }
.lp-card { flex: 1; background: var(--lp-s); border: 1px solid rgba(0,0,0,.09);
  border-radius: 3px; height: 22px; }
.lp-card.tall { height: 30px; }

.lp-center { align-items: center; text-align: center; }
.lp-center .lp-line { margin: 0 auto; }

.lp-crest { width: 14px; height: 14px; border-radius: 50%; background: var(--lp-p);
  margin: 0 auto; flex-shrink: 0; }

.lp-split { display: flex; gap: 6px; flex: 1; min-height: 0; }
.lp-split > div:first-child { flex: 1.15; display: flex; flex-direction: column;
  gap: 4px; justify-content: center; }
.lp-split > div:last-child { flex: 1; background: var(--lp-p); border-radius: 3px;
  opacity: .9; }

.lp-notice { background: var(--lp-a); height: 11%; flex-shrink: 0; display: flex;
  align-items: center; padding: 0 7%; }
.lp-notice i { display: block; height: 2px; width: 46%; background: var(--lp-p);
  opacity: .75; border-radius: 1px; }

.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

.lp-num { display: flex; align-items: center; gap: 5px; }
.lp-num b { font-size: 6px; line-height: 1; color: var(--lp-a); font-weight: 800;
  font-family: ui-monospace, monospace; }
.lp-num i { display: block; height: 2px; flex: 1; background: var(--lp-t);
  opacity: .35; border-radius: 1px; }

.lp-search { display: flex; gap: 3px; margin: 0 auto; width: 82%; }
.lp-search span { flex: 1; height: 13px; background: var(--lp-s);
  border: 1px solid rgba(0,0,0,.14); border-radius: 3px; }
.lp-search b { width: 24px; height: 13px; background: var(--lp-a); border-radius: 3px; }

.lp-foot { height: 13%; background: var(--lp-p); opacity: .9; flex-shrink: 0;
  margin-top: auto; }

/* The selectable card that wraps a preview. */
.template-card .lp { margin-bottom: 10px; }
.template-card { position: relative; }
.template-card.selected::after {
  content: "✓"; position: absolute; top: 8px; right: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 11px; line-height: 18px; text-align: center; font-weight: 700;
}

/* ----------------------------------------------------- onboarding wizard */

.wizard { max-width: 1000px; }

.wizard-steps {
  list-style: none; margin: 0 0 20px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 6px;
}
.ws { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: 999px; font-size: 13px; color: var(--text-muted); }
.ws-dot {
  width: 22px; height: 22px; border-radius: 999px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  border: 2px solid var(--border-strong); background: var(--surface);
}
.ws-done { color: var(--success); }
.ws-done .ws-dot { background: var(--success); border-color: var(--success); color: #fff; }
.ws-current { background: var(--primary-tint); color: var(--primary-hover); font-weight: 600; }
.ws-current .ws-dot { border-color: var(--primary); color: var(--primary); }

@media (max-width: 760px) {
  .ws-label { display: none; }
  .ws { padding: 6px; }
}

/* ------------------------------------------------------- tenant banner

   The header of a website's overview. It carries the institute's own
   colours so the page reads as "this tenant" at a glance, rather than
   looking identical for every institute in the console.                 */

.tenant-banner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.tenant-banner::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--tb-primary, #14284b) 0%,
                              var(--tb-primary, #14284b) 62%,
                              var(--tb-accent, #c9a24a) 62%);
}
.tb-inner {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 24px 22px 20px; flex-wrap: wrap;
}
.tb-crest {
  width: 54px; height: 54px; border-radius: 12px; flex-shrink: 0;
  background: var(--tb-primary, #14284b); color: var(--tb-primary-fg, #fff);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; letter-spacing: -.02em;
}
.tb-crest img { width: 100%; height: 100%; object-fit: contain; border-radius: 12px; }
.tb-main { flex: 1; min-width: 240px; }
.tb-name { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.tb-sub { color: var(--text-muted); font-size: 13.5px; margin: 3px 0 0; }
.tb-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tb-side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }

.tb-addr {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; background: var(--surface-muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 5px 12px;
}
.tb-addr a { font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Definition list used by the profile card. */
.dl {
  margin: 0; display: grid; grid-template-columns: 132px 1fr;
  gap: 9px 14px; font-size: 13.5px;
}
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; }

.reg-list { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.reg-list li { padding: 7px 0; border-bottom: 1px dashed var(--border); }
.reg-list li:last-child { border-bottom: 0; }
.reg-list b { color: var(--text-muted); font-weight: 600; }

.theme-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.theme-chip {
  display: flex; align-items: center; gap: 8px; font-size: 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 7px 11px; background: var(--surface);
}
.theme-chip i { width: 18px; height: 18px; border-radius: 5px;
  border: 1px solid rgba(0,0,0,.12); display: block; }

/* Three columns on wide screens; the console is full-width now. */
.grid-3up { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .grid-3up { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1480px) { .grid-3up { grid-template-columns: repeat(3, 1fr); } }

/* Stat tiles: four of them in an auto-fit grid wrapped 3 + 1 between
   roughly 1000px and 1250px, which reads as a mistake. Fixed counts
   avoid the orphan row. */
.grid-4 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px)  { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1280px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

/* The 132px label column is too wide once the viewport is narrow. */
@media (max-width: 560px) {
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { margin-top: 10px; font-size: 12px; text-transform: uppercase;
           letter-spacing: .04em; }
  .tb-side { align-items: flex-start; width: 100%; }
  .tb-inner { padding: 20px 16px 18px; }
}

/* ------------------------------------------------------- DNS record panel */

.dns-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: var(--surface);
}
.dns-panel + .dns-panel { margin-top: 12px; }
.dns-panel-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.dns-panel-head strong {
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13.5px; word-break: break-all;
}

table.dns-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.dns-table th {
  text-align: left; font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-muted); font-weight: 600;
  padding: 0 8px 6px 0; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.dns-table td {
  padding: 9px 8px 9px 0; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.dns-table tr:last-child td { border-bottom: 0; }
table.dns-table .dns-value { word-break: break-all; }
table.dns-table .dns-note-row td { border-bottom: 0; padding-top: 0; }

/* Step 2 of Launch: addresses on the left, the records to add on the right. */
.address-split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .address-split { grid-template-columns: minmax(300px, 1fr) 1.25fr; } }
.wizard-wide { max-width: 1240px; }

.brand-slot {
  display: flex; align-items: center; justify-content: center;
  height: 86px; padding: 10px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-muted);
}
.brand-slot img { max-height: 100%; max-width: 100%; object-fit: contain; }

/* ------------------------------------------------- touch tap targets

   The institute console is used on phones — a franchise clerk often
   registers a student from the counter with no desk computer at all. On a
   touch screen the 32px small buttons and 40px rows are below the 44px
   that WCAG 2.5.8 asks for and that a thumb actually needs.

   Keyed on (hover: none) as well as width so a narrow desktop window,
   where a mouse is precise, is left alone. */

@media (hover: none), (max-width: 760px) {
  .nav a,
  .btn,
  .input,
  select.input,
  .switch {
    min-height: 44px;
  }

  .btn-sm { min-height: 44px; padding: 0 14px; }

  /* A details/summary used as a button needs the height set on the
     summary itself, which is not a .btn box in the layout. */
  summary.btn, summary.btn-sm { min-height: 44px; }

  .switch { min-width: 44px; }

  /* Table action cells hold two or three small buttons; let them stack
     rather than squeezing each below the thumb-sized minimum. */
  table.data td .btn-row { flex-wrap: wrap; gap: 8px; }

  /* The student's name in a table row is how you open that row, not prose,
     so it gets a thumb-sized box of its own. */
  table.data td a:not(.btn) {
    display: inline-flex; align-items: center;
    min-height: 44px;
  }

  /* The breadcrumb is navigation, not a sentence. */
  .crumb a { display: inline-flex; align-items: center; min-height: 44px; }
}
