:root {
  --primary: #0A0A0A;
  --blue: #0066FF;
  --blue-dark: #0050CC;
  --gold: #FFC200;
  --neutral: #F5F6F8;
  --border: #E4E7EC;
  --text: #1A1D23;
  --text-muted: #667085;
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.55;
}

a { color: var(--blue); text-decoration: none; }

/* Round 21: a real base rule for the many standalone .hint spans/paragraphs
   used across the app — previously only .form-group .hint / .pm-body .hint /
   etc. had their own font-size, so a .hint outside those contexts fell back
   to full body-text size with no muted color, inconsistent with the rest.
   14px was chosen (not smaller) per the "font sizes are too small,
   especially at the back end" feedback — this is a floor, not a shrink. */
.hint { font-size: 14px; color: var(--text-muted); }
a:hover { text-decoration: underline; }

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

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 20;
}
.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1160px;
  margin: 0 auto;
}
/* Round 25: brand logo lockup — the FP monogram mark plus the wordmark,
   with a small "Business" badge attached directly under it so the mark
   always reads as this platform (not the retail store) wherever it's used
   (site header, footer, staff header). See public/img/logo-mark.svg. */
.brand-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo-icon { flex-shrink: 0; display: block; }
.brand-logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-logo-name {
  font-weight: 800;
  font-size: 19px;
  color: var(--primary);
  letter-spacing: -0.02em;
}
.brand-logo-name .accent { color: var(--blue); }
.brand-logo-badge {
  align-self: flex-start;
  margin-top: 3px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
}
/* On the dark footer the wordmark needs to flip to light text; the badge
   stays the same solid blue since it's already self-contained. */
footer.site-footer .brand-logo-name { color: #fff; }
nav.main-nav { display: flex; gap: 28px; align-items: center; }
nav.main-nav a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
}
nav.main-nav a:hover { color: var(--blue); text-decoration: none; }
.nav-cta {
  background: var(--blue);
  color: #fff !important;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--blue-dark); }

/* Cart icon in the header nav */
.cart-link { position: relative; display: inline-flex; align-items: center; padding: 4px; }
.cart-link svg { width: 22px; height: 22px; display: block; stroke: var(--text); }
.cart-link:hover svg { stroke: var(--blue); }
.cart-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--blue); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  border-radius: 999px; min-width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

/* Full-bleed hero slider (home + For Businesses), background image or
   gradient behind the headline/subhead/buttons, staff-editable content. */
.hero-slider { position: relative; min-height: 520px; overflow: hidden; display: flex; align-items: center; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; z-index: 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue-dark) 100%);
  background-size: cover; background-position: center;
  display: flex; align-items: center;
  transition: opacity 0.7s ease;
}
.hero-slide.active { opacity: 1; z-index: 1; }
.hero-slide-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(10,10,10,0.80) 0%, rgba(10,10,10,0.55) 45%, rgba(0,80,204,0.35) 100%);
}
.hero-slide-inner { position: relative; z-index: 2; width: 100%; }
.hero-slide-content { max-width: 620px; color: #fff; padding: 90px 0; }
.hero-slide-content h1 { font-size: 44px; line-height: 1.15; margin: 0 0 16px; letter-spacing: -0.02em; font-weight: 800; color: #fff; }
.hero-slide-content p.sub { font-size: 18px; color: rgba(255,255,255,0.88); max-width: 560px; margin: 0 0 28px; }
.hero-btn-secondary { background: transparent !important; color: #fff !important; border-color: rgba(255,255,255,0.5) !important; }
.hero-btn-secondary:hover { border-color: #fff !important; background: rgba(255,255,255,0.1) !important; color: #fff !important; }
.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,0.15); color: #fff; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.hero-arrow:hover { background: rgba(255,255,255,0.3); }
.hero-arrow-left { left: 20px; }
.hero-arrow-right { right: 20px; }
.hero-dots { position: absolute; bottom: 22px; left: 0; right: 0; z-index: 3; display: flex; justify-content: center; gap: 8px; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; border: none; background: rgba(255,255,255,0.4); cursor: pointer; padding: 0; }
.hero-dot.active { background: #fff; }
@media (max-width: 700px) {
  .hero-slide-content h1 { font-size: 30px; }
  .hero-slider { min-height: 460px; }
}

/* Hero */
.hero {
  background: linear-gradient(180deg, var(--neutral) 0%, #fff 100%);
  padding: 72px 24px;
  text-align: center;
}
.hero h1 {
  font-size: 44px;
  line-height: 1.15;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.hero h1 .accent { color: var(--blue); }
.hero p.sub {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.badge-row {
  display: flex;
  gap: 28px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 14px;
}
.badge-row span { display: flex; align-items: center; gap: 8px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); text-decoration: none; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }
.btn-gold { background: var(--gold); color: #1A1D23; }
.btn-gold:hover { opacity: 0.9; text-decoration: none; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Sections */
section { padding: 56px 24px; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; margin: 0 0 10px; font-weight: 800; letter-spacing: -0.01em; }
.section-title p { color: var(--text-muted); font-size: 16px; margin: 0; }

/* Grids & Cards */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  background: #fff;
  transition: box-shadow 0.15s, transform 0.15s;
}
.card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.06); }

.service-card { text-align: left; display: flex; flex-direction: column; height: 100%; padding: 0; overflow: hidden; }
.service-card .thumb { width: 100%; aspect-ratio: 4 / 3; background: var(--neutral); display: block; object-fit: contain; border-bottom: 1px solid var(--border); }
.service-card .card-body { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.service-card .emoji { font-size: 34px; margin-bottom: 12px; }
.service-card h3 { margin: 0 0 8px; font-size: 18px; }
.service-card p.desc { color: var(--text-muted); font-size: 14px; margin: 0 0 16px; flex-grow: 1; }
.service-card .price-from { font-weight: 700; color: var(--blue); margin-bottom: 14px; }
.category-pill {
  display: inline-block;
  background: var(--neutral);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Catalogue header + search — taller by default (Round 23), and optionally
   a real staff-uploaded background photo (set from /staff/settings) in
   place of the plain gradient; a dark gradient overlay keeps the heading and
   search box readable over any photo without needing per-photo tuning. */
.catalogue-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue-dark) 100%);
  border-radius: var(--radius);
  padding: 40px 32px;
  min-height: 220px;
  color: #fff;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.catalogue-hero-with-image { background-color: var(--primary); }
.catalogue-hero-with-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,20,40,0.72) 0%, rgba(10,20,40,0.45) 100%);
}
.catalogue-hero-content, .catalogue-hero-with-image .search-box { position: relative; z-index: 1; }
.catalogue-hero h2 { margin: 0 0 8px; font-size: 26px; color: #fff; }
.catalogue-hero p { margin: 0; color: #cfd9f2; font-size: 14px; max-width: 460px; }
.catalogue-hero-with-image p { color: #e6ebf5; }
@media (max-width: 700px) { .catalogue-hero { min-height: 180px; } }
.search-box { display: flex; gap: 0; max-width: 360px; width: 100%; }
.search-box input {
  flex-grow: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 8px 0 0 8px;
  font-size: 14px;
}
.search-box button {
  border-radius: 0 8px 8px 0;
  border: none;
}

/* Small item thumbnails on cart / checkout / payment / tracking / staff pages */
.item-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--neutral);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-shrink: 0;
}
.item-row { display: flex; gap: 14px; align-items: flex-start; }

.category-filter { display: flex; gap: 10px; justify-content: center; margin-bottom: 32px; flex-wrap: wrap; }
.category-filter a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
}
.category-filter a.active, .category-filter a:hover { background: var(--blue); color: #fff; border-color: var(--blue); text-decoration: none; }

/* Stepper */
.stepper { display: flex; justify-content: center; gap: 0; margin-bottom: 40px; flex-wrap: wrap; }
.stepper .step {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}
.stepper .step .dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--neutral);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin-right: 8px;
  font-size: 13px;
}
.stepper .step.active .dot { background: var(--blue); color: #fff; }
.stepper .step.done .dot { background: var(--success); color: #fff; }
.stepper .step.active, .stepper .step.done { color: var(--text); }
.stepper .sep { width: 32px; height: 1px; background: var(--border); margin: 0 12px; }

/* Configurator layout — 3 columns: sticky image, scrolling options, sticky price/CTA */
.configure-3col { display: grid; grid-template-columns: 380px minmax(0, 1fr) 340px; gap: 36px; align-items: start; }
.configure-col-image { position: sticky; top: 90px; }
.configure-col-price { position: sticky; top: 90px; }
@media (max-width: 1100px) {
  .configure-3col { grid-template-columns: 320px minmax(0, 1fr); }
  .configure-col-price { grid-column: 1 / -1; position: static; }
}
@media (max-width: 760px) {
  .configure-3col { grid-template-columns: 1fr; }
  .configure-col-image { position: static; }
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.form-group .hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.form-control {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
}
.form-control:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,102,255,0.12); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Staff admin: dynamic tiers / option-group builders */
.builder-box { border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #FAFBFC; margin-bottom: 12px; }
.builder-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.builder-group { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: #fff; margin-bottom: 12px; }
.builder-choice-row { display: grid; grid-template-columns: 1fr 140px auto; gap: 10px; align-items: center; margin-bottom: 8px; }
.btn-tiny { padding: 5px 10px; font-size: 12.5px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.checkbox-row input[type="checkbox"] { width: 17px; height: 17px; }
.checkbox-row label { font-weight: 600; font-size: 14px; margin: 0; }

.image-manager { display: flex; flex-wrap: wrap; gap: 14px; }
.existing-image-item { position: relative; width: 130px; border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; }
.existing-image-item img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; background: var(--neutral); display: block; }
.existing-image-actions { display: flex; align-items: center; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.existing-image-actions .btn-tiny { padding: 3px 8px; }
.cover-badge { position: absolute; top: 4px; left: 4px; background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }

.radio-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  margin-bottom: 8px;
  font-size: 14px;
}
.radio-card input { margin-right: 10px; }
.radio-card .delta { color: var(--text-muted); font-weight: 600; font-size: 13px; }
.radio-card:has(input:checked) { border-color: var(--blue); background: #F0F6FF; }

/* Product image gallery (configure page) */
.gallery {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--neutral);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
}
.gallery-main { width: 100%; height: 100%; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.gallery-arrow:hover { border-color: var(--blue); color: var(--blue); }
.gallery-arrow-left { left: 12px; }
.gallery-arrow-right { right: 12px; }
.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  margin-bottom: 8px;
}
.gallery-thumb {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 2px solid var(--border);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  background: var(--neutral);
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumb.active { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(0,102,255,0.15); }

/* Bulk discount callouts */
.bulk-discount-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F0FDF4;
  border: 1px solid #86EFAC;
  color: var(--success);
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}
.bulk-discount-hint { font-size: 13.5px; color: var(--text-muted); margin-bottom: 16px; }

.price-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--neutral);
  position: sticky;
  top: 90px;
}
.price-box h4 { margin: 0 0 16px; font-size: 15px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); }
.price-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 10px; color: var(--text-muted); }
.price-row.total { font-size: 20px; font-weight: 800; color: var(--text); border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.price-row.total .value { color: var(--blue); }

/* Order summary / review */
.summary-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.summary-table td { padding: 6px 0; font-size: 14.5px; line-height: 1.3; }
.summary-table td:first-child { color: var(--text-muted); width: 45%; }
.summary-table td:last-child { text-align: right; font-weight: 600; }

.upload-box {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  background: var(--neutral);
  position: relative;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-box:hover, .upload-box.dragover { border-color: var(--blue); background: #F0F6FF; }
.upload-box input[type=file] {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.upload-box .upload-icon { font-size: 26px; margin-bottom: 6px; }
.upload-box .upload-title { margin: 0 0 6px; font-weight: 600; }
.upload-box .upload-selected {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; color: var(--success); flex-wrap: wrap; font-size: 14px;
}
.upload-box .upload-selected .remove-file {
  color: var(--danger); font-weight: 700; text-decoration: underline; cursor: pointer;
}

/* Borderless spec rows (cart item configuration summary) */
.spec-list { margin: 4px 0; }
.spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 14px; }
.spec-row span:first-child { color: var(--text-muted); }
.spec-row span:last-child { font-weight: 600; text-align: right; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}

.alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FCA5A5; }
.alert-success { background: #F0FDF4; color: var(--success); border: 1px solid #86EFAC; }
.alert-info { background: #EFF6FF; color: var(--blue-dark); border: 1px solid #93C5FD; }

/* Payment box */
.pay-method {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.pay-method h4 { margin: 0 0 10px; font-size: 15px; }
.pay-method .kv { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed var(--border); }
.pay-method .kv:last-child { border-bottom: none; }
.pay-method .kv strong { font-weight: 700; }

/* Track timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 16px; padding-bottom: 26px; position: relative; }
.timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 11px; top: 26px; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline .tdot { width: 24px; height: 24px; border-radius: 50%; background: var(--blue); flex-shrink: 0; margin-top: 2px; }
.timeline .content strong { display: block; margin-bottom: 2px; }
.timeline .content span { color: var(--text-muted); font-size: 13px; }

/* Footer */
footer.site-footer { background: var(--primary); color: #cfd3da; padding: 48px 24px 28px; margin-top: 60px; }
footer.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
footer.site-footer h4 { color: #fff; margin: 0 0 4px; }
footer.site-footer .fine { font-size: 12.5px; color: #8a90a0; margin-top: 24px; text-align: center; width: 100%; }

/* Round 26 — "Stay Connected" footer column: social icon links + an
   inert (visual-only, no backend yet) email signup, styled to echo the
   retail site's (frameityprints.com) own footer treatment. */
.footer-newsletter-copy { font-size: 13.5px; color: #9aa0ad; margin: 0 0 12px; max-width: 240px; }
.footer-newsletter-form { display: flex; border: 1px solid rgba(255,255,255,0.16); border-radius: 8px; overflow: hidden; max-width: 240px; }
.footer-newsletter-form input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  padding: 10px 12px;
  color: #fff;
  font-size: 13.5px;
}
.footer-newsletter-form input::placeholder { color: #7d8494; }
.footer-newsletter-form input:focus { outline: none; }
.footer-newsletter-form button {
  background: var(--blue);
  border: none;
  padding: 0 14px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.footer-newsletter-form button:hover { background: var(--blue-dark); }
.footer-newsletter-form button svg { width: 15px; height: 15px; }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.15s ease;
}
.footer-social a:hover { background: var(--blue); }
.footer-social svg { width: 16px; height: 16px; }

/* Tables (staff) */
table.staff-table { width: 100%; border-collapse: collapse; }
table.staff-table th, table.staff-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 15px; }
table.staff-table th { color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; }
table.staff-table tr:hover { background: var(--neutral); }

.stat-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 900px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
.stat-card { border: 1px solid var(--border); border-radius: 10px; padding: 16px; }

/* Customer "My Account" dashboard polish (Round 10) */
.account-hero-card { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border: 1px solid var(--border); border-radius: 12px; margin-top: 24px; flex-wrap: wrap; }
.account-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 24px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.account-quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 22px; }
@media (max-width: 700px) { .account-quick-actions { grid-template-columns: 1fr; } }
.account-qa-card {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px;
  text-decoration: none !important; color: var(--text) !important; font-weight: 600; font-size: 14px; transition: border-color 0.15s;
}
.account-qa-card:hover { border-color: var(--blue); }
.account-qa-icon { font-size: 20px; }
.stat-card .num { font-size: 24px; font-weight: 800; }
.stat-card .lbl { font-size: 13.5px; color: var(--text-muted); }

.login-box { max-width: 380px; margin: 80px auto; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); }

/* Round 16: widened from 1.3fr so the Order Items table (Product/Details
   columns especially) has enough room to let text flow across 1-2 lines
   instead of being squeezed against the sidebar's fixed-width status panels. */
/* align-items is deliberately "stretch" (the default), not "start": a
   position:sticky child (the Order Summary / Submit card on cart, checkout,
   payment and the quote page) needs its own direct parent — the grid item —
   to be as TALL as the row itself in order to have anywhere to "stick" while
   the taller left column scrolls past. With align-items:start the grid item
   shrinks to the sticky card's own content height, leaving no room to stick
   at all — found while investigating a report that the quote page's Submit
   card wasn't staying in view on scroll, but this affected every page using
   this pattern, not just that one. Stretching the (unstyled, background-less)
   grid-item div has no visible effect other than giving sticky room to work. */
.two-col { display: grid; grid-template-columns: 1.7fr 1fr; gap: 32px; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr !important; } }

/* Payment page: method selection (left) + order summary (right) */
.payment-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; }
@media (max-width: 900px) { .payment-layout { grid-template-columns: 1fr; } }
.payment-method-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.payment-method-card {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: border-color 0.15s;
}
.payment-method-card:hover { border-color: var(--blue); }
.payment-method-card.active { border-color: var(--blue); background: rgba(0,102,255,0.04); }
.payment-method-card.disabled { opacity: 0.5; cursor: not-allowed; }
.payment-method-card input[type="radio"] { margin-top: 3px; }
.pm-icon { font-size: 22px; line-height: 1; }
.pm-body { display: flex; flex-direction: column; gap: 3px; }
.pm-body strong { font-size: 15.5px; }
.pm-body .hint { margin: 0; }
.method-panel { display: none; padding-top: 6px; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 16px; }

/* Business landing page */
.biz-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 20px 0 48px; }
@media (max-width: 900px) { .biz-hero { grid-template-columns: 1fr; } }
.biz-hero .eyebrow { color: var(--blue); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 10px; }
.biz-hero h1 { font-size: 42px; line-height: 1.1; margin: 0 0 16px; font-weight: 800; letter-spacing: -0.02em; }
.biz-hero p.sub { color: var(--text-muted); font-size: 17px; margin: 0 0 20px; max-width: 520px; }
.biz-checklist { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 26px; font-size: 14px; color: var(--text); font-weight: 500; }
.biz-checklist span { display: flex; align-items: center; gap: 6px; }
.hero-placeholder-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue-dark) 55%, var(--blue) 100%);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 20px;
}
.feature-grid-item { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--neutral); }
.feature-grid-item .icon { font-size: 24px; margin-bottom: 10px; }
.feature-grid-item h4 { margin: 0 0 6px; font-size: 15px; }
.feature-grid-item p { margin: 0; font-size: 13px; color: var(--text-muted); }
.how-it-works-step { text-align: center; }
.how-it-works-step .num {
  width: 36px; height: 36px; border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 12px;
}
.segment-chip { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; text-align: center; background: #fff; }
.segment-chip .icon { font-size: 22px; margin-bottom: 8px; }
.cta-banner {
  background: var(--primary); color: #fff; border-radius: var(--radius);
  padding: 40px 32px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin: 0 0 8px; font-size: 26px; }
.cta-banner p { color: #cfd3da; margin: 0; }

/* ==========================================================================
   Staff portal shell (Round 13) — dark-chrome-by-default design language:
   sidebar, topbar and contextual side panels are dark navy by default
   (matching the reference mockup); main content stays on white cards in
   both modes, since the mockup itself pairs a dark shell with white
   content cards rather than darkening everything. The theme toggle
   (staff-header/staff-footer) now opts INTO a fully light shell instead
   of opting into dark — data-theme="light" is the override, no
   data-theme attribute (or data-theme="dark") is the default.
   Chrome-only variables below are scoped to body.staff-body so they never
   leak into the public site or the separate Partner Portal page.
   ========================================================================== */
body.staff-body {
  margin: 0;
  /* Round 16: dark is a genuine full-page theme again (chrome AND content
     cards/tables/forms), matching how Round 9's dark mode worked — not just
     the dark sidebar/topbar/panels Round 14 introduced. Redefining the same
     core semantic variables everything already reads (--text, --border,
     --neutral, etc.) means .card/table.staff-table/.form-control and every
     other component built against them go dark automatically; only the
     handful below with a hardcoded #fff background need an explicit
     override right after this block. */
  --primary: #E9EBF0;
  --blue: #5B9BFF;
  --blue-dark: #3D7CE0;
  --neutral: #20242C;
  --border: #333844;
  --text: #E9EBF0;
  --text-muted: #99A2B3;
  --success: #34D399;
  --warning: #FBBF24;
  --danger: #F87171;
  --staff-canvas: #10151F;
  --staff-sidebar: #141D2A;
  --staff-topbar: #141D2A;
  --staff-panel: #1B2330;
  --staff-panel-border: #2A3344;
  --staff-border-dark: #262F40;
  --staff-ondark: #F4F6FA;
  --staff-ondark-muted: #8891A3;
  --staff-hover-dark: #1E2836;
  --staff-accent: #2E6CF6;
  --staff-accent-dark: #1B4FCE;
  --staff-avatar-bg: #2E6CF6;
  background: var(--staff-canvas);
  color: var(--text);
}
html[data-theme="light"] body.staff-body {
  --primary: #0A0A0A;
  --blue: #0066FF;
  --blue-dark: #0050CC;
  --neutral: #F5F6F8;
  --border: #E4E7EC;
  --text: #1A1D23;
  --text-muted: #667085;
  --success: #16A34A;
  --warning: #F59E0B;
  --danger: #DC2626;
  --staff-canvas: var(--neutral);
  --staff-sidebar: #fff;
  --staff-topbar: #fff;
  --staff-panel: #fff;
  --staff-panel-border: var(--border);
  --staff-border-dark: var(--border);
  --staff-ondark: var(--text);
  --staff-ondark-muted: var(--text-muted);
  --staff-hover-dark: var(--neutral);
  --staff-accent: var(--blue);
  --staff-accent-dark: var(--blue-dark);
  --staff-avatar-bg: var(--blue);
}
/* Components with a hardcoded #fff background rather than a variable one —
   these still need an explicit dark value (the variable redefinition above
   can't reach a literal color), reset back to white under the light theme. */
body.staff-body .card,
body.staff-body .stat-card,
body.staff-body .form-control,
body.staff-body select.form-control,
body.staff-body .btn-secondary,
body.staff-body .builder-box,
body.staff-body .builder-group,
body.staff-body .existing-image-item {
  background: var(--staff-panel);
  color: var(--text);
  border-color: var(--border);
}
body.staff-body .btn-secondary:hover { border-color: var(--staff-accent); color: var(--staff-accent); }
body.staff-body input[disabled].form-control { background: var(--staff-hover-dark) !important; color: var(--text-muted); }
body.staff-body .alert-error { background: #3A1F22; border-color: #6B2E33; color: #F87171; }
html[data-theme="light"] body.staff-body .card,
html[data-theme="light"] body.staff-body .stat-card,
html[data-theme="light"] body.staff-body .form-control,
html[data-theme="light"] body.staff-body select.form-control,
html[data-theme="light"] body.staff-body .btn-secondary,
html[data-theme="light"] body.staff-body .builder-box,
html[data-theme="light"] body.staff-body .builder-group,
html[data-theme="light"] body.staff-body .existing-image-item {
  background: #fff;
}
html[data-theme="light"] body.staff-body input[disabled].form-control { background: #F5F6F8 !important; }
html[data-theme="light"] body.staff-body .alert-error { background: #FDECEC; border-color: #F5C6C6; color: #B42318; }

/* Round 16 — a few more staff-portal components with a hardcoded #fff
   background (dashboard stat cards, the summary donut's center hole, the
   Manage Products slide-over panel, and the category filter pills) that the
   variable redefinition above can't reach on its own. Same pattern: dark by
   default, reset to #fff under the light theme. These mirror the original
   Round 9 html[data-theme="dark"] overrides that Round 14 removed. */
body.staff-body .dash-stat-card,
body.staff-body .dash-donut-hole,
body.staff-body .product-drawer,
body.staff-body .btn-danger-outline,
body.staff-body .btn-danger-outline:disabled,
body.staff-body .staff-filter-bar a {
  background: var(--staff-panel);
  border-color: var(--border);
  color: var(--text);
}
body.staff-body .btn-danger-outline { color: var(--danger); border-color: var(--danger); }
body.staff-body .btn-danger-outline:disabled { color: var(--text-muted); border-color: var(--border); }
body.staff-body .staff-filter-bar a { color: var(--text); }
body.staff-body .staff-filter-bar a.active,
body.staff-body .staff-filter-bar a:hover {
  background: var(--staff-accent); color: #fff; border-color: var(--staff-accent);
}
html[data-theme="light"] body.staff-body .dash-stat-card,
html[data-theme="light"] body.staff-body .dash-donut-hole,
html[data-theme="light"] body.staff-body .product-drawer,
html[data-theme="light"] body.staff-body .btn-danger-outline,
html[data-theme="light"] body.staff-body .btn-danger-outline:disabled,
html[data-theme="light"] body.staff-body .staff-filter-bar a {
  background: #fff;
}

.staff-shell { display: flex; align-items: flex-start; min-height: 100vh; }

.staff-sidebar {
  width: 250px; flex-shrink: 0; min-height: 100vh; background: var(--staff-sidebar);
  border-right: 1px solid var(--staff-border-dark); display: flex; flex-direction: column;
  padding: 20px 0; position: sticky; top: 0; transition: background 0.15s, border-color 0.15s;
}
.staff-logo {
  display: block; font-weight: 800; font-size: 17px; color: var(--staff-ondark) !important;
  text-decoration: none !important; padding: 0 20px 18px; border-bottom: 1px solid var(--staff-border-dark); margin-bottom: 14px;
}
.staff-logo span { color: var(--staff-accent); }
.staff-logo small { display: block; font-weight: 500; font-size: 11px; color: var(--staff-ondark-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }

.staff-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.staff-nav a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border-radius: 8px; color: var(--staff-ondark-muted) !important;
  text-decoration: none !important; font-size: 14.5px; font-weight: 600;
}
.staff-nav a:hover { background: var(--staff-hover-dark); color: var(--staff-ondark) !important; }
.staff-nav a.active { background: var(--staff-accent); color: #fff !important; }
.staff-nav-badge {
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px; min-width: 18px; text-align: center; line-height: 1.5;
}
.staff-nav a.active .staff-nav-badge { background: #fff; color: var(--staff-accent); }

.staff-filter-group { padding: 16px 20px 0; margin-top: 10px; border-top: 1px solid var(--staff-border-dark); }
.staff-filter-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--staff-ondark-muted); margin-bottom: 8px; }
.staff-filter-link {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 7px; font-size: 14.5px; color: var(--staff-ondark-muted) !important; text-decoration: none !important;
}
.staff-filter-link:hover { background: var(--staff-hover-dark); color: var(--staff-ondark) !important; }
.staff-filter-link.active { background: rgba(46,108,246,0.16); color: var(--staff-accent) !important; font-weight: 700; }
.staff-filter-count { font-size: 11.5px; color: var(--staff-ondark-muted); background: var(--staff-hover-dark); border-radius: 20px; padding: 1px 7px; }
.staff-filter-link.active .staff-filter-count { color: var(--staff-accent); background: rgba(46,108,246,0.18); }

.staff-sidebar-bottom { margin-top: auto; padding: 16px 20px 0; border-top: 1px solid var(--staff-border-dark); }
.staff-theme-toggle {
  width: 100%; display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 9px 10px; border-radius: 8px; border: 1px solid var(--staff-border-dark); background: var(--staff-hover-dark);
  color: var(--staff-ondark); font-size: 14px; font-weight: 600; cursor: pointer; margin-bottom: 10px;
}
.staff-theme-toggle:hover { border-color: var(--staff-accent); }
.staff-partner-link {
  display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600;
  color: var(--staff-ondark-muted) !important; text-decoration: none !important; margin-bottom: 14px;
}
.staff-partner-link:hover { color: var(--staff-accent) !important; }
.staff-user-row { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--staff-ondark-muted); }
.staff-user-row a { font-weight: 600; color: var(--staff-ondark-muted); }
.staff-user-row a:hover { color: var(--staff-accent); }

.staff-main { flex-grow: 1; min-width: 0; padding: 8px 0 40px; background: var(--neutral); min-height: 100vh; }
.staff-main .wrap { max-width: 1180px; }

/* Topbar avatar + notification bell (Round 13) */
.staff-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--staff-avatar-bg); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  flex-shrink: 0; text-transform: uppercase;
}
.staff-topbar-identity { display: flex; align-items: center; gap: 10px; }
.staff-topbar-name { font-size: 14.5px; font-weight: 600; color: var(--staff-ondark); line-height: 1.3; }
.staff-topbar-name small { display: block; font-weight: 500; font-size: 12.5px; color: var(--staff-ondark-muted); }
.staff-bell {
  position: relative; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 15px; color: var(--staff-ondark); text-decoration: none !important;
  background: var(--staff-hover-dark); flex-shrink: 0;
}
.staff-bell:hover { background: var(--staff-accent); }
.staff-bell-badge {
  position: absolute; top: -3px; right: -3px; background: var(--danger); color: #fff; font-size: 10px;
  font-weight: 700; border-radius: 999px; padding: 1px 5px; min-width: 15px; text-align: center; line-height: 1.4;
  border: 2px solid var(--staff-topbar);
}

@media (max-width: 900px) {
  /* .staff-shell uses align-items: flex-start for the desktop sidebar
     layout, which (once flex-direction flips to column here) would let
     each stacked child size to its own content instead of the viewport
     width — override to stretch so .staff-main can't be pushed wider by
     a table's natural content width. */
  .staff-shell { flex-direction: column; align-items: stretch; }
  .staff-sidebar { width: 100%; min-height: auto; position: relative; border-right: none; border-bottom: 1px solid var(--staff-border-dark); }
  .staff-main .wrap { padding: 0 16px; }
  /* Wide tables (Orders, Products, Quotes, Hero Slides) would otherwise
     force the whole page wider than the viewport on phones — instead let
     just the table itself scroll horizontally within its own box. */
  table.staff-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; max-width: 100%; }
}

/* ==========================================================================
   Staff topbar (search) + dashboard widgets (Round 10; restyled dark Round 13)
   ========================================================================== */
.staff-topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px;
  background: var(--staff-topbar); border-bottom: 1px solid var(--staff-border-dark); transition: background 0.15s, border-color 0.15s;
}
.staff-search-form { position: relative; flex-grow: 1; max-width: 420px; }
.staff-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: 0.7; }
.staff-search-input { width: 100%; padding: 8px 12px 8px 32px; border-radius: 8px; border: 1px solid var(--staff-border-dark); background: var(--staff-hover-dark); color: var(--staff-ondark); font-size: 14.5px; }
.staff-search-input::placeholder { color: var(--staff-ondark-muted); }
.staff-search-input:focus { outline: none; border-color: var(--staff-accent); }
.staff-topbar-right { font-size: 14px; color: var(--staff-ondark-muted); white-space: nowrap; display: flex; align-items: center; gap: 14px; }

.dash-stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
@media (max-width: 900px) { .dash-stat-cards { grid-template-columns: repeat(2, 1fr); } }
.dash-stat-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; background: #fff; }
.dash-stat-icon { width: 44px; height: 44px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.dash-stat-num { font-size: 21px; font-weight: 800; line-height: 1.2; }
.dash-stat-lbl { font-size: 13.5px; color: var(--text-muted); }

.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 18px; align-items: stretch; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; margin-bottom: 22px; align-items: start; }
@media (max-width: 900px) { .dash-grid2 { grid-template-columns: 1fr; } }

.dash-donut { width: 130px; height: 130px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; position: relative; }
.dash-donut-hole {
  width: 82px; height: 82px; border-radius: 50%; background: #fff; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; box-shadow: inset 0 0 0 1px var(--border);
}
.dash-donut-hole strong { font-size: 18px; }
.dash-donut-hole span { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }

.top-product-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.top-product-row:last-child { border-bottom: none; }
.top-product-rank { width: 22px; height: 22px; border-radius: 6px; background: var(--neutral); font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.top-product-name { font-size: 14.5px; font-weight: 600; }
.top-product-units { font-size: 12.5px; color: var(--text-muted); }
.top-product-revenue { margin-left: auto; font-weight: 700; font-size: 14.5px; white-space: nowrap; }

/* Inventory + Settings pages */
.stock-badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 20px; }
.stock-badge.ok { background: rgba(31,169,113,0.12); color: #1FA971; }
.stock-badge.low { background: rgba(248,113,113,0.14); color: #E0483E; }
.stock-badge.off { background: var(--neutral); color: var(--text-muted); }
.inline-adjust-form { display: flex; gap: 6px; align-items: center; }
.inline-adjust-form input[type="number"] { width: 64px; padding: 5px 7px; font-size: 13.5px; }
.whatsapp-line-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.whatsapp-line-row:last-child { border-bottom: none; }
.default-pill { font-size: 11px; font-weight: 700; color: var(--blue); background: rgba(0,102,255,0.1); padding: 2px 8px; border-radius: 20px; }

/* ==========================================================================
   Print Partner Portal placeholder page — its own light/dark toggle,
   independent of the staff portal and the public site.
   ========================================================================== */
body.partner-body { background: #fff; }
html[data-theme="dark"] body.partner-body {
  --primary: #E9EBF0; --neutral: #20242C; --border: #333844; --text: #E9EBF0; --text-muted: #99A2B3;
  background: #14161B; color: var(--text);
}
html[data-theme="dark"] body.partner-body .card,
html[data-theme="dark"] body.partner-body .feature-grid-item { background: #1F232B; border-color: var(--border); }
.partner-topbar { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.partner-theme-toggle {
  display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 20px;
  border: 1px solid var(--border); background: var(--neutral); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer;
}

/* ==========================================================================
   Round 11 — save-feedback toast (flash message), shown once after a
   POST/redirect on any page (staff or public) that includes header.ejs or
   staff-header.ejs. See lib/flash.js + partials/flash-toast.ejs.
   ========================================================================== */
.flash-toast {
  position: fixed; top: 18px; right: 18px; z-index: 9999;
  display: flex; align-items: center; gap: 10px;
  background: #16A34A; color: #fff; padding: 13px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  max-width: 360px; animation: flashIn 0.25s ease-out;
}
.flash-toast.flash-error { background: #DC2626; }
.flash-toast.flash-fade { opacity: 0; transform: translateY(-8px); transition: opacity 0.4s, transform 0.4s; }
.flash-icon { font-size: 15px; }
.flash-msg { flex-grow: 1; }
.flash-close {
  background: none; border: none; color: #fff; opacity: 0.8; font-size: 18px; line-height: 1;
  cursor: pointer; padding: 0 0 0 4px;
}
.flash-close:hover { opacity: 1; }
@keyframes flashIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
  .flash-toast { left: 14px; right: 14px; max-width: none; top: 12px; }
}

/* ==========================================================================
   Round 11 — catalogue page: left vertical accordion of categories,
   replacing the old horizontal pill filter row. Each category is a
   collapsible section in the main content; the sidebar just toggles which
   sections are expanded (see services.ejs's inline script).
   ========================================================================== */
.catalogue-shell { display: flex; align-items: flex-start; gap: 28px; }
.catalogue-sidebar {
  width: 250px; flex-shrink: 0; position: sticky; top: 90px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #fff;
}
.catalogue-sidebar-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-muted); padding: 14px 16px 10px;
}
.cat-accordion-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  text-align: left; background: none; border: none; border-top: 1px solid var(--border);
  padding: 12px 16px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer;
}
.cat-accordion-toggle:first-of-type { border-top: none; }
.cat-accordion-toggle:hover { background: var(--neutral); }
.cat-accordion-toggle.active { color: var(--blue); background: rgba(0,102,255,0.06); }
.cat-accordion-chevron { transition: transform 0.15s; color: var(--text-muted); font-size: 11px; }
.cat-accordion-toggle[aria-expanded="true"] .cat-accordion-chevron { transform: rotate(90deg); }
.cat-accordion-count { font-size: 11.5px; color: var(--text-muted); background: var(--neutral); border-radius: 20px; padding: 1px 7px; }
.catalogue-main { flex-grow: 1; min-width: 0; }
.cat-section { margin-bottom: 8px; }
.cat-section[hidden] { display: none; }
@media (max-width: 900px) {
  .catalogue-shell { flex-direction: column; }
  .catalogue-sidebar { width: 100%; position: relative; top: 0; }
}

/* Round 22 — the print-services catalogue page reads as too narrow/margin-heavy
   next to Addo's reference mockup, so it gets its own wider container instead
   of the site-wide 1160px `.wrap` (left untouched everywhere else, including
   the header/footer, so this doesn't ripple into pages that weren't asked
   about). */
.catalogue-page-wrap { max-width: 1600px; }
@media (max-width: 1680px) { .catalogue-page-wrap { max-width: none; padding-left: 32px; padding-right: 32px; } }
@media (max-width: 700px) { .catalogue-page-wrap { padding-left: 16px; padding-right: 16px; } }

/* Round 22 — small black icon before each category name in the sidebar,
   matching the reference mockup. Hand-authored inline SVGs (see services.ejs),
   not an icon-font dependency, consistent with this project's dependency-light
   pattern elsewhere (node:sqlite, crypto.scrypt, the hand-rolled ZIP builder). */
.cat-accordion-toggle { gap: 10px; }
.cat-accordion-icon { flex-shrink: 0; width: 18px; height: 18px; color: #1a1a1a; display: flex; align-items: center; justify-content: center; }
.cat-accordion-icon svg { width: 100%; height: 100%; display: block; }
.cat-accordion-label { flex-grow: 1; }

/* Round 23 — small clickable pills for switching between sibling styles
   within a family (e.g. the 6 Business Card styles), shown when browsing a
   family drilled into the same catalogue page/shell as the tile view, so
   there's no separate "family page" look to keep in sync with this one. */
.family-pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: var(--neutral); color: var(--text); text-decoration: none; border: 1px solid var(--border);
}
.family-pill:hover { background: var(--border); }
.family-pill.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* Round 11 — "I don't have my artwork yet" checkbox on the configurator */
.no-artwork-check {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 12px;
  background: var(--neutral); border-radius: 8px; font-size: 13px; color: var(--text);
}
.no-artwork-check input { margin-top: 3px; }

/* Round 11 — printable customer invoice */
.invoice-page { max-width: 760px; margin: 30px auto; padding: 0 20px 60px; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.invoice-head h1 { margin: 0 0 4px; font-size: 22px; }
.invoice-meta { text-align: right; font-size: 13.5px; color: var(--text-muted); }
.invoice-meta strong { color: var(--text); }
.invoice-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.invoice-table th, .invoice-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 13.5px; text-align: left; }
.invoice-table th { text-transform: uppercase; font-size: 11px; letter-spacing: 0.03em; color: var(--text-muted); }
.invoice-table td:last-child, .invoice-table th:last-child { text-align: right; }
.invoice-totals { margin-left: auto; width: 280px; }
.invoice-totals .price-row { padding: 5px 0; }
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
  .invoice-page { margin: 0; max-width: none; }
}

/* Round 11 — a visible-in-both-themes outline style for destructive actions
   (Delete/Remove buttons), replacing several hardcoded inline colors that
   read fine on the light theme but were too muddy to see on the dark one. */
.btn-danger-outline { color: var(--danger); border-color: var(--danger); background: #fff; }
.btn-danger-outline:hover { background: var(--danger); color: #fff; }
.btn-danger-outline:disabled { color: var(--text-muted); border-color: var(--border); background: #fff; opacity: 0.65; }

/* Round 11 — Manage Products slide-over drawer: the product form loads in
   an iframe (its own full page, untouched) inside a right-side panel over
   the product list, so staff never lose the list. See staff-products.ejs. */
.product-drawer-overlay {
  position: fixed; inset: 0; background: rgba(10,12,16,0.4); z-index: 9990;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.product-drawer-overlay.open { opacity: 1; pointer-events: auto; }
.product-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: min(720px, 94vw);
  background: #fff; z-index: 9991; box-shadow: -12px 0 40px rgba(0,0,0,0.22);
  transform: translateX(100%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
}
.product-drawer.open { transform: translateX(0); }
.product-drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.product-drawer-head strong { font-size: 15px; }
.product-drawer-close {
  background: none; border: none; font-size: 24px; line-height: 1; color: var(--text-muted); cursor: pointer; padding: 0 4px;
}
.product-drawer-close:hover { color: var(--text); }
.product-drawer-body { flex-grow: 1; min-height: 0; }
.product-drawer-body iframe { width: 100%; height: 100%; border: none; display: block; }

/* Round 12 — Manage Products: a horizontal category-filter row above the
   table (in addition to the sidebar's own filter), and a bulk-select
   toolbar that appears once at least one row is checked. */
.staff-filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.staff-filter-bar a {
  padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); font-size: 13px;
  font-weight: 600; color: var(--text); text-decoration: none; background: #fff; white-space: nowrap;
}
.staff-filter-bar a .count { color: var(--text-muted); font-weight: 500; }
.staff-filter-bar a.active, .staff-filter-bar a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.staff-filter-bar a.active .count, .staff-filter-bar a:hover .count { color: rgba(255,255,255,0.8); }

.bulk-actions-bar {
  display: none; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(0,102,255,0.06); border: 1px solid var(--blue);
  border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px;
}
.bulk-actions-bar.visible { display: flex; }
.bulk-actions-bar .count { font-weight: 700; font-size: 13.5px; }
.bulk-actions-bar .spacer { flex-grow: 1; }
.bulk-actions-bar button, .bulk-actions-bar a.clear-selection {
  padding: 6px 12px; font-size: 13px;
}
.select-col { width: 34px; text-align: center; }

/* ==========================================================================
   Round 13 — dark "panel" widgets for the order-detail page's right column
   (Order Status, Status History, Internal Notes, Order Actions), matching
   the reference mockup's dark contextual sidebar alongside white content
   cards. Uses the same --staff-panel/--staff-ondark chrome variables as
   the sidebar/topbar, so they lighten together when data-theme="light".
   ========================================================================== */
.staff-panel {
  background: var(--staff-panel); border: 1px solid var(--staff-panel-border); border-radius: 14px;
  padding: 18px 20px; margin-bottom: 16px; color: var(--staff-ondark);
}
.staff-panel-title {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--staff-ondark-muted); margin: 0 0 14px;
}
.staff-panel p { color: var(--staff-ondark); }
.staff-panel .hint { color: var(--staff-ondark-muted); }

.order-status-current { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.order-status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.order-status-current strong { font-size: 15px; }

.staff-timeline { list-style: none; margin: 0; padding: 0; }
.staff-timeline li {
  position: relative; padding: 0 0 16px 20px; border-left: 2px solid var(--staff-panel-border); font-size: 14px;
}
.staff-timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.staff-timeline li::before {
  content: ''; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--staff-accent); border: 2px solid var(--staff-panel);
}
.staff-timeline .tl-label { color: var(--staff-ondark); font-weight: 600; }
.staff-timeline .tl-meta { color: var(--staff-ondark-muted); font-size: 12.5px; margin-top: 2px; }

.staff-panel textarea.form-control {
  background: var(--staff-hover-dark); border: 1px solid var(--staff-panel-border); color: var(--staff-ondark);
  width: 100%; min-height: 90px; border-radius: 8px; padding: 10px 12px; font-size: 14.5px; font-family: inherit; resize: vertical;
}
.staff-panel textarea.form-control::placeholder { color: var(--staff-ondark-muted); }
.staff-panel textarea.form-control:focus { outline: none; border-color: var(--staff-accent); }
.staff-panel .staff-notes-saved { font-size: 11.5px; color: var(--staff-ondark-muted); margin-top: 8px; }

.staff-quick-action {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--staff-panel-border); background: var(--staff-hover-dark);
  color: var(--staff-ondark); font-size: 14.5px; font-weight: 600; cursor: pointer; margin-bottom: 8px; text-decoration: none !important;
}
.staff-quick-action:last-child { margin-bottom: 0; }
.staff-quick-action:hover { border-color: var(--staff-accent); color: var(--staff-accent); }
.staff-quick-action.primary { background: var(--staff-accent); border-color: var(--staff-accent); color: #fff; }
.staff-quick-action.primary:hover { background: var(--staff-accent-dark); color: #fff; }
.staff-quick-action.danger { color: #F87171; border-color: rgba(248,113,113,0.4); }
.staff-quick-action.danger:hover { background: rgba(248,113,113,0.12); border-color: #F87171; color: #F87171; }

/* Customer info card (white, main column) with avatar + type pill */
.customer-info-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.customer-info-head .staff-avatar { width: 42px; height: 42px; font-size: 15px; }
.customer-info-head strong { font-size: 15.5px; display: block; }
.customer-type-pill {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 2px 9px; border-radius: 20px; background: rgba(46,108,246,0.1); color: var(--staff-accent, var(--blue)); margin-top: 3px;
}

/* ==========================================================================
   Round 15 — order-detail cards restyled to match the reference mockup's
   own card treatment (icon-badge header + title, a highlighted total-amount
   box, a proper multi-column items table with a totals footer row) instead
   of the older stacked summary-table cards. Accent color for the badges/
   links here is --staff-accent, the same variable the sidebar/topbar/panels
   already use — so it automatically matches whichever theme (dark-chrome
   default, or the light toggle) is currently active, rather than a color
   fixed to one theme.
   ========================================================================== */
.staff-card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
}
.staff-card-header-left { display: flex; align-items: center; gap: 12px; }
.staff-icon-badge {
  width: 36px; height: 36px; border-radius: 10px; background: var(--staff-accent, var(--blue)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0;
}
.staff-card-header h3 { margin: 0; font-size: 16px; }
.staff-card-header-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.staff-btn-soft {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px;
  background: var(--neutral); color: var(--staff-accent, var(--blue)); font-size: 14px; font-weight: 600;
  border: 1px solid var(--border); text-decoration: none !important; cursor: pointer;
}
.staff-btn-soft:hover { border-color: var(--staff-accent, var(--blue)); }

.staff-total-box { background: var(--neutral); border-radius: 10px; padding: 8px 20px; text-align: center; }
.staff-total-box .lbl { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.staff-total-box .amt { font-size: 19px; font-weight: 800; }
.staff-total-box .sub { font-size: 11.5px; color: var(--text-muted); }

.customer-info-grid { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 2px; }
.customer-info-grid .info-item { display: flex; align-items: center; gap: 8px; font-size: 14.5px; }
.customer-info-grid .info-icon { color: var(--staff-accent, var(--blue)); flex-shrink: 0; }

/* Round 16: fixed layout with explicit column widths so Product/Details get
   enough room for text to wrap onto 1-2 lines instead of being squeezed
   narrow while Files/price columns take whatever's left. Widths sum to 100%. */
.order-items-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.order-items-table th:nth-child(1) { width: 4%; }
.order-items-table th:nth-child(2) { width: 20%; }
.order-items-table th:nth-child(3) { width: 26%; }
.order-items-table th:nth-child(4) { width: 19%; }
.order-items-table th:nth-child(5) { width: 12%; }
.order-items-table th:nth-child(6) { width: 8%; }
.order-items-table th:nth-child(7) { width: 11%; }
.order-items-table td { word-wrap: break-word; overflow-wrap: break-word; }
.order-items-table th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted);
  padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.order-items-table td { padding: 13px 10px; border-bottom: 1px solid var(--border); font-size: 14.5px; vertical-align: top; }
.order-items-table tbody tr:last-of-type td { border-bottom: 1px solid var(--border); }
.order-items-table .item-num { color: var(--text-muted); width: 24px; }
.order-items-table .item-product strong { display: block; }
.order-items-table .item-product span { color: var(--text-muted); font-size: 13px; }
.order-items-table .item-details div { font-size: 13.5px; color: var(--text-muted); margin-bottom: 2px; }
.order-items-table .file-badge {
  display: inline-flex; align-items: center; gap: 4px; background: var(--neutral); border-radius: 6px;
  padding: 3px 8px; font-size: 13px; margin-bottom: 4px; color: var(--text-muted);
}
.order-items-table .file-download-link { display: block; font-size: 13.5px; color: var(--staff-accent, var(--blue)); font-weight: 600; }
.order-items-table .num-col { text-align: right; white-space: nowrap; }
.order-items-footer-row td { font-weight: 700; background: var(--neutral); border-bottom: none !important; }
.order-items-footer-row.total-row td { font-size: 14.5px; }
.order-items-footer-row .num-col { color: var(--staff-accent, var(--blue)); }

/* ==========================================================================
   Round 18 — customer-facing My Account order-detail redesign: payment
   status badge, fulfillment progress stepper, per-item cards with a real
   artwork upload fallback, and an order-total callout box. Customer pages
   have no dark theme, so this reuses the same semantic variables as
   everything else with no separate dark handling needed.
   ========================================================================== */
.order-detail-topmeta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; color: var(--text-muted); font-size: 13.5px; margin: 8px 0 18px; }
.order-detail-topmeta .pill { background: var(--neutral); border-radius: 20px; padding: 3px 12px; font-weight: 600; color: var(--text); }

.payment-status-badge { display: inline-flex; align-items: center; gap: 10px; border-radius: 10px; padding: 10px 16px; background: var(--neutral); }
.payment-status-badge .psb-icon {
  width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 13px; flex-shrink: 0; background: var(--text-muted);
}
.payment-status-badge.paid .psb-icon { background: var(--success); }
.payment-status-badge.pending .psb-icon { background: var(--warning); }
.payment-status-badge.cancelled .psb-icon { background: var(--danger); }
.payment-status-badge .psb-label { font-weight: 700; font-size: 14px; }
.payment-status-badge .psb-sub { font-size: 11.5px; color: var(--text-muted); }

.order-progress { display: flex; align-items: flex-start; margin: 6px 0 4px; }
.order-progress-step { display: flex; flex-direction: column; align-items: center; width: 128px; flex-shrink: 0; }
.order-progress-line { flex-grow: 1; height: 2px; background: var(--border); margin-top: 18px; min-width: 12px; }
.order-progress-line.done { background: var(--success); }
.order-progress-dot {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 15px; border: 2px solid var(--border); background: #fff; color: var(--text-muted); margin-bottom: 8px;
}
.order-progress-step.done .order-progress-dot { background: var(--success); border-color: var(--success); color: #fff; }
.order-progress-step.current .order-progress-dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.order-progress-label { font-size: 12px; font-weight: 700; text-align: center; }
.order-progress-meta { font-size: 10.5px; color: var(--text-muted); text-align: center; margin-top: 2px; }
.order-progress-step.current .order-progress-meta { color: var(--blue); font-weight: 600; }
@media (max-width: 700px) {
  .order-progress { flex-wrap: wrap; }
  .order-progress-line { display: none; }
  .order-progress-step { width: auto; flex-direction: row; gap: 10px; align-items: center; margin-bottom: 10px; text-align: left; }
  .order-progress-dot { margin-bottom: 0; }
  .order-progress-label, .order-progress-meta { text-align: left; }
}

.order-item-card { display: flex; gap: 18px; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; flex-wrap: wrap; }
/* Round 19: bumped up from 96px — Addo said the item thumbnails read too
   small next to the rest of the card's content. */
.order-item-thumb { width: 160px; height: 160px; border-radius: 12px; object-fit: cover; flex-shrink: 0; background: var(--neutral); }
.order-item-main { flex-grow: 1; min-width: 200px; }
@media (max-width: 560px) {
  .order-item-thumb { width: 110px; height: 110px; }
}
.order-item-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.order-item-title-row strong { font-size: 15px; }
.order-item-specs { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.order-item-specs .spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 2px 0; }
.order-item-specs .spec-row .spec-label { color: var(--text-muted); }
.order-item-specs .spec-row .spec-value { font-weight: 600; text-align: right; }

.order-item-artwork-box { width: 230px; flex-shrink: 0; background: var(--neutral); border-radius: 10px; padding: 14px; }
.order-item-artwork-box h5 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.artwork-file-row { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.artwork-file-row .af-icon { flex-shrink: 0; color: var(--blue); }
.artwork-file-row .af-name { font-size: 12px; font-weight: 600; flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.artwork-file-row .af-size { font-size: 10.5px; color: var(--text-muted); flex-shrink: 0; }
.artwork-file-row .af-download { flex-shrink: 0; color: var(--blue); }
.artwork-missing-note { font-size: 12px; color: var(--warning); font-weight: 600; margin-bottom: 8px; }
.artwork-upload-form input[type="file"] { font-size: 11px; width: 100%; margin-bottom: 6px; padding: 6px; }
.artwork-upload-form button { width: 100%; font-size: 12px; padding: 7px; }

.order-total-box { display: flex; justify-content: space-between; align-items: center; background: var(--neutral); border-radius: 12px; padding: 16px 22px; margin: 16px 0; flex-wrap: wrap; gap: 10px; }
.order-total-box .otb-label { font-weight: 700; font-size: 15px; }
.order-total-box .otb-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.order-total-box .otb-amt { font-size: 22px; font-weight: 800; color: var(--blue); }

.order-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
@media (max-width: 700px) { .order-bottom-grid { grid-template-columns: 1fr; } }

/* ==========================================================================
   Round 19 — Profile photo upload modal with a drag-to-pan / slider-to-zoom
   cropper (plain canvas + pointer events, no image-cropping library added,
   consistent with the rest of the app's dependency-light approach). The
   crop viewport is a circle to match how every avatar in the app is shown;
   the actual saved file is a square image so it also displays correctly
   anywhere a plain square/rounded thumbnail is used instead.
   ========================================================================== */
.photo-modal-overlay {
  position: fixed; inset: 0; background: rgba(10,12,16,0.55); z-index: 9995;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.photo-modal-overlay.open { display: flex; }
.photo-modal {
  background: #fff; border-radius: 14px; padding: 24px; width: min(420px, 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.photo-modal h3 { margin: 0 0 4px; }
.photo-modal .hint { margin: 0 0 16px; }
.photo-crop-viewport {
  width: 260px; height: 260px; margin: 0 auto; border-radius: 50%; overflow: hidden;
  position: relative; background: var(--neutral); cursor: grab; touch-action: none;
  border: 2px dashed var(--border);
}
.photo-crop-viewport.dragging { cursor: grabbing; }
.photo-crop-viewport img {
  position: absolute; top: 0; left: 0; transform-origin: 0 0; max-width: none;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.photo-crop-empty {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--text-muted); font-size: 13px; text-align: center; padding: 20px;
}
.photo-zoom-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.photo-zoom-row span { font-size: 16px; color: var(--text-muted); }
.photo-zoom-row input[type="range"] { flex-grow: 1; }
.photo-modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.photo-modal-actions .btn { flex: 1; }
.photo-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 22px; line-height: 1; color: var(--text-muted); cursor: pointer; }
.photo-modal { position: relative; }

.profile-photo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-photo-preview {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: var(--blue);
  color: #fff; font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
img.profile-photo-preview { font-size: 0; }
