/* ===== Design tokens ===== */
:root {
  /* Palette — forest green on warm off-white; high contrast, legible in sun */
  --bg:            #f4f5f1;
  --surface:       #ffffff;
  --text:          #1c1c1c;
  --text-muted:    #556055;
  --accent:        #2d6a2d;
  --accent-light:  #e5f0e5;
  --danger:        #c0392b;
  --border:        #d0d8cc;

  /* Layout */
  --header-h:    52px;
  --tab-h:       60px;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* Touch & spacing */
  --touch:  48px;
  --radius: 8px;
  --gap:    16px;
}

/* ===== Reset ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] { display: none !important; }

html { height: 100%; }

body {
  height: 100%;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

/* ===== Focus ===== */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===== App header ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) var(--gap) 0;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.app-title {
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.375rem;
  min-width: var(--touch);
  min-height: var(--touch);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: var(--radius);
  line-height: 1;
}

.header-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Sync pending count badge */
.sync-badge {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

/* ===== Main screen area ===== */
.screen {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--gap);
}

/* When signed in, screen sits between header and tab bar */
body.signed-in .screen {
  top: calc(var(--header-h) + var(--safe-top));
  bottom: calc(var(--tab-h) + var(--safe-bottom));
}

/* ===== Tab bar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

.tab {
  flex: 1;
  min-height: var(--touch);
  background: none;
  border: none;
  border-top: 2px solid transparent;
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.1s;
}

.tab[aria-current="page"] {
  color: var(--accent);
  font-weight: 700;
  border-top-color: var(--accent);
}

.tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

/* ===== Auth screen ===== */
.auth-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  gap: 20px;
  padding: 40px var(--gap);
  text-align: center;
}

.auth-logo {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.auth-tagline {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 28ch;
}

.auth-error {
  color: var(--danger);
  font-size: 0.9375rem;
  max-width: 32ch;
  padding: 12px 16px;
  background: #fdf2f2;
  border-radius: var(--radius);
  border: 1px solid #f5c6c6;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch);
  padding: 0 24px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.1s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  max-width: 320px;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  width: 100%;
}

/* ===== Settings sheet ===== */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 12px var(--gap) calc(var(--gap) + var(--safe-bottom));
  z-index: 201;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 -2px 16px rgba(0,0,0,0.12);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.sheet-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.settings-rows {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 28px;
}

.settings-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}

.settings-row:first-child {
  border-top: 1px solid var(--border);
}

.settings-row dt {
  color: var(--text-muted);
  font-weight: 500;
}

.settings-row dd {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ===== Screen toolbar (sticky search + action button) ===== */
.screen-toolbar {
  position: sticky;
  top: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  z-index: 10;
}

.search-input {
  flex: 1;
  min-width: 0;
  height: var(--touch);
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  -webkit-appearance: none;
}

.search-input:focus {
  border-color: var(--accent);
  outline: none;
}

.btn-add {
  width: var(--touch);
  height: var(--touch);
  min-width: var(--touch);
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===== Item list (clients, jobs, etc.) ===== */
.item-list {
  list-style: none;
  margin: 0 calc(-1 * var(--gap));
}

.item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--gap);
  min-height: 56px;
  gap: var(--gap);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.item-row:first-child {
  border-top: 1px solid var(--border);
}

.item-row:active {
  background: var(--accent-light);
}

.item-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.item-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ===== Empty state ===== */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px var(--gap);
  font-size: 0.9375rem;
}

/* ===== Detail view ===== */
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.detail-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.2;
}

.detail-dl {
  margin-bottom: 20px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: var(--gap);
}

.detail-row:first-child {
  border-top: 1px solid var(--border);
}

.detail-row dt {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  flex-shrink: 0;
  min-width: 72px;
}

.detail-row dd {
  text-align: right;
  word-break: break-word;
  font-size: 0.9375rem;
}

.detail-section {
  margin-top: 24px;
}

.detail-section h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.detail-notes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.9375rem;
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ===== Back / text buttons ===== */
.btn-back {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.btn-text {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0;
  cursor: pointer;
  text-align: right;
}

/* ===== Client form ===== */
.form-header {
  position: sticky;
  top: 0;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  z-index: 10;
}

.form-header h2 {
  font-size: 1rem;
  font-weight: 700;
}

.client-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 40px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.field input,
.field textarea {
  width: 100%;
  min-height: var(--touch);
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  -webkit-appearance: none;
}

.field textarea {
  min-height: 80px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  outline: none;
}

.field input.invalid {
  border-color: var(--danger);
}

.field-error {
  color: var(--danger);
  font-size: 0.875rem;
}

/* ===== Screen placeholder (Phase 0 stubs) ===== */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ===== Detail section with action button ===== */
.detail-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.detail-section-hdr h3 {
  margin-bottom: 0;
}

.btn-new-job {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  min-height: 36px;
  padding: 0;
  cursor: pointer;
}

/* ===== Job rows (in client detail) ===== */
.job-list {
  margin-top: 0;
}

.job-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap);
  padding: 12px var(--gap);
  min-height: 60px;
}

.job-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.job-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.job-desc {
  font-size: 0.9375rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.job-price {
  font-size: 0.9375rem;
  font-weight: 600;
}

.job-status {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 10px;
}

.status-paid      { background: #d4edda; color: #1a5e2a; }
.status-done      { background: #fef9e7; color: #7a5c00; }
.status-scheduled { background: var(--accent-light); color: var(--accent); }
.status-part      { background: #fde8d8; color: #954500; }

/* ===== Job form specific ===== */
.field-display {
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  color: var(--text);
  min-height: var(--touch);
  display: flex;
  align-items: center;
  opacity: 0.75;
}

.form-more {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.form-more-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  padding: 14px;
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
  min-height: var(--touch);
  -webkit-tap-highlight-color: transparent;
}

.form-more-summary::-webkit-details-marker { display: none; }

.form-more-summary::after {
  content: '›';
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.15s;
  display: inline-block;
}

.form-more[open] .form-more-summary::after {
  transform: rotate(90deg);
}

.form-more-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.field-row {
  display: flex;
  gap: 12px;
}

.field-row .field {
  flex: 1;
  min-width: 0;
}

.btn-calc {
  background: var(--accent-light);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

/* ===== Costs section ===== */
.field-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}

.costs-existing {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.cost-existing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.9375rem;
  border-bottom: 1px solid var(--border);
  gap: var(--gap);
  color: var(--text-muted);
}

.cost-existing:last-child { border-bottom: none; }

.cost-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cost-desc {
  flex: 1;
  min-width: 0;
  height: var(--touch);
  padding: 0 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9375rem;
  font-family: inherit;
  -webkit-appearance: none;
}

.cost-amount {
  width: 88px;
  flex-shrink: 0;
  height: var(--touch);
  padding: 0 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.9375rem;
  font-family: inherit;
  -webkit-appearance: none;
}

.cost-desc:focus,
.cost-amount:focus {
  border-color: var(--accent);
  outline: none;
}

.cost-remove {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-add-cost {
  background: none;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  height: var(--touch);
  cursor: pointer;
  width: 100%;
}

/* ===== Paid checkbox ===== */
.field-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 500;
  padding: 4px 0;
  cursor: pointer;
  min-height: var(--touch);
}

.field-checkbox input[type="checkbox"] {
  width: 22px;
  height: 22px;
  border: 2px solid var(--border);
  border-radius: 5px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
}

/* ===== Owed screen ===== */
.owed-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--accent);
  color: #fff;
  padding: 16px var(--gap);
  border-radius: var(--radius);
  margin-bottom: 20px;
  margin-left: calc(-1 * var(--gap));
  margin-right: calc(-1 * var(--gap));
  margin-top: calc(-1 * var(--gap));
}

.owed-total-label {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.85;
}

.owed-total-amount {
  font-size: 1.5rem;
  font-weight: 700;
}

.owed-list {
  list-style: none;
  margin: 0 calc(-1 * var(--gap));
}

.owed-client-item {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.owed-client-item:first-child {
  border-top: 1px solid var(--border);
}

.owed-client-row {
  width: 100%;
  background: none;
  border: none;
  padding: 0 var(--gap);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.owed-client-row:active {
  background: var(--accent-light);
}

.owed-client-name {
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owed-client-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.owed-amount {
  font-weight: 700;
  color: var(--text);
}

.owed-age {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.owed-chevron {
  color: var(--text-muted);
  font-size: 1.125rem;
  display: inline-block;
  transition: transform 0.15s;
}

.owed-jobs {
  list-style: none;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.owed-job {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--gap);
  border-bottom: 1px solid var(--border);
}

.owed-job:last-child { border-bottom: none; }

.owed-job-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.owed-job-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.owed-job-desc {
  font-size: 0.9375rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.owed-job-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.owed-job-price,
.owed-job-balance {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.owed-job-balance {
  color: var(--text-muted);
}

.btn-mark-paid {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  height: 36px;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-mark-paid:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== Due screen ===== */
.due-section {
  margin-bottom: 28px;
}

.due-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.due-list {
  list-style: none;
  margin: 0 calc(-1 * var(--gap));
}

.due-item {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.due-item:first-child {
  border-top: 1px solid var(--border);
}

.due-row {
  width: 100%;
  background: none;
  border: none;
  padding: 14px var(--gap);
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.due-row:active {
  background: var(--accent-light);
}

.due-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.due-client {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.due-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-overdue { background: #fde8d8; color: #8b3a00; }
.badge-due     { background: #d4edda; color: #1a5e2a; }
.badge-sched   { background: var(--accent-light); color: var(--accent); }

.due-row-mid {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.due-desc {
  font-size: 0.9375rem;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.due-price {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
}

.due-row-foot {
  display: flex;
  gap: 12px;
  align-items: center;
}

.due-last {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.due-booked {
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 600;
}

.due-date-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* Floating + button */
.due-fab {
  position: fixed;
  bottom: calc(var(--tab-h) + var(--safe-bottom) + 16px);
  right: var(--gap);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  z-index: 50;
}

.due-fab:active {
  opacity: 0.85;
}

/* ===== Recurrences in client detail ===== */
.rec-list {
  margin-top: 4px;
}

.rec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
}

.rec-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rec-interval {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Interval preset buttons */
.preset-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preset-btn {
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-family: inherit;
  font-size: 0.9375rem;
  cursor: pointer;
  color: var(--text);
}

.preset-btn.preset-active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.field-custom-interval {
  width: 100%;
  min-height: var(--touch);
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  margin-top: 10px;
  -webkit-appearance: none;
}

.field-custom-interval:focus {
  border-color: var(--accent);
  outline: none;
}

/* ===== Utilities ===== */
.num {
  font-variant-numeric: tabular-nums;
}

/* ===== Motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
