/* ==========================================================================
   AmfrePOS Cloud — UI kit
   Palette and type follow the Amfre TVC CMS: navy + gold, Montserrat.
   ========================================================================== */

:root {
  --navy: #0a2540;
  --navy-deep: #071b30;
  --navy-soft: #123a5c;
  --gold: #fbbf24;
  --gold-deep: #d99a06;
  --blue: #1d4ed8;
  --paper: #ffffff;
  --canvas: #f3f6fb;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #dbe4ef;
  --ok: #0f7a4d;
  --ok-soft: #e6f6ee;
  --warn: #a16207;
  --warn-soft: #fdf3d8;
  --danger: #b91c1c;
  --danger-soft: #fdecec;
  --info-soft: #e8effc;
  --shadow: 0 10px 30px -12px rgba(10, 37, 64, 0.18);
  --shadow-lg: 0 30px 60px -30px rgba(10, 37, 64, 0.35);
  --radius: 14px;
  --sidebar: 258px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: none; }
.btn--gold { background: linear-gradient(135deg, var(--gold), #f59e0b); color: var(--navy); }
.btn--navy { background: var(--navy); }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { background: #fff; }
.btn--light { background: #fff; color: var(--navy); }
.btn--danger { background: var(--danger); }
.btn--sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- Cards & grids ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(10, 37, 64, .04);
}
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card__head h3 { font-size: 14.5px; font-weight: 700; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em;
  background: #eef2f7; color: var(--muted);
  white-space: nowrap;
}
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warn { background: var(--warn-soft); color: var(--warn); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--gold { background: #fdf1cf; color: #8a5a00; }
.badge--navy { background: var(--navy); color: #fff; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.label { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--navy-soft);
  box-shadow: 0 0 0 3px rgba(18, 58, 92, .12);
}
.textarea { min-height: 92px; resize: vertical; }
.hint { font-size: 11.5px; color: var(--muted); }
.error { font-size: 12px; color: var(--danger); font-weight: 600; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.check input { width: 16px; height: 16px; accent-color: var(--navy); }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 15px; border-radius: 10px;
  font-size: 13px; border: 1px solid transparent; margin-bottom: 16px;
}
.alert strong { font-weight: 700; }
.alert--success { background: var(--ok-soft); color: #085c3a; border-color: #bfe8d4; }
.alert--info { background: var(--info-soft); color: #1e3a8a; border-color: #c9d8f7; }
.alert--warning { background: var(--warn-soft); color: #7c4a03; border-color: #f0dba6; }
.alert--danger { background: var(--danger-soft); color: #7f1d1d; border-color: #f3c2c2; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 11px 16px;
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); font-weight: 700;
  background: #f8fafc; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid #eef3f9; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfdff; }
.table .right { text-align: right; }
.table__sub { display: block; font-size: 11.5px; color: var(--muted); }

/* ---------- Stats ---------- */
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 6px;
  position: relative; overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(180deg, var(--gold), var(--gold-deep));
}
.stat__label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.stat__value { font-size: 24px; font-weight: 800; letter-spacing: -0.6px; color: var(--navy); line-height: 1.15; }
.stat__delta { font-size: 12px; color: var(--muted); }
.stat--plain::after { display: none; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-title { font-size: 23px; font-weight: 800; letter-spacing: -0.5px; color: var(--navy); }
.page-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty h4 { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.empty p { font-size: 13px; }

/* ---------- Pagination ---------- */
.pagination-wrap { padding: 14px 18px; border-top: 1px solid var(--line); }
.pagination-wrap nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; }
.pagination-wrap .pagination { display: flex; gap: 6px; align-items: center; }
.pagination-wrap a, .pagination-wrap span[aria-current] {
  display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center;
  padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
  font-size: 12.5px;
}
.pagination-wrap span[aria-current] { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 700; }
.pagination-wrap svg { width: 14px; height: 14px; }

/* ---------- Charts (pure CSS bars) ---------- */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 170px; padding-top: 10px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; min-width: 0; }
.chart__bar { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, var(--navy-soft), var(--navy)); min-height: 4px; transition: height .3s ease; }
.chart__bar--gold { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); }
.chart__label { font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.chart__value { font-size: 10px; color: var(--muted); font-weight: 600; }

/* ==========================================================================
   Platform marketing site
   ========================================================================== */
.site { background: #fff; }

.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav__inner {
  max-width: 1160px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 26px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--navy); letter-spacing: -0.4px; font-size: 16px; }
.logo:hover { text-decoration: none; }
.logo__mark {
  width: 36px; height: 36px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--gold), #f59e0b);
  color: var(--navy); display: grid; place-items: center;
  font-size: 13px; font-weight: 800;
}
.logo__text small { display: block; font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.nav-links { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.nav-links a { color: #334155; font-size: 13px; font-weight: 600; }
.nav-links a:hover { color: var(--navy); text-decoration: none; }
.nav-cta { display: flex; align-items: center; gap: 10px; }

.hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(251, 191, 36, .18), transparent 60%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #e8f0fb; overflow: hidden;
}
.hero__inner {
  max-width: 1160px; margin: 0 auto; padding: 70px 24px 76px;
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(251, 191, 36, .14); color: var(--gold);
  font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  border: 1px solid rgba(251, 191, 36, .3);
}
.hero h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.08; letter-spacing: -1.2px; margin: 18px 0 16px; color: #fff; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero__lead { font-size: 15.5px; line-height: 1.7; color: #b9cbe2; max-width: 480px; }
.hero__cta { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.hero__stats { display: flex; gap: 32px; margin-top: 38px; flex-wrap: wrap; }
.hero__stat strong { display: block; font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -.5px; }
.hero__stat span { font-size: 11.5px; color: #93a9c4; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }

/* Browser-style preview */
.preview {
  background: #0d2c4b; border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden;
  transform: rotate(-.6deg);
}
.preview__bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(255, 255, 255, .05); border-bottom: 1px solid rgba(255, 255, 255, .07); }
.preview__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.preview__url { margin-left: 10px; font-size: 10.5px; color: #8ba6c4; background: rgba(255, 255, 255, .06); padding: 3px 9px; border-radius: 5px; }
.preview__body { padding: 18px; display: grid; gap: 12px; }
.preview__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.preview__card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px; padding: 11px 12px; }
.preview__card small { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; color: #8ba6c4; margin-bottom: 4px; }
.preview__card strong { font-size: 14px; color: #fff; letter-spacing: -.2px; }
.preview__list { display: grid; gap: 7px; }
.preview__item { display: flex; align-items: center; justify-content: space-between; background: rgba(255, 255, 255, .04); border-radius: 7px; padding: 8px 11px; font-size: 10.5px; color: #c5d6ea; }
.preview__item b { color: var(--gold); font-weight: 700; }

.section { max-width: 1160px; margin: 0 auto; padding: 72px 24px; }
.section--alt { max-width: none; background: var(--canvas); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section--alt > .section__inner { max-width: 1160px; margin: 0 auto; }
.section__head { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.kicker { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.section__head h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.8px; color: var(--navy); margin: 8px 0 10px; font-weight: 800; }
.section__head p { color: var(--muted); font-size: 14px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.feature__icon {
  width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center;
  background: #fdf3d8; color: #8a5a00; margin-bottom: 14px;
}
.feature__icon svg { width: 21px; height: 21px; }
.feature h3 { font-size: 15px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--muted); line-height: 1.65; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-size: 12px; font-weight: 800; color: var(--gold-deep);
  background: #fdf3d8; border-radius: 8px; padding: 4px 9px; display: inline-block; margin-bottom: 12px;
}
.step h3 { font-size: 15px; color: var(--navy); margin-bottom: 6px; }
.step p { font-size: 13px; color: var(--muted); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 16px; position: relative; }
.plan--featured { border: 2px solid var(--navy); box-shadow: var(--shadow); }
.plan__flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: var(--navy); font-size: 10px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.plan h3 { font-size: 17px; color: var(--navy); font-weight: 800; }
.plan__tag { font-size: 12px; color: var(--muted); min-height: 34px; }
.plan__price { display: flex; align-items: baseline; gap: 6px; }
.plan__price strong { font-size: 32px; letter-spacing: -1px; color: var(--navy); font-weight: 800; }
.plan__price span { font-size: 12px; color: var(--muted); }
.plan__save { font-size: 11px; color: var(--ok); font-weight: 700; }
.plan__features { display: grid; gap: 9px; font-size: 12.5px; color: #334155; }
.plan__features li { display: flex; gap: 8px; align-items: flex-start; }
.plan__features li::before { content: ""; width: 15px; height: 15px; border-radius: 50%; flex: none; margin-top: 3px; background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f7a4d' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/10px no-repeat; }
.plan .btn { margin-top: auto; }

/* Demo cards */
.demos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.demo-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.demo-card__top { display: flex; align-items: center; gap: 12px; }
.demo-card__mark { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--navy); background: var(--gold); flex: none; }
.demo-card h3 { font-size: 14.5px; color: var(--navy); }
.demo-card p { font-size: 12.5px; color: var(--muted); }
.demo-card__meta { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.demo-card .btn { margin-top: auto; }

.cta-band {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  border-radius: 18px; padding: 44px; display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap; color: #fff;
}
.cta-band h2 { font-size: 26px; letter-spacing: -.7px; font-weight: 800; }
.cta-band p { color: #b9cbe2; font-size: 13.5px; margin-top: 6px; }

.site-footer { background: var(--navy-deep); color: #93a9c4; padding: 44px 24px 30px; margin-top: 0; }
.site-footer__inner { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: 13px; margin-bottom: 10px; }
.site-footer a { color: #93a9c4; font-size: 12.5px; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--gold); text-decoration: none; }
.site-footer__bottom { max-width: 1160px; margin: 28px auto 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .09); font-size: 11.5px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.site-footer .logo { color: #fff; }
.site-footer .logo__text small { color: #8ba6c4; }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth { min-height: 100vh; display: grid; grid-template-columns: .9fr 1.1fr; }
.auth__brand {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #c9d9ec; padding: 46px 44px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth__brand::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(251, 191, 36, .22), transparent 70%);
  bottom: -160px; right: -120px;
}
.auth__brand .logo { color: #fff; margin-bottom: auto; }
.auth__brand .logo__text small { color: #8ba6c4; }
.auth__pitch h1 { color: #fff; font-size: 30px; line-height: 1.18; letter-spacing: -.8px; margin-bottom: 14px; font-weight: 800; }
.auth__pitch p { font-size: 13.5px; line-height: 1.7; color: #a9c0da; max-width: 380px; }
.auth__points { display: grid; gap: 12px; margin-top: 26px; }
.auth__points li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; color: #c9d9ec; }
.auth__points li::before { content: ""; width: 17px; height: 17px; border-radius: 50%; flex: none; margin-top: 2px; background: rgba(251, 191, 36, .18) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fbbf24' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/10px no-repeat; }
.auth__foot { font-size: 11.5px; color: #7d94ad; margin-top: 34px; }
.auth__main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--canvas); }
.auth-card { width: 100%; max-width: 460px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 32px; }
.auth-card h2 { font-size: 22px; letter-spacing: -.5px; color: var(--navy); font-weight: 800; }
.auth-card > p { font-size: 13px; color: var(--muted); margin: 6px 0 22px; }
.auth-alt { margin-top: 18px; font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-alt a { font-weight: 700; }
.demo-box { margin-top: 20px; padding: 14px 16px; border-radius: 10px; background: #f8fafc; border: 1px dashed var(--line); font-size: 11.5px; color: var(--muted); }
.demo-box strong { color: var(--ink); }
.demo-box a { font-weight: 700; }
.demo-accounts { display: grid; gap: 6px; margin-top: 8px; }
.demo-accounts a { display: flex; justify-content: space-between; gap: 10px; }

.plan-pick { display: grid; gap: 10px; }
.plan-option { display: flex; gap: 10px; align-items: center; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: 12.5px; }
.plan-option input { accent-color: var(--navy); }
.plan-option:has(input:checked) { border-color: var(--navy); background: #f5f8fc; }
.plan-option__price { margin-left: auto; font-weight: 800; color: var(--navy); }
.cycle-toggle { display: inline-flex; padding: 3px; background: #eef2f7; border-radius: 9px; gap: 3px; margin-bottom: 4px; }
.cycle-toggle label { padding: 6px 12px; border-radius: 7px; font-size: 12px; font-weight: 600; cursor: pointer; }
.cycle-toggle input { display: none; }
.cycle-toggle label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(10, 37, 64, .12); color: var(--navy); }
.step-row { display: flex; gap: 6px; margin-bottom: 20px; }
.step-row span { height: 4px; flex: 1; border-radius: 99px; background: var(--line); }
.step-row span.on { background: var(--gold); }

/* ==========================================================================
   Panel (shop + superadmin)
   ========================================================================== */
.panel { min-height: 100vh; display: flex; }
.panel__sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar);
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #dbeafe; display: flex; flex-direction: column; z-index: 60;
  overflow-y: auto;
}
.panel__brand { display: flex; align-items: center; gap: 11px; padding: 20px 18px; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.panel__brand:hover { text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--gold), #f59e0b); color: var(--navy);
  display: grid; place-items: center; font-weight: 800; font-size: 13px; letter-spacing: -.5px;
}
.brand-text { font-size: 13.5px; font-weight: 700; line-height: 1.25; letter-spacing: -.2px; }
.brand-text small { display: block; font-size: 10px; font-weight: 600; color: #8fa9c6; letter-spacing: .08em; text-transform: uppercase; }
.panel__shop { padding: 14px 16px 8px; }
.panel__shop-name { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #7f9bba; font-weight: 700; margin-bottom: 6px; }
.panel__shop h2 { font-size: 14px; color: #fff; font-weight: 700; line-height: 1.3; }
.panel__shop p { font-size: 11px; color: #93a9c4; margin-top: 2px; }

.nav { padding: 6px 10px 18px; display: flex; flex-direction: column; gap: 2px; }
.nav__label { padding: 14px 10px 6px; font-size: 9.5px; text-transform: uppercase; letter-spacing: .14em; color: #6c88a6; font-weight: 700; }
.nav__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 8px;
  color: #c2d4e7; font-size: 12.5px; font-weight: 500;
  border-left: 2px solid transparent;
  transition: background .12s, color .12s;
}
.nav__link:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav__link.is-active { background: rgba(251, 191, 36, .12); color: #fff; border-left-color: var(--gold); font-weight: 600; }
.nav__link svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.nav__link .badge { margin-left: auto; }
.panel__sidebar-foot { margin-top: auto; padding: 14px 16px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 10.5px; color: #6c88a6; }

.panel__main { margin-left: var(--sidebar); flex: 1; min-width: 0; display: flex; flex-direction: column; }
.panel__topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); padding: 12px 26px;
}
.panel__topbar h1 { font-size: 15px; font-weight: 700; color: var(--navy); letter-spacing: -.2px; }
.panel__topbar .spacer { flex: 1; }
.topbar-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
}
.avatar--gold { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: var(--navy); }
.user-name { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.user-role { font-size: 10.5px; color: var(--muted); }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.panel__content { padding: 26px; max-width: 1440px; width: 100%; margin: 0 auto; }
.mobile-toggle { display: none; }

.impersonation-banner {
  background: var(--gold); color: var(--navy); padding: 8px 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12.5px; font-weight: 600;
}
.impersonation-banner form { margin: 0; }
.impersonation-banner button { background: transparent; border: 0; font: inherit; font-weight: 800; text-decoration: underline; cursor: pointer; color: var(--navy); }

/* Trial strip */
.trial-strip {
  display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap;
  background: linear-gradient(90deg, #0a2540, #123a5c); color: #dce8f5;
  border-radius: 12px; padding: 13px 18px; font-size: 12.5px; margin-bottom: 20px;
}
.trial-strip strong { color: var(--gold); }
.trial-strip a { color: #fff; font-weight: 700; text-decoration: underline; }

/* Setup checklist */
.setup { display: grid; gap: 10px; }
.setup__item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.setup__tick {
  width: 20px; height: 20px; border-radius: 50%; flex: none; display: grid; place-items: center;
  border: 1.5px solid var(--line); color: transparent; font-size: 11px; font-weight: 900;
}
.setup__item.is-done .setup__tick { background: var(--ok); border-color: var(--ok); color: #fff; }
.setup__item.is-done a { color: var(--muted); text-decoration: line-through; }
.setup__item a { color: var(--navy); font-weight: 600; }

.copy { display: flex; align-items: center; gap: 6px; }
.copy input { font-family: ui-monospace, monospace; font-size: 11.5px; background: #f8fafc; }

/* POS */
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.pos__toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--navy-soft); }
.chip.is-active { background: var(--navy); color: #fff; border-color: var(--navy); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.product-tile {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  cursor: pointer; text-align: left; font: inherit; display: flex; flex-direction: column; gap: 6px;
  transition: transform .1s, box-shadow .1s, border-color .1s; min-height: 108px;
}
.product-tile:hover { border-color: var(--navy-soft); box-shadow: var(--shadow); transform: translateY(-1px); }
.product-tile:disabled { opacity: .45; cursor: not-allowed; }
.product-tile__name { font-size: 12.5px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.product-tile__meta { font-size: 10.5px; color: var(--muted); }
.product-tile__price { margin-top: auto; font-size: 13.5px; font-weight: 800; color: var(--navy); }
.product-tile__per { font-size: 10px; font-weight: 600; color: var(--muted); }
.product-tile__units { display: flex; flex-wrap: wrap; gap: 4px; }
.product-tile__unit {
  font-size: 9.5px; font-weight: 700; color: var(--navy); background: #eef4fb;
  border: 1px solid #dbe7f5; border-radius: 999px; padding: 2px 6px; white-space: nowrap;
  transition: background .1s, border-color .1s;
}
.product-tile__unit:hover { background: #fdf1cf; border-color: #f2d58a; }
.product-tile__stock { font-size: 10px; color: var(--muted); }
.product-tile__stock.is-low { color: var(--danger); font-weight: 700; }

.pos__shift { margin-bottom: 16px; }
.pos__shift-body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 14px; }
.pos__shift-info { display: flex; align-items: center; gap: 9px; min-width: 0; }
.pos__shift-info strong { font-size: 12.5px; display: block; }
.pos__shift-info .hint { font-size: 10.5px; line-height: 1.35; }
.pos__shift-dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); flex: none; }
.pos__shift-dot.is-off { background: var(--muted); box-shadow: 0 0 0 3px rgba(100, 116, 139, .12); }

.pos__cart { position: sticky; top: 78px; }
.pos__holds { margin-bottom: 16px; }
.holds-list { max-height: 260px; overflow-y: auto; }
.hold-row { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #eef3f9; }
.hold-row:last-child { border-bottom: 0; }
.hold-row__main { flex: 1; min-width: 0; }
.hold-row__ref { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.hold-row__label { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hold-row__meta { font-size: 10.5px; color: var(--muted); }
.hold-row__total { font-size: 12.5px; font-weight: 800; color: var(--navy); white-space: nowrap; }
.hold-row__actions { display: flex; gap: 5px; }
.holds-empty { padding: 16px; text-align: center; font-size: 12px; color: var(--muted); }
.cart-empty { padding: 30px 10px; text-align: center; color: var(--muted); font-size: 12.5px; }
.cart-lines { max-height: 300px; overflow-y: auto; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 11px 0; border-bottom: 1px solid #eef3f9; }
.cart-line:last-child { border-bottom: 0; }
.cart-line__name { font-size: 12.5px; font-weight: 600; }
.cart-line__price { font-size: 11.5px; color: var(--muted); }
.cart-line__total { font-size: 12.5px; font-weight: 700; text-align: right; }
.cart-line__main { min-width: 0; }
.cart-line__unit-label { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 10px; font-weight: 700; color: var(--muted); }
.cart-line__unit { margin-top: 0; padding: 4px 8px; font-size: 11.5px; width: 100%; max-width: 210px; }
.cart-line__stock { font-size: 10px; color: var(--muted); margin-top: 3px; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty input {
  width: 58px; padding: 4px 6px; text-align: center;
  border: 1px solid var(--line); border-radius: 6px; font-size: 12px; font-family: inherit;
}
.qty button {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-weight: 700; line-height: 1; color: var(--ink); font-size: 13px;
}
.qty span { min-width: 22px; text-align: center; font-size: 12.5px; font-weight: 700; }
.cart-totals { display: grid; gap: 7px; padding-top: 14px; border-top: 1px dashed var(--line); margin-top: 12px; font-size: 12.5px; }
.cart-totals__row { display: flex; justify-content: space-between; gap: 10px; }
.cart-totals__row--total { font-size: 16px; font-weight: 800; color: var(--navy); padding-top: 8px; border-top: 1px solid var(--line); margin-top: 4px; }
.pay-methods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.method { position: relative; }
.method input { position: absolute; opacity: 0; }
.method span {
  display: block; text-align: center; padding: 9px 6px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 11.5px; font-weight: 700; cursor: pointer; background: #fff;
}
.method input:checked + span { border-color: var(--navy); background: #f0f5fb; color: var(--navy); box-shadow: 0 0 0 2px rgba(10, 37, 64, .08); }
.mobile-money-note { display: none; margin-top: 10px; }
.mobile-money-note.is-on { display: block; }
.pos__terminal { display: flex; align-items: center; gap: 8px; }
.pos__terminal .label { margin: 0; white-space: nowrap; }
.pos__terminal .select { max-width: 200px; }
.offline-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #fff7e6; border: 1px solid #f0dba6; color: #7c4a03;
  border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-size: 12.5px;
}
[hidden] { display: none !important; }

/* Receipt */
.receipt-page { max-width: 420px; margin: 0 auto; }
.receipt { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px; font-size: 12.5px; }
.receipt__head { text-align: center; padding-bottom: 16px; border-bottom: 1px dashed var(--line); }
.receipt__brand { font-size: 16px; font-weight: 800; color: var(--navy); letter-spacing: -.3px; }
.receipt__meta { text-align: center; font-size: 11px; color: var(--muted); margin-top: 2px; }
.receipt__rows { padding: 14px 0; border-bottom: 1px dashed var(--line); }
.receipt table { width: 100%; border-collapse: collapse; font-size: 12px; }
.receipt th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: 8px; }
.receipt th:last-child, .receipt td:last-child { text-align: right; }
.receipt td { padding: 5px 0; vertical-align: top; }
.receipt__totals { padding-top: 12px; display: grid; gap: 5px; }
.receipt__totals div { display: flex; justify-content: space-between; }
.receipt__total { font-size: 15px; font-weight: 800; color: var(--navy); border-top: 1px solid var(--line); padding-top: 8px; margin-top: 4px; }
.receipt__foot { text-align: center; padding-top: 16px; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.receipt__badge { margin: 14px auto 0; display: flex; justify-content: center; }
.pay-pending { background: var(--warn-soft); border: 1px solid #f0dba6; border-radius: 10px; padding: 14px 16px; font-size: 12.5px; color: #7c4a03; }

/* Code / credential block */
.code-block { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.8; overflow-x: auto; }
.danger-zone { border: 1px solid #f3c2c2; background: #fffafa; }

/* Banner for demo / test mode */
.demo-ribbon {
  position: fixed; bottom: 14px; right: 14px; z-index: 70;
  background: var(--navy); color: #fff; font-size: 11px; font-weight: 600;
  padding: 7px 12px; border-radius: 999px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 6px; opacity: .92;
}
.demo-ribbon span { color: var(--gold); font-weight: 800; letter-spacing: .08em; }

/* Responsive */
@media (max-width: 1150px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .pos { grid-template-columns: minmax(0, 1fr) 340px; }
  .hero__inner { gap: 30px; }
}
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .preview { transform: none; max-width: 520px; }
  .plans, .demos { grid-template-columns: 1fr; }
  .plan--featured { order: -1; }
  .auth { grid-template-columns: 1fr; }
  .auth__brand { padding: 28px 24px; }
  .auth__pitch, .auth__points, .auth__foot { display: none; }
  .auth__brand .logo { margin-bottom: 0; }
  .grid--main { grid-template-columns: 1fr; }
  .pos { grid-template-columns: 1fr; }
  .pos__cart { position: static; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .panel__sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  .panel__sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .panel__main { margin-left: 0; }
  .mobile-toggle { display: grid; }
  .panel__content { padding: 18px; }
  .panel__topbar { padding: 10px 18px; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .cta-band { padding: 30px; }
  .chart { gap: 4px; }
  .chart__label { font-size: 9px; }
  .page-title { font-size: 20px; }
  .table th, .table td { padding: 10px 12px; }
}
@media (max-width: 560px) {
  .hero__inner { padding: 48px 20px 56px; }
  .hero__stats { gap: 20px; }
  .section { padding: 52px 20px; }
  .auth-card { padding: 24px; }
  .plan__price strong { font-size: 28px; }
  .site-footer__inner { grid-template-columns: 1fr; }
  .pay-methods { grid-template-columns: 1fr; }
}

/* ---------- Purchases & ledgers ---------- */
.purchase-totals { display: flex; flex-direction: column; gap: 8px; max-width: 360px; margin-left: auto; }
.purchase-totals > div { display: flex; justify-content: space-between; gap: 20px; font-size: 13px; color: var(--muted); }
.purchase-totals > div strong { color: var(--ink); font-weight: 700; }
.purchase-totals__grand { border-top: 1px dashed var(--line); padding-top: 8px; }
.purchase-totals__grand strong { font-size: 18px; }
.detail-list { display: grid; grid-template-columns: 40% 1fr; gap: 9px 14px; font-size: 13px; }
.detail-list dt { color: var(--muted); }
.detail-list dd { color: var(--ink); font-weight: 600; word-break: break-word; }
.detail-list dd a { color: var(--navy); text-decoration: underline; }
.muted { opacity: .55; }
.purchase-lines .select, .purchase-lines .input { min-width: 90px; }

@media print {
  .no-print, .panel__sidebar, .panel__topbar, .demo-ribbon, .impersonation-banner { display: none !important; }
  .panel__main { margin: 0; }
  .panel__content { padding: 0; }
  .receipt { border: 0; padding: 0; }
  body { background: #fff; }
  .receipt-page { max-width: none; }
}

/* ---------- Barcode scanner ---------- */
.scanner { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(6, 20, 36, .72); backdrop-filter: blur(3px); }
.scanner__dialog { width: 100%; max-width: 520px; background: var(--paper); border-radius: 18px; box-shadow: 0 30px 80px rgba(3, 14, 26, .35); overflow: hidden; display: flex; flex-direction: column; }
.scanner__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px 12px; }
.scanner__eyebrow { display: block; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.scanner__title { margin: 4px 0 0; font-size: 19px; color: var(--navy); }
.scanner__close { flex: none; }
.scanner__stage { position: relative; margin: 0 20px; border-radius: 14px; overflow: hidden; background: var(--navy-deep); min-height: 210px; display: flex; align-items: center; justify-content: center; }
.scanner__video { width: 100%; max-height: 320px; object-fit: cover; display: block; }
.scanner__frame { position: absolute; inset: 16% 10%; border: 2px solid rgba(251, 191, 36, .85); border-radius: 12px; pointer-events: none; }
.scanner__frame span { position: absolute; left: 6%; right: 6%; top: 50%; height: 2px; background: linear-gradient(90deg, transparent, rgba(251, 191, 36, .9), transparent); animation: scanner-sweep 2.4s ease-in-out infinite; }
@keyframes scanner-sweep { 0%, 100% { transform: translateY(-28px); opacity: .35; } 50% { transform: translateY(28px); opacity: 1; } }
.scanner__notice { position: absolute; inset: auto 16px 16px; padding: 10px 12px; border-radius: 10px; background: rgba(7, 27, 48, .88); color: #e2e8f0; font-size: 12px; line-height: 1.45; }
.scanner__last { position: absolute; top: 12px; left: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(7, 27, 48, .85); color: var(--gold); font-size: 11px; font-weight: 700; }
.scanner__manual { padding: 16px 20px 0; }
.scanner__manual-row { display: flex; gap: 8px; }
.scanner__manual-row .input { flex: 1; }
.scanner__hint { margin: 10px 20px 0; }
.scanner__keep { margin: 12px 20px 20px; }

/* ---------- Communications ---------- */
.inbox-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background .15s ease; }
.inbox-row:last-child { border-bottom: 0; }
.inbox-row:hover { background: #f8fafc; }
.inbox-row.is-unread { background: #fffdf3; }
.inbox-row__dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: transparent; border: 2px solid var(--line); }
.inbox-row.is-unread .inbox-row__dot { background: var(--gold); border-color: var(--gold-deep); }
.inbox-row__main { flex: 1; min-width: 0; }
.inbox-row__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.inbox-row__top strong { color: var(--navy); font-size: 14px; }
.inbox-row p { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announcement-body { font-size: 14px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; word-break: break-word; }

.list-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row__main { min-width: 0; }
.list-row__main strong { display: block; color: var(--navy); font-size: 14px; }
.list-row__main span { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

.picker { max-height: 320px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 12px; background: #fbfdff; }
.picker .check { padding: 8px 0; border-bottom: 1px solid rgba(219, 228, 239, .6); }
.picker .check:last-child { border-bottom: 0; }

.thread { display: flex; flex-direction: column; gap: 14px; }
.thread__item { display: flex; flex-direction: column; align-items: flex-start; max-width: 88%; }
.thread__item.is-shop { align-self: flex-end; align-items: flex-end; }
.thread__meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: 11px; color: var(--muted); }
.thread__bubble { padding: 11px 14px; border-radius: 14px; background: #f1f5f9; border: 1px solid var(--line); font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; color: var(--ink); }
.thread__item.is-shop .thread__bubble { background: #ecfdf5; border-color: #b7e4cd; }
.thread__item.is-staff .thread__bubble { background: #eff6ff; border-color: #c7dcf7; }

.message-provider { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: #fbfdff; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.card__head .hint { margin: 0; }

@media (max-width: 560px) {
  .scanner__stage { min-height: 170px; }
  .scanner__manual-row { flex-direction: column; }
  .thread__item { max-width: 100%; }
}

/* POS product images, pickers and full-screen till */
.product-tile__thumb { display: block; width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: #eef4fb; }
.product-tile__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-line__title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cart-line__thumb { width: 34px; height: 34px; border-radius: 7px; overflow: hidden; flex: none; background: #eef4fb; }
.cart-line__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cart-line__batch { font-size: 10.5px; color: var(--navy-soft); font-weight: 600; margin-top: 2px; }

.pos-modal { position: fixed; inset: 0; z-index: 80; background: rgba(10, 37, 64, .55); display: flex; align-items: center; justify-content: center; padding: 18px; }
.pos-modal__dialog { width: min(460px, 100%); max-height: min(80vh, 640px); background: #fff; border-radius: 16px; box-shadow: 0 24px 60px rgba(10, 37, 64, .28); display: flex; flex-direction: column; overflow: hidden; }
.pos-modal__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; border-bottom: 1px solid var(--line); }
.pos-modal__title { margin: 0; font-size: 16px; }
.pos-modal__sub { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.pos-modal__body { padding: 10px 12px 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.picker-option { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; font: inherit; color: var(--ink); cursor: pointer; }
.picker-option:hover:not(:disabled) { border-color: var(--navy-soft); background: #f8fbff; }
.picker-option.is-active { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.picker-option:disabled { opacity: .5; cursor: not-allowed; }
.picker-option__thumb { width: 42px; height: 42px; border-radius: 8px; overflow: hidden; flex: none; background: #eef4fb; }
.picker-option__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picker-option__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.picker-option__label { font-size: 13px; font-weight: 700; }
.picker-option__meta { font-size: 11.5px; color: var(--muted); }
.picker-option__note { font-size: 10.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.picker-option__note.is-danger { color: var(--danger); }

.pos:fullscreen { padding: 16px; overflow-y: auto; background: var(--page, #f4f7fb); }
.pos:fullscreen .pos__cart { top: 0; }
