/* Clothiq — fashion business software
   A quiet, paper-and-ink palette so garment photos and numbers do the talking. */

:root {
  --ink: #191512;
  --ink-soft: #4b423a;
  --ink-faint: #8b7f74;
  --paper: #faf7f2;
  --card: #ffffff;
  --line: #e7e0d5;
  --line-strong: #d5cabb;
  --accent: #7c2d3a;          /* deep bordeaux */
  --accent-soft: #f6e9eb;
  --gold: #b08d4f;
  --success: #2f6b43;
  --success-soft: #e6f1e9;
  --warning: #9a6b12;
  --warning-soft: #fbf0da;
  --danger: #a32020;
  --danger-soft: #fbe8e8;
  --info: #2a5570;
  --info-soft: #e6eff5;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(25, 21, 18, .05), 0 8px 24px -16px rgba(25, 21, 18, .25);
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

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

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; font-family: var(--sans); }

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

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

.sidebar {
  width: 224px;
  flex: 0 0 224px;
  background: var(--ink);
  color: #efe8de;
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: var(--ink);
  font-family: var(--serif); font-size: 1.1rem; font-weight: 700;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.2; overflow: hidden; }
.brand__text strong { font-size: .9rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.brand__text small { font-size: .7rem; color: #a99e91; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: #cfc5b8; font-size: .875rem; text-decoration: none;
}
.nav__link:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav__link.is-active { background: var(--accent); color: #fff; }
.nav__icon { width: 18px; text-align: center; opacity: .9; }
.sidebar__foot { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }

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

.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 24px; background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.topbar__search { flex: 1; max-width: 420px; }
.topbar__search input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--line-strong);
  border-radius: 999px; background: var(--paper); font-size: .875rem; font-family: inherit;
}
.topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user { display: flex; align-items: center; gap: 8px; }
.user__name { font-size: .8rem; color: var(--ink-faint); }

.content { padding: 24px; flex: 1; max-width: 1280px; width: 100%; }

.flashes { padding: 12px 24px 0; }
.flash {
  padding: 10px 14px; border-radius: var(--radius-sm); font-size: .875rem; margin-bottom: 8px;
  border: 1px solid transparent;
}
.flash--notice { background: var(--success-soft); color: var(--success); border-color: #cfe3d6; }
.flash--alert { background: var(--danger-soft); color: var(--danger); border-color: #f0cccc; }

/* ---------- Page furniture ---------- */

.page-head {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.page-head__text { flex: 1; min-width: 220px; }
.page-head__text p { margin: 4px 0 0; color: var(--ink-faint); font-size: .875rem; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 18px;
}
.card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card__head h2, .card__head h3 { margin: 0; }
.card__head .spacer { margin-left: auto; }
.card--flush { padding: 0; overflow: hidden; }
.card--flush .card__head { padding: 16px 18px 0; }

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

.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat__label { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); }
.stat__value { font-family: var(--serif); font-size: 1.7rem; margin-top: 4px; line-height: 1.1; }
.stat__meta { font-size: .78rem; color: var(--ink-faint); margin-top: 4px; }
.stat--danger .stat__value { color: var(--danger); }
.stat--success .stat__value { color: var(--success); }

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

.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
  text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-faint); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fdfbf7; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .strong { font-weight: 600; }
.table__wrap { overflow-x: auto; }
.row-link { font-weight: 600; color: var(--ink); }
.row-sub { display: block; font-size: .78rem; color: var(--ink-faint); }

/* ---------- Badges, chips, buttons ---------- */

.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: .72rem; font-weight: 600; white-space: nowrap;
  background: #f0ebe2; color: var(--ink-soft);
}
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--danger  { background: var(--danger-soft); color: var(--danger); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--info    { background: var(--info-soft); color: var(--info); }
.badge--accent  { background: var(--accent-soft); color: var(--accent); }
.badge--muted   { background: #f2efe9; color: var(--ink-faint); }

.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--card); color: var(--ink); font-size: .85rem; font-weight: 500;
  font-family: inherit; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #f6f2ec; text-decoration: none; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn--primary:hover { background: #6a2531; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--dark:hover { background: #2b2420; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-faint); }
.btn--ghost:hover { background: rgba(0,0,0,.04); }
.btn--danger { color: var(--danger); border-color: #eccfcf; }
.btn--danger:hover { background: var(--danger-soft); }
.btn--small { padding: 5px 10px; font-size: .78rem; }
.btn--block { width: 100%; }
form.button_to { display: inline; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  padding: 6px 12px; border-radius: 999px; font-size: .82rem; color: var(--ink-soft);
  background: var(--card); border: 1px solid var(--line);
}
.tab:hover { text-decoration: none; background: #f6f2ec; }
.tab.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab .count { opacity: .65; margin-left: 4px; }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

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

.form { max-width: 780px; }
.form--wide { max-width: none; }
.field { margin-bottom: 14px; }
.field > label, .field-label {
  display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 5px;
}
.field input[type=text], .field input[type=email], .field input[type=password],
.field input[type=tel], .field input[type=number], .field input[type=date],
.field input[type=datetime-local], .field input[type=search], .field input[type=file],
.field select, .field textarea, .input {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--card); font-size: .9rem;
  font-family: inherit; color: var(--ink);
}
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.field__hint { font-size: .75rem; color: var(--ink-faint); margin-top: 4px; }
.field--check { display: flex; align-items: center; gap: 8px; }
.field--check label { margin: 0; font-weight: 500; }
.field--check input { width: auto; }
.field-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
fieldset { border: 0; padding: 0; margin: 0 0 22px; }
legend { font-family: var(--serif); font-size: 1.05rem; padding: 0 0 10px; }

.errors {
  background: var(--danger-soft); border: 1px solid #f0cccc; color: var(--danger);
  border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; font-size: .85rem;
}
.errors ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Measurements ---------- */

.measure-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.measure-field label { font-size: .72rem; color: var(--ink-faint); display: block; margin-bottom: 3px; }
.measure-field input { width: 100%; padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font-family: inherit; }
.measure-list { display: grid; gap: 8px 18px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin: 0; }
.measure-list > div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted var(--line-strong); padding-bottom: 3px; font-size: .85rem; }
.measure-list dt { color: var(--ink-faint); }
.measure-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Misc ---------- */

.blank { text-align: center; padding: 32px 16px; color: var(--ink-faint); }
.blank p { margin: 0 0 14px; }

.meta-list { display: grid; gap: 10px 20px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; }
.meta-list dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); }
.meta-list dd { margin: 2px 0 0; font-size: .9rem; }

.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress__bar { height: 100%; background: var(--accent); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); position: relative; font-size: .85rem; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.timeline li.is-done::before { background: var(--success); }

.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.day { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; min-height: 140px; }
.day.is-today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.day__label { font-size: .72rem; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
.day__date { font-family: var(--serif); font-size: 1.1rem; }
.event { display: block; font-size: .74rem; padding: 4px 6px; border-radius: 4px; margin-top: 5px; background: var(--info-soft); color: var(--info); }
.event--deadline { background: var(--danger-soft); color: var(--danger); }
.event--fitting { background: var(--warning-soft); color: var(--warning); }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: .85rem; }
.bar-row__label { width: 130px; flex: 0 0 130px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row__track { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-row__fill { height: 100%; background: var(--gold); }
.bar-row__value { width: 100px; text-align: right; font-variant-numeric: tabular-nums; }

/* Column chart: monthly takings */
.bars { display: flex; align-items: flex-end; gap: 10px; padding-top: 8px; }
.bars__item { flex: 1; text-align: center; min-width: 0; }
.bars__col { height: 130px; display: flex; align-items: flex-end; }
.bars__fill {
  width: 100%; background: var(--accent); border-radius: 4px 4px 0 0;
  min-height: 3px; transition: height .2s ease;
}
.bars__item:last-child .bars__fill { background: var(--gold); }
.bars__label { font-size: .72rem; color: var(--ink-faint); margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }
.bars__value { font-size: .7rem; font-variant-numeric: tabular-nums; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.gauge { text-align: center; padding: 10px 0 4px; }
.gauge__value { font-family: var(--serif); font-size: 2.6rem; line-height: 1; }
.gauge__label { font-size: .82rem; color: var(--ink-faint); margin: 6px 0 14px; }

.meter { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter--slim { height: 5px; margin-top: 6px; }
.meter__fill { height: 100%; background: var(--gold); border-radius: 999px; }

.thumb { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.thumb-row { display: flex; gap: 8px; flex-wrap: wrap; }

.muted { color: var(--ink-faint); }
.small { font-size: .8rem; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.mt { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }

/* Small standalone pieces used by the tenant/staff screens */

.pill {
  display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px;
  background: var(--info-soft); color: var(--info); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; vertical-align: middle;
}

.notice-card {
  background: var(--warning-soft); border: 1px solid #eddcb4; color: #6f4d0c;
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 18px; font-size: .85rem;
}

.choice-list { display: grid; gap: 8px; }
.choice {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--card); cursor: pointer;
}
.choice:hover { background: #f9f6f1; }
.choice.is-selected, .choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { width: auto; margin-top: 3px; }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--ink-faint); font-size: .78rem; }

.sidebar__user { padding: 10px 10px 0; line-height: 1.3; }
.sidebar__user-name { display: block; font-size: .8rem; color: #efe8de; }
.sidebar__user-role { display: block; font-size: .7rem; color: #a99e91; }
.brand__logo { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: #fff; }

/* ---------- Subscription banner & billing ---------- */

.subbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 24px; font-size: .85rem;
  border-bottom: 1px solid var(--line);
  background: var(--info-soft); color: var(--info);
}
.subbar__text { flex: 1; min-width: 220px; }
.subbar__hint { font-size: .78rem; opacity: .8; }
.subbar--grace { background: var(--warning-soft); color: #6f4d0c; border-color: #eddcb4; }
.subbar--locked, .subbar--cancelled { background: var(--danger-soft); color: var(--danger); border-color: #f0cccc; }

.steps { margin: 0 0 16px; padding-left: 20px; font-size: .88rem; }
.steps li { margin-bottom: 5px; }

.plain-list { margin: 0; padding-left: 18px; }
.plain-list li { margin-bottom: 7px; }

.table--plain td { border-bottom: 1px dotted var(--line); padding: 8px 0; }
.table--plain tr:last-child td { border-bottom: 0; }

.plan-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 12px; }
.plan { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 16px; background: var(--paper); }
.plan--best { border-color: var(--accent); background: var(--accent-soft); }
.plan__name { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-faint); margin-bottom: 6px; }
.plan__price { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; }
.plan__meta { font-size: .78rem; color: var(--ink-faint); margin-bottom: 12px; }

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

.auth-body { background: var(--ink); display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.auth { width: 100%; max-width: 380px; }
.auth--wide { max-width: 560px; }
.auth-card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: 0 24px 60px -30px rgba(0,0,0,.6); }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-card p.sub { color: var(--ink-faint); font-size: .85rem; margin: 0 0 20px; }
.auth-card .form { max-width: none; }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: .85rem; color: var(--ink-faint); }

/* ---------- Print sheets ---------- */

.print-body { background: #e9e5de; padding: 20px; }
.print-bar { max-width: 800px; margin: 0 auto 14px; display: flex; justify-content: space-between; }
.sheet {
  max-width: 800px; margin: 0 auto; background: #fff; padding: 44px;
  box-shadow: var(--shadow); border-radius: 4px;
}
.sheet__head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 22px; }
.sheet__title { font-family: var(--serif); font-size: 1.6rem; }
.sheet h1 { font-size: 1.5rem; }
.sheet .table th, .sheet .table td { padding: 8px 6px; }
.totals { margin-left: auto; width: 280px; }
.totals > div { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--line); }
.totals > div.grand { border-bottom: 0; border-top: 2px solid var(--ink); font-weight: 700; font-size: 1.05rem; }

@media print {
  .no-print { display: none !important; }
  .print-body { background: #fff; padding: 0; }
  .sheet { box-shadow: none; max-width: none; padding: 0; }
  body { font-size: 12px; }
}

/* ---------- Responsive ----------
   Three shapes: laptop/desktop (sidebar), iPad (narrow icon rail), phone
   (bottom tab bar and tables that become cards). */

/* --- iPad landscape and small laptops --- */
@media (max-width: 1180px) {
  .content { padding: 20px; }
  .grid--4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
}

/* --- iPad portrait: collapse the sidebar to an icon rail --- */
@media (min-width: 761px) and (max-width: 1024px) {
  .sidebar { width: 68px; flex: 0 0 68px; padding: 16px 8px; align-items: center; }
  .brand__text, .sidebar__user { display: none; }
  .nav__link { flex-direction: column; gap: 3px; font-size: .6rem; padding: 8px 4px; text-align: center; }
  .nav__link span:not(.nav__icon) { line-height: 1.1; }
  .nav__icon { width: auto; font-size: 1.05rem; }
  .sidebar__foot { width: 100%; }
  .grid--2 { grid-template-columns: 1fr; }
  .topbar { padding: 12px 16px; }
}

/* --- Phones: bottom navigation, stacked everything --- */
@media (max-width: 760px) {
  body { font-size: 16px; }

  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: fixed; bottom: 0; left: 0; top: auto;
    order: 2; flex-direction: row; align-items: center; gap: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    overflow-x: auto; z-index: 30; border-top: 1px solid rgba(255,255,255,.1);
  }
  .sidebar::-webkit-scrollbar { display: none; }
  .brand, .sidebar__user { display: none; }
  .nav, .sidebar__foot { flex-direction: row; gap: 2px; border: 0; padding-top: 0; }
  .nav__link {
    flex-direction: column; gap: 2px; font-size: .62rem; padding: 7px 11px;
    min-width: 58px; text-align: center; white-space: nowrap;
  }
  .nav__icon { font-size: 1.05rem; }

  .main { order: 1; padding-bottom: 72px; }
  .content { padding: 14px; }
  .topbar { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .topbar__search { order: 3; max-width: none; flex-basis: 100%; }
  .topbar__actions { margin-left: auto; }
  .user__name { display: none; }
  .flashes { padding: 10px 14px 0; }
  .subbar { padding: 10px 14px; }

  h1 { font-size: 1.4rem; }
  .page-head { margin-bottom: 16px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }

  /* Comfortable thumb targets */
  .btn { padding: 11px 16px; }
  .btn--small { padding: 8px 12px; }
  .field input, .field select, .field textarea, .input { padding: 12px; font-size: 16px; }
  .tab { padding: 9px 14px; }

  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 13px; }
  .stat__value { font-size: 1.4rem; }
  .field-row { grid-template-columns: 1fr; }
  .form-actions { position: sticky; bottom: 68px; background: var(--paper); z-index: 5; }
  .form-actions .btn { flex: 1; }

  /* Tables become stacked cards — no sideways scrolling on a phone */
  .table--cards thead { display: none; }
  .table--cards tbody tr {
    display: block; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 10px 12px; margin: 10px; background: var(--card);
  }
  .table--cards tbody tr:hover { background: var(--card); }
  .table--cards td {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 5px 0; border: 0; text-align: right;
  }
  .table--cards td:first-child { text-align: left; display: block; font-size: 1rem; }
  .table--cards td[data-label]::before {
    content: attr(data-label); font-size: .7rem; text-transform: uppercase;
    letter-spacing: .06em; color: var(--ink-faint); text-align: left; flex: 0 0 auto;
  }
  .table--cards .row-sub { text-align: left; }

  .week { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .sheet { padding: 18px; }
  .totals { width: 100%; }
  .measure-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 380px) {
  .grid--4 { grid-template-columns: 1fr; }
  .nav__link { min-width: 52px; padding: 7px 8px; }
}
