/* ===========================================================================
   SteelSync Web — iOS "Liquid Glass" design system
   Brand: #FF6B35 (orange), #1B4332 (green). Minimal, mobile-first, dark-mode.
   Theme is driven by tokens that swap between light/dark; brand accent is
   constant. Manual override via html[data-theme], else prefers-color-scheme.
   =========================================================================== */

:root {
  /* Brand (constant across themes) */
  --orange: #ff6b35;
  --orange-ink: #ffffff;
  --green: #1b4332;
  --green-soft: #2d6a4f;
  --danger: #e5484d;

  /* Light theme tokens */
  --bg: #eef0ec;
  --text: #18211c;
  --text-soft: #5f6b64;
  --text-faint: #8a948d;

  --surface: rgba(255, 255, 255, 0.62);
  --surface-2: rgba(255, 255, 255, 0.45);
  --surface-strong: rgba(255, 255, 255, 0.86);
  --surface-solid: #ffffff;
  --border: rgba(20, 32, 26, 0.10);
  --border-strong: rgba(20, 32, 26, 0.16);

  --accent: var(--orange);
  --accent-tint: rgba(255, 107, 53, 0.14);
  --accent-tint-2: rgba(255, 107, 53, 0.08);

  --shadow-1: 0 1px 2px rgba(20, 30, 25, 0.06), 0 1px 0 rgba(255, 255, 255, 0.5) inset;
  --shadow-2: 0 8px 30px rgba(20, 30, 25, 0.12), 0 2px 8px rgba(20, 30, 25, 0.06);
  --shadow-pop: 0 18px 50px rgba(20, 30, 25, 0.18);

  --glass-blur: saturate(180%) blur(22px);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-pill: 999px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.28s;

  --aura-1: rgba(255, 107, 53, 0.20);
  --aura-2: rgba(45, 106, 79, 0.18);
}

/* Explicit dark + system dark (unless explicitly set to light) */
:root[data-theme="dark"] {
  --bg: #0c0e0d;
  --text: #eef1ee;
  --text-soft: #9aa39d;
  --text-faint: #6c756f;

  --surface: rgba(34, 38, 36, 0.55);
  --surface-2: rgba(40, 45, 42, 0.40);
  --surface-strong: rgba(28, 31, 30, 0.80);
  --surface-solid: #1b1e1d;
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  --accent: #ff7d4d;
  --accent-tint: rgba(255, 125, 77, 0.18);
  --accent-tint-2: rgba(255, 125, 77, 0.10);

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-2: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 22px 60px rgba(0, 0, 0, 0.6);

  --aura-1: rgba(255, 107, 53, 0.16);
  --aura-2: rgba(45, 106, 79, 0.20);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0e0d;
    --text: #eef1ee;
    --text-soft: #9aa39d;
    --text-faint: #6c756f;
    --surface: rgba(34, 38, 36, 0.55);
    --surface-2: rgba(40, 45, 42, 0.40);
    --surface-strong: rgba(28, 31, 30, 0.80);
    --surface-solid: #1b1e1d;
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);
    --accent: #ff7d4d;
    --accent-tint: rgba(255, 125, 77, 0.18);
    --accent-tint-2: rgba(255, 125, 77, 0.10);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
    --shadow-2: 0 10px 34px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-pop: 0 22px 60px rgba(0, 0, 0, 0.6);
    --aura-1: rgba(255, 107, 53, 0.16);
    --aura-2: rgba(45, 106, 79, 0.20);
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.4s var(--ease), color 0.3s var(--ease);
}

/* Brand gradient backdrop the glass blurs against. */
.bg-aura {
  position: fixed;
  inset: -20vh -10vw;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40vw 40vw at 12% 8%, var(--aura-1), transparent 60%),
    radial-gradient(45vw 45vw at 92% 14%, var(--aura-2), transparent 62%),
    radial-gradient(50vw 40vw at 70% 100%, var(--accent-tint-2), transparent 60%);
  filter: blur(10px);
  animation: aura-drift 24s ease-in-out infinite alternate;
}
@keyframes aura-drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(0, -2.5%, 0) scale(1.06); }
}

/* ---------- glass surface helper ---------- */
.surface {
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px max(20px, env(safe-area-inset-left)) 10px max(20px, env(safe-area-inset-right));
  padding-top: max(10px, env(safe-area-inset-top));
  background: var(--surface-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.brand { display: flex; align-items: baseline; gap: 7px; }
.brand-glyph { color: var(--accent); font-size: 13px; transform: translateY(-1px); }
.brand-mark { font-weight: 800; color: var(--text); letter-spacing: -0.02em; font-size: 17px; }
.brand-sub {
  color: var(--accent); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.06em;
}

/* ---------- nav (inline on desktop/tablet) ---------- */
.nav { display: flex; gap: 4px; }
.nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: 1px solid transparent;
  padding: 8px 13px;
  border-radius: var(--radius-pill);
  color: var(--text-soft);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease),
    border-color var(--dur) var(--ease), transform 0.12s var(--ease);
}
.nav-item svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: var(--text); background: var(--surface-2); }
.nav-item:active { transform: scale(0.96); }
.nav-item.active {
  background: var(--accent-tint);
  color: var(--accent);
  border-color: var(--accent-tint);
}

.auth { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.auth-status {
  color: var(--text-soft); font-size: 12px;
  max-width: 30ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------- icon button (theme toggle, steppers) ---------- */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.12s var(--ease), background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.icon-btn:hover { box-shadow: var(--shadow-1); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-sun { display: none; }
.ic-moon { display: block; }
:root[data-theme="dark"] .ic-sun { display: block; }
:root[data-theme="dark"] .ic-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ic-sun { display: block; }
  :root:not([data-theme="light"]) .ic-moon { display: none; }
}

/* ---------- layout ---------- */
#app-root {
  padding: 22px max(18px, env(safe-area-inset-left)) 40px max(18px, env(safe-area-inset-right));
  max-width: 1320px;
  margin: 0 auto;
}
.view { animation: view-in 0.4s var(--ease) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.view-header h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.view-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-label { min-width: 180px; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn-primary, .btn-secondary {
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  color: var(--text);
  transition: transform 0.12s var(--ease), box-shadow var(--dur) var(--ease),
    background-color var(--dur) var(--ease), filter var(--dur) var(--ease);
}
.btn-secondary:hover { box-shadow: var(--shadow-1); background: var(--surface-strong); }
.btn-secondary:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 92%, #fff) 0%, var(--accent) 100%);
  color: var(--orange-ink);
  border-color: transparent;
  box-shadow: 0 6px 18px var(--accent-tint), var(--shadow-1);
}
.btn-primary:hover { filter: brightness(1.04); box-shadow: 0 10px 26px var(--accent-tint); }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled {
  background: var(--surface-2);
  color: var(--text-faint);
  border-color: var(--border);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
}
.icon-only { width: 38px; height: 38px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- messages / toasts ---------- */
.message {
  background: var(--accent-tint);
  border: 1px solid var(--accent-tint);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  animation: view-in 0.3s var(--ease) both;
}
.message.error { background: rgba(229, 72, 77, 0.14); border-color: rgba(229, 72, 77, 0.3); }

/* ---------- timesheet grid ---------- */
.grid-wrap { overflow: auto; -webkit-overflow-scrolling: touch; }
.timesheet-grid {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.timesheet-grid th, .timesheet-grid td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.timesheet-grid thead th {
  background: var(--surface-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  font-weight: 700;
  color: var(--text-soft);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: sticky;
  top: 0;
  z-index: 1;
}
.timesheet-grid tbody tr { transition: background-color 0.2s var(--ease); }
.timesheet-grid tbody tr:hover { background: var(--surface-2); }
.col-day, .col-total, .col-rate, .col-perdiem { text-align: right; width: 70px; }
.col-employee { min-width: 170px; }
.col-project { min-width: 170px; }
.col-actions { width: 44px; }
.timesheet-grid tbody tr.dirty { background: var(--accent-tint-2); }
.timesheet-grid tbody tr.ts-empty td {
  color: var(--text-soft);
  text-align: center;
  padding: 28px;
}

.cell-input, .cell-select {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 6px 8px;
  border-radius: 8px;
  font: inherit;
  color: inherit;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.cell-input:focus, .cell-select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-solid);
}
.cell-input.num { text-align: right; }

.grid-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 4px 4px;
  flex-wrap: wrap;
}
.footer-totals { display: flex; gap: 20px; color: var(--text-soft); font-size: 13px; }
.footer-totals strong { color: var(--text); font-size: 15px; margin-left: 4px; }
.footer-actions { display: flex; align-items: center; gap: 12px; }
.dirty-indicator { color: var(--accent); font-size: 12px; font-weight: 600; }

.row-delete {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 17px;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background-color 0.2s var(--ease);
}
.row-delete:hover { background: rgba(229, 72, 77, 0.14); }

/* ---------- Clock In/Out (foreman flow) ---------- */
.clock-card {
  max-width: 540px;
  margin: 6px auto;
  padding: 22px;
  background: var(--surface);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow-2);
  animation: card-pop 0.42s var(--ease) both;
}
@keyframes card-pop {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.clock-card.on-break { box-shadow: var(--shadow-2), 0 0 0 1px var(--accent-tint) inset; }
.clock-card h2 { margin: 0 0 16px; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }

.clock-banner { display: flex; align-items: center; gap: 9px; font-size: 1.05rem; font-weight: 700; }
.clock-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--green-soft);
  box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.5);
  animation: pulse 2s var(--ease) infinite;
}
.clock-dot.amber { background: var(--accent); animation: pulse-amber 2s var(--ease) infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(45, 106, 79, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 106, 79, 0); }
}
@keyframes pulse-amber {
  0% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.5); }
  70% { box-shadow: 0 0 0 9px rgba(255, 107, 53, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 53, 0); }
}
.clock-project { font-size: 1.3rem; font-weight: 800; margin-top: 12px; letter-spacing: -0.01em; }
.clock-since { color: var(--text-soft); font-size: 0.9rem; }
.clock-elapsed {
  font-variant-numeric: tabular-nums;
  font-size: 2.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 8px 0;
}
.clock-breakline { color: var(--text-soft); font-size: 0.9rem; min-height: 1.1em; margin-bottom: 8px; }

.clock-field { display: block; margin-bottom: 18px; }
.clock-field > span { display: block; font-size: 0.78rem; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 8px; }
.clock-field select, #clock-project {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* ≥16px stops iOS zoom-on-focus */
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.clock-field select:focus, #clock-project:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }

.clock-crew-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 4px; }
.clock-crew-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.12s var(--ease);
}
label.clock-crew-row { cursor: pointer; }
label.clock-crew-row:active { transform: scale(0.99); }
.clock-crew-row input[type="checkbox"] {
  width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; flex: none;
}
.clock-crew-name { flex: 1; font-weight: 600; }
.clock-crew-meta { color: var(--text-soft); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.clock-actions { display: flex; gap: 12px; margin-top: 20px; }
.clock-actions .btn-primary, .clock-actions .btn-secondary { flex: 1; padding: 13px; font-size: 15px; }
.muted { color: var(--text-soft); line-height: 1.5; }

/* per-member clock-out / resume + skip-lunch toggle (parity with native) */
.clock-crew-row.off { opacity: 0.6; }
.mem-btn {
  flex: none;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background-color 0.2s var(--ease);
}
.mem-btn:active { transform: scale(0.94); }
.mem-btn.out { background: rgba(229, 72, 77, 0.14); color: var(--danger); }
.mem-btn.resume { background: var(--accent-tint); color: var(--accent); }
.clock-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 4px;
  font-weight: 600;
  cursor: pointer;
}
.clock-toggle input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); }
.clock-lunch-hint { font-size: 0.82rem; margin: 0 0 4px; }

/* ---------- debug drawer (subtle, bottom) ---------- */
#debug-panel {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  padding-bottom: env(safe-area-inset-bottom);
}
.debug-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px max(20px, env(safe-area-inset-left));
  color: var(--text-faint);
}
.debug-bar strong { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
.debug-log {
  max-height: 200px;
  overflow-y: auto;
  padding: 6px max(20px, env(safe-area-inset-left)) 12px;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text-soft);
}
.debug-log.collapsed { display: none; }
.debug-row { padding: 1px 0; }
.debug-row:nth-child(even) { background: var(--surface-2); }

/* ===========================================================================
   Responsive — iPad keeps the comfortable inline layout; phone gets an iOS
   bottom tab bar and stacked controls.
   =========================================================================== */
@media (max-width: 720px) {
  body { font-size: 15px; }

  .topbar { gap: 10px; padding-bottom: 10px; }
  .brand-sub { display: none; }
  .auth-status { max-width: 14ch; font-size: 11px; }

  /* nav becomes a floating glass tab bar pinned to the bottom */
  .nav {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 60;
    justify-content: space-around;
    gap: 4px;
    padding: 7px;
    border-radius: 22px;
    background: var(--surface-strong);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-pop);
  }
  .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 16px;
    font-size: 10.5px;
    font-weight: 600;
  }
  .nav-item svg { width: 22px; height: 22px; }
  .nav-item.active { background: var(--accent-tint); }

  /* room so content clears the floating tab bar */
  #app-root { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

  .view-header h1 { font-size: 22px; }
  .view-controls { width: 100%; }
  #ts-week-label { flex: 1; min-width: 0; }
  #ts-add-row, #ts-refresh { flex: 1; }

  .clock-card { margin: 4px 2px; padding: 18px; border-radius: 20px; }
  .clock-elapsed { font-size: 2.4rem; }

  .grid-footer { position: sticky; bottom: 0; }
}

@media (max-width: 380px) {
  .nav-item span { display: none; } /* icons-only tab bar on very small phones */
  .nav-item svg { width: 24px; height: 24px; }
}

/* ---------- motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .bg-aura { animation: none; }
}

/* ---------- role visibility ----------
   Foremen see hours only — no rates, per-diem, or pay (set by app.js adding
   `.role-foreman` to <body> once the signed-in user is identified as a foreman). */
body.role-foreman .col-rate,
body.role-foreman .col-perdiem,
body.role-foreman .col-pay,
body.role-foreman .money-only {
  display: none !important;
}

/* ===========================================================================
   Daily Log (foreman field report: manpower + progress photos)
   Reuses .clock-card / .clock-field / .clock-crew-* ; adds date/number/textarea
   inputs and a progress-photo grid.
   =========================================================================== */
.daily-card input[type="date"],
.daily-card input[type="number"],
.daily-card textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 16px; /* ≥16px stops iOS zoom-on-focus */
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.daily-card textarea {
  resize: vertical;
  min-height: 68px;
  line-height: 1.4;
}
.daily-card input[type="date"]:focus,
.daily-card input[type="number"]:focus,
.daily-card textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.daily-card > .btn-primary {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  margin-top: 4px;
}

.daily-photo-add {
  display: inline-block;
  cursor: pointer;
}
.daily-photo-add .btn-secondary {
  display: inline-block;
}

.daily-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.daily-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
}
.daily-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.daily-thumb-x {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  box-shadow: var(--shadow-1);
}
