/* Fit9 — owner web · follows Docs/Fit9_BrandGuide.html */

:root {
  --bg: #F3F4F1;
  --card: #FFFFFF;
  --border: #E3E5EA;
  --chip: #EEF0F3;
  --divider: #EEF0F3;
  --text: #14161B;
  --text-2: #3F4553;
  --muted: #5F6675;
  --accent: #D4FF3A;
  --ink: #596B18;
  --deep-lime: color-mix(in srgb, var(--accent), #000 38%);
  --night: #0E1014;
  --r-chip: 10px;
  --r-btn: 14px;
  --r-card: 22px;
  --r-hero: 28px;
  --warn: #C2410C;
  --warn-2: #9A3412;
  --warn-bg: #FFF7ED;
  --warn-border: #FED7AA;
  --danger: #B42318;
  --danger-bg: #FDE8E1;
  --ok: #3F4F0E;
  --ok-bg: #EEF5D6;
  --info: #1E40AF;
  --info-bg: #E7F0FF;
  --plate-1: #14161B;
  --plate-2: #6B7280;
  --plate-3: #C2C7D0;
  --bar: #9AA1B0;
  --sleeve: #6B7280;

  --bs-body-font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-border-color: var(--border);
}

* { -webkit-font-smoothing: antialiased; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--bs-body-font-family);
  font-size: 14px;
  line-height: 1.45;
}

a { color: inherit; }

.num, .ld-table td, .ld-stat { font-variant-numeric: tabular-nums; }

.ld-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 32px 64px;
}

/* ---------- Top bar ---------- */

.ld-top {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.ld-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 6px 0;
  text-decoration: none;
}
.ld-brand img { display: block; }
.ld-brand-mark { display: none !important; }

.ld-nav {
  display: flex;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.ld-nav::-webkit-scrollbar { display: none; }

.ld-nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  white-space: nowrap;
  transition: background .15s;
}
.ld-nav a:hover { background: var(--chip); }
.ld-nav a.active { background: var(--text); color: #fff; font-weight: 800; }

.ld-top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ld-date { color: var(--muted); font-size: 13px; margin-right: 6px; }
.ld-top-actions :is(.btn-ld, .btn-ld-outline, .btn-ld-dark, .btn-ld-ink) { min-height: 48px; padding: 0 18px; font-size: 14px; }

.ld-live { display: inline-flex; align-items: center; gap: 6px; }
.ld-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }

/* ---------- Type ---------- */

.ld-label {
  font-size: 12px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  margin: 0 0 6px;
}
.ld-label.warn { color: var(--danger); }

.ld-h1 { font-size: 48px; font-weight: 800; letter-spacing: -0.03em; margin: 0; line-height: 1.08; }
.ld-h2 { font-size: 20px; font-weight: 700; margin: 0; }
.ld-h3 { font-size: 16px; font-weight: 700; margin: 0; }
.ld-sub { color: var(--muted); font-size: 12.5px; }
.ld-muted { color: var(--muted); }
.ld-ink { color: var(--ink); }
.ld-warn-text { color: var(--warn); font-weight: 600; }
.ld-danger-text { color: var(--danger); font-weight: 600; }

.ld-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.ld-back {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 600;
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 14px;
}
.ld-back:hover { text-decoration: underline; }

.ld-link {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}

/* ---------- Cards ---------- */

.ld-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 22px 24px;
}
.ld-card.hero { border-radius: var(--r-hero); }
.ld-card.tight { padding: 18px 20px; }
.ld-card.flush { padding: 0; overflow: hidden; }
.ld-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ld-stat { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.ld-stat.xl { font-size: 48px; }
.ld-stat.ink { color: var(--ink); }
.ld-stat.danger { color: var(--danger); }
.ld-stat.warn { color: var(--warn); }

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

.btn-ld,
.btn-ld-dark,
.btn-ld-outline,
.btn-ld-ink,
.btn-ld-danger,
.btn-ld-red {
  --btn-edge: transparent;
  --btn-shade: rgba(20, 22, 27, .14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 0 22px;
  border-radius: var(--r-btn);
  font-weight: 800;
  font-size: 15px;
  border: 1.5px solid var(--btn-edge);
  box-shadow: inset 0 -3px 0 var(--btn-shade);
  text-decoration: none;
  cursor: pointer;
  transition: filter .15s, background .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
:is(.btn-ld, .btn-ld-dark, .btn-ld-outline, .btn-ld-ink, .btn-ld-danger, .btn-ld-red):hover { border-color: var(--btn-edge); }
:is(.btn-ld, .btn-ld-dark, .btn-ld-outline, .btn-ld-ink, .btn-ld-danger, .btn-ld-red):active:not([disabled]) {
  transform: translateY(1px);
  box-shadow: inset 0 0 0 var(--btn-shade);
}

.btn-ld { --btn-edge: var(--deep-lime); background: var(--accent); color: var(--text); }
.btn-ld:hover { filter: brightness(.95); color: var(--text); }

.btn-ld-dark { --btn-edge: #000; --btn-shade: rgba(0, 0, 0, .5); background: var(--text); color: #fff; }
.btn-ld-dark:hover { background: #2a2d35; color: #fff; }

.btn-ld-outline { --btn-edge: #CBD0D8; --btn-shade: rgba(20, 22, 27, .06); background: var(--card); color: var(--text); font-weight: 700; }
.btn-ld-outline:hover { background: var(--chip); color: var(--text); }

.btn-ld-ink { --btn-edge: var(--ink); --btn-shade: color-mix(in srgb, var(--ink) 20%, transparent); background: var(--card); color: var(--ink); font-weight: 700; }
.btn-ld-ink:hover { background: var(--ok-bg); color: var(--ink); }

.btn-ld-danger { --btn-edge: color-mix(in srgb, var(--danger) 45%, #fff); --btn-shade: color-mix(in srgb, var(--danger) 16%, transparent); background: var(--card); color: var(--danger); font-weight: 700; }
.btn-ld-danger:hover { background: var(--danger-bg); color: var(--danger); }

.btn-ld-red { --btn-edge: color-mix(in srgb, var(--danger), #000 30%); --btn-shade: rgba(0, 0, 0, .25); background: var(--danger); color: #fff; }
.btn-ld-red:hover { filter: brightness(.94); color: #fff; }

.btn-sm-ld { min-height: 40px; padding: 0 16px; font-size: 13px; border-radius: 12px; }
:is(.btn-ld, .btn-ld-dark, .btn-ld-outline, .btn-ld-ink, .btn-ld-danger, .btn-ld-red)[disabled] { opacity: .55; cursor: default; box-shadow: none; filter: none; }

/* ---------- Chips, pills, tabs ---------- */

.ld-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.ld-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
}
.ld-chip .cnt { font-weight: 400; color: var(--muted); }
.ld-chip.active { background: var(--text); color: #fff; border-color: var(--text); }
.ld-chip.active .cnt { color: #c8ccd4; }
.ld-chip.static { cursor: default; font-weight: 600; }
.ld-chip.warn { color: var(--warn); border-color: var(--warn); font-weight: 600; }
.ld-chip.soft { background: var(--chip); border-color: var(--chip); font-weight: 600; }
.ld-chip.lime { background: var(--accent); border: 1.5px solid var(--ink); }
.ld-chip.dark { background: var(--text); border-color: var(--text); color: var(--accent); }

.ld-pill {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--chip);
  color: var(--text-2);
}
.ld-pill.ok { background: var(--ok-bg); color: var(--ok); }
.ld-pill.warn { background: var(--warn-bg); color: var(--warn-2); }
.ld-pill.danger { background: var(--danger-bg); color: var(--danger); }
.ld-pill.info { background: var(--info-bg); color: var(--info); }
.ld-pill.accent { background: var(--accent); color: var(--text); }

/* ---------- Avatar ---------- */

.ld-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--chip);
  color: var(--text);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.ld-avatar.lg { width: 56px; height: 56px; border-radius: var(--r-btn); font-size: 18px; }
.ld-avatar.xl { width: 64px; height: 64px; border-radius: var(--r-btn); font-size: 18px; }
.ld-avatar.accent { background: var(--accent); }

/* ---------- Lists ---------- */

.ld-list { list-style: none; margin: 0; padding: 0; }
.ld-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--divider);
}
.ld-row:first-child { border-top: 0; }
.ld-list.top-rule .ld-row:first-child { border-top: 1px solid var(--divider); }
.ld-row .grow { flex: 1; min-width: 0; }
.ld-row .name { font-weight: 600; }
.ld-row .meta { color: var(--muted); font-size: 12.5px; }

.ld-kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.ld-kv dt { font-weight: 600; color: var(--text-2); }
.ld-kv dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Progress ---------- */

.ld-track {
  height: 6px;
  border-radius: 999px;
  background: var(--chip);
  overflow: hidden;
  flex: 1;
}
.ld-track > span { display: block; height: 100%; border-radius: inherit; background: var(--bar); }
.ld-track > span.ink { background: var(--ink); }
.ld-track.thick { height: 8px; }

.ld-split {
  display: flex;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  gap: 2px;
}
.ld-split > span:nth-child(1) { background: var(--text); }
.ld-split > span:nth-child(2) { background: var(--bar); }
.ld-split > span:nth-child(3) { background: var(--accent); }

/* ---------- Table ---------- */

.ld-table { width: 100%; border-collapse: collapse; }
.ld-table th {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
  padding: 14px 10px;
  white-space: nowrap;
  text-align: left;
}
.ld-table td {
  padding: 12px 10px;
  border-top: 1px solid var(--divider);
  vertical-align: middle;
}
.ld-table tbody tr.clickable { cursor: pointer; }
.ld-table tbody tr.clickable:hover td { background: #FAFBF8; }
.ld-table tfoot td { border-top: 2px solid var(--text); font-weight: 700; padding-top: 16px; }
.ld-table-wrap { overflow-x: auto; }
.ld-card.flush .ld-table th:first-child,
.ld-card.flush .ld-table td:first-child { padding-left: 20px; }
.ld-card.flush .ld-table th:last-child,
.ld-card.flush .ld-table td:last-child { padding-right: 20px; }

.ld-empty { text-align: center; color: var(--muted); padding: 36px 12px; }

.ld-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ld-search { position: relative; flex: 1 1 320px; margin: 0; }
.ld-search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ld-search .ld-input { padding-left: 42px; }
.ld-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.ld-filters .ld-select { width: auto; min-width: 150px; font-weight: 600; cursor: pointer; }
.ld-filters .ld-select.on { border-color: var(--ink); background: var(--ok-bg); }
.ld-filters .ld-filter-clear { min-height: 46px; }

.ld-quick {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 100%;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  color: var(--text);
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .05s;
}
.ld-quick:hover { color: var(--text); border-color: #CBD0D8; box-shadow: 0 6px 18px rgba(20, 22, 27, .06); }
.ld-quick:active { transform: translateY(1px); }
.ld-quick-icon { width: 42px; height: 42px; border-radius: var(--r-chip); background: var(--accent); border: 1.5px solid var(--deep-lime); display: grid; place-items: center; flex-shrink: 0; }
.ld-quick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ld-quick-text strong { font-size: 14.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ld-quick-text > span { color: var(--muted); font-size: 12.5px; }
.ld-quick-go { color: var(--muted); font-size: 22px; line-height: 1; }

/* ---------- Forms ---------- */

.ld-field label,
.ld-field .ld-field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.ld-input,
.ld-select,
.ld-textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  transition: border-color .15s, box-shadow .15s;
}
.ld-textarea { padding: 12px 14px; min-height: 120px; resize: vertical; }
.ld-select { appearance: auto; }
.ld-input::placeholder { color: #9AA1B0; text-transform: none; }
.ld-input:focus, .ld-select:focus, .ld-textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
}

.ld-upload {
  width: 100px;
  height: 100px;
  border-radius: var(--r-card);
  border: 1.5px dashed var(--plate-3);
  background: #F6F7F5;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  overflow: hidden;
  flex-shrink: 0;
}
.ld-upload img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Toggle switch ---------- */

.ld-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.ld-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.ld-switch .track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--chip);
  border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
}
.ld-switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.2);
  transition: transform .18s, background .15s;
}
.ld-switch input:checked + .track { background: var(--accent); border-color: var(--ink); }
.ld-switch input:checked + .track::after { transform: translateX(18px); background: var(--text); }
.ld-switch input:focus-visible + .track { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 50%, transparent); }

/* ---------- Check box (permission matrix) ---------- */

.ld-check {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1px solid var(--plate-3);
  background: #fff;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  margin: 0;
}
.ld-check:checked {
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%2314161B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat;
  border-color: var(--text);
}

/* ---------- Notes ---------- */

.ld-note {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
}
.ld-note .ld-label { color: var(--warn-2); font-weight: 700; margin-bottom: 4px; }

/* ---------- Barbell ---------- */

.ld-barbell { width: 100%; display: block; }
.ld-barbell svg { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------- Bar charts ---------- */

.ld-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 140px;
}
.ld-bars .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.ld-bars .bar { width: 100%; border-radius: 10px; background: var(--plate-3); transition: height .4s; }
.ld-bars .bar.now { background: var(--accent); border: 1px solid var(--text); }
.ld-bars .val { font-size: 11px; color: var(--text-2); font-weight: 600; }
.ld-bars .lbl { font-size: 11.5px; color: var(--muted); }

.ld-pairs {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 200px;
  padding-top: 10px;
}
.ld-pairs .grp { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; }
.ld-pairs .duo { display: flex; align-items: flex-end; gap: 4px; flex: 1; min-height: 0; }
.ld-pairs .duo span { width: 16px; border-radius: 4px; display: block; }
.ld-pairs .j { background: var(--text); }
.ld-pairs .l { background: var(--plate-3); }
.ld-pairs .lbl { font-size: 11.5px; color: var(--muted); }
.ld-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.ld-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* ---------- Attendance grid ---------- */

.ld-attend {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.ld-attend span { height: 18px; border-radius: 5px; background: var(--chip); }
.ld-attend span.on { background: var(--ink); }
.ld-attend span.today { background: var(--accent); border: 1px solid var(--ink); }
.ld-attend span.future { background: #fff; border: 1px solid var(--border); }
.ld-attend-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 8px; font-size: 11px; color: var(--muted); }

/* ---------- Roster ---------- */

.ld-roster { width: 100%; border-collapse: separate; border-spacing: 6px; min-width: 640px; table-layout: fixed; }
.ld-roster th:first-child { width: 140px; }
.ld-roster th { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 800; padding: 0 4px 4px; text-align: left; }
.ld-roster th.today { color: var(--text); font-weight: 700; }
.ld-roster td.who { font-weight: 600; font-size: 13px; white-space: nowrap; padding-right: 6px; }
.ld-roster .cell {
  display: grid;
  place-items: center;
  min-height: 40px;
  border-radius: 10px;
  background: var(--chip);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  padding: 4px;
}
.ld-roster .cell.off { background: #fff; border: 1px dashed var(--plate-3); color: var(--muted); }
.ld-roster .cell.leave { background: var(--warn-bg); color: var(--warn); }
.ld-roster .cell.today { background: var(--accent); border: 1px solid var(--ink); font-weight: 600; }
.ld-roster .cell.today.off { background: #fff; }

.ld-leave {
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  padding: 14px 16px;
}
.ld-leave + .ld-leave { margin-top: 12px; }
.ld-leave .type { font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); font-weight: 600; }

/* ---------- WhatsApp preview ---------- */

.ld-wa {
  background: #EAE4DA;
  border-radius: var(--r-card);
  padding: 14px;
}
.ld-wa .bubble {
  background: #fff;
  border-radius: var(--r-chip);
  padding: 12px 14px;
  font-size: 13.5px;
  white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0,0,0,.06);
}
.ld-wa .bubble b { font-weight: 700; }

.ld-msg-row { cursor: pointer; }
.ld-msg-row .name { transition: color .15s; }
.ld-msg-row.selected .name { text-decoration: underline; text-underline-offset: 3px; }

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

.ld-plan { height: 100%; display: flex; flex-direction: column; }
.ld-plan.featured { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.ld-plan .price { font-size: 26px; font-weight: 700; letter-spacing: -0.3px; }
.ld-plan .per { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.ld-plan .foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--divider); display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; }

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

.ld-staff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; font-size: 12px; margin: 14px 0; }
.ld-staff-grid .k { color: var(--muted); }
.ld-staff-grid .v { font-weight: 700; font-size: 13px; }

/* ---------- Tweaks ---------- */

.ld-tweaks {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1050;
}
.ld-tweaks-btn {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 6px 20px rgba(20,22,27,.08);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ld-tweaks-btn i { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 1px solid var(--text); display: inline-block; }
.ld-tweaks-panel {
  position: absolute;
  right: 0;
  bottom: 52px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px;
  width: 220px;
  box-shadow: 0 12px 32px rgba(20,22,27,.12);
  display: none;
}
.ld-tweaks.open .ld-tweaks-panel { display: block; }
.ld-swatches { display: flex; gap: 10px; margin-top: 8px; }
.ld-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  outline: 1px solid var(--border);
  cursor: pointer;
}
.ld-swatch.active { border-color: var(--text); }

/* ---------- Bootstrap overrides ---------- */

.modal-content { border-radius: var(--r-hero); border: 1px solid var(--border); }
.modal-header, .modal-footer { border: 0; padding: 20px 24px; }
.modal-body { padding: 4px 24px 8px; }
.modal-title { font-weight: 700; font-size: 18px; }

.dropdown-menu { border-radius: 14px; border-color: var(--border); padding: 6px; box-shadow: 0 10px 28px rgba(20,22,27,.1); }
.dropdown-item { border-radius: var(--r-chip); font-weight: 600; padding: 8px 12px; }
.dropdown-item.active, .dropdown-item:active { background: var(--text); }

.toast-container { z-index: 1100; }
.ld-toast {
  background: var(--text);
  color: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(20,22,27,.25);
}
.ld-toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.ld-radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 600;
}
.ld-radio-card input { accent-color: var(--text); width: 18px; height: 18px; }
.ld-radio-card:has(input:checked) { border-color: var(--ink); background: var(--ok-bg); }
.ld-radio-card .sub { font-weight: 400; color: var(--muted); font-size: 12.5px; }

.ld-seg { display: flex; background: var(--chip); border-radius: var(--r-btn); padding: 4px; gap: 4px; }
.ld-seg label { flex: 1; text-align: center; padding: 9px 8px; border-radius: 9px; cursor: pointer; font-weight: 600; font-size: 13px; }
.ld-seg input { display: none; }
.ld-seg label:has(input:checked) { background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* ---------- Header: gym switcher + account ---------- */

.ld-gym-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-btn);
  padding: 6px 14px 6px 6px;
  text-align: left;
  color: var(--text);
  min-height: 48px;
}
.ld-gym-btn:hover { background: #FAFBF8; }
.ld-gym-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.ld-gym-text strong { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.2; }
.ld-gym-text small { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.2; }
.ld-gym-text small::after { content: " ▾"; font-size: 9px; }

.ld-gym-menu { width: 300px; padding: 10px; border-radius: var(--r-card); }
.ld-gym-menu .ld-label { padding: 6px 10px 4px; }
.ld-gym-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  background: none;
  border-radius: var(--r-chip);
  padding: 9px 10px;
  text-align: left;
  color: var(--text);
  text-decoration: none;
}
.ld-gym-item:hover, .ld-gym-item.current { background: var(--chip); }
.ld-gym-item .grow { flex: 1; min-width: 0; }
.ld-gym-item strong { display: block; font-size: 14px; }
.ld-gym-item small { color: var(--muted); font-size: 12px; }
.ld-gym-item .check { color: var(--ink); font-weight: 700; }
.ld-menu-link {
  display: block;
  padding: 10px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
}
.ld-menu-link:hover { background: var(--chip); }
.ld-menu-sep { border: 0; border-top: 1px solid var(--divider); margin: 6px 0; opacity: 1; }

.ld-avatar-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--r-btn);
  border: 0;
  background: var(--text);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 3px transparent;
  transition: box-shadow .15s;
}
.ld-avatar-btn[aria-expanded="true"], .ld-avatar-btn:hover { box-shadow: 0 0 0 3px var(--accent); }
.ld-avatar.dark { background: var(--text); color: #fff; border-radius: 10px; }
.ld-top-end { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.ld-top-actions:empty { display: none; }
.ld-top-actions:empty ~ .ld-top-end { margin-left: auto; }

.ld-account-menu { width: 320px; padding: 8px; border-radius: var(--r-card); }
.ld-account-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px 12px; border-bottom: 1px solid var(--divider); margin-bottom: 4px; }
.ld-account-head strong { display: block; font-size: 16px; }
.ld-account-head small { color: var(--muted); }
.ld-account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14.5px;
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
}
.ld-account-row:hover { background: var(--chip); }
.ld-account-row small { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.ld-account-row.danger { color: var(--danger); }

/* ---------- Steps (Add a gym) ---------- */

.ld-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ld-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: var(--r-chip);
  font-weight: 600;
  font-size: 13.5px;
}
.ld-steps li.on { background: var(--chip); }
.ld-steps .n {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 11.5px;
  flex-shrink: 0;
}
.ld-steps li.on .n { background: var(--text); color: #fff; border-color: var(--text); }
.ld-steps li.done .n { background: var(--accent); border-color: var(--ink); }

.ld-check-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--divider); cursor: pointer; }
.ld-check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--text); flex-shrink: 0; }

/* ---------- Feedback ---------- */

.ld-fb-item {
  display: flex;
  gap: 12px;
  width: 100%;
  border: 1px solid transparent;
  background: none;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  color: var(--text);
}
.ld-fb-item:hover { background: #FAFBF8; }
.ld-fb-item.selected { border-color: var(--ink); background: #FBFDF4; }
.ld-fb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); margin-top: 7px; flex-shrink: 0; }
.ld-fb-item.resolved .ld-fb-dot { background: var(--plate-3); }
.ld-quote { background: var(--chip); border-radius: 14px; padding: 12px 16px; }

/* ---------- Import ---------- */

.ld-file {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--ink);
  background: #FBFDF4;
  border-radius: var(--r-card);
  padding: 14px 16px;
}
.ld-file-badge { width: 36px; height: 36px; border-radius: 10px; background: var(--accent); display: grid; place-items: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.ld-col-src {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: var(--chip);
  border-radius: 8px;
  padding: 7px 10px;
  flex: 1;
}
.ld-col-dst { flex: 1; border: 0; background: none; font-weight: 600; font-size: 13.5px; padding: 4px 0; color: var(--text); }
.ld-col-dst.skip { color: var(--muted); font-weight: 400; }

/* ---------- Tax invoice (A4) ---------- */

.ld-a4 {
  width: 210mm;
  min-height: 297mm;
  max-width: 100%;
  margin: 0 auto;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 20px 50px -20px rgba(20,22,27,.25);
  padding: 18mm 16mm 14mm;
  display: flex;
  flex-direction: column;
  font-size: 13px;
}
.ld-inv-box { border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; height: 100%; }
.ld-inv-table { width: 100%; border-collapse: collapse; margin-top: 24px; }
.ld-inv-table th { background: #F3F4F1; font-size: 10.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-2); font-weight: 600; padding: 10px 12px; text-align: left; }
.ld-inv-table th:first-child { border-radius: 10px 0 0 10px; }
.ld-inv-table th:last-child { border-radius: 0 10px 10px 0; text-align: right; }
.ld-inv-table td { padding: 14px 12px; border-bottom: 1px solid var(--divider); vertical-align: top; }
.ld-inv-table td:last-child { text-align: right; }
.ld-inv-totals { width: 300px; margin-left: auto; margin-top: 18px; }
.ld-inv-totals .ld-kv { padding: 5px 0; }
.ld-inv-bar { position: relative; height: 4px; background: var(--chip); border-radius: 2px; margin: 34px 0 0; }
.ld-inv-bar::before, .ld-inv-bar::after { content: ""; position: absolute; top: -8px; width: 8px; height: 20px; border-radius: 3px; background: var(--accent); border: 1px solid var(--ink); }
.ld-inv-bar::before { left: 0; }
.ld-inv-bar::after { right: 0; }

/* ---------- ID card ---------- */

.ld-idcard {
  width: 400px;
  max-width: 100%;
  aspect-ratio: 85.6 / 54;
  border-radius: 18px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.ld-idcard.front { background: var(--text); color: #fff; }
.ld-idcard.back { background: #fff; border: 1px solid var(--border); flex-direction: row; align-items: center; gap: 22px; }
.ld-idcard .photo { width: 72px; height: 84px; border-radius: 12px; background: #3A3F4B; display: grid; place-items: center; font-size: 12px; color: #A9AEB8; flex-shrink: 0; }
.ld-idcard .bar { margin-top: auto; height: 4px; background: #3A3F4B; border-radius: 2px; position: relative; }
.ld-idcard .bar::before, .ld-idcard .bar::after { content: ""; position: absolute; top: -6px; width: 10px; height: 16px; border-radius: 3px; background: var(--accent); box-shadow: 5px 0 0 -1px var(--accent); }
.ld-idcard .bar::before { left: 0; }
.ld-idcard .bar::after { right: 5px; }
.ld-idqr { width: 120px; height: 120px; padding: 10px; border-radius: 14px; background: #fff; border: 8px solid var(--accent); flex-shrink: 0; }
.ld-idqr svg { width: 100%; height: 100%; display: block; }

/* ---------- States sheet ---------- */

.ld-skel { background: linear-gradient(90deg, #EEF0F3 25%, #F7F8F9 37%, #EEF0F3 63%); background-size: 400% 100%; animation: ld-shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes ld-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.ld-state-icon { width: 44px; height: 44px; border-radius: var(--r-chip); background: var(--chip); display: grid; place-items: center; margin: 0 auto 12px; }
.ld-banner-dark { background: var(--text); color: #fff; border-radius: var(--r-btn); padding: 14px 18px; display: flex; gap: 12px; align-items: flex-start; }

@media print {
  .ld-noprint, .ld-tweaks, .toast-container { display: none !important; }
  body { background: #fff; }
  .ld-shell { padding: 0; max-width: none; }
  .ld-a4 { box-shadow: none; border-radius: 0; width: auto; min-height: auto; padding: 0; }
}

/* ---------- Responsive ---------- */

@media (max-width: 991.98px) {
  .ld-top-end { order: 1; margin-left: auto; }
  .ld-nav { order: 2; width: 100%; }
  .ld-top-actions { order: 3; margin-left: 0; width: 100%; justify-content: flex-end; }
  .ld-date { display: none; }
}

@media (max-width: 575.98px) {
  .ld-shell { padding: 16px 16px 80px; }
  .ld-h1 { font-size: 32px; }
  .ld-stat { font-size: 26px; }
  .ld-stat.xl { font-size: 40px; }
  .ld-card { padding: 18px; }
  .ld-top { gap: 12px; }
  .ld-filters { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .ld-filters .ld-select { min-width: 0; padding: 0 8px; font-size: 13px; }
  .ld-filters .ld-filter-clear { grid-column: 1 / -1; }
  .ld-gym-text strong { font-size: 12.5px; }
  .ld-brand-lockup { display: none !important; }
  .ld-brand-mark { display: block !important; }
  .ld-top-end { gap: 8px; }
  .ld-top-actions :is(.btn-ld, .btn-ld-outline, .btn-ld-dark, .btn-ld-ink) { min-height: 40px; padding: 0 12px; font-size: 13px; }
  .ld-a4 { padding: 20px; min-height: auto; }
  .ld-idcard.back { gap: 14px; padding: 16px; }
  .ld-idqr { width: 96px; height: 96px; border-width: 6px; }
}
