/* =============================================================================
   Lakeland Product Hub — Stylesheet (v2 / bento redesign)
   Mobile-first. Inter typeface. Lakeland palette on cool neutral surfaces.
   Apple-style cards, soft shadows, red as accent only.
   All existing class names from v1 are preserved so JS keeps working.
============================================================================= */

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

/* ============================================================================
   1. DESIGN TOKENS
============================================================================ */
:root {
  /* --- Brand --- */
  --lk-red:        #C8102E;   /* Lakeland accent */
  --lk-red-dark:   #A00D24;   /* Hover state */
  --lk-red-tint:   #FFF1F2;   /* Subtle red wash for success/badge backgrounds */

  /* --- Neutrals (cool gray scale) --- */
  --lk-black:      #0A0A0A;
  --lk-ink:        #1A1A1A;
  --lk-gray-900:   #1F1F1F;
  --lk-gray-700:   #404040;
  --lk-gray-500:   #737373;
  --lk-gray-400:   #A3A3A3;
  --lk-gray-300:   #D4D4D4;
  --lk-gray-200:   #E5E5E8;
  --lk-gray-100:   #ECECEF;
  --lk-gray-50:    #F2F2F4;
  --lk-paper:      #EBEBED;   /* Page background — a touch darker than Apple's #F5F5F7 */
  --lk-white:      #FFFFFF;

  /* --- Legacy aliases (so any straggling references still resolve) --- */
  --lk-off-white:  #EBEBED;
  --lk-silver:     #D4D4D4;
  --lk-stone:      #737373;

  /* --- Spacing --- */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   32px;
  --space-2xl:  48px;

  /* --- Radius --- */
  --radius-sm:  10px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  /* --- Shadows (Apple-soft) --- */
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md:   0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg:   0 12px 32px rgba(0,0,0,0.08), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-glow: var(--shadow-sm);   /* Legacy alias — original had a red glow */

  /* --- Motion --- */
  --ease:       cubic-bezier(0.32, 0.72, 0, 1);
}

/* ============================================================================
   2. BASE / RESET
============================================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--lk-ink);
  background: var(--lk-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md) var(--space-2xl);
}

img { max-width: 100%; display: block; }

/* ============================================================================
   3. HEADER
============================================================================ */
.lk-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(235, 235, 237, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 14px var(--space-lg);
  text-align: center;
  color: var(--lk-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.lk-header__brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
  color: var(--lk-ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lk-header__brand .accent {
  color: var(--lk-red);
  font-weight: 400;
  margin: 0 4px;
}

.lk-header__sub {
  font-size: 11px;
  color: var(--lk-gray-500);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.lk-header--scrolled {
  border-bottom-color: rgba(0, 0, 0, 0.10);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

/* ============================================================================
   4. TYPOGRAPHY
============================================================================ */
h1 {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 var(--space-md);
  color: var(--lk-ink);
}

h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  margin: var(--space-xl) 0 var(--space-md);
  color: var(--lk-ink);
}

p {
  margin: 0 0 var(--space-md);
  color: var(--lk-ink);
}

a {
  color: var(--lk-red);
  text-decoration: none;
  transition: color 0.15s;
}
a:hover { color: var(--lk-red-dark); text-decoration: underline; }

.muted {
  color: var(--lk-gray-500);
  font-size: 14.5px;
  line-height: 1.5;
}

/* ============================================================================
   5. CARDS
============================================================================ */
.lk-card {
  background: var(--lk-white);
  border: 1px solid var(--lk-gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-md);
}

.lk-card--center { text-align: center; }

.lk-success-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--lk-red-tint);
  color: var(--lk-red);
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

/* ============================================================================
   6. FORMS
============================================================================ */
.lk-field {
  display: flex;
  flex-direction: column;
  margin-bottom: var(--space-md);
}

.lk-field label {
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--lk-gray-700);
  letter-spacing: -0.005em;
  text-transform: none;
}

.lk-field input,
.lk-field textarea,
.lk-field select {
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
  background: var(--lk-paper);
  border: 1px solid var(--lk-gray-200);
  border-radius: 12px;
  color: var(--lk-ink);
  width: 100%;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

.lk-field input:focus,
.lk-field textarea:focus,
.lk-field select:focus {
  border-color: var(--lk-ink);
  background: var(--lk-white);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.04);
}

.lk-field textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.lk-field input::placeholder,
.lk-field textarea::placeholder {
  color: var(--lk-gray-400);
}

.lk-select {
  font-family: inherit;
  font-size: 14px;
  padding: 10px 14px;
  border: 1px solid var(--lk-gray-200);
  border-radius: 999px;
  background: var(--lk-white);
  color: var(--lk-ink);
  font-weight: 500;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.lk-select:hover { border-color: var(--lk-gray-400); }
.lk-select:focus { outline: none; border-color: var(--lk-ink); box-shadow: 0 0 0 4px rgba(0,0,0,0.04); }

/* ============================================================================
   7. BUTTONS
============================================================================ */
.lk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.18s var(--ease);
  width: 100%;
  letter-spacing: -0.005em;
  line-height: 1;
}

.lk-btn--primary {
  background: var(--lk-red);
  color: var(--lk-white);
  border-color: var(--lk-red);
}
.lk-btn--primary:hover {
  background: var(--lk-red-dark);
  border-color: var(--lk-red-dark);
  color: var(--lk-white);
  text-decoration: none;
  transform: translateY(-1px);
}

.lk-btn--secondary {
  background: var(--lk-ink);
  color: var(--lk-white);
  border-color: var(--lk-ink);
}
.lk-btn--secondary:hover {
  background: var(--lk-gray-900);
  color: var(--lk-white);
  text-decoration: none;
  transform: translateY(-1px);
}

.lk-btn--ghost {
  background: var(--lk-gray-100);
  color: var(--lk-ink);
  border-color: var(--lk-gray-200);
}
.lk-btn--ghost:hover {
  background: var(--lk-gray-200);
  color: var(--lk-ink);
  text-decoration: none;
  border-color: var(--lk-gray-300);
}

.lk-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

.lk-btn--cta {
  font-size: 16px;
  padding: 17px 28px;
  letter-spacing: -0.01em;
  font-weight: 700;
}

@media (min-width: 480px) {
  .lk-btn { width: auto; }
  .lk-btn--block { width: 100%; }
}

/* ============================================================================
   8. VENDOR GRID — Bento-style layout
   Cards keep the existing JS-rendered structure; CSS gives them rhythm.
============================================================================ */
.lk-vendor-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 480px) {
  .lk-vendor-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (min-width: 768px) {
  .lk-vendor-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .lk-vendor-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    grid-auto-flow: dense;
  }
  /* Subtle bento rhythm: every 6th vendor card is double-wide */
  .lk-vendor-grid > .lk-vendor-card:nth-child(6n + 1) {
    grid-column: span 2;
  }
}

.lk-vendor-card {
  background: var(--lk-white);
  border: 1px solid var(--lk-gray-200);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  cursor: pointer;
  text-decoration: none;
  color: var(--lk-ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s;
  min-height: 96px;
  position: relative;
  overflow: hidden;
}

.lk-vendor-card:hover {
  transform: translateY(-2px);
  border-color: var(--lk-ink);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--lk-ink);
}

.lk-vendor-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--lk-gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 17px;
  color: var(--lk-ink);
  letter-spacing: -0.025em;
  flex-shrink: 0;
  overflow: hidden;
}

.lk-vendor-logo img { width: 100%; height: 100%; object-fit: cover; }

.lk-vendor-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  flex: 1;
  color: var(--lk-ink);
  line-height: 1.25;
}

.lk-vendor-chevron {
  font-size: 0;        /* Hide the chevron text — we use a styled circle instead */
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--lk-gray-100);
  color: var(--lk-gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s var(--ease);
}

.lk-vendor-chevron::after {
  content: '→';
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.lk-vendor-card:hover .lk-vendor-chevron {
  background: var(--lk-red);
  color: var(--lk-white);
  transform: translateX(2px);
}

/* ============================================================================
   9. BACK LINK
============================================================================ */
.lk-back-link {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--lk-gray-500);
  text-decoration: none;
  margin-bottom: var(--space-md);
  letter-spacing: -0.005em;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  background: var(--lk-gray-100);
  transition: all 0.15s;
}

.lk-back-link:hover {
  color: var(--lk-ink);
  background: var(--lk-gray-200);
  text-decoration: none;
}

/* ============================================================================
   10. SECTION DIVIDER
============================================================================ */
.lk-section-divider {
  border: none;
  border-top: 1px solid var(--lk-gray-200);
  margin: var(--space-xl) 0;
}

/* ============================================================================
   11. FILE LIST (vendor public page downloads)
============================================================================ */
.lk-file-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lk-file-list li { margin: 0; }

.lk-file-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  background: var(--lk-white);
  border: 1px solid var(--lk-gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lk-file-card:hover {
  border-color: var(--lk-gray-400);
  box-shadow: var(--shadow-md);
}

.lk-file-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--lk-red-tint);
  color: var(--lk-red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  text-transform: uppercase;
}

.lk-file-card__body { flex: 1; min-width: 0; }

.lk-file-card__name {
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
  color: var(--lk-ink);
  letter-spacing: -0.01em;
}

.lk-file-card__actions {
  display: flex;
  gap: 8px;
}

/* ============================================================================
   12. STATUS PILLS (file conversion status)
============================================================================ */
.lk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lk-status--converting {
  background: var(--lk-gray-100);
  color: var(--lk-gray-700);
}
.lk-status--converting::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lk-gray-400);
  animation: lkPulse 1.4s ease-in-out infinite;
}

.lk-status--ready {
  background: var(--lk-red-tint);
  color: var(--lk-red);
}
.lk-status--ready::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lk-red);
}

.lk-status--error {
  background: var(--lk-ink);
  color: var(--lk-white);
}

@keyframes lkPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ============================================================================
   13. FOOTER
============================================================================ */
.lk-footer {
  text-align: center;
  padding: var(--space-lg) var(--space-md);
  font-size: 12px;
  color: var(--lk-gray-500);
  background: transparent;
  border-top: 1px solid var(--lk-gray-200);
  margin-top: var(--space-xl);
  letter-spacing: -0.005em;
}

/* ============================================================================
   14. ANIMATIONS
============================================================================ */
@keyframes lkFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.lk-anim-in {
  animation: lkFadeUp 0.3s var(--ease) both;
}

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

.lk-skeleton {
  background: linear-gradient(90deg, var(--lk-gray-100) 25%, var(--lk-gray-50) 50%, var(--lk-gray-100) 75%);
  background-size: 200% 100%;
  animation: lkShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
  display: block;
}

/* ============================================================================
   15. UTILITIES
============================================================================ */
.lk-hidden  { display: none !important; }
.lk-loading { color: var(--lk-gray-500); font-style: italic; font-size: 14px; }
.lk-error   { color: var(--lk-red); font-weight: 600; }
.lk-success { color: var(--lk-red); font-weight: 600; }

.lk-stack > * + * { margin-top: var(--space-md); }
.lk-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.lk-spacer { flex: 1; }

/* ============================================================================
   16. ADMIN — TABS
============================================================================ */
.admin-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--lk-white);
  padding: 6px;
  border: 1px solid var(--lk-gray-200);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
}

.admin-tab {
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  background: transparent;
  color: var(--lk-gray-500);
  transition: all 0.15s;
  letter-spacing: -0.005em;
}

.admin-tab:hover { color: var(--lk-ink); background: var(--lk-gray-100); }

.admin-tab.is-active {
  background: var(--lk-ink);
  color: var(--lk-white);
}

.admin-tab.is-active:hover {
  background: var(--lk-gray-900);
  color: var(--lk-white);
}

.tab-badge {
  display: inline-block;
  margin-left: 8px;
  min-width: 20px;
  padding: 1px 7px;
  background: var(--lk-red);
  color: var(--lk-white);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
}

.admin-tab.is-active .tab-badge {
  background: var(--lk-white);
  color: var(--lk-red);
}

/* ============================================================================
   17. ADMIN — LIST ROWS (vendors / events)
============================================================================ */
.admin-list-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--lk-white);
  border: 1px solid var(--lk-gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  flex-wrap: wrap;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.admin-list-row:hover {
  border-color: var(--lk-gray-400);
  box-shadow: var(--shadow-md);
}

.admin-list-row .meta { flex: 1; min-width: 180px; }
.admin-list-row .meta .name {
  font-weight: 700;
  font-size: 16px;
  color: var(--lk-ink);
  letter-spacing: -0.01em;
}
.admin-list-row .meta .sub {
  color: var(--lk-gray-500);
  font-size: 13px;
  margin-top: 3px;
}

.admin-list-row .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-list-row .actions .lk-btn {
  width: auto;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.admin-detail-panel {
  background: var(--lk-paper);
  border: 1px solid var(--lk-gray-200);
  border-left: 3px solid var(--lk-red);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  margin-top: 10px;
}

/* iOS-style grouped list — admin vendor & event tabs */
#vendor-list:not(:empty),
#event-list:not(:empty) {
  background: var(--lk-white);
  border: 1px solid var(--lk-gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

#vendor-list .admin-list-row,
#event-list .admin-list-row {
  background: transparent;
  border: none;
  border-top: 1px solid var(--lk-gray-100);
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  transition: background 0.15s;
}

#vendor-list .admin-list-row:first-child,
#event-list .admin-list-row:first-child {
  border-top: none;
}

#vendor-list .admin-list-row:hover,
#event-list .admin-list-row:hover {
  background: var(--lk-gray-50);
  border-color: var(--lk-gray-100);
  box-shadow: none;
}

.admin-toggles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: var(--space-sm);
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  cursor: pointer;
  padding: 6px 0;
}

.admin-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--lk-red);
  cursor: pointer;
}

/* ============================================================================
   18. STATUS BADGES (events)
============================================================================ */
.status-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-badge--active   { background: var(--lk-red);     color: var(--lk-white); }
.status-badge--archived { background: var(--lk-gray-200); color: var(--lk-gray-700); }

/* ============================================================================
   19. PASSWORD BOX (admin shows generated vendor password)
============================================================================ */
.password-box {
  background: var(--lk-ink);
  color: var(--lk-white);
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-top: var(--space-sm);
  word-break: break-all;
  font-size: 15px;
  letter-spacing: 1px;
}

/* ============================================================================
   20. CALLOUT (informational notices)
============================================================================ */
.callout {
  background: var(--lk-ink);
  color: var(--lk-white);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  margin-top: var(--space-md);
  font-size: 13.5px;
  line-height: 1.5;
  border: none;
}

.callout strong {
  color: var(--lk-red);
  font-weight: 700;
}

/* ============================================================================
   21. SAMPLE REQUEST INBOX
============================================================================ */
.request-row {
  position: relative;
  padding: var(--space-md) var(--space-lg);
  background: var(--lk-white);
  border: 1px solid var(--lk-gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 10px;
  border-left: 4px solid var(--lk-gray-300);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.request-row:hover {
  box-shadow: var(--shadow-md);
}

.request-row.is-unread {
  border-left-color: var(--lk-red);
  background: var(--lk-white);
}

.request-row .req-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.request-row .req-vendor {
  font-weight: 700;
  font-size: 16px;
  color: var(--lk-ink);
  letter-spacing: -0.01em;
}

.request-row .req-meta {
  font-size: 12px;
  color: var(--lk-gray-500);
}

.request-row .req-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 4px 14px;
  font-size: 13.5px;
  margin: 8px 0;
}

.request-row .req-grid dt {
  color: var(--lk-gray-500);
  font-weight: 600;
}

.request-row .req-grid dd {
  margin: 0;
  color: var(--lk-ink);
  word-break: break-word;
  white-space: pre-wrap;
}

.request-row .req-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.request-row .req-actions .lk-btn {
  width: auto;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
}

.unread-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--lk-red);
  color: var(--lk-white);
  text-transform: uppercase;
}

/* ============================================================================
   22. SETTINGS TAB
============================================================================ */
.settings-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-tile {
  background: var(--lk-white);
  border: 1px solid var(--lk-gray-200);
  border-radius: var(--radius-md);
  padding: var(--space-lg) var(--space-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-tile:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--lk-red);
  line-height: 1;
  letter-spacing: -0.025em;
}

.stat-label {
  font-size: 11px;
  color: var(--lk-gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 8px;
  font-weight: 700;
}

.stat-sub {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--lk-gray-400);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 3px;
}

.settings-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 0;
  border-bottom: 1px solid var(--lk-gray-100);
  gap: var(--space-sm);
}

.settings-row:last-child { border-bottom: none; }

.settings-row__label {
  flex: 0 0 180px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lk-gray-500);
  letter-spacing: -0.005em;
}

.settings-row__value {
  flex: 1;
  font-size: 14px;
  color: var(--lk-ink);
  min-width: 200px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.status-pill--on  { background: var(--lk-red-tint); color: var(--lk-red); }
.status-pill--on::before  { background: var(--lk-red); }
.status-pill--off { background: var(--lk-gray-100); color: var(--lk-gray-500); }
.status-pill--off::before { background: var(--lk-gray-400); }

/* ============================================================================
   23. ANALYTICS TAB
============================================================================ */
.analytics-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: var(--space-lg);
}

.analytics-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.analytics-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lk-gray-500);
  border-bottom: 1px solid var(--lk-gray-200);
  font-weight: 700;
}

.analytics-table td {
  padding: 12px;
  border-bottom: 1px solid var(--lk-gray-100);
  vertical-align: middle;
  color: var(--lk-ink);
}

.analytics-table tr:last-child td { border-bottom: none; }

.analytics-table td.num {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--lk-ink);
  white-space: nowrap;
}

.attendee-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--lk-gray-100);
  font-size: 14px;
}

.attendee-row:last-child { border-bottom: none; }

.attendee-row .att-name {
  font-weight: 700;
  line-height: 1.4;
  color: var(--lk-ink);
  letter-spacing: -0.01em;
}

.attendee-row .att-meta {
  color: var(--lk-gray-500);
  font-size: 12.5px;
  margin-top: 3px;
  line-height: 1.4;
}

/* ============================================================================
   24. SCAN ITEM FEATURE — Floating action buttons
============================================================================ */
.scan-fab {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 200;
}

/* Stop page content from sitting beneath the mobile tab bar */
body:has(.scan-fab) main {
  padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.scan-fab__scan-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lk-red);
  color: var(--lk-white);
  border: none;
  border-radius: 999px;
  padding: 14px 22px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(200, 16, 46, 0.32), 0 4px 8px rgba(200, 16, 46, 0.18);
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  letter-spacing: -0.005em;
}

.scan-fab__scan-btn:hover {
  background: var(--lk-red-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(200, 16, 46, 0.40), 0 6px 12px rgba(200, 16, 46, 0.22);
}
.scan-fab__scan-btn:active { transform: translateY(0); }

.scan-fab__list-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lk-ink);
  color: var(--lk-white);
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.scan-fab__list-btn:hover { background: var(--lk-gray-900); transform: translateY(-1px); }

.scan-fab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--lk-red);
  color: var(--lk-white);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

/* Desktop variant: list button shown in footer area instead of FAB */
.scan-desktop-list {
  display: none;
  justify-content: center;
  padding: var(--space-md);
  border-top: 1px solid var(--lk-gray-200);
}

.scan-desktop-list__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lk-ink);
  color: var(--lk-white);
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.scan-desktop-list__btn:hover { background: var(--lk-gray-900); transform: translateY(-1px); }

.scan-desktop-list__badge {
  background: var(--lk-red);
  color: var(--lk-white);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 800;
}

@media (min-width: 641px) {
  .scan-fab {
    bottom: 24px;
    right: 16px;
    left: auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: none;
  }
  body:has(.scan-fab) main { padding-bottom: var(--space-2xl); }
  .scan-fab__list-btn { display: none; }
  .scan-desktop-list  { display: flex; }
}

/* ============================================================================
   25. SCAN ITEM — Overlays / loading
============================================================================ */
.scan-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.5);
  z-index: 300;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.scan-overlay--visible { display: block; }

.scan-loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.scan-loading--visible { display: flex; }

.scan-loading__box {
  background: var(--lk-white);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.scan-loading__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--lk-gray-100);
  border-top-color: var(--lk-red);
  border-radius: 50%;
  animation: scanSpin 0.75s linear infinite;
}

@keyframes scanSpin { to { transform: rotate(360deg); } }

.scan-loading__text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--lk-ink);
  letter-spacing: -0.005em;
}

/* ============================================================================
   26. SCAN ITEM — Confirm modal (slides up from bottom on mobile)
============================================================================ */
.scan-confirm {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--lk-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 28px var(--space-lg) var(--space-xl);
  z-index: 400;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 -10px 30px rgba(10, 10, 10, 0.16);
}

.scan-confirm--visible { display: block; }

.scan-confirm__title {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  color: var(--lk-ink);
}

.scan-confirm__subtitle {
  font-size: 13px;
  color: var(--lk-gray-500);
  margin: 0 0 var(--space-lg);
}

.scan-confirm__actions {
  display: flex;
  gap: 10px;
  margin-top: var(--space-md);
}

.scan-confirm__actions .lk-btn { flex: 1; }

@media (min-width: 641px) {
  .scan-confirm {
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 480px;
    border-radius: var(--radius-xl);
    max-height: 85vh;
  }
}

/* ============================================================================
   27. SCAN ITEM — My List slide-up panel
============================================================================ */
.scan-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--lk-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 400;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  transform: translateY(100%);
  transition: transform 0.3s var(--ease);
  box-shadow: 0 -10px 30px rgba(10, 10, 10, 0.16);
}

.scan-panel--open { transform: translateY(0); }

.scan-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: 1px solid var(--lk-gray-100);
  flex-shrink: 0;
}

.scan-panel__title {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.015em;
  color: var(--lk-ink);
}

.scan-panel__close {
  background: var(--lk-gray-100);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lk-gray-500);
  transition: all 0.15s;
  flex-shrink: 0;
}

.scan-panel__close:hover { background: var(--lk-gray-200); color: var(--lk-ink); }

.scan-panel__list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) var(--space-lg) var(--space-xl);
}

.scan-panel__loading,
.scan-panel__empty {
  text-align: center;
  color: var(--lk-gray-500);
  padding: var(--space-xl) 0;
  font-size: 14px;
  line-height: 1.6;
}

@media (min-width: 641px) {
  .scan-panel {
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    width: 100%;
    max-width: 540px;
    border-radius: var(--radius-xl);
    max-height: 75vh;
    opacity: 0;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .scan-panel--open {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* ============================================================================
   28. SCAN ITEM — Item rows in My List
============================================================================ */
.scan-item-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--lk-gray-100);
}

.scan-item-row:last-child { border-bottom: none; }

.scan-item-row__body { flex: 1; min-width: 0; }

.scan-item-row__vendor {
  font-weight: 700;
  font-size: 15px;
  color: var(--lk-ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.scan-item-row__fields {
  font-size: 13px;
  color: var(--lk-gray-500);
  margin-bottom: 4px;
}

.scan-item-row__label {
  font-weight: 700;
  color: var(--lk-ink);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.scan-item-row__desc {
  font-size: 14px;
  color: var(--lk-ink);
}

.scan-item-row__notes {
  font-size: 13px;
  color: var(--lk-gray-500);
  font-style: italic;
  margin-top: 4px;
}

.scan-item-row__delete {
  background: var(--lk-gray-100);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  min-width: 30px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lk-gray-500);
  transition: all 0.15s;
  margin-top: 2px;
}

.scan-item-row__delete:hover {
  background: var(--lk-red-tint);
  color: var(--lk-red);
}

/* ============================================================================
   29. SCAN ITEM — Delete confirm dialog
============================================================================ */
.scan-delete-dialog {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--lk-white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg);
  z-index: 500;
  box-shadow: 0 -10px 30px rgba(10, 10, 10, 0.18);
}

.scan-delete-dialog--visible { display: block; }

.scan-delete-dialog__msg {
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 var(--space-lg);
  color: var(--lk-ink);
  letter-spacing: -0.01em;
}

.scan-delete-dialog__actions {
  display: flex;
  gap: 10px;
}

.scan-delete-dialog__actions .lk-btn { flex: 1; }

@media (min-width: 641px) {
  .scan-delete-dialog {
    bottom: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 380px;
    border-radius: var(--radius-xl);
  }
}

/* ============================================================================
   30. SCAN ITEM — Toast
============================================================================ */
.scan-toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--lk-ink);
  color: var(--lk-white);
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s var(--ease);
  pointer-events: none;
  z-index: 600;
  box-shadow: var(--shadow-lg);
  letter-spacing: -0.005em;
}

.scan-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =============================================================================
   END
============================================================================= */
