/* ============================================================
   Farm Habit Vendor PWA — Global Styles
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --green:         #2D5016;
  --green-hover:   #3a6820;
  --green-light:   #EAF2DF;
  --bg:            #FAF8F4;
  --surface:       #FFFFFF;
  --border:        #E8E4DE;
  --text:          #1C1C1C;
  --text-muted:    #6B6B6B;
  --red:           #B91C1C;
  --red-bg:        #FEF2F2;
  --red-border:    #FECACA;
  --amber:         #92400E;
  --amber-bg:      #FFFBEB;
  --amber-border:  #FDE68A;
  --shadow-sm:     0 1px 2px rgba(0,0,0,0.06);
  --shadow:        0 1px 4px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --radius:        12px;
  --radius-sm:     8px;
  --max-w:         520px;
}

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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
}

img { display: block; max-width: 100%; }
a  { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout wrapper ── */
.page-wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ============================================================
   HOME — Header
   ============================================================ */
.home-header {
  background: var(--green);
  padding: 20px 20px 18px;
  text-align: center;
  position: relative;
}


.home-header .logo {
  height: 48px;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

.home-header .tagline {
  color: rgba(255,255,255,0.75);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 6px;
}

/* ── Vendor Login / Vendor Dashboard CTA above market list ── */
#home-auth-cta a.submit-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

/* Market page: match the 16px top padding .home-main provides on the homepage */
.page-wrap #home-auth-cta {
  padding-top: 16px;
  padding-bottom: 8px;
}

/* ── Home market list ── */
.home-main {
  padding: 16px 16px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Day-of-week group header ── */
.day-header {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 4px 4px;
  margin-top: 4px;
}

/* ── Market card (home) — single line format ── */
.market-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.market-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  text-decoration: none;
}

.market-card:active { transform: scale(0.99); box-shadow: var(--shadow-sm); }

.market-card-label {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1.3;
}

.market-card-hours {
  font-size: 0.61rem; /* 75% of market-card-label's 0.8125rem */
}

.market-card-arrow {
  color: var(--border);
  font-size: 1.25rem;
  margin-left: 12px;
  flex-shrink: 0;
}

/* ============================================================
   MARKET PAGE — Top nav
   ============================================================ */
.market-nav {
  background: var(--green);
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.back-btn {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.back-btn:hover { color: #fff; text-decoration: none; }
.back-btn svg { width: 16px; height: 16px; }

.nav-market-name {
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   BANNERS
   ============================================================ */
.banner {
  padding: 14px 16px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.banner-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.4; }
.banner-body { flex: 1; }

.banner-title {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: 2px;
}

.banner-text { font-size: 0.875rem; line-height: 1.45; }

.banner-cancel {
  background: var(--red-bg);
  border-bottom: 1px solid var(--red-border);
  color: var(--red);
}

.banner-message {
  background: var(--amber-bg);
  border-bottom: 1px solid var(--amber-border);
  color: var(--amber);
}

/* ============================================================
   MARKET PAGE — Hero
   ============================================================ */
.market-hero {
  background: var(--green);
  padding: 22px 20px 24px;
  text-align: center;
}

.hero-name {
  color: #fff;
  font-size: 1.625rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.badge {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-top: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}

/* ── Collapsible section title ── */
.section-title--toggle {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 16px 10px;
  -webkit-tap-highlight-color: transparent;
}
.section-title--toggle:hover { background: var(--bg); }

.section-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 8px;
}
.section-title--toggle[aria-expanded="true"] .section-chevron {
  transform: rotate(180deg);
}

/* Collapsed by default — open class reveals content */
.section-collapsible {
  display: none;
}
.section-collapsible--open {
  display: block;
}

/* ── Info grid ── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.info-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.info-item:nth-child(odd):not(.info-full) {
  border-right: 1px solid var(--border);
}

.info-full { grid-column: 1 / -1; }

.info-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.info-value {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text);
}

.info-value a { color: var(--green); font-weight: 500; }

/* ── Instagram link in Market Info ── */
.instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-weight: 500;
  text-decoration: none;
}
.instagram-link:hover { text-decoration: underline; }

.instagram-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--green);
}

/* ── Manager card ── */
.manager-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}

.manager-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.65rem;
  overflow: hidden;
}

.manager-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.manager-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.manager-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1px;
}

/* ============================================================
   WEATHER WIDGET
   ============================================================ */
.weather-current {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-current--border {
  border-bottom: 1px solid var(--border);
}

.weather-icon { font-size: 2.5rem; line-height: 1; flex-shrink: 0; }

.weather-temp {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.weather-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.weather-wind {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.weather-unavailable {
  padding: 16px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Weather sub-section title ── */
.weather-sub-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Hourly scroll ── */
.hourly-scroll {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.hourly-scroll::-webkit-scrollbar { display: none; }

.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 56px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  flex-shrink: 0;
}

.hourly-time {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.hourly-icon  { font-size: 1.25rem; line-height: 1; }

.hourly-temp {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

.hourly-wind {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.hourly-precip {
  font-size: 0.6875rem;
  color: #1d4ed8;
}

/* ── Next market day summary ── */
.next-market-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.next-market-icon { font-size: 2.25rem; line-height: 1; flex-shrink: 0; }

.next-market-temps {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.next-market-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.next-market-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Documents list ── */
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.doc-item:last-child { border-bottom: none; }
.doc-item:hover  { background: var(--bg); }
.doc-item:active { background: var(--border); }

.doc-item-left { display: flex; align-items: center; gap: 10px; }

.doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #FEE2E2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  color: #DC2626;
}

.doc-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.doc-arrow { color: var(--text-muted); font-size: 0.875rem; }

/* ── Rules accordion ── */
.rule-item { border-bottom: 1px solid var(--border); }
.rule-item:last-child { border-bottom: none; }

.rule-header {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

.rule-header:hover { background: var(--bg); }

.rule-category {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.rule-chevron {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.rule-item.open .rule-chevron { transform: rotate(180deg); }

.rule-body {
  display: none;
  padding: 0 16px 14px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.rule-item.open .rule-body { display: block; }

/* ============================================================
   VENDOR MESSAGE FORM
   ============================================================ */
.form-inner { padding: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.form-field { margin-bottom: 10px; }

.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 5px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--green);
  background: var(--surface);
}

.form-field input[readonly] {
  background: var(--green-light);
  color: var(--green);
  font-weight: 600;
  cursor: default;
}

.form-field textarea {
  resize: none;
  height: 100px;
  line-height: 1.5;
}

.char-counter {
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: -6px;
  margin-bottom: 14px;
}

.char-counter.near-limit { color: var(--amber); }
.char-counter.at-limit   { color: var(--red); }

.submit-btn {
  width: 100%;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.submit-btn:hover   { background: var(--green-hover); }
.submit-btn:active  { opacity: 0.9; }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.toast.show          { transform: translateX(-50%) translateY(0); }
.toast.toast-success { background: var(--green); }
.toast.toast-error   { background: var(--red); }

/* ── Form note ── */
.form-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

/* ============================================================
   PUSH NOTIFICATION OPT-IN
   ============================================================ */
.notify-container {
  margin-top: 16px;
  margin-bottom: 0;
  padding: 0 0 4px;
}

.notify-btn {
  width: 100%;
  background: var(--surface);
  color: var(--green);
  border: 1.5px solid var(--green);
  border-radius: var(--radius);
  padding: 13px 16px;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
  display: block;
}

.notify-btn:hover  { background: var(--green-light); }
.notify-btn:active { opacity: 0.85; }

.notify-btn--active {
  background: var(--green-light);
  color: var(--green);
  border-color: var(--green-light);
  cursor: default;
}

.notify-btn:disabled { opacity: 0.7; cursor: default; }

/* ── iOS install hint ── */
.notify-ios-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 8px;
  line-height: 1.5;
}

/* ============================================================
   FOOTER
   ============================================================ */
.market-footer {
  text-align: center;
  padding: 32px 16px 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.market-footer a { color: var(--text-muted); }
.market-footer a:hover { color: var(--green); }

/* ============================================================
   UTILITY
   ============================================================ */
.hidden { display: none !important; }

.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #f0ede8 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 4px;
  height: 1em;
  display: inline-block;
  width: 120px;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 540px) {
  .market-nav  { padding: 12px 24px; }
  .market-hero { padding: 28px 24px 30px; }
  .hero-name   { font-size: 1.875rem; }
}

/* ============================================================
   CHAT WIDGET
   ============================================================ */

/* ── Floating action button ── */
.chat-fab {
  position: fixed;
  bottom: max(24px, calc(env(safe-area-inset-bottom) + 16px));
  right: 20px;
  z-index: 1000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: background 0.2s, transform 0.2s;
}
.chat-fab:hover    { background: var(--green-hover); }
.chat-fab:active   { transform: scale(0.94); }
.chat-fab svg      { width: 24px; height: 24px; }
.chat-fab--open    { display: none; }

/* ── Chat panel ── */
.chat-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  max-width: var(--max-w);
  margin: 0 auto;
  height: 520px;
  max-height: 80dvh;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.14);
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.chat-panel--open { transform: translateY(0); }

/* ── Header ── */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--green);
  color: #fff;
  flex-shrink: 0;
}
.chat-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.chat-title    { font-size: 0.9375rem; font-weight: 600; line-height: 1.2; }
.chat-subtitle { font-size: 0.75rem; opacity: 0.75; margin-top: 1px; }

.chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s;
}
.chat-close:hover { background: rgba(255,255,255,0.15); }

/* ── Messages ── */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-bubble--user {
  align-self: flex-end;
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble--assistant {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

/* Typing indicator */
.chat-bubble--typing {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-bubble--typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typingDot 1.2s infinite;
  display: inline-block;
}
.chat-bubble--typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-bubble--typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%            { opacity: 1;   transform: translateY(-4px); }
}

/* ── Input row ── */
.chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}
.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 10px 14px;
  font-size: 0.9375rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--green); }
.chat-input::placeholder { color: var(--text-muted); }

.chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, opacity 0.2s;
}
.chat-send:hover    { background: var(--green-hover); }
.chat-send:disabled { opacity: 0.45; cursor: default; }
.chat-send svg      { width: 18px; height: 18px; }

/* ============================================================
   AUTH LINK — Vendor Login / First Name (top-right every page)
   ============================================================ */
.auth-link-target {
  margin-left: auto;
  flex-shrink: 0;
}

.auth-link {
  background: none;
  border: none;
  color: rgba(255,255,255,0.80);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  text-decoration: none;
  white-space: nowrap;
}
.auth-link:hover       { color: #fff; text-decoration: none; }
.auth-link--user       { color: rgba(255,255,255,0.90); }
.auth-link--signout    { color: rgba(255,255,255,0.70); font-size: 0.75rem; }

/* ============================================================
   VENDOR DASHBOARD
   ============================================================ */
.dash-greeting {
  padding: 20px 16px;
}

.dash-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.dash-biz {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Markets list ── */
.dash-list-item {
  padding: 12px 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.dash-list-item:last-child { border-bottom: none; }
.dash-market-link {
  color: var(--green);
  text-decoration: none;
  font-weight: 600;
}
.dash-market-link:hover { text-decoration: underline; }

/* ── Load sheet ── */
.dash-loadsheet-area { padding: 4px 0; }

.dash-loadsheet-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.dash-loadsheet-item:last-child { border-bottom: none; }

.dash-ls-market {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dash-ls-btn {
  display: block;
  text-align: center;
  text-decoration: none;
}

.dash-ls-btn--disabled {
  background: var(--border);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 1;
}

.dash-ls-countdown {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 6px;
}

/* ── Message history ── */
.dash-msg-group {
  border-bottom: 1px solid var(--border);
  padding: 14px 16px;
}
.dash-msg-group:last-child { border-bottom: none; }

.dash-msg-market {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.dash-msg-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 8px;
}
.dash-msg-item:last-child { margin-bottom: 0; }

.dash-msg-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
}

.dash-msg-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.dash-msg-reply {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--green);
  line-height: 1.45;
}

.dash-msg-reply-label {
  font-weight: 600;
}

/* ── Empty state ── */
.dash-empty {
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 12px 16px;
}

/* ============================================================
   INSTALL PROMPT BANNER
   ============================================================ */
.install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: var(--green);
  padding: 12px 16px max(12px, env(safe-area-inset-bottom));
}

.install-banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.install-banner-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.install-banner-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.install-banner-text strong { font-weight: 700; }

.install-banner-more {
  color: rgba(255,255,255,0.85);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: underline;
  white-space: nowrap;
  flex-shrink: 0;
}

.install-banner-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  line-height: 1;
}

/* ============================================================
   INSTALL PAGE — Step list
   ============================================================ */
.install-steps {
  padding: 4px 0 8px;
}

.install-step {
  display: flex;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.install-step:last-child { border-bottom: none; }

.install-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.install-step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.install-step-body strong {
  font-weight: 600;
  color: var(--text);
}

.install-step-body span {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.install-step-link {
  color: var(--green);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  margin-top: 2px;
}
.install-step-link:hover { text-decoration: underline; }

/* ── Feature list ── */
.install-features {
  list-style: none;
  margin: 0;
  padding: 4px 16px 16px;
}
.install-features li {
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text);
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.install-features li:last-child { border-bottom: none; }
.install-features li::before {
  content: '✓';
  color: var(--green);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.install-features li em {
  color: var(--text-muted);
  font-style: normal;
  font-size: 0.875rem;
}
