/* =========================================================
   Handymen — VacationPlaya Mobile Logger
   Design: Türkis · Sand · Sonne. Groß, lesbar, sonnenlicht-tauglich.
   ========================================================= */

:root {
  /* Palette */
  --color-bg: #fbf6ee;          /* warm sand */
  --color-bg-soft: #f3ead9;
  --color-surface: #ffffff;
  --color-surface-alt: #faf3e6;

  --color-primary: #0d9488;     /* deep teal */
  --color-primary-dark: #0f766e;
  --color-primary-soft: #ccfbf1;

  --color-accent: #f59e0b;      /* sun amber */
  --color-accent-soft: #fef3c7;

  --color-danger: #dc2626;
  --color-danger-soft: #fee2e2;
  --color-success: #16a34a;

  --color-text: #1c1917;        /* near-black */
  --color-text-soft: #44403c;   /* darker for better sun-readability */
  --color-text-muted: #78716c;  /* dark enough for WCAG AA on sand bg */
  --color-border: #d6d3d1;      /* slightly darker so cards stand out */

  --shadow-sm: 0 1px 2px rgba(28, 25, 23, 0.05);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.08);
  --shadow-lg: 0 12px 30px rgba(28, 25, 23, 0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --tap: 48px;
  --bar-h: 64px;
  --header-h: 56px;

  --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', sans-serif;
  --font-display: 'Avenir Next', 'Trebuchet MS', var(--font-base);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  font-family: var(--font-base);
  font-size: 18px;
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
  min-height: 100vh;
}

body.modal-open { overflow: hidden; }

button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

#app-root { min-height: 100vh; min-height: 100dvh; }

/* =========================================================
   Boot loading
   ========================================================= */
.boot-loading {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
}

/* =========================================================
   Brand
   ========================================================= */
.brand { text-align: center; }
.brand-mark {
  font-size: 64px; line-height: 1;
  display: inline-block;
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--color-primary), var(--color-primary-dark));
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  filter: drop-shadow(0 4px 8px rgba(13, 148, 136, 0.25));
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -0.02em;
  margin: 16px 0 4px;
  color: var(--color-text);
}
.brand-sub {
  margin: 0;
  font-size: 14px;
  color: var(--color-text-soft);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* =========================================================
   Login screen
   ========================================================= */
.login-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px env(safe-area-inset-right) max(24px, env(safe-area-inset-bottom)) env(safe-area-inset-left);
  background:
    radial-gradient(circle at 80% 0%, var(--color-primary-soft) 0%, transparent 60%),
    radial-gradient(circle at 0% 100%, var(--color-accent-soft) 0%, transparent 60%),
    var(--color-bg);
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--color-surface);
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.login-card .brand { margin-bottom: 24px; }
.hello {
  text-align: center;
  font-size: 18px;
  margin: 0 0 20px;
  color: var(--color-text-soft);
}
.hello strong { color: var(--color-text); }
.login-pw-field { margin-bottom: 12px; }
.login-error {
  min-height: 24px;
  font-size: 14px;
  color: var(--color-danger);
  text-align: center;
  margin: 8px 0;
}
.login-error.visible { padding: 8px; background: var(--color-danger-soft); border-radius: var(--radius-sm); }

/* =========================================================
   App shell
   ========================================================= */
.app-shell {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
}
.app-header {
  height: var(--header-h);
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.brand-mini { display: flex; align-items: center; gap: 8px; }
.brand-mini-mark {
  font-size: 22px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--color-primary), var(--color-primary-dark));
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-mini-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.lock-btn {
  background: none; border: none;
  font-size: 22px;
  width: var(--tap); height: var(--tap);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-text-soft);
}
.lock-btn:active { background: var(--color-bg-soft); }

.tab-host {
  flex: 1;
  padding: 16px 16px calc(var(--bar-h) + 16px + env(safe-area-inset-bottom)) 16px;
  overflow-y: auto;
}

.tab-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--bar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: grid; grid-template-columns: repeat(4, 1fr);
  z-index: 40;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
}
.tab-bar.tab-bar-5 { grid-template-columns: repeat(5, 1fr); }
.tab-btn {
  background: none; border: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  font-size: 12px;
  color: var(--color-text-soft);
  padding: 4px;
  font-weight: 600;
}
.tab-btn .tab-icon { font-size: 24px; line-height: 1; }
.tab-btn.active { color: var(--color-primary); }
.tab-btn.active .tab-icon { transform: translateY(-1px); }

/* =========================================================
   Forms / Fields (shared)
   ========================================================= */
.field { display: block; margin: 0 0 14px; }
.field-label {
  display: flex; gap: 4px; align-items: baseline;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-soft);
  margin: 0 0 6px;
  letter-spacing: 0;
}
.field-label .req { color: var(--color-accent); }
.field-input {
  width: 100%;
  display: block;
  padding: 13px 14px;
  font-size: 18px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.field-input:focus {
  border-color: var(--color-primary);
  background: var(--color-surface);
}
textarea.field-input { resize: vertical; min-height: 3em; line-height: 1.4; }
.field-hint {
  display: block;
  font-size: 14px;
  color: var(--color-text-muted);
  margin-top: 4px;
}
.field-row.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field-row.two-col .field { margin-bottom: 0; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 11px 18px;
  font-size: 17px;
  font-weight: 600;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  color: var(--color-text);
  transition: transform 0.05s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 6px rgba(13,148,136,0.25);
}
.btn-primary:active { background: var(--color-primary-dark); }
.btn-ghost { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-ghost:active { background: var(--color-bg-soft); }
.btn-danger { background: var(--color-danger); color: white; }
.btn-large { min-height: 60px; padding: 16px 24px; font-size: 18px; }
.btn-block { display: flex; width: 100%; margin: 8px 0; }
.btn-link {
  background: transparent; color: var(--color-text-soft);
  font-size: 15px; font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--color-text-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  min-height: 44px;
}
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; }

/* =========================================================
   Modal
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 100;
  animation: fade-in 0.15s ease-out;
}
.modal-overlay.closing { animation: fade-out 0.15s ease-out forwards; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }

.modal {
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  background: var(--color-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.2s ease-out;
}
@keyframes slide-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: 24px; }
  .modal { border-radius: var(--radius-xl); max-height: 86vh; }
}
.modal-large { max-width: 720px; }
.modal-header {
  padding: 16px 20px 8px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
}
.modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.modal-close {
  background: var(--color-bg-soft);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 22px;
  color: var(--color-text-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-body {
  padding: 0 20px 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  overflow-y: auto;
}
.modal-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 20px;
  justify-content: flex-end;
}
.modal-actions .btn { flex: 1 1 auto; min-width: 120px; }
.section-h {
  font-size: 16px; font-weight: 700;
  margin: 18px 0 10px;
  color: var(--color-text);
}

/* Setup wizard */
.setup-intro {
  margin: 0 0 16px;
  color: var(--color-text-soft);
  font-size: 15px;
}
.setup-error { min-height: 0; font-size: 14px; color: var(--color-danger); }
.setup-error.visible { padding: 10px; background: var(--color-danger-soft); border-radius: var(--radius-sm); margin: 8px 0; }

.confirm-message { font-size: 16px; line-height: 1.5; margin: 8px 0 4px; }

/* =========================================================
   Toasts
   ========================================================= */
.toast-host {
  position: fixed; left: 50%; bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--color-text);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: var(--color-success); }
.toast-error { background: var(--color-danger); }

/* =========================================================
   Tab 1 — Pending Tasks
   ========================================================= */
.tab-pending { position: relative; }
.filter-bar {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.chip-select {
  padding: 9px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  min-height: 44px;
}
.chip-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  background: var(--color-surface);
  border: 1.5px solid var(--color-border);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.chip-toggle input { width: 20px; height: 20px; accent-color: var(--color-primary); }

.empty {
  padding: 80px 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 16px;
}

.pending-list { display: flex; flex-direction: column; gap: 12px; }
.p-group { background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.p-group-header {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(90deg, var(--color-primary-soft), transparent 40%);
  border: none;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.p-group-toggle { width: 16px; color: var(--color-primary); font-weight: bold; }
.p-group-icon { font-size: 18px; }
.p-group-name { flex: 1; }
.p-group-count {
  background: var(--color-primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  min-width: 24px; text-align: center;
}
.p-group-tasks { list-style: none; margin: 0; padding: 0; }
.p-group-tasks.collapsed { display: none; }

.p-task, .p-flat-list .p-task {
  display: flex; align-items: stretch; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
}
.p-task:last-child { border-bottom: none; }
.p-task.done { opacity: 0.55; }
.p-task.done .p-task-text { text-decoration: line-through; }

.p-task-main { flex: 1; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.p-task-icon {
  font-size: 22px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.p-task.priority-high .p-task-icon { background: var(--color-danger-soft); }
.p-task.priority-medium .p-task-icon { background: var(--color-accent-soft); }
.p-task.done .p-task-icon { background: var(--color-primary-soft); color: var(--color-primary-dark); font-weight: bold; }

.p-task-content { flex: 1; min-width: 0; }
.p-task-text { font-size: 17px; font-weight: 500; line-height: 1.35; }
.p-task-meta {
  font-size: 14px;
  color: var(--color-text-soft);
  margin-top: 4px;
}
.p-task-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.p-photo-btn, .p-done-btn, .p-reopen-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.p-done-btn { background: var(--color-primary); color: white; border-color: var(--color-primary); font-weight: bold; }
.p-done-btn:active { background: var(--color-primary-dark); transform: scale(0.94); }

.p-flat-list { list-style: none; margin: 0; padding: 0; background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.p-task-prop { font-weight: 700; color: var(--color-primary-dark); }

/* FAB */
.fab {
  position: fixed; right: 20px; bottom: calc(var(--bar-h) + 20px + env(safe-area-inset-bottom));
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  border: none;
  font-size: 32px; font-weight: 300;
  box-shadow: var(--shadow-lg);
  z-index: 30;
  display: flex; align-items: center; justify-content: center;
}
.fab:active { transform: scale(0.92); background: var(--color-primary-dark); }

/* Priority pills (in task form) */
.prio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.prio-pill {
  padding: 10px 16px;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  border-radius: 999px;
  font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px;
}
.prio-pill.active { border-color: var(--color-primary); background: var(--color-primary-soft); color: var(--color-primary-dark); }

/* =========================================================
   Tab 2/3 — sub-tabs (used in Entry tab and List tab)
   ========================================================= */
.sub-tabs {
  display: flex; gap: 4px;
  background: var(--color-bg-soft);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.sub-tab {
  flex: 1;
  background: transparent;
  border: none;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-soft);
  min-height: 44px;
}
.sub-tab.active { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sm); }

/* Tab 2 — Entry CTA */
.tab-entry .entry-cta {
  margin-top: 32px;
  text-align: center;
}
.tab-entry .entry-cta .btn { margin-top: 16px; min-width: 220px; }

/* Photo button in entry forms */
.photo-field .photo-row { display: flex; align-items: center; gap: 12px; }
.btn-photo {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-bg-soft);
  border: 2px dashed var(--color-border);
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
}
.photo-preview {
  width: 80px; height: 80px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--color-bg-soft);
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }

/* Billable toggle */
.billable-field { margin-bottom: 14px; }
.billable-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 56px;
  border: none;
  border-radius: 999px;
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.02em;
  transition: background 0.18s, color 0.18s;
  position: relative;
  overflow: hidden;
}
.billable-toggle .billable-label-yes,
.billable-toggle .billable-label-no { transition: opacity 0.18s; }
.billable-toggle[data-state="yes"] {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}
.billable-toggle[data-state="yes"] .billable-label-no { display: none; }
.billable-toggle[data-state="no"] {
  background: #d6d3d1;
  color: #44403c;
}
.billable-toggle[data-state="no"] .billable-label-yes { display: none; }

/* =========================================================
   Tab 3 — List
   ========================================================= */
.tab-list { position: relative; padding-bottom: 80px; }
.list-host { margin-bottom: 16px; }
.list-entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.list-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  background: var(--color-surface);
  padding: 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border-left: 4px solid transparent;
}
.list-card:active { transform: scale(0.99); }
.list-card.is-exported { border-left-color: var(--color-primary); }
.lc-icon { font-size: 24px; width: 36px; text-align: center; }
.lc-main { min-width: 0; }
.lc-line1 { font-size: 15px; color: var(--color-text-soft); font-weight: 500; }
.lc-line1 .lc-prop { font-weight: 700; color: var(--color-text); margin-left: 6px; font-size: 16px; }
.lc-line2 { font-size: 14px; color: var(--color-text-muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-right { text-align: right; }
.lc-amount { font-size: 17px; font-weight: 800; color: var(--color-text); letter-spacing: -0.01em; }
.lc-flags { font-size: 13px; margin-top: 3px; }
.dot { display: inline-block; margin-left: 4px; }
.dot-bill { background: var(--color-primary); color: white; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.dot-nobill { background: var(--color-bg-soft); color: var(--color-text-soft); padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.from-pending { color: var(--color-primary); margin-left: 4px; }

.list-actions {
  position: fixed;
  right: 16px; bottom: calc(var(--bar-h) + 20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 12px;
  z-index: 30;
}
.fab-add {
  width: 52px; height: 52px;
  font-size: 22px;
  background: var(--color-surface);
  color: var(--color-text);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-md);
}
.btn-export {
  position: fixed;
  left: 16px; right: calc(16px + 52px + 12px);
  bottom: calc(var(--bar-h) + 20px + env(safe-area-inset-bottom));
  z-index: 29;
  box-shadow: var(--shadow-md);
}

/* Export dialog */
.export-dialog .export-which { border: none; padding: 0; margin: 0 0 16px; }
.export-dialog .export-which legend { font-size: 13px; font-weight: 700; color: var(--color-text-soft); text-transform: uppercase; letter-spacing: 0.03em; padding: 0; margin-bottom: 8px; }
.radio-row, .checkbox-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  margin: 6px 0;
  cursor: pointer;
  font-size: 15px;
}
.radio-row input, .checkbox-row input { margin-top: 3px; width: 20px; height: 20px; accent-color: var(--color-primary); }
.email-tip {
  background: var(--color-accent-soft);
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin: 12px 0;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.email-tip code { background: white; padding: 4px 8px; border-radius: 6px; font-size: 13px; }
.export-error { color: var(--color-danger); min-height: 0; }
.export-error:not(:empty) { padding: 8px; background: var(--color-danger-soft); border-radius: var(--radius-sm); margin: 8px 0; }

/* =========================================================
   Tab 4 — Settings
   ========================================================= */
.tab-settings { display: flex; flex-direction: column; gap: 16px; }
.settings-section {
  background: var(--color-surface);
  padding: 16px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.settings-section h2 {
  margin: 0 0 12px;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--color-text-soft);
}
.kv { display: flex; flex-direction: column; gap: 6px; }
.kv-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 16px; }
.kv-row span { color: var(--color-text-soft); }
.kv-row strong { font-weight: 700; }
.admin-section .btn-block { justify-content: flex-start; padding-left: 16px; }

/* =========================================================
   Smart-Done dialog
   ========================================================= */
.big-q { font-size: 17px; font-weight: 600; margin: 16px 0 12px; }
.smart-done-actions { display: flex; flex-direction: column; gap: 10px; }
.smart-done-actions .btn { justify-content: flex-start; text-align: left; line-height: 1.3; }
.recommended {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  padding: 2px 6px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: 999px;
  margin-left: auto;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* =========================================================
   Photo viewer
   ========================================================= */
.photo-viewer { display: flex; flex-direction: column; gap: 16px; }
.photo-viewer-img { width: 100%; max-height: 70vh; object-fit: contain; border-radius: var(--radius-md); background: #000; }
.photo-viewer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* Detail list (entry detail modal) */
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 10px 18px; margin: 0 0 16px; }
.detail-list dt { font-size: 14px; font-weight: 600; color: var(--color-text-soft); align-self: center; }
.detail-list dd { margin: 0; font-size: 17px; }
.detail-photo { margin: 12px 0; }
.detail-photo img { max-width: 100%; max-height: 240px; border-radius: var(--radius-md); }

.muted { color: var(--color-text-soft); }
.small { font-size: 14px; }

/* =========================================================
   Boot error
   ========================================================= */
.boot-error { padding: 24px; max-width: 900px; margin: 0 auto; }
.boot-error h1 { font-size: 28px; margin: 0 0 16px; color: #b91c1c; }
.boot-error h2 { font-size: 18px; margin: 20px 0 8px; }
.boot-error pre {
  background: var(--color-bg-soft, #f4f4f4);
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #ddd;
}
.boot-error ol { font-size: 16px; line-height: 1.6; padding-left: 24px; }
.boot-error ol li { margin-bottom: 8px; }
.boot-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.boot-btn {
  padding: 14px 18px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 8px;
  border: 2px solid #999;
  background: white;
  cursor: pointer;
  min-height: 52px;
}
.boot-btn:hover { background: #f0f0f0; }
.boot-btn-primary {
  background: #0d9488;
  color: white;
  border-color: #0d9488;
}
.boot-btn-primary:hover { background: #0f766e; }
.boot-btn-danger {
  background: #fee;
  color: #b91c1c;
  border-color: #b91c1c;
}
.boot-btn-danger:hover { background: #fecaca; }

/* =========================================================
   Reports tab (v1.1)
   ========================================================= */
.tab-reports { padding-bottom: 32px; }

.report-body { font-size: 17px; line-height: 1.5; }
textarea.report-body { min-height: 180px; resize: vertical; }

.report-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }

.photo-multi {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 10px;
}
.photo-multi-thumb {
  position: relative;
  width: 88px; height: 88px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-soft);
  cursor: zoom-in;
  border: 2px solid var(--color-border);
}
.photo-multi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-multi-remove {
  position: absolute; top: 4px; right: 4px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7); color: white;
  border: none;
  font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

/* History list */
.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.report-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  border-left: 5px solid var(--color-border);
  transition: transform 0.05s;
}
.report-card:active { transform: scale(0.99); }
.report-card.is-sent { border-left-color: var(--color-primary); }

.rc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.rc-date { font-weight: 800; font-size: 17px; color: var(--color-text); }
.rc-prop { font-weight: 700; color: var(--color-primary-dark); font-size: 15px; }
.rc-body {
  font-size: 16px; line-height: 1.45; color: var(--color-text);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 8px;
}
.rc-foot {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  font-size: 14px; color: var(--color-text-soft);
}
.rc-photos { font-weight: 600; }
.rc-status { margin-left: auto; font-weight: 600; }
.rc-status.rc-sent { color: var(--color-primary); }
.rc-status.rc-not-sent { color: var(--color-accent); }

/* Detail view */
.report-body-view {
  background: var(--color-bg-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 16px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 12px 0;
}
.report-photos { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 16px; }
.report-photo-thumb {
  width: 110px; height: 110px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-bg-soft);
  cursor: zoom-in;
}
.report-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

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