/* T&J Design and Landscape - shared styles for /quote and /admin.
   Brand tokens copied from public/index.html so these pages match the
   marketing site. Vanilla CSS, no framework, mobile-first. */

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

:root {
  --dark-950: #050a08;
  --dark-900: #0a1410;
  --dark-800: #0f1f18;
  --dark-700: #142a20;
  --dark-600: #1a3528;
  --dark-500: #1f4030;
  --lime-500: #84ff57;
  --lime-400: #a3ff7f;
  --lime-300: #c2ffa7;
  --lime-600: #5cd636;
  --lime-glow: rgba(132,255,87,0.15);
  --lime-glow-strong: rgba(132,255,87,0.25);
  --white: #ffffff;
  --gray-100: #f0f4f2;
  --gray-200: #d1d9d4;
  --gray-300: #a8b5ac;
  --gray-400: #7a8c80;
  --gray-500: #5a6b5f;
  --red-400: #ff8a8a;
  --red-500: #ff5c5c;
  --amber-400: #ffcf6b;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-100);
  line-height: 1.6;
  background: var(--dark-950);
  min-height: 100vh;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: 'Space Grotesk', sans-serif; color: var(--white); line-height: 1.25; }

a { color: var(--lime-400); }

button { font-family: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--lime-400);
  outline-offset: 2px;
}

/* ── NAV ── */
nav.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(5,10,8,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(132,255,87,0.08);
}
.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--lime-500);
  border-radius: 8px;
  flex: none;
  position: relative;
}
.logo-icon::before {
  content: '';
  width: 12px;
  height: 12px;
  border: 3px solid var(--dark-900);
  border-radius: 50%;
  position: absolute;
  top: 9px; left: 9px;
}
.logo .brand { color: var(--white); }
.logo .accent { color: var(--lime-500); }
.nav-links { display: flex; gap: 20px; list-style: none; align-items: center; }
.nav-links a { text-decoration: none; color: var(--gray-300); font-weight: 500; font-size: 0.85rem; }
.nav-links a:hover, .nav-links a:focus-visible { color: var(--lime-400); }

/* ── FOOTER ── */
footer.site-footer {
  background: var(--dark-950);
  border-top: 1px solid rgba(132,255,87,0.06);
  padding: 40px 16px 24px;
  margin-top: 48px;
}
.footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-inner p { font-size: 0.85rem; color: var(--gray-500); max-width: 420px; }
.footer-contact { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; }
.footer-contact a { color: var(--gray-400); text-decoration: none; font-size: 0.85rem; }
.footer-contact a:hover { color: var(--lime-400); }
.footer-bottom { font-size: 0.78rem; color: var(--gray-500); padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); }

/* ── LAYOUT ── */
main.wizard-shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  min-height: calc(100vh - 64px);
}
main.admin-shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

/* Accessible status/announcement region: visible so the user sees state
   changes, not just sr-only, since these are the main feedback channel
   during long-running photo/quote/payment operations. */
.status-live {
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--lime-300);
  margin: 12px 0;
}
.status-live.is-error { color: var(--red-400); }

/* ── PROGRESS ── */
.progress {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  list-style: none;
}
.progress li {
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
}
.progress li.done, .progress li.active { background: var(--lime-500); }
.progress-label { font-size: 0.78rem; color: var(--gray-400); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }

/* ── CARDS / PANELS ── */
.panel {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
}
.panel h2 { font-size: 1.3rem; margin-bottom: 6px; }
.panel .sub { color: var(--gray-400); font-size: 0.9rem; margin-bottom: 16px; }

/* ── FORMS ── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-200);
  margin-bottom: 6px;
}
.field .hint { font-size: 0.78rem; color: var(--gray-500); margin-top: 4px; }
.field .error-text { font-size: 0.8rem; color: var(--red-400); margin-top: 4px; }

input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
select, textarea {
  width: 100%;
  font-size: 16px; /* prevents iOS auto-zoom */
  font-family: inherit;
  color: var(--white);
  background: var(--dark-700);
  border: 1px solid var(--dark-500);
  border-radius: 10px;
  padding: 13px 14px;
  min-height: 48px;
  transition: border-color 0.15s;
}
textarea { min-height: 110px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--gray-500); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime-500); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--red-500); }

.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; min-width: 0; }

fieldset { border: none; margin-bottom: 16px; }
legend { font-size: 0.85rem; font-weight: 600; color: var(--gray-200); margin-bottom: 6px; padding: 0; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}
.btn-primary { background: var(--lime-500); color: var(--dark-900); }
.btn-primary:hover:not(:disabled) { background: var(--lime-400); box-shadow: 0 6px 24px rgba(132,255,87,0.25); }
.btn-outline { background: transparent; color: var(--gray-100); border: 2px solid rgba(255,255,255,0.2); }
.btn-outline:hover:not(:disabled) { border-color: var(--lime-500); color: var(--lime-400); }
.btn-small { width: auto; min-height: 40px; padding: 8px 16px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; margin-top: 8px; }
.btn-row .btn { width: auto; flex: 1; }

/* ── SPINNER ── */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: var(--lime-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { text-align: center; padding: 40px 16px; }
.loading-block .spinner { width: 32px; height: 32px; border-width: 4px; margin-bottom: 16px; }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
}

/* ── PHOTOS ── */
.photo-input-btn {
  display: block;
  text-align: center;
  border: 2px dashed var(--dark-500);
  border-radius: 12px;
  padding: 28px 16px;
  color: var(--gray-300);
  cursor: pointer;
  font-weight: 600;
}
.photo-input-btn:hover, .photo-input-btn:focus-visible { border-color: var(--lime-500); color: var(--lime-400); }
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
  list-style: none;
}
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--dark-700); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb .remove-btn {
  position: absolute; top: 4px; right: 4px;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(5,10,8,0.85);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}
.photo-thumb .progress-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px;
  background: rgba(0,0,0,0.4);
}
.photo-thumb .progress-bar > span { display: block; height: 100%; background: var(--lime-500); transition: width 0.2s; }
.photo-thumb .thumb-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,92,92,0.25); font-size: 0.7rem; text-align: center; padding: 4px; }

/* ── LINE ITEMS ── */
.line-item { padding: 14px 0; border-bottom: 1px solid var(--dark-600); }
.line-item:last-child { border-bottom: none; }
.line-item-head { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; color: var(--white); }
.line-item-desc { font-size: 0.85rem; color: var(--gray-400); margin-top: 4px; }
.line-item-mats { font-size: 0.8rem; color: var(--gray-500); margin-top: 6px; }
.totals-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.92rem; color: var(--gray-300); }
.totals-row.grand { font-weight: 800; color: var(--white); font-size: 1.15rem; border-top: 1px solid var(--dark-600); padding-top: 14px; margin-top: 6px; }
.deposit-callout {
  background: var(--dark-700);
  border: 1px solid var(--lime-glow-strong);
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
  font-size: 0.9rem;
}
.balance-note { font-size: 0.85rem; color: var(--gray-300); margin-top: 10px; }

/* ── CALENDAR ── */
.cal-legend { display: flex; gap: 14px; font-size: 0.78rem; color: var(--gray-400); margin-bottom: 12px; flex-wrap: wrap; }
.cal-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cal-month { margin-bottom: 18px; }
.cal-month-label { font-weight: 700; color: var(--white); margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 0.68rem; color: var(--gray-500); text-transform: uppercase; }
.cal-day {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  font-size: 0.85rem;
  background: var(--dark-700);
  color: var(--gray-500);
  border: none;
  min-height: 36px;
}
.cal-day.bookable { background: var(--dark-600); color: var(--gray-100); cursor: pointer; }
.cal-day.bookable:hover, .cal-day.bookable:focus-visible { background: var(--lime-glow); color: var(--lime-300); }
.cal-day.selected { background: var(--lime-500); color: var(--dark-900); font-weight: 700; }
.cal-day.empty { visibility: hidden; }

/* ── ADMIN ── */
.admin-login { max-width: 360px; margin: 60px auto; }
.tabs { display: flex; gap: 4px; overflow-x: auto; margin-bottom: 20px; border-bottom: 1px solid var(--dark-600); }
.tab-btn {
  background: none; border: none; color: var(--gray-400);
  padding: 12px 16px; font-weight: 600; font-size: 0.9rem;
  border-bottom: 3px solid transparent; cursor: pointer; white-space: nowrap;
}
.tab-btn.active { color: var(--lime-400); border-bottom-color: var(--lime-500); }
.tab-panel[hidden] { display: none; }
.booking-card, .pending-card { background: var(--dark-800); border: 1px solid var(--dark-600); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.booking-card h3, .pending-card h3 { font-size: 1rem; margin-bottom: 4px; }
.meta-row { font-size: 0.82rem; color: var(--gray-400); margin: 2px 0; }
.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: var(--dark-600); color: var(--gray-300); }
.badge.warn { background: rgba(255,207,107,0.15); color: var(--amber-400); }
.li-edit-row { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 10px; flex-wrap: wrap; }
.li-edit-row .field { margin-bottom: 0; flex: 1; min-width: 90px; }
.admin-photo-thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; margin-right: 8px; margin-bottom: 8px; }
.admin-cal-day { cursor: pointer; }
.admin-cal-day.open { background: rgba(132,255,87,0.18); color: var(--lime-300); }
.admin-cal-day.blackout { background: rgba(255,92,92,0.18); color: var(--red-400); }
.admin-cal-day.default { background: var(--dark-700); color: var(--gray-300); }
.cap-input { width: 100%; margin-top: 6px; }

/* ── WEEKEND (never bookable, on both calendars) ──
   Two signals, because either one alone is ambiguous on a dark grid: the
   cell sinks to the darkest surface so it reads as a different KIND of
   day than a merely-unbooked weekday, and the number is struck through.
   The strike is drawn lighter than the digit it crosses and at 2px on
   purpose - a hairline in the same dim grey as the number is invisible
   at this size, which is exactly what the first pass shipped. */
.cal-day.weekend,
.admin-cal-day.weekend {
  background: var(--dark-800);
  color: var(--gray-500);
  cursor: not-allowed;
}
.cal-day.weekend .day-num,
.admin-cal-day.weekend .day-num {
  text-decoration: line-through;
  text-decoration-color: var(--gray-300);
  text-decoration-thickness: 2px;
}

/* ── FIELD SCREENS (one field per screen intake) ──
   Fixed and full-viewport-height rather than flowing inside
   main.wizard-shell's padded box: only one screen is ever visible, so
   escaping the shell's padding via position:fixed gives a true
   full-height step without fighting the shell's own spacing. */
.field-screen {
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 10;
  background: var(--dark-950);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 24px 20px;
}
.field-screen-inner { width: 100%; max-width: 420px; }
.back-link {
  display: inline-block;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 18px;
}
.back-link:hover, .back-link:focus-visible { color: var(--lime-400); }
.field-screen .progress-label { margin-bottom: 10px; }
.field-screen label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.3;
}
.field-screen input { font-size: 1.15rem; padding: 16px; min-height: 56px; }
.field-screen .btn { margin-top: 22px; }
.field-screen .error-text { margin-top: 8px; }

/* ── CHAT ── */
.chat-screen {
  position: fixed;
  inset: 64px 0 0 0;
  z-index: 10;
  background: var(--dark-950);
  display: flex;
  flex-direction: column;
}
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  max-width: 560px;
  width: 100%;
  margin: 0 auto;
}
.chat-bubble {
  max-width: 84%;
  padding: 12px 14px;
  border-radius: 16px;
  margin-bottom: 10px;
  font-size: 0.95rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-bubble.assistant {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  color: var(--gray-100);
  border-bottom-left-radius: 4px;
  margin-right: auto;
}
.chat-bubble.user {
  background: var(--lime-500);
  color: var(--dark-900);
  font-weight: 600;
  border-bottom-right-radius: 4px;
  margin-left: auto;
}
.chat-bubble.system {
  background: transparent;
  color: var(--gray-500);
  font-size: 0.8rem;
  text-align: center;
  max-width: 100%;
  margin: 6px auto;
}
.chat-photos-bubble {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  margin-bottom: 10px;
  max-width: 84%;
  justify-content: flex-end;
}
.chat-photo-thumb { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--dark-700); flex: none; }
.chat-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chat-photo-thumb .remove-btn {
  position: absolute; top: 2px; right: 2px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(5,10,8,0.85); color: var(--white);
  border: 1px solid rgba(255,255,255,0.3); cursor: pointer; font-size: 0.75rem; line-height: 1;
}
.chat-photo-thumb .progress-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0,0,0,0.4); }
.chat-photo-thumb .progress-bar > span { display: block; height: 100%; background: var(--lime-500); transition: width 0.2s; }
.chat-photo-thumb .thumb-error { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(255,92,92,0.3); font-size: 0.6rem; text-align: center; padding: 2px; }

.chat-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.chat-option-chip {
  background: var(--dark-700);
  border: 1px solid var(--lime-glow-strong);
  color: var(--lime-300);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
}
.chat-option-chip:hover, .chat-option-chip:focus-visible { background: var(--lime-glow); }
.chat-option-chip:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-estimate-bubble {
  background: var(--dark-800);
  border: 1px solid var(--dark-600);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 12px;
  max-width: 100%;
}

.chat-composer-wrap {
  position: sticky;
  bottom: 0;
  background: var(--dark-950);
  border-top: 1px solid var(--dark-600);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.dictation-hint { max-width: 560px; margin: 0 auto 6px; text-align: center; }
.chat-err { max-width: 560px; margin: 0 auto 6px; text-align: center; }
.chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 560px;
  margin: 0 auto;
}
.chat-icon-btn {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--dark-700);
  color: var(--gray-200);
  border: 1px solid var(--dark-500);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.chat-icon-btn:hover, .chat-icon-btn:focus-visible { border-color: var(--lime-500); color: var(--lime-400); }
.chat-icon-btn.highlight { background: var(--lime-glow); border-color: var(--lime-500); color: var(--lime-400); }
.chat-icon-btn.recording { background: rgba(255,92,92,0.2); border-color: var(--red-500); color: var(--red-400); }
.chat-textarea {
  flex: 1;
  font-size: 16px;
  font-family: inherit;
  color: var(--white);
  background: var(--dark-700);
  border: 1px solid var(--dark-500);
  border-radius: 20px;
  padding: 13px 16px;
  min-height: 48px;
  max-height: 140px;
  resize: none;
  line-height: 1.35;
}
.chat-textarea:focus { outline: none; border-color: var(--lime-500); }
.chat-send-btn { flex: none; width: auto; min-height: 48px; padding: 0 18px; border-radius: 24px; }
.chat-send-btn:disabled { opacity: 0.4; }

@media (min-width: 640px) {
  .nav-links { gap: 28px; }
  main.wizard-shell { padding-top: 32px; }
  .photo-grid { grid-template-columns: repeat(4, 1fr); }
}
