/* Expert Solutions Portal — mobile-first styles.
   PRIMARY blue #1a5fd7, ACCENT lime #a4d233, white / light backgrounds. No frameworks, no CDNs. */

:root {
  --blue: #1a5fd7;
  --blue-dark: #1249a8;
  --blue-soft: #e8f0fd;
  --lime: #a4d233;
  --lime-dark: #6f9a10;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e2e8f0;
  --danger: #dc2626;
  --radius: 14px;
  --tap: 48px; /* minimum touch target */
}

/* ---------- Dark mode ---------- */
body.dark-mode {
  --bg: #0f172a;
  --card: #1e293b;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --border: #334155;
  --blue-soft: #1e3a5f;
  --danger: #f87171;
}
body.dark-mode #topbar,
body.dark-mode #bottomnav {
  background: #1e293b;
}
body.dark-mode .btn-outline {
  background: #1e293b;
  color: #93c5fd;
  border-color: #3b82f6;
}
body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #334155;
}
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
  color: #64748b;
}
body.dark-mode .qa-answer {
  color: #e2e8f0;
}
body.dark-mode .empty,
body.dark-mode .hint {
  color: #94a3b8;
}

/* ---------- Dark mode: readability fixes ----------
   Hardcoded light-mode colors below get dark-safe values here. */
body.dark-mode .brand-name,
body.dark-mode .stat-num,
body.dark-mode .btn-ghost,
body.dark-mode .prod-price,
body.dark-mode .login-tagline,
body.dark-mode #splash .splash-name,
body.dark-mode .brand-loading-name,
body.dark-mode .tool-label,
body.dark-mode .cat-btn.active,
body.dark-mode .progress-text,
body.dark-mode .photo-sec summary,
body.dark-mode .link-btn,
body.dark-mode .nav-item.active,
body.dark-mode .dash-section-title,
body.dark-mode .doc-body .doc-h2,
body.dark-mode .leader-card-name,
body.dark-mode details.direct-members summary,
body.dark-mode .doc-body .doc-h1,
body.dark-mode .doc-body .doc-h3,
body.dark-mode .dash-modal-x { color: #93c5fd; }
body.dark-mode .stepper button { background: #1e293b; color: #93c5fd; border-color: #3b82f6; }
body.dark-mode .copy-btn,
body.dark-mode .cat-tag { background: #1e3a5f; color: #93c5fd; }
body.dark-mode .dir-btn,
body.dark-mode .help-tab { background: #1e293b; color: #93c5fd; }
body.dark-mode .chip { background: #1e293b; }
body.dark-mode .leader-card,
body.dark-mode details.direct-members,
body.dark-mode .dash-modal,
body.dark-mode .sheet { background: #1e293b; border-color: #334155; }
body.dark-mode .leader-card-count { background: #1e3a5f; color: #93c5fd; }
body.dark-mode .msg-their { background: #1e293b; }
body.dark-mode #splash { background: #0f172a; }
body.dark-mode #splash .splash-tag,
body.dark-mode .commission-line,
body.dark-mode .preview-discount { color: #bef264; }
body.dark-mode .success-box { background: #052e16; border-color: #16a34a; color: #bbf7d0; }
body.dark-mode .doc-body { color: #e2e8f0; }
body.dark-mode .doc-body .doc-h4 { color: #cbd5e1; }
body.dark-mode .doc-body strong { color: #f1f5f9; }
body.dark-mode .doc-body code { background: #0f172a; color: #e2e8f0; }
body.dark-mode .dash-modal .dlabel { color: #94a3b8; }

/* Utility text/background classes used by JS instead of hardcoded inline colors. */
.c-blue { color: #1a5fd7; }
body.dark-mode .c-blue { color: #93c5fd; }
.c-green { color: #2e7d32; }
body.dark-mode .c-green { color: #86efac; }
.c-red { color: #c62828; }
body.dark-mode .c-red { color: #f87171; }
.c-red2 { color: #dc2626; }
body.dark-mode .c-red2 { color: #f87171; }
.c-purple { color: #7c3aed; }
body.dark-mode .c-purple { color: #c4b5fd; }
.c-mut { color: #8a97a5; }
body.dark-mode .c-mut { color: #94a3b8; }
.box-soft { background: #f0fdf4; border-radius: 8px; }
body.dark-mode .box-soft { background: #052e16; }
.box-plain { background: #f8fafc; }
body.dark-mode .box-plain { background: #16213a; }
.overlay-full { background: #f2f6fc; }
body.dark-mode .overlay-full { background: #0f172a; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
  padding-bottom: calc(76px + env(safe-area-inset-bottom)); /* room for bottom nav */
}

/* ---------- Header ---------- */
#topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 3px solid var(--lime);
  padding: 6px 14px 8px;
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
/* Prominent brand band: full name always visible, logo colors (2026-10-17).
   White S-mark tile pops on the brand-blue band; name in white, tagline in lime. */
.brand-band {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a5fd7 0%, #0d3fa3 100%);
  border: 2px solid #0d3fa3;
}
.brand-band .brand-logo { width: 48px; height: 48px; flex-shrink: 0; background: #fff; border-radius: 12px; padding: 3px; }
.brand-band .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-band .brand-name { font-size: 24px; font-weight: 800; color: #fff; white-space: nowrap; }
.brand-band .brand-tag { font-size: 13px; font-weight: 600; color: #d9f99d; white-space: nowrap; }
body.dark-mode .brand-band {
  background: linear-gradient(135deg, #1e40af 0%, #0c2f7a 100%);
  border-color: #3b82f6;
}
body.dark-mode .brand-band .brand-name { color: #fff; }
body.dark-mode .brand-band .brand-tag { color: #d9f99d; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 auto; }
.brand-logo { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; }
.brand-name { color: var(--blue); font-weight: 800; font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Top-bar action cluster: dark toggle + notification bell + refresh (2026-10-17) */
#top-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
#top-actions .notif-bell { width: 40px; height: 40px; }

/* ---------- Layout ---------- */
.container { max-width: 520px; margin: 0 auto; padding: 14px 14px 24px; }
.page-title { margin: 6px 0 14px; font-size: 22px; font-weight: 800; }
.section-title { margin: 22px 0 10px; font-size: 17px; font-weight: 700; }

/* ---------- Category headings (Products + Price list) ---------- */
.cat-title { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--blue); border-bottom: 3px solid var(--lime); padding-bottom: 6px; }
.cat-desc { margin: 0 0 12px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.pl-cat summary strong { font-size: 20px; color: var(--blue); }
.pl-cat .cat-desc { display: block; margin: 4px 0 0 46px; font-size: 13px; }

/* ---------- Introductions to the Work ---------- */
.intro-banner { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; border-top: 4px solid var(--blue); }
.intro-banner-logo { height: 48px; width: auto; flex-shrink: 0; }
.intro-banner-text { flex: 1; min-width: 0; }
.intro-banner-title { font-size: 19px; font-weight: 800; color: var(--blue); }
.intro-banner-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.intro-banner-arrow { font-size: 22px; font-weight: 800; color: var(--blue); }
.intro-back { display: inline-block; margin: 4px 0 10px; color: var(--blue); font-weight: 700; text-decoration: none; }
.intro-page-head { background: #fff; border-bottom: 4px solid var(--lime); border-radius: var(--radius) var(--radius) 0 0; text-align: center; padding: 14px 10px 10px; }
.intro-page-logo { height: 110px; width: auto; }
.intro-hero { background: var(--blue); color: #fff; padding: 18px 16px; text-align: center; }
.intro-hero h1 { margin: 0; font-size: 24px; font-weight: 800; border-bottom: 3px solid var(--lime); display: inline-block; padding-bottom: 6px; }
.intro-hero p { margin: 8px 0 0; font-size: 15px; opacity: .95; }
.intro-switch { display: flex; gap: 8px; margin: 14px 0 4px; }
.intro-switch button { flex: 1; padding: 8px 4px; border-radius: 8px; border: 2px solid var(--blue); background: var(--card); color: var(--blue); font-weight: 800; font-size: 15px; cursor: pointer; }
.intro-switch button.active { background: var(--lime); border-color: var(--lime); color: #1f2937; }
.intro-sec { margin: 18px 0; }
.intro-sec h2 { font-size: 19px; font-weight: 800; color: var(--blue); border-bottom: 3px solid var(--lime); padding-bottom: 6px; margin: 0 0 8px; }
.intro-sec p { margin: 8px 0; font-size: 15px; line-height: 1.55; }
.intro-sec-sub { color: var(--muted); }
.intro-table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
.intro-table th, .intro-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.intro-table th { background: var(--blue); color: #fff; }
.intro-footer { background: var(--blue); color: #fff; text-align: center; padding: 16px 12px; margin-top: 22px; border-radius: 0 0 var(--radius) var(--radius); }
.intro-footer-line { font-weight: 800; font-size: 15px; }
.intro-footer-copy { font-size: 12px; opacity: .85; margin-top: 4px; }

/* ---------- Cards / rows ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15, 35, 80, .05);
}
.row-card { display: block; width: 100%; text-align: left; cursor: pointer; }
button.row-card { font: inherit; color: inherit; }
.row-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.row-name { font-weight: 700; font-size: 16px; }
.row-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.row-total { font-weight: 800; font-size: 16px; margin-top: 6px; }
.commission-line { color: var(--lime-dark); font-weight: 700; font-size: 14px; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { text-align: center; padding: 16px 8px; }
a.stat-card { text-decoration: none; color: inherit; cursor: pointer; }
a.stat-card:active { transform: scale(0.97); }
.ct-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.stat-num { font-size: 26px; font-weight: 800; color: var(--blue); }
.stat-label { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  padding: 12px 18px;
  border: none; border-radius: 12px;
  font-size: 16px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  width: 100%;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:active { background: var(--blue-dark); }
.btn-lime { background: var(--lime); color: #1f2937; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: #fff; color: var(--blue); border: 2px solid var(--blue); }
.btn-ghost { background: transparent; color: var(--blue); width: auto; padding: 8px 10px; min-height: 40px; }
.btn-sm { min-height: 40px; padding: 8px 12px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-block { margin-top: 10px; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 40px; padding: 8px 12px;
  background: var(--blue-soft); color: var(--blue);
  border: 1px solid #c9dcf8; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.quick-actions { display: grid; gap: 10px; margin-top: 14px; }
.quick-actions.two { grid-template-columns: 1fr 1fr; }

/* ---------- Forms ---------- */
label { display: block; font-weight: 700; font-size: 14px; margin: 14px 0 6px; }
input, select, textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 12px 14px;
  font-size: 16px; font-family: inherit;
  border: 2px solid var(--border); border-radius: 12px;
  background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); }
textarea { min-height: 96px; resize: vertical; }
.hint { color: var(--muted); font-size: 13px; margin-top: 6px; }
.error-box {
  background: #fef2f2; border: 2px solid #fca5a5; color: #991b1b;
  border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-weight: 600;
}
.success-box {
  background: #f7fee7; border: 2px solid var(--lime); color: #3f6212;
  border-radius: 12px; padding: 12px 14px; margin: 12px 0; font-weight: 600;
}
.inline-error { color: var(--danger); font-size: 14px; margin-top: 6px; font-weight: 600; }

/* ---------- Filter chips ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; -webkit-overflow-scrolling: touch; }
.chip {
  flex: 0 0 auto; min-height: 40px; padding: 8px 14px;
  border: 2px solid var(--border); border-radius: 999px;
  background: #fff; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer;
}
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-block; padding: 5px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 800; white-space: nowrap;
}
.pill-pending    { background: #f1f5f9; color: #64748b; }
.pill-processing  { background: #fef3c7; color: #d97706; }
.pill-confirmed   { background: #dbeafe; color: #1d4ed8; }
.pill-delivered   { background: #dcfce7; color: #16a34a; }
.pill-cancelled   { background: #fee2e2; color: #dc2626; }
.pill-rejected    { background: #fecaca; color: #b91c1c; }
.pill-rescheduled { background: #ede9fe; color: #7c3aed; }
.pill-skip        { background: #e2e8f0; color: #475569; }
.pill-onhold      { background: #ffedd5; color: #b45309; }
.pill-noanswer    { background: #f5f3ff; color: #6d28d9; }
.pill-callagain   { background: #ccfbf1; color: #0d9488; }
.pill-remarks     { background: #e0f2fe; color: #0284c7; }

/* ---------- Detail / copy rows ---------- */
.field-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.field-row:last-child { border-bottom: none; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.field-value { font-size: 16px; font-weight: 600; word-break: break-word; text-align: right; }
.field-left { min-width: 0; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative; padding: 0 0 16px 26px;
  border-left: 3px solid var(--lime); margin-left: 8px;
}
.timeline li:last-child { padding-bottom: 2px; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 2px;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--blue); border: 2px solid #fff;
}
.timeline .t-status { font-weight: 800; }
.timeline .t-trans { font-weight: 800; }
/* Timeline status text colors as classes (light mode = previous inline values;
   dark mode gets brightened variants — inline colors couldn't be overridden). */
.tst-pending { color: #64748b; } .tst-processing { color: #d97706; }
.tst-confirmed { color: #1a5fd7; } .tst-delivered { color: #16a34a; }
.tst-cancelled { color: #dc2626; } .tst-rejected { color: #b91c1c; }
.tst-rescheduled { color: #7c3aed; } .tst-skip { color: #475569; }
.tst-onhold { color: #b45309; } .tst-noanswer { color: #6d28d9; }
.tst-callagain { color: #0d9488; } .tst-remarks { color: #0284c7; }
body.dark-mode .tst-pending { color: #94a3b8; } body.dark-mode .tst-processing { color: #fbbf24; }
body.dark-mode .tst-confirmed { color: #60a5fa; } body.dark-mode .tst-delivered { color: #4ade80; }
body.dark-mode .tst-cancelled { color: #f87171; } body.dark-mode .tst-rejected { color: #f87171; }
body.dark-mode .tst-rescheduled { color: #a78bfa; } body.dark-mode .tst-skip { color: #94a3b8; }
body.dark-mode .tst-onhold { color: #fbbf24; } body.dark-mode .tst-noanswer { color: #a78bfa; }
body.dark-mode .tst-callagain { color: #2dd4bf; } body.dark-mode .tst-remarks { color: #38bdf8; }
/* Notification card left-border colors as classes (same dark-mode reason). */
.nbl { border-left: 4px solid; }
.nbl-pending { border-left-color: #64748b; } .nbl-processing { border-left-color: #d97706; }
.nbl-confirmed { border-left-color: #1a5fd7; } .nbl-delivered { border-left-color: #16a34a; }
.nbl-cancelled { border-left-color: #dc2626; } .nbl-rejected { border-left-color: #b91c1c; }
.nbl-rescheduled { border-left-color: #7c3aed; } .nbl-skip { border-left-color: #475569; }
.nbl-onhold { border-left-color: #b45309; } .nbl-noanswer { border-left-color: #6d28d9; }
.nbl-callagain { border-left-color: #0d9488; } .nbl-remarks { border-left-color: #0284c7; }
body.dark-mode .nbl-pending { border-left-color: #94a3b8; } body.dark-mode .nbl-processing { border-left-color: #fbbf24; }
body.dark-mode .nbl-confirmed { border-left-color: #60a5fa; } body.dark-mode .nbl-delivered { border-left-color: #4ade80; }
body.dark-mode .nbl-cancelled { border-left-color: #f87171; } body.dark-mode .nbl-rejected { border-left-color: #f87171; }
body.dark-mode .nbl-rescheduled { border-left-color: #a78bfa; } body.dark-mode .nbl-skip { border-left-color: #94a3b8; }
body.dark-mode .nbl-onhold { border-left-color: #fbbf24; } body.dark-mode .nbl-noanswer { border-left-color: #a78bfa; }
body.dark-mode .nbl-callagain { border-left-color: #2dd4bf; } body.dark-mode .nbl-remarks { border-left-color: #38bdf8; }
/* Unread NEW ORDER alert — state-driven class (added by JS only while the
   notification's read_at is empty, so a re-render after mark-as-read returns
   the card to normal). Red is the alert accent only: light red tint, solid
   red left border, bold red title. */
.card.notif-alert-unread { background: #fef2f2; border-left-color: #dc2626; }
body.dark-mode .card.notif-alert-unread { background: #450a0a; border-left-color: #f87171; }
.notif-alert-unread .row-name { color: #b91c1c; font-weight: 800; }
body.dark-mode .notif-alert-unread .row-name { color: #f87171; }
.timeline .t-note { margin-top: 2px; }
.timeline .t-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- Product picker ---------- */
.stepper { display: inline-flex; align-items: center; gap: 10px; }
.stepper button {
  width: 44px; height: 44px; border-radius: 12px;
  border: 2px solid var(--blue); background: #fff; color: var(--blue);
  font-size: 22px; font-weight: 800; cursor: pointer; line-height: 1;
}
.stepper .qty { min-width: 28px; text-align: center; font-weight: 800; font-size: 18px; }
.prod-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.prod-row:last-child { border-bottom: none; }
.prod-name { font-weight: 700; }
.prod-name-es { color: var(--muted); font-size: 13px; }
.prod-price { font-weight: 800; color: var(--blue); margin-top: 2px; }
.preview-box { background: var(--blue-soft); border-radius: var(--radius); padding: 14px; margin-top: 14px; }
.preview-line { display: flex; justify-content: space-between; padding: 3px 0; font-size: 15px; }
.preview-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; margin-top: 8px; padding-top: 8px; border-top: 2px solid var(--blue); }
.preview-discount { color: var(--lime-dark); font-weight: 700; }

/* ---------- Bottom nav ---------- */
#bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex;
  background: #fff;
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 8px rgba(15, 35, 80, .08);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 64px; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 12px; font-weight: 700;
  border: none; background: none; cursor: pointer; font-family: inherit;
}
.nav-item .nav-icon { font-size: 22px; line-height: 1; }
.nav-item.active { color: var(--blue); }
.nav-item.active::before {
  content: ""; position: absolute; top: 0; left: 25%; right: 25%;
  height: 3px; border-radius: 0 0 4px 4px; background: var(--lime);
}
.nav-item.active .nav-icon { filter: none; }

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(84px + env(safe-area-inset-bottom));
  background: #1f2937; color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
  z-index: 50; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }

/* ---------- Misc ---------- */
.hidden { display: none !important; }
.center { text-align: center; }
.mt { margin-top: 14px; }
.greeting { font-size: 22px; font-weight: 800; margin: 8px 0 2px; }
.greeting-sub { color: var(--muted); margin: 0 0 14px; }
.logo-big { width: 96px; height: 96px; object-fit: contain; border-radius: 20px; margin: 18px auto 8px; display: block; }
/* Branded login header. */
.login-brand { text-align: center; margin-bottom: 6px; }
.login-brand .logo-big { width: 110px; height: 110px; margin: 10px auto 4px; }
.login-tagline { color: var(--blue); font-weight: 800; font-size: 22px; letter-spacing: 0.5px; }
.login-tagline::after { content: ''; display: block; width: 48px; height: 4px; background: linear-gradient(90deg, var(--blue), var(--lime)); border-radius: 2px; margin: 8px auto 0; }
.auth-wrap { max-width: 420px; margin: 0 auto; }
.loading { text-align: center; color: var(--muted); padding: 40px 0; }
/* Branded PWA splash screen. */
#splash { position: fixed; inset: 0; z-index: 9999; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity 0.4s ease; }
#splash.hide { opacity: 0; pointer-events: none; }
#splash img { width: 110px; height: 110px; object-fit: contain; }
#splash .splash-name { color: var(--blue); font-weight: 800; font-size: 24px; margin-top: 12px; }
#splash .splash-tag { color: var(--lime-dark); font-weight: 700; font-size: 15px; margin-top: 4px; }
/* Branded loading screen — Expert Solutions logo + colors on every page load. */
.brand-loading { text-align: center; padding: 48px 20px; }
.brand-loading-logo { width: 72px; height: 72px; object-fit: contain; margin-bottom: 12px; }
.brand-loading-name { color: var(--blue); font-weight: 800; font-size: 20px; letter-spacing: 0.5px; }
.brand-loading-bar { width: 120px; height: 4px; background: var(--blue-soft); border-radius: 2px; margin: 16px auto 0; overflow: hidden; }
.brand-loading-bar span { display: block; height: 100%; width: 40%; background: linear-gradient(90deg, var(--blue), var(--lime)); border-radius: 2px; animation: brandload 1.2s ease-in-out infinite; }
@keyframes brandload { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
.empty { text-align: center; color: var(--muted); padding: 32px 12px; }
.badge-inactive { background: #fee2e2; color: #b91c1c; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.badge-active { background: #ecfccb; color: #4d7c0f; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }

/* ---------- Phase 2: tools ---------- */
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tool-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: var(--card); border: 2px solid var(--border); border-radius: var(--radius);
  padding: 20px 10px; min-height: 132px;
  text-decoration: none; color: var(--text); text-align: center;
  box-shadow: 0 1px 2px rgba(15, 35, 80, .05);
}
.tool-card:active { border-color: var(--blue); background: var(--blue-soft); }
.tool-icon { font-size: 36px; line-height: 1; }
.tool-label { font-weight: 800; font-size: 16px; color: var(--blue); }
.tool-desc { font-size: 13px; color: var(--muted); }

/* ---------- Phase 2: category buttons ---------- */
.cat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cat-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 88px; padding: 12px 8px;
  background: #fff; border: 2px solid var(--border); border-radius: var(--radius);
  font-size: 15px; font-weight: 700; color: var(--text); cursor: pointer; font-family: inherit;
}
.cat-btn .cat-icon { font-size: 30px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.cat-btn .cat-icon svg { display: block; }
.cat-btn.active .cat-icon svg { stroke: var(--blue); }
.cat-btn.active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }

/* ---------- Phase 2: listings / messages ---------- */
.listing-title { font-size: 18px; font-weight: 800; margin: 10px 0 6px; }
.listing-desc { font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.msg-text { font-size: 15px; white-space: pre-wrap; word-break: break-word; margin-top: 10px; }
.photo-note { font-size: 12px; color: var(--muted); margin: 8px 0; }
.btn-big { font-size: 18px; padding: 14px 18px; }

/* ---------- Phase 2: photo grids ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.thumb-wrap { position: relative; display: block; }
.sb-thumb { cursor: pointer; }
.sb-thumb .sb-check { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); color: var(--blue); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 18px; opacity: 0; }
.sb-thumb.sb-picked .sb-check { opacity: 1; background: var(--lime); border-color: var(--lime); color: #1f2937; }
.sb-thumb.sb-picked img { outline: 3px solid var(--lime); outline-offset: -3px; }
.sb-thumb .sb-tag { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 8px; }
.sb-thumb .sb-rm { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.thumb {
  width: 100%; aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 10px; border: 1px solid var(--border); display: block; background: var(--bg);
}
.thumb-cap { font-size: 12px; color: var(--muted); margin: 4px 0; min-height: 17px; }
.thumb-del {
  position: absolute; top: 4px; right: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0, 0, 0, .65); color: #fff; border: none;
  font-size: 16px; font-weight: 800; cursor: pointer; line-height: 1;
}
.thumb-ai {
  position: absolute; bottom: 4px; right: 4px;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(126, 211, 33, .92); border: none;
  font-size: 18px; cursor: pointer; line-height: 1;
}
.thumb-ai:disabled { opacity: .5; }
.thumb-x {
  position: absolute; top: 4px; right: 4px;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(220, 50, 50, .92); border: none;
  color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; line-height: 1;
}
.thumb-grid-pad { margin-top: 10px; }
.progress-text { font-size: 14px; font-weight: 700; color: var(--blue); margin: 8px 0; }

/* ---------- Phase 2: owner product photo section ---------- */
.photo-sec { margin-top: 6px; border-top: 1px dashed var(--border); padding-top: 2px; }
.photo-sec summary {
  min-height: var(--tap); display: flex; align-items: center;
  font-weight: 800; color: var(--blue); cursor: pointer; padding: 6px 0; font-size: 15px;
}
.photo-sec-body { padding-bottom: 8px; }

/* ---------- Phase 2: zip checker ---------- */
.zip-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.zip-city { font-size: 20px; font-weight: 800; }
.zip-deliverable { font-size: 17px; font-weight: 800; margin-top: 12px; }
.zone-pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px;
  font-size: 14px; font-weight: 800; white-space: nowrap;
}
.zone-a { background: #ecfccb; color: #4d7c0f; }
.zone-b { background: #fef9c3; color: #a16207; }
.zone-c { background: #ffedd5; color: #c2410c; }

/* ---------- Phase 2: Q&A ---------- */
.cat-tag {
  display: inline-block; background: var(--blue-soft); color: var(--blue);
  font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em;
}
.qa-answer { font-size: 15px; margin-top: 10px; white-space: pre-wrap; word-break: break-word; }
.qa-q-text { font-weight: 700; margin-top: 6px; }
.qa-core { border-bottom: 1px solid var(--border); padding: 10px 0; }
.qa-core:last-child { border-bottom: none; }
.qa-core-actions { display: flex; gap: 8px; flex-shrink: 0; }
.link-btn {
  background: none; border: none; color: var(--blue); font-weight: 700; font-size: 15px;
  min-height: var(--tap); padding: 8px 4px; cursor: pointer; font-family: inherit; text-decoration: underline;
}
.edit-form { background: var(--bg); border-radius: 10px; padding: 12px; margin-top: 10px; }

/* ---------- Phase 2: translator ---------- */
.dir-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0 4px; }
.dir-btn {
  min-height: var(--tap); border: 2px solid var(--border); border-radius: 12px;
  background: #fff; font-size: 15px; font-weight: 800; color: var(--text); cursor: pointer;
}
.dir-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ---------- Phase 3: chat ---------- */
.chat-msgs {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 55vh; overflow-y: auto;
  padding: 6px 2px 12px;
  -webkit-overflow-scrolling: touch;
}
.msg {
  max-width: 85%; padding: 10px 12px; border-radius: 14px; font-size: 15px;
}
.msg-own {
  align-self: flex-end; background: var(--blue); color: #fff;
  border-bottom-right-radius: 4px;
}
.msg-their {
  align-self: flex-start; background: #fff; border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.msg-name { font-size: 12px; font-weight: 800; color: var(--blue); margin-bottom: 2px; }
.msg-own .msg-name { color: #dbeafe; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.msg-time { font-size: 11px; opacity: .75; margin-top: 4px; text-align: right; }
.msg-attach { display: inline-block; margin-top: 6px; font-weight: 700; word-break: break-all; }
.msg-own .msg-attach { color: #fff; }
.msg-their .msg-attach { color: var(--blue); }
.chat-send { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.chat-send input[type="text"] { flex: 1; min-width: 0; }

/* Chat status pills (order pills live above; these are separate). */
.pill-open     { background: #e0ecfd; color: #1249a8; }
.pill-answered { background: #ecfccb; color: #4d7c0f; }
.pill-closed   { background: #f1f5f9; color: #475569; }

/* Unread badges: thread rows + bottom nav. */
.unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 7px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.nav-item { position: relative; }
.nav-green .nav-icon { color: var(--lime-deep); }
.nav-badge {
  position: absolute; top: 6px; left: 50%; margin-left: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1;
}

/* ---------- Phase 3: accordion (FAQs) ---------- */
.acc-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  width: 100%; background: none; border: none; padding: 0;
  font: inherit; color: inherit; text-align: left; cursor: pointer;
  min-height: var(--tap);
}
.acc-q { display: block; font-weight: 700; margin-top: 6px; font-size: 16px; }
.acc-arrow { font-size: 18px; color: var(--blue); transition: transform .15s; flex-shrink: 0; }
.acc-item.open .acc-arrow { transform: rotate(180deg); }
.acc-body { margin-top: 8px; }

/* ---------- Phase 3: simple tables (leaderboard) ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; -webkit-overflow-scrolling: touch; }
table.tbl {
  width: 100%; border-collapse: collapse; font-size: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.tbl th, .tbl td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td:nth-child(2) { white-space: normal; }
.tbl th {
  background: var(--blue-soft); color: var(--blue);
  font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.tbl tr:last-child td { border-bottom: none; }

/* ---------- Status quick menu (3-dots) ---------- */
.row-status-wrap { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.dots-btn {
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--muted);
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.dots-btn:active { background: var(--blue-soft); color: var(--blue); }
.sheet-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  background: #fff; width: 100%; max-width: 520px;
  border-radius: 18px 18px 0 0; padding: 8px 16px 28px;
  max-height: 84vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  animation: sheetUp .18s ease-out;
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.sheet-handle { width: 40px; height: 4px; border-radius: 999px; background: var(--border); margin: 4px auto 10px; }
.sheet-title { font-size: 17px; font-weight: 800; }
.sheet-sub { color: var(--muted); font-size: 13px; margin: 2px 0 8px; }
.sheet-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--border);
  padding: 13px 4px; font: inherit; font-size: 15px; cursor: pointer;
  min-height: var(--tap); text-align: left; color: inherit;
}
.sheet-item:active { background: var(--blue-soft); }
.sheet-item:last-child { border-bottom: none; }
.sheet-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.sheet-label { flex: 1; }
.sheet-check { color: var(--blue); font-weight: 800; }
#st-sheet-sched { padding-top: 8px; }
.hint-inline { color: var(--muted); font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.user-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.user-tag { display: inline-flex; align-items: center; gap: 6px; }
.row-by { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 3px; }
.row-time { color: var(--muted); font-size: 13px; margin-top: 3px; }

/* Price list (#/pricelist) */
.pl-items { margin-top: 8px; }
.row-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.pl-add { display: flex; gap: 6px; margin-top: 10px; }
.pl-add input[type="text"] { flex: 1 1 auto; min-width: 0; }
.pl-add input[data-plprice] { flex: 0 0 84px; }
.pl-add .btn { flex-shrink: 0; }

/* AI listing media */
.ai-video { width: 100%; border-radius: 10px; margin-top: 10px; background: #000; }

/* Announcements (#/announcements + dashboard banner) */
.ann-banner { border-left: 4px solid var(--accent, #84cc16); margin-bottom: 12px; }
.ann-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.ann-head .btn { flex-shrink: 0; }
.ann-x { border: none; background: none; font-size: 18px; line-height: 1; padding: 4px 8px; cursor: pointer; color: var(--muted); }
.ann-body { margin-top: 6px; font-size: 14px; white-space: pre-wrap; }
.ann-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.ann-more { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 600; }
.ann-card { margin-bottom: 12px; }

/* More menu page */
.more-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
  text-decoration: none;
  color: inherit;
}
.more-item:last-child { border-bottom: none; }
.more-item:active { background: #f5f8fc; }
.more-icon { font-size: 22px; width: 36px; text-align: center; }
.more-label { flex: 1; font-size: 16px; font-weight: 500; }
.more-arrow { color: #9fb3c8; font-size: 20px; }

/* Install guide steps */
.install-step { display: flex; gap: 14px; align-items: flex-start; }
.install-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.install-body { display: flex; gap: 12px; align-items: flex-start; flex: 1; }
.install-icon { font-size: 28px; }

/* Help Center */
.help-tabs { display: flex; gap: 8px; margin: 16px 0; }
.help-tab {
  flex: 1; padding: 12px; border: 2px solid var(--blue); border-radius: 10px;
  background: #fff; color: var(--blue); font-weight: 600; font-size: 15px; cursor: pointer;
}
.help-tab.active { background: var(--blue); color: #fff; }
.help-guide { margin-bottom: 12px; }
.help-steps { list-style: none; padding: 0; margin: 12px 0 0; }
.help-steps li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; line-height: 1.5;
}
.help-steps li:last-child { border-bottom: none; }
.help-step-num {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--lime); color: #333;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0; margin-top: 1px;
}

/* Dashboard notification bell */
.dash-header { display: flex; justify-content: space-between; align-items: flex-start; }
.notif-bell {
  position: relative; font-size: 26px; text-decoration: none;
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--blue-soft, #e8f0fe); border-radius: 50%; flex-shrink: 0;
}
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 20px; height: 20px; border-radius: 10px;
  background: #dc2626; color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* Brand-colored bell and wave */
.notif-bell svg { display: block; }
.notif-bell {
  background: #e8f0fe; border: 2px solid #1a5fd7;
}

/* New-order bell pulse (2026-10-21): 🛒 icon shakes/pulses when a new
   order arrives while the app is open. */
@keyframes bellPulse {
  0%, 100% { transform: scale(1) rotate(0deg); }
  25% { transform: scale(1.28) rotate(-9deg); }
  50% { transform: scale(1.16) rotate(7deg); }
  75% { transform: scale(1.24) rotate(-5deg); }
}
.bell-pulse { animation: bellPulse .55s ease-in-out 4; background: #bbf7d0 !important; }


/* Branded greeting card */
.greeting-card {
  background: linear-gradient(135deg, #e8f0fe 0%, #f0fdf4 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 12px 16px;
  flex: 1;
}
.greeting { margin: 0; font-size: 20px; }
.greet-name { color: #1a5fd7; font-weight: 700; }
.role-badge {
  display: inline-block; margin-top: 6px;
  background: #84cc16; color: #1a2e05;
  font-size: 12px; font-weight: 700;
  padding: 3px 12px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.beta-badge {
  display: inline-block; margin-top: 6px; margin-left: 8px;
  background: #f97316; color: #fff;
  font-size: 12px; font-weight: 800;
  padding: 3px 14px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 1.5px;
  box-shadow: 0 0 0 2px #fed7aa, 0 2px 6px rgba(249,115,22,.4);
}
.checkin-badge {
  margin: 8px 0; padding: 8px 12px;
  background: #f7fee7; border: 1px solid #a4d233; border-radius: 10px;
  color: #3f6212; font-size: 13px;
}
.dash-header { align-items: stretch; }
.dash-header .notif-bell { align-self: center; }

.twinkle { display: inline-block; animation: twinkle 1.8s ease-in-out infinite; }
@keyframes twinkle { 0%,100% { opacity: 1; transform: scale(1) rotate(0deg); } 50% { opacity: 0.4; transform: scale(0.8) rotate(20deg); } }

/* Compact team dashboard (supreme/director): 3-column leader grid, inline member dropdowns.
   Branding: blue primary + lime accent (Expert Solutions). */
.leader-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 16px; }
.leader-card { background: #fff; border: 1.5px solid #c9dafc; border-radius: 10px; padding: 8px; cursor: pointer; }
.leader-card.open { border-color: var(--blue); box-shadow: 0 2px 8px rgba(26,95,215,.18); }
.leader-card-head { display: flex; align-items: center; gap: 5px; }
.leader-card-name { font-weight: 700; font-size: 13px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue-dark); }
.leader-card-count { display: inline-block; font-size: 11px; font-weight: 700; color: var(--blue-dark); background: var(--blue-soft); border-radius: 20px; padding: 2px 8px; margin-top: 6px; }
.leader-card.open .leader-card-count { background: var(--lime); color: #1a2e05; }
.leader-members { margin-top: 8px; border-top: 2px solid var(--blue-soft); padding-top: 4px; }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 2px; font-size: 13px; border-bottom: 1px solid #eef3fb; }
.mrow:last-child { border-bottom: none; }
.mrow-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 13px; font-weight: 800; font-style: italic; text-decoration: none; flex-shrink: 0; line-height: 1; font-family: Georgia, serif; }
.info-btn:active { background: var(--blue-dark); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
details.direct-members { background: #fff; border: 1.5px solid #c9dafc; border-radius: 10px; padding: 10px 12px; margin-bottom: 16px; }
details.direct-members summary { font-weight: 700; font-size: 14px; cursor: pointer; color: var(--blue-dark); }
.dash-section-title { margin: 12px 0 6px; font-weight: 700; color: var(--blue); font-size: 14px; }

/* Member details modal (team dashboard) */
.dash-modal-overlay { position: fixed; inset: 0; background: rgba(10,25,60,.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 22px; }
.dash-modal { background: #fff; border-radius: 14px; max-width: 340px; width: 100%; padding: 18px; border-top: 4px solid var(--blue); box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.dash-modal .drow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eef3fb; font-size: 14px; }
.dash-modal .drow:last-of-type { border-bottom: none; }
.dash-modal .dlabel { color: #8a97a5; }
.dash-modal-x { border: none; background: var(--blue-soft); color: var(--blue-dark); width: 28px; height: 28px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; flex-shrink: 0; }

/* Project Docs (#/docs) */
.doc-card { padding: 16px; }
.doc-body { font-size: 14px; line-height: 1.65; color: #1e293b; }
.doc-body .doc-h1 { font-size: 20px; color: var(--blue-dark); margin: 18px 0 8px; }
.doc-body .doc-h2 { font-size: 17px; color: var(--blue); margin: 16px 0 6px; border-bottom: 2px solid var(--blue-soft); padding-bottom: 4px; }
.doc-body .doc-h3 { font-size: 15px; color: var(--blue-dark); margin: 12px 0 4px; }
.doc-body .doc-h4 { font-size: 14px; color: #334155; margin: 10px 0 4px; }
.doc-body p { margin: 8px 0; }
.doc-body .doc-list { margin: 8px 0; padding-left: 20px; }
.doc-body .doc-list li { margin: 4px 0; }
.doc-body .doc-hr { border: none; border-top: 2px solid var(--blue-soft); margin: 16px 0; }
.doc-body code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.doc-body strong { color: #0f172a; }

/* ---------- New Order page (v238 redesign) ---------- */
.order-hero {
  background: linear-gradient(135deg, #1a5fd7, #0d3fa3);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 12px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 63, 163, .28);
}
.order-hero h1 { margin: 0; font-size: 22px; font-weight: 800; color: #fff; }
.order-hero p { margin: 6px 0 0; font-size: 13px; color: #cdebb0; }
.ord-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--blue); color: #fff;
  font-size: 14px; font-weight: 800; margin-right: 8px;
  vertical-align: 2px;
}
.order-page .card { border-radius: 16px; box-shadow: 0 2px 10px rgba(15, 35, 80, .08); }
.order-page input:focus, .order-page select:focus, .order-page textarea:focus {
  box-shadow: 0 0 0 3px rgba(26, 95, 215, .16);
}
.order-page .prod-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
}
.order-page .prod-row:last-child { border-bottom: 1px solid var(--border); margin-bottom: 0; }
.order-page .stepper button {
  width: 40px; height: 40px; border-radius: 50%;
  font-size: 20px;
}
.order-page .size-sel {
  margin-top: 6px; max-width: 220px;
  border-radius: 10px;
}
.addr-wrap { position: relative; }


/* ---------- New Order: per-line colors + review sheet (v239) ---------- */
.order-page .color-sel { margin-top: 8px; max-width: 220px; border-radius: 10px; }
.order-page .color-other { margin-top: 8px; max-width: 220px; }
.order-page .btn-add { width: auto; flex-shrink: 0; padding: 10px 16px; min-height: 44px; font-size: 15px; }
.line-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px; background: var(--card);
}
.line-row:last-child { margin-bottom: 0; }
.line-sub { color: var(--muted); font-size: 13px; margin-top: 2px; font-weight: 600; }
.line-color { color: var(--muted); font-size: 13px; font-weight: 600; }
/* Per-product color swatches (Products page, Price list) — real color dots, professional look. */
.prod-colors { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0 4px; }
.colors-label { font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.color-swatch { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.color-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0,0,0,0.25); flex: none; }
.no-color-tag { font-size: 13px; color: var(--muted); font-style: italic; }
/* Quick Add bundle cards (New Order) — light theme, blue + lime accents. */
.qa-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 0 10px; }
.qa-title { font-size: 16px; font-weight: 800; color: var(--ink); }
.qa-cards { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.qa-card { flex: 0 0 205px; scroll-snap-align: start; background: var(--card); border: 1.5px solid var(--border); border-radius: 14px; padding: 12px; cursor: pointer; }
.qa-card.open { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.qa-name { font-size: 14px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-parts { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 32px; line-height: 1.35; }
.qa-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.qa-price { font-size: 18px; font-weight: 800; color: var(--lime-dark); }
.qa-count { font-size: 11px; font-weight: 700; color: var(--blue); background: var(--blue-soft); border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.qa-pick { margin-top: 10px; border-top: 1px dashed var(--border); padding-top: 8px; }
.qa-pick-label { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.qa-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 5px 10px; cursor: pointer; color: var(--ink); }
/* Orders stats bar (owner/director) */
.stats-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.stat-chip { font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px; }
.stat-chip b { color: var(--ink); font-size: 13px; margin-right: 2px; }
/* Configure-item pills (owner preview) */
.cfg-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cfg-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); background: var(--card); border-radius: 999px; padding: 6px 11px; cursor: pointer; color: var(--ink); }
.cfg-pill.active { border-color: var(--blue, #1a5fd7); background: #eef4ff; color: #1a5fd7; box-shadow: inset 0 0 0 1px var(--blue, #1a5fd7); }
.cfg-pill .color-dot { width: 12px; height: 12px; }
.qa-pill:active { border-color: var(--lime); }
.qa-pill .color-dot { width: 12px; height: 12px; }
.line-x {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent; color: var(--muted);
  font-size: 18px; font-weight: 700; cursor: pointer; line-height: 1; margin-left: 4px;
}
.modal-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-sheet {
  background: var(--card); color: var(--text);
  border-radius: 20px 20px 0 0;
  width: 100%; max-width: 540px; max-height: 88vh; overflow-y: auto;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .25);
  animation: sheet-up .22s ease-out;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.confirm-cust {
  background: var(--blue-soft); border-radius: 12px;
  padding: 10px 12px; font-size: 14px; margin-bottom: 10px; line-height: 1.5;
}
.confirm-total {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 17px; margin: 12px 0 4px; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.confirm-total strong { font-size: 20px; color: var(--blue); }
.confirm-actions { display: flex; gap: 10px; margin-top: 14px; }
.confirm-actions .btn { margin-top: 0; flex: 1; }

/* ---------- Address autocomplete dropdown (v242) ---------- */
.addr-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 35, 80, .18);
  margin-top: 4px; overflow: hidden;
}
.addr-item {
  display: block; width: 100%; text-align: left;
  padding: 10px 12px; border: none; background: transparent;
  border-bottom: 1px solid var(--border); cursor: pointer;
  font: inherit; color: inherit;
}
.addr-item:last-child { border-bottom: none; }
.addr-item:active { background: var(--blue-soft); }
.addr-label { font-weight: 700; font-size: 14px; }
.addr-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

/* ---------- Customer confirmation sheet (v246) ---------- */
.confirm-inv {
  background: var(--blue-soft);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 4px;
}
.confirm-inv-title {
  font-size: 18px; font-weight: 800; color: var(--blue);
  margin-bottom: 10px; text-align: center;
}
.confirm-inv-row {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 14px; padding: 3px 0;
}
.confirm-inv-row > span:first-child { color: var(--muted); flex-shrink: 0; }
.confirm-inv-row > strong { text-align: right; }
.confirm-inv-div { border-top: 1px solid var(--border); margin: 8px 0; }
.confirm-inv-total { font-size: 17px; }
.confirm-inv-total strong { color: var(--blue); }

/* ---------- Customer confirmation professional card (v248) ---------- */
.confirm-inv-sub {
  text-align: center; color: var(--muted); font-size: 13px;
  margin: -6px 0 10px;
}
.confirm-steps {
  background: #eef4ff; border-radius: 12px; padding: 12px; margin-top: 12px;
}
.confirm-steps-title {
  font-weight: 800; color: var(--blue); font-size: 14px; margin-bottom: 8px;
}
.confirm-step {
  display: flex; gap: 8px; font-size: 13px; margin-top: 6px; color: #334155;
}
.confirm-step-n {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

/* ---------- Order code (v249) ---------- */
.row-code {
  font-size: 12px; font-weight: 800; color: var(--blue);
  letter-spacing: 0.5px; margin-top: 2px;
}
