/* =============================================================================
   TikTok Coins (release faadumo71)
   Executive redesigned layout matching TikTok Coins page.jpg.
   Every rule is scoped strictly inside .tc-root (and .dark .tc-root).
   ============================================================================= */

.tc-root {
  --tc-surface: #ffffff;
  --tc-canvas: #f8fafc;
  --tc-ink: #0f172a;
  --tc-text: #1e293b;
  --tc-muted: #64748b;
  --tc-faint: #94a3b8;
  --tc-line: #e2e8f0;
  --tc-line-soft: #f1f5f9;
  --tc-brand: #dc2626;
  --tc-brand-deep: #b91c1c;
  --tc-brand-soft: #fef2f2;
  --tc-profit-border: #ef4444;
  --tc-good: #15803d;
  --tc-good-soft: #dcfce7;
  --tc-amber: #b45309;
  --tc-amber-ink: #92400e;
  --tc-amber-soft: #fef3c7;
  --tc-indigo: #3730a3;
  --tc-indigo-soft: #eef2ff;
  --tc-bad: #dc2626;
  --tc-bad-soft: #fee2e2;
  --tc-total-bg: #fdf6f2;
  --tc-total-line: #f3e6df;
  --tc-apply-bg: #111827;
  --tc-apply-hover: #1f2937;
  --tc-apply-ink: #ffffff;
  --tc-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --tc-radius: 16px;

  color: var(--tc-text);
  font-size: 14px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.dark .tc-root {
  --tc-surface: #0f172a;
  --tc-canvas: #111c33;
  --tc-ink: #f8fafc;
  --tc-text: #e2e8f0;
  --tc-muted: #94a3b8;
  --tc-faint: #64748b;
  --tc-line: #1e293b;
  --tc-line-soft: #16213a;
  --tc-brand: #ef4444;
  --tc-brand-deep: #dc2626;
  --tc-brand-soft: rgba(239, 68, 68, 0.14);
  --tc-profit-border: #f87171;
  --tc-good: #34d399;
  --tc-good-soft: rgba(52, 211, 153, 0.16);
  --tc-amber: #fbbf24;
  --tc-amber-ink: #fcd34d;
  --tc-amber-soft: rgba(251, 191, 36, 0.16);
  --tc-indigo: #a5b4fc;
  --tc-indigo-soft: rgba(129, 140, 248, 0.16);
  --tc-bad: #f87171;
  --tc-bad-soft: rgba(248, 113, 113, 0.16);
  --tc-total-bg: rgba(239, 68, 68, 0.08);
  --tc-total-line: rgba(248, 113, 113, 0.22);
  --tc-apply-bg: #f8fafc;
  --tc-apply-hover: #e2e8f0;
  --tc-apply-ink: #0f172a;
  --tc-shadow: 0 1px 3px rgba(0, 0, 0, 0.34);
}

.tc-root *,
.tc-root *::before,
.tc-root *::after { box-sizing: border-box; }
.tc-root h2,
.tc-root h3,
.tc-root p { margin: 0; }
.tc-root button,
.tc-root input,
.tc-root select { font: inherit; color: inherit; }

/* ---------- helpers ---------- */
.tc-root .tc-ico-xs { width: 14px; height: 14px; flex: none; }
.tc-root .tc-ico-sm { width: 16px; height: 16px; flex: none; }
.tc-root .tc-ico { width: 21px; height: 21px; flex: none; }
.tc-root .tc-ico-lg { width: 34px; height: 34px; flex: none; color: var(--tc-faint); }
.tc-root .tc-muted { color: var(--tc-muted); }
.tc-root .tc-faint { color: var(--tc-faint); }
.tc-root .tc-sub { font-size: 12.5px; }
.tc-root .tc-num { font-variant-numeric: tabular-nums; }
.tc-root .tc-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.tc-root .tc-loss-text { color: var(--tc-bad); }
.tc-root .tc-spin { animation: tc-spin 0.9s linear infinite; }
@keyframes tc-spin { to { transform: rotate(360deg); } }

/* ---------- buttons ---------- */
.tc-root .tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 16px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s, border-color 0.14s, box-shadow 0.14s, opacity 0.14s;
}
.tc-root .tc-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tc-root .tc-btn--sm { height: 34px; padding: 0 13px; font-size: 12.5px; border-radius: 9px; }
.tc-root .tc-btn--primary {
  background: var(--tc-brand);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.26);
}
.tc-root .tc-btn--primary:hover:not(:disabled) { background: var(--tc-brand-deep); }
.tc-root .tc-btn--ghost {
  background: var(--tc-surface);
  border-color: var(--tc-line);
  color: var(--tc-ink);
  box-shadow: var(--tc-shadow);
}
.tc-root .tc-btn--ghost:hover:not(:disabled) { background: var(--tc-line-soft); }
.tc-root .tc-btn--apply {
  height: 36px;
  padding: 0 18px;
  border-radius: 10px;
  background: var(--tc-apply-bg);
  color: var(--tc-apply-ink);
  font-weight: 700;
}
.tc-root .tc-btn--apply:hover:not(:disabled) { background: var(--tc-apply-hover); }
.tc-root .tc-btn--danger { background: var(--tc-bad); color: #ffffff; }

.tc-root .tc-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--tc-muted);
  cursor: pointer;
  flex: none;
}
.tc-root .tc-icon-btn:hover:not(:disabled) { background: var(--tc-line-soft); color: var(--tc-ink); }

.tc-root .tc-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--tc-brand);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.tc-root .tc-link:hover { text-decoration: underline; }

.tc-root .tc-btn:focus-visible,
.tc-root .tc-icon-btn:focus-visible,
.tc-root .tc-time-pill:focus-visible,
.tc-root .tc-select:focus-visible,
.tc-root .tc-action-btn:focus-visible,
.tc-root .tc-preset:focus-visible {
  outline: 2px solid var(--tc-brand);
  outline-offset: 2px;
}

/* ---------- A. page header row ---------- */
.tc-root .tc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.tc-root .tc-head-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tc-root .tc-head-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tc-root .tc-head-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--tc-amber-soft);
  color: var(--tc-amber);
  flex: none;
}
.tc-root .tc-title-badge-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-root .tc-head-title h2 {
  font-size: 23px;
  font-weight: 800;
  color: var(--tc-ink);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.tc-root .tc-head-title p { font-size: 13px; }
.tc-root .tc-rate-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tc-good-soft);
  color: var(--tc-good);
  font-size: 11.5px;
  font-weight: 800;
  white-space: nowrap;
}
.tc-root .tc-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- B. time filter bar ---------- */
.tc-root .tc-timebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-radius: var(--tc-radius);
  background: var(--tc-surface);
  border: 1px solid var(--tc-line);
  box-shadow: var(--tc-shadow);
}
.tc-root .tc-time-pills { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.tc-root .tc-time-pill {
  height: 36px;
  padding: 0 15px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--tc-text);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.14s, color 0.14s;
}
.tc-root .tc-time-pill:hover:not(.is-active) { background: var(--tc-line-soft); color: var(--tc-ink); }
.tc-root .tc-time-pill.is-active {
  background: var(--tc-brand);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22);
}

.tc-root .tc-time-pickers { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-root .tc-select-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 6px 0 12px;
  border-radius: 10px;
  background: var(--tc-canvas);
  border: 1px solid var(--tc-line);
}
.tc-root .tc-select-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--tc-muted);
  white-space: nowrap;
}
.tc-root .tc-select {
  height: 28px;
  padding: 0 8px 0 8px;
  border-radius: 7px;
  border: 1px solid var(--tc-line);
  background: var(--tc-surface);
  color: var(--tc-ink);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  outline: 0;
}

/* ---------- setup & error banners ---------- */
.tc-root .tc-setup {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--tc-radius);
  background: var(--tc-amber-soft);
  border: 1px solid var(--tc-amber);
  flex-wrap: wrap;
}
.tc-root .tc-setup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--tc-surface);
  color: var(--tc-amber);
  flex: none;
}
.tc-root .tc-setup-body { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 4px; }
.tc-root .tc-setup-body h3 { font-size: 15px; font-weight: 800; color: var(--tc-ink); }
.tc-root .tc-setup-body code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--tc-surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--tc-ink);
}
.tc-root .tc-error {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--tc-bad-soft);
  color: var(--tc-bad);
  font-weight: 600;
  font-size: 13px;
}
.tc-root .tc-error span { flex: 1; }

/* ---------- C. 3 KPI summary cards ---------- */
.tc-root .tc-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.tc-root .tc-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border-radius: var(--tc-radius);
  background: var(--tc-surface);
  border: 1px solid var(--tc-line);
  box-shadow: var(--tc-shadow);
  min-width: 0;
}
.tc-root .tc-kpi--profit { border: 1.5px solid var(--tc-profit-border); }
.tc-root .tc-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-root .tc-kpi-label {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--tc-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tc-root .tc-kpi-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.tc-root .tc-kpi-ico--gold { background: var(--tc-amber-soft); color: var(--tc-amber); }
.tc-root .tc-kpi-ico--indigo { background: var(--tc-indigo-soft); color: var(--tc-indigo); }
.tc-root .tc-kpi-ico--green { background: var(--tc-good-soft); color: var(--tc-good); }
.tc-root .tc-kpi-value {
  font-size: 30px;
  font-weight: 900;
  color: var(--tc-ink);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.tc-root .tc-kpi-sub { font-size: 12.5px; font-weight: 600; color: var(--tc-muted); }

/* ---------- empty & loading states ---------- */
.tc-root .tc-state,
.tc-root .tc-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 16px;
  border-radius: var(--tc-radius);
  background: var(--tc-surface);
  border: 1px solid var(--tc-line);
  color: var(--tc-muted);
  font-weight: 600;
  text-align: center;
}
.tc-root .tc-empty { flex-direction: column; border-style: dashed; font-weight: 500; }
.tc-root .tc-empty strong { color: var(--tc-ink); font-size: 15px; }
.tc-root .tc-empty-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- D. simplified 5-column table & bottom Total bar ---------- */
.tc-root .tc-table-card {
  border-radius: var(--tc-radius);
  background: var(--tc-surface);
  border: 1px solid var(--tc-line);
  box-shadow: var(--tc-shadow);
  overflow: hidden;
}
.tc-root .tc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tc-root .tc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}
.tc-root .tc-table th,
.tc-root .tc-table td {
  padding: 15px 18px;
  text-align: left;
  vertical-align: middle;
}
.tc-root .tc-table thead th {
  padding-top: 13px;
  padding-bottom: 13px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--tc-muted);
  background: var(--tc-surface);
  border-bottom: 1px solid var(--tc-line-soft);
  white-space: nowrap;
}
.tc-root .tc-table tbody td { border-bottom: 1px solid var(--tc-line-soft); }
.tc-root .tc-table tbody tr:last-child td { border-bottom: 0; }
.tc-root .tc-table tbody tr:hover { background: var(--tc-canvas); }

.tc-root .tc-col-idx { width: 56px; padding-left: 22px; font-weight: 600; }
.tc-root .tc-cell-date { font-weight: 600; color: var(--tc-ink); white-space: nowrap; }

.tc-root .tc-coins-pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--tc-amber-soft);
  color: var(--tc-amber-ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.tc-root .tc-cell-money {
  font-size: 14.5px;
  font-weight: 800;
  color: var(--tc-ink);
  white-space: nowrap;
}

.tc-root .tc-profit-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 999px;
  background: var(--tc-good-soft);
  color: var(--tc-good);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.tc-root .tc-profit-pill small { font-size: 11.5px; font-weight: 700; opacity: 0.9; }
.tc-root .tc-profit-pill.is-loss { background: var(--tc-bad-soft); color: var(--tc-bad); }

.tc-root .tc-col-actions { width: 108px; text-align: right; padding-right: 22px; }
.tc-root .tc-row-actions { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; }
.tc-root .tc-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--tc-line);
  background: var(--tc-surface);
  color: var(--tc-muted);
  cursor: pointer;
  transition: background-color 0.14s, border-color 0.14s, color 0.14s;
}
.tc-root .tc-action-btn:hover { background: var(--tc-line-soft); border-color: var(--tc-faint); color: var(--tc-ink); }
.tc-root .tc-action-btn--danger:hover {
  background: var(--tc-bad-soft);
  border-color: rgba(220, 38, 38, 0.35);
  color: var(--tc-bad);
}

/* Bottom Total Bar */
.tc-root .tc-totals-row td {
  background: var(--tc-total-bg);
  border-top: 1px solid var(--tc-total-line);
  border-bottom: 0;
  padding-top: 15px;
  padding-bottom: 15px;
  font-size: 14px;
  font-weight: 800;
  color: var(--tc-ink);
}
.tc-root .tc-total-label { font-weight: 800; color: var(--tc-ink); }
.tc-root .tc-total-coins { font-weight: 800; color: var(--tc-ink); white-space: nowrap; }
.tc-root .tc-total-money { font-size: 14.5px; font-weight: 800; color: var(--tc-ink); white-space: nowrap; }

/* ---------- modals & forms ---------- */
.tc-root .tc-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(2px);
}
.tc-root .tc-dialog {
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--tc-surface);
  border: 1px solid var(--tc-line);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.32);
  overflow: hidden;
}
.tc-root .tc-dialog--sale { max-width: 520px; }
.tc-root .tc-dialog--md { max-width: 490px; }
.tc-root .tc-dialog--sm { max-width: 400px; padding: 22px; align-items: center; text-align: center; gap: 8px; }
.tc-root .tc-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--tc-line);
}
.tc-root .tc-dialog-title-wrap { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tc-root .tc-dialog-title { font-size: 17px; font-weight: 800; color: var(--tc-ink); }
.tc-root .tc-dialog-body { display: flex; flex-direction: column; gap: 15px; padding: 18px 20px; overflow-y: auto; }
.tc-root .tc-dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 13px 20px;
  border-top: 1px solid var(--tc-line);
  background: var(--tc-canvas);
}
.tc-root .tc-dialog-foot--split { justify-content: space-between; flex-wrap: wrap; }
.tc-root .tc-foot-right { display: flex; gap: 8px; }

.tc-root .tc-confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: var(--tc-bad-soft);
  color: var(--tc-bad);
}
.tc-root .tc-confirm-text { font-size: 13px; overflow-wrap: anywhere; }
.tc-root .tc-confirm-actions { display: flex; gap: 8px; margin-top: 8px; }

.tc-root .tc-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tc-root .tc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tc-root .tc-label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tc-root .tc-label { font-size: 12.5px; font-weight: 800; color: var(--tc-ink); }
.tc-root .tc-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--tc-line);
  background: var(--tc-surface);
  color: var(--tc-ink);
  font-size: 13.5px;
  outline: 0;
}
.tc-root .tc-input:focus { border-color: var(--tc-brand); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12); }
.tc-root .tc-input::placeholder { color: var(--tc-faint); }

/* Quick package chips */
.tc-root .tc-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.tc-root .tc-preset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--tc-line);
  background: var(--tc-canvas);
  color: var(--tc-ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.tc-root .tc-preset strong { font-weight: 800; }
.tc-root .tc-preset-dot { opacity: 0.45; }
.tc-root .tc-preset:hover { border-color: var(--tc-amber); background: var(--tc-amber-soft); color: var(--tc-amber-ink); }
.tc-root .tc-preset.is-active {
  border-color: var(--tc-brand);
  background: var(--tc-brand);
  color: #ffffff;
}

/* Live profit preview box */
.tc-root .tc-profit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--tc-line);
  background: var(--tc-canvas);
  font-size: 13px;
}
.tc-root .tc-profit-box.is-good {
  border-color: rgba(21, 128, 61, 0.28);
  background: var(--tc-good-soft);
  color: var(--tc-good);
}
.tc-root .tc-profit-box.is-loss {
  border-color: rgba(220, 38, 38, 0.35);
  background: var(--tc-bad-soft);
  color: var(--tc-bad);
}
.tc-root .tc-profit-main { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.tc-root .tc-profit-sub { font-size: 12px; font-weight: 600; opacity: 0.9; }
.tc-root .tc-rate-preview-list { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }

.tc-root .tc-form-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--tc-bad-soft);
  color: var(--tc-bad);
  font-size: 13px;
  font-weight: 600;
}

/* ---------- toasts ---------- */
.tc-root .tc-toasts {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 210;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: calc(100vw - 32px);
}
.tc-root .tc-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 9px 9px 13px;
  border-radius: 12px;
  background: var(--tc-ink);
  color: var(--tc-surface);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  animation: tc-toast-in 0.18s ease-out;
}
.tc-root .tc-toast .tc-icon-btn { color: inherit; opacity: 0.75; width: 26px; height: 26px; }
.tc-root .tc-toast--success svg:first-child { color: #34d399; }
.tc-root .tc-toast--error svg:first-child { color: #f87171; }
@keyframes tc-toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tc-root .tc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .tc-root .tc-kpi { padding: 16px 16px; }
  .tc-root .tc-kpi-value { font-size: 24px; }
}

@media (max-width: 680px) {
  .tc-root .tc-kpis { grid-template-columns: 1fr; }
  .tc-root .tc-head-actions { width: 100%; }
  .tc-root .tc-head-actions .tc-btn { flex: 1; }
  .tc-root .tc-timebar { flex-direction: column; align-items: stretch; }
  .tc-root .tc-time-pickers { justify-content: space-between; }
  .tc-root .tc-select-group { flex: 1; justify-content: space-between; }
  .tc-root .tc-grid-2 { grid-template-columns: 1fr; }
  .tc-root .tc-overlay { align-items: flex-end; padding: 0; }
  .tc-root .tc-dialog { max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .tc-root .tc-dialog--sm { border-radius: 18px; margin: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .tc-root .tc-spin,
  .tc-root .tc-toast { animation: none; }
}
