/* ==========================================================================
   BoltX admin / CMS — extends the BoltX CMS template's visual language.
   Header, sidebar, panels, fields and buttons use the template's exact
   colours, radii and spacing.
   ========================================================================== */

:root {
  --ink: #101828;
  --ink-deep: #0b1120;
  --ink-line: #344054;
  --orange: #ff7a1a;
  --orange-dark: #e2660d;
  --orange-soft: #ffe3cc;
  --orange-tint: #fff4ec;
  --body: #475467;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line-dark: #d0d5dd;
  --line: #e4e7ec;
  --surface: #f6f7f9;
  --white: #ffffff;
  --ok-bg: #ecfdf3;
  --ok-line: #17b26a;
  --ok-text: #067647;
  --warn: #fdb022;
  --warn-bg: #fffaeb;
  --warn-text: #b54708;
  --good: #75e0a7;
  --danger: #d92d20;
  --danger-bg: #fef3f2;
  --danger-text: #912018;
  --info-bg: #eff8ff;
  --info-text: #175cd3;
  --sora: 'Sora', sans-serif;
  --sans: 'Public Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--orange); }
::selection { background: var(--orange-soft); }
input, textarea, select, button { font-family: var(--sans); }
img { max-width: 100%; display: block; }

/* ---------- Shell ----------------------------------------------------- */

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

.topbar {
  background: var(--ink);
  padding: 16px clamp(20px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 40;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--orange);
  display: grid; place-items: center; flex-shrink: 0;
}
.topbar-name { font-family: var(--sora); font-weight: 700; font-size: 18px; color: var(--white); }
.topbar-name span { color: var(--orange); }
.topbar-sub {
  color: var(--muted); font-size: 13px;
  border-left: 1px solid var(--ink-line); padding-left: 12px;
}
.topbar-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.topbar-user { color: var(--muted-light); font-size: 13px; }
.topbar-user strong { color: var(--white); font-weight: 600; }

.layout { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); align-items: stretch; }
.layout-wide { grid-template-columns: minmax(0, 1fr); }

/* The menu runs its natural length and the white column fills the page, so
   there is no inner scrollbar and nothing is clipped. The page scrolls as one.
   `.layout` stretches its children (see below) so the column never stops
   short of the footer on a long page. */
.sidebar {
  background: var(--white); border-right: 1px solid var(--line);
  padding: 24px 16px 40px; display: grid; gap: 4px; align-content: start;
  min-height: 100%;
}
.side-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-light); padding: 14px 12px 8px;
}
.side-label:first-child { padding-top: 0; }
.side-link {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; text-align: left; background: transparent; border: none;
  border-left: 3px solid transparent; color: var(--body);
  font-family: var(--sora); font-weight: 500; font-size: 15px;
  padding: 11px 12px; border-radius: 8px; cursor: pointer;
}
.side-link:hover { background: var(--surface); color: var(--ink); }
.side-link.is-active {
  background: var(--orange-tint); border-left-color: var(--orange);
  color: var(--ink); font-weight: 600;
}
.side-link .count { font-size: 12px; color: var(--muted-light); font-family: var(--sans); }
.side-foot { border-top: 1px solid var(--line); margin-top: 16px; padding: 16px 12px 0; display: grid; gap: 10px; }
.side-foot a { font-size: 14px; color: var(--body); }
.side-foot a:hover { color: var(--orange); }

.main {
  padding: clamp(24px, 4vw, 40px) clamp(20px, 3vw, 32px);
  display: grid; gap: 24px; align-content: start; min-width: 0;
}

.page-title {
  font-family: var(--sora); color: var(--ink);
  font-size: clamp(22px, 3vw, 28px); font-weight: 700; margin: 0 0 6px;
}
.page-hint { font-size: 15px; margin: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

.sidebar-toggle { display: none; background: none; border: 1px solid var(--ink-line); border-radius: 8px; padding: 8px 10px; cursor: pointer; line-height: 0; }

@media (max-width: 860px) {
  /* Only the structural change lives here; the drawer itself is defined in
     the admin layout's inline <style>, which loads last and therefore owns
     the shell at these widths. */
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar-toggle { display: inline-block; }
}

}

/* ---------- Panels ---------------------------------------------------- */

.panel {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: clamp(20px, 3vw, 28px);
}
.panel-flush { padding: 0; overflow: hidden; }
.panel h2, .panel-title {
  font-family: var(--sora); color: var(--ink); font-size: 16px; font-weight: 600;
  margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.panel-title-flush { padding: 20px clamp(18px, 3vw, 24px); margin: 0; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  flex-wrap: wrap; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; padding: 0; border: none; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; }
.split-cms { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px; align-items: start; }
@media (max-width: 1180px) { .split-cms { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Stat tiles ------------------------------------------------ */

.stat {
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  padding: 22px 24px; display: grid; gap: 6px;
}
.stat .k { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.stat .v { font-family: var(--sora); color: var(--ink); font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat .d { font-size: 13px; color: var(--muted-light); }
.stat-accent { border-left: 3px solid var(--orange); }

/* ---------- Fields ---------------------------------------------------- */

.fields { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; }
.field > span, .field > label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12px; font-weight: 400; color: var(--muted-light); }
.input, .textarea, .select {
  border: 1px solid var(--line-dark); border-radius: 8px;
  padding: 11px 14px; font-size: 14px; color: var(--ink);
  outline: none; width: 100%; background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.textarea { line-height: 1.6; resize: vertical; }
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 12%, transparent);
}
.input[readonly] { background: var(--surface); color: var(--muted); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 18px; }
.field-row-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 18px; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink); font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--orange); margin-top: 2px; flex-shrink: 0; }

.field-error { color: var(--danger); font-size: 12px; font-weight: 500; }

/* ---------- Buttons --------------------------------------------------- */

.btn {
  display: inline-block; font-family: var(--sora); font-weight: 600; font-size: 14px;
  padding: 11px 22px; border-radius: 8px; border: none; cursor: pointer;
  text-align: center; transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--orange); color: var(--ink); }
.btn-primary:hover { background: var(--orange-dark); color: var(--ink); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-deep); color: var(--white); }
.btn-ghost { background: none; border: 1px solid var(--ink-line); color: var(--line-dark); padding: 10px 18px; }
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-line { background: var(--white); border: 1px solid var(--line-dark); color: var(--ink); padding: 10px 18px; }
.btn-line:hover { border-color: var(--orange); color: var(--orange); }
.btn-danger { background: var(--white); border: 1px solid var(--danger); color: var(--danger); padding: 10px 18px; }
.btn-danger:hover { background: var(--danger); color: var(--white); }
.btn-sm { font-size: 13px; padding: 8px 14px; }
.btn-block { display: block; width: 100%; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Tables ---------------------------------------------------- */

.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
table.data th {
  text-align: left; font-family: var(--sora); font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted);
  padding: 12px clamp(14px, 2vw, 20px); border-bottom: 1px solid var(--line);
  background: var(--surface); white-space: nowrap;
}
table.data td {
  padding: 14px clamp(14px, 2vw, 20px); border-bottom: 1px solid var(--line);
  color: var(--body); vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #fcfcfd; }
table.data td strong, table.data td .name { color: var(--ink); font-weight: 600; }
table.data .num { font-family: var(--sora); font-weight: 600; color: var(--ink); }
table.data .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
table.data th.right, table.data td.right { text-align: right; }

/* ---------- Badges ---------------------------------------------------- */

.badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 4px 10px;
  border-radius: 99px; letter-spacing: 0.02em; white-space: nowrap;
}
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }
.badge-danger { background: var(--danger-bg); color: var(--danger-text); }
.badge-info { background: var(--info-bg); color: var(--info-text); }
.badge-mute { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.badge-orange { background: var(--orange-soft); color: var(--orange-dark); }

/* ---------- Alerts ---------------------------------------------------- */

.alert { border-radius: 10px; padding: 14px 18px; font-size: 14px; font-weight: 500; }
.alert-ok { background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok-text); }
.alert-err { background: var(--danger-bg); border: 1px solid var(--danger); color: var(--danger-text); }
.alert-info { background: var(--info-bg); border: 1px solid #b2ddff; color: var(--info-text); }
.alert ul { margin: 8px 0 0; padding-left: 18px; }

.flag-dirty { color: var(--warn); font-size: 13px; font-weight: 500; }
.flag-saved { color: var(--good); font-size: 13px; font-weight: 500; }

/* ---------- Media / images -------------------------------------------- */

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 20px; }
.media-slot { display: grid; gap: 8px; }
.media-drop {
  width: 100%; height: 130px; border: 1px dashed var(--line-dark); border-radius: 10px;
  background: var(--surface); display: grid; place-items: center; overflow: hidden;
  position: relative; cursor: pointer; text-align: center;
}
.media-drop:hover { border-color: var(--orange); background: var(--orange-tint); }
.media-drop img { width: 100%; height: 100%; object-fit: cover; }
.media-drop .ph { font-size: 12px; color: var(--muted-light); padding: 10px; }
.media-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.media-slot .lbl { font-size: 13px; font-weight: 600; color: var(--ink); }
.media-slot .sub { font-size: 12px; color: var(--muted-light); }

.thumb-xs { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface); }
.thumb-sm { width: 64px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--surface); }

/* ---------- Preview pane ---------------------------------------------- */

.preview-pane { display: grid; gap: 16px; align-content: start; position: sticky; top: 91px; }
.preview-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted-light); margin-bottom: 8px;
}
.preview-frame {
  width: 100%; height: 620px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--white);
}
.preview-empty {
  border: 1px dashed var(--line-dark); border-radius: 12px; padding: 28px;
  text-align: center; font-size: 14px;
}

/* ---------- Charts ---------------------------------------------------- */

.chart { display: flex; align-items: flex-end; gap: 6px; height: 200px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.chart .bar {
  width: 100%; background: var(--orange); border-radius: 4px 4px 0 0; min-height: 2px;
  transition: background .15s ease;
}
.chart .col:hover .bar { background: var(--orange-dark); }
.chart .lab { font-size: 10px; color: var(--muted-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.hbar-list { display: grid; gap: 14px; }
.hbar-row { display: grid; gap: 6px; }
.hbar-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.hbar-head .k { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-head .v { color: var(--muted); font-weight: 600; flex-shrink: 0; }
.hbar-track { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.hbar-fill { height: 8px; background: var(--orange); border-radius: 99px; }

/* ---------- Auth screens ---------------------------------------------- */

.auth-wrap {
  min-height: 100vh; display: grid; place-items: center;
  padding: 40px 20px;
  background: var(--ink);
  background-image:
    radial-gradient(700px 380px at 80% 15%, color-mix(in srgb, var(--orange) 22%, transparent), transparent 70%),
    radial-gradient(500px 300px at 5% 100%, color-mix(in srgb, var(--orange) 10%, transparent), transparent 70%);
}
.auth-card {
  width: min(440px, 100%); background: var(--white);
  border-radius: 16px; padding: clamp(28px, 5vw, 40px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.28);
}
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-brand .mark { width: 38px; height: 38px; border-radius: 10px; background: var(--orange); display: grid; place-items: center; }
.auth-brand .name { font-family: var(--sora); font-weight: 700; font-size: 22px; color: var(--ink); }
.auth-brand .name span { color: var(--orange); }
.auth-card h1 { font-family: var(--sora); font-size: 24px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.auth-card .sub { font-size: 14px; margin: 0 0 26px; }
.auth-foot { margin-top: 22px; font-size: 13px; text-align: center; color: var(--muted); }
.auth-foot a { color: var(--orange); font-weight: 600; }

/* ---------- Timeline / activity --------------------------------------- */

.timeline { display: grid; gap: 0; }
.timeline-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px;
  padding-bottom: 20px; position: relative;
}
.timeline-item:not(:last-child)::before {
  content: ''; position: absolute; left: 13px; top: 24px; bottom: 0;
  width: 1px; background: var(--line);
}
.timeline-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--orange-soft);
  display: grid; place-items: center; z-index: 1;
}
.timeline-body .t { font-size: 14px; color: var(--ink); font-weight: 500; }
.timeline-body .m { font-size: 12px; color: var(--muted-light); margin-top: 2px; }

/* ---------- Tabs ------------------------------------------------------ */

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab {
  padding: 11px 18px; font-family: var(--sora); font-size: 14px; font-weight: 600;
  color: var(--body); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--orange); }
.tab.is-active { color: var(--orange); border-bottom-color: var(--orange); }

/* ---------- Filter bar ------------------------------------------------ */

.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { min-width: 170px; }
.filters .input, .filters .select { padding: 9px 12px; }

/* ---------- Pagination ------------------------------------------------ */

.pager { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 20px; }
.pager a, .pager span {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--line); display: inline-grid; place-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink); background: var(--white);
}
.pager a:hover { border-color: var(--orange); color: var(--orange); }
.pager .is-current { background: var(--orange); border-color: var(--orange); color: var(--ink); }
.pager .is-disabled { color: var(--line-dark); background: var(--surface); }
.pager svg { width: 15px; height: 15px; }

/* ---------- Repeater rows --------------------------------------------- */

.repeat-row {
  border: 1px solid var(--line); border-radius: 12px; padding: 18px;
  display: grid; gap: 14px; background: var(--surface);
}
.repeat-row .row-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.repeat-row .row-head .n { font-family: var(--sora); font-size: 14px; font-weight: 600; color: var(--ink); }

/* ---------- Empty state ----------------------------------------------- */

.empty {
  border: 1px dashed var(--line-dark); border-radius: 12px;
  padding: 40px 24px; text-align: center; color: var(--muted); font-size: 14px;
}
.empty strong { display: block; color: var(--ink); font-family: var(--sora); font-size: 15px; margin-bottom: 6px; }

/* ---------- Utilities ------------------------------------------------- */

.stack-8 { display: grid; gap: 8px; }
.stack-12 { display: grid; gap: 12px; }
.stack-16 { display: grid; gap: 16px; }
.stack-20 { display: grid; gap: 20px; }
.stack-24 { display: grid; gap: 24px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.flex-center { display: flex; align-items: center; gap: 10px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--muted); }
.text-mute-light { color: var(--muted-light); }
.text-ink { color: var(--ink); }
.text-orange { color: var(--orange); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.fw-600 { font-weight: 600; }
.sora { font-family: var(--sora); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.nowrap { white-space: nowrap; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--line); margin: 4px 0; }

/* ---------- Responsive safety net -------------------------------------
   The admin and staff shells must stay usable on a phone: no sideways
   page scroll, tables scroll inside their own container, and long values
   (emails, IDs, URLs, file paths) wrap instead of stretching a row.
   ---------------------------------------------------------------------- */

html, body { max-width: 100%; overflow-x: hidden; }

img, svg, video, iframe, canvas { max-width: 100%; }
iframe { border: 0; }

.layout, .main, .panel, .shell { min-width: 0; }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .split-cms > *,
.fields > *, .field-row > *, .field-row-3 > *, .media-grid > * { min-width: 0; }

p, li, td, th, dd, dt,
.stat .k, .stat .d, .field .hint,
.text-sm, .text-xs, .mono { overflow-wrap: anywhere; }

h1, h2, h3, h4, .page-title, .panel-title { overflow-wrap: break-word; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data td, table.data th { overflow-wrap: break-word; }
table.data td.nowrap, table.data th.nowrap { overflow-wrap: normal; }

.btn { max-width: 100%; }
.input, .textarea, .select { max-width: 100%; }
.textarea { min-height: 90px; }

.mono { word-break: break-all; }

@media (max-width: 860px) {
  .preview-pane { position: static; }
  .preview-frame { height: 420px; }
  .topbar { position: sticky; }
}

@media (max-width: 620px) {
  .topbar { gap: 10px; }
  .topbar-sub { border-left: none; padding-left: 0; }
  .topbar-user { width: 100%; }
  .topbar-actions { width: 100%; }
  .topbar-actions .btn { flex: 1 1 auto; }
  .page-head { align-items: flex-start; }
  .panel-head { align-items: flex-start; }
  .filters { width: 100%; }
  .filters .field { min-width: 0; flex: 1 1 140px; }
  .btn-row .btn { flex: 1 1 auto; }
  .stat .v { font-size: 26px; }
  .chart { height: 150px; }
  .chart .lab { font-size: 9px; }
  .auth-card { padding: 26px 22px; }
}

@media (max-width: 420px) {
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr)); }
  .media-drop { height: 110px; }
}




/* ==========================================================================
   Data tables on small screens
   A table with six or more columns cannot shrink to 375px without collapsing
   its columns — which is what produced titles breaking one letter per line.
   Below 860px the cells keep a workable minimum instead, the table grows to
   whatever that needs, and `.table-scroll` does its job and scrolls.
   ========================================================================== */

@media (max-width: 860px) {
  table.data {
    /* Let the sum of the cell minimums decide the width, not a flat guess. */
    min-width: 0;
    width: auto;
  }

  table.data th,
  table.data td {
    min-width: 112px;
    max-width: 280px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  /* Thumbnails, checkboxes and icons — narrow on purpose. */
  table.data th:first-child:empty,
  table.data td:has(> img.thumb-xs),
  table.data td:has(> img.thumb-sm) { min-width: 56px; max-width: 72px; }

  /* The name column carries the most text, so give it more room. */
  table.data td .name,
  table.data td strong { display: inline-block; min-width: 150px; }

  /* Numbers, dates, money and badges never need to wrap. */
  table.data td.right,
  table.data th.right,
  table.data td .num,
  table.data td .badge,
  table.data td.nowrap,
  table.data th.nowrap { white-space: nowrap; }
  table.data td .badge { min-width: 0; }

  /* Keep row actions on one line at the end of the row. */
  table.data td .actions {
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
  }
  table.data td .actions .btn { white-space: nowrap; }
  table.data td:has(> .actions) { min-width: 140px; max-width: none; }

  /* The scroll region needs to look scrollable. */
  .table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
  }
}

@media (max-width: 480px) {
  table.data { font-size: 13px; }
  table.data th { font-size: 11px; }
  table.data th, table.data td { padding: 11px 12px; min-width: 104px; }
  table.data td .name, table.data td strong { min-width: 132px; }
}
