/* ==========================================================================
   LifeMedicalStore — Design System Stylesheet
   Layered on top of Tailwind (Play CDN). Tokens live in js/components.js.
   --------------------------------------------------------------------------
   1. Root tokens
   2. Base / reset
   3. Typography helpers
   4. Buttons
   5. Form controls
   6. Cards & surfaces
   7. Badges & pills
   8. Tables
   9. Navigation
   10. Overlays (modal, drawer, toast, tooltip)
   11. Steppers & timelines
   12. Reels
   13. Charts
   14. States (empty, loading, skeleton)
   15. Animations
   16. Utilities & responsive tweaks
   ========================================================================== */

/* 1. Root tokens ---------------------------------------------------------- */
:root {
  --lms-primary: #2f80ff;
  --lms-primary-dark: #1461eb;
  --lms-primary-soft: #eef6ff;
  --lms-secondary: #12a882;
  --lms-secondary-soft: #eafaf4;
  --lms-ink: #0b1b33;
  --lms-ink-muted: #5b6b83;
  --lms-line: #e6edf6;
  --lms-surface: #f6f9fc;
  --lms-warning: #f59e0b;
  --lms-danger: #ef4444;
  --lms-radius: 16px;
  --lms-header-h: 132px;
  --lms-sidebar-w: 268px;
  --lms-sidebar-w-collapsed: 78px;
}

/* 2. Base / reset --------------------------------------------------------- */
* { -webkit-tap-highlight-color: transparent; }

/* overflow-x: clip (not hidden) so this doesn't also force overflow-y to
   auto per the CSS overflow computed-value pairing rule — that would turn
   html/body into their own scroll container and break position: sticky. */
html { scroll-behavior: smooth; overflow-x: clip; }

body {
  overflow-x: clip;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--lms-ink);
  background-color: var(--lms-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}
/* Headings inherit their colour rather than declaring it.
   `body` already sets the ink colour, so a heading on a light surface renders
   exactly as before. The old element selector beat the colour inherited from
   any ancestor, so a heading inside a dark panel came out in dark ink however
   the panel was styled — `text-white` on a wrapper silently did nothing to
   the heading inside it. Inheriting makes the obvious thing work. */
h1, h2, h3, h4, h5, h6 { color: inherit; }

a { color: inherit; text-decoration: none; }

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

::selection { background: rgba(47, 128, 255, 0.18); color: var(--lms-ink); }

:focus-visible {
  outline: 2px solid var(--lms-primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Scrollbars */
.lms-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.lms-scroll::-webkit-scrollbar-track { background: transparent; }
.lms-scroll::-webkit-scrollbar-thumb { background: #cfdcec; border-radius: 999px; }
.lms-scroll::-webkit-scrollbar-thumb:hover { background: #b3c5db; }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

/* 3. Typography helpers --------------------------------------------------- */
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lms-primary);
}
.section-title { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; }
.section-sub { color: var(--lms-ink-muted); font-size: 15px; line-height: 1.65; max-width: 62ch; }
.text-balance { text-wrap: balance; }
.gradient-text {
  background: linear-gradient(96deg, #1461eb 0%, #2f80ff 45%, #12a882 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* 4. Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease, opacity .18s ease;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: linear-gradient(180deg, #3d89ff 0%, #1461eb 100%);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(20, 97, 235, .65);
}
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(20, 97, 235, .75); transform: translateY(-1px); }

.btn-secondary {
  background: linear-gradient(180deg, #18c193 0%, #0a866a 100%);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(10, 134, 106, .6);
}
.btn-secondary:hover { transform: translateY(-1px); box-shadow: 0 12px 26px -8px rgba(10, 134, 106, .7); }

.btn-outline {
  background: #fff;
  border-color: var(--lms-line);
  color: var(--lms-ink);
  box-shadow: 0 1px 2px rgba(11, 27, 51, .04);
}
.btn-outline:hover { border-color: #bcdcff; background: var(--lms-primary-soft); color: var(--lms-primary-dark); }

.btn-ghost { background: transparent; color: var(--lms-ink-muted); }
.btn-ghost:hover { background: rgba(47, 128, 255, .08); color: var(--lms-primary-dark); }

.btn-soft { background: var(--lms-primary-soft); color: var(--lms-primary-dark); }
.btn-soft:hover { background: #d9ebff; }

.btn-danger { background: var(--lms-danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-white { background: #fff; color: var(--lms-primary-dark); box-shadow: 0 10px 24px -12px rgba(11, 27, 51, .4); }
.btn-white:hover { transform: translateY(-1px); }

.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { height: 54px; padding: 0 28px; font-size: 15px; border-radius: 14px; }
.btn-lg svg { width: 20px; height: 20px; }
.btn-icon { width: 42px; height: 42px; padding: 0; border-radius: 12px; }
.btn-icon.btn-sm { width: 34px; height: 34px; }
.btn-block { width: 100%; }

/* 5. Form controls -------------------------------------------------------- */
.input, .select, .textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--lms-line);
  border-radius: 12px;
  padding: 0 14px;
  height: 46px;
  font-size: 14px;
  color: var(--lms-ink);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.textarea { height: auto; padding: 12px 14px; line-height: 1.6; resize: vertical; min-height: 110px; }
.input::placeholder, .textarea::placeholder { color: #93a3b8; }
.input:hover, .select:hover, .textarea:hover { border-color: #cfdcec; }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--lms-primary);
  box-shadow: 0 0 0 4px rgba(47, 128, 255, .12);
}
.input-sm { height: 38px; font-size: 13px; border-radius: 10px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b6b83' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
  cursor: pointer;
}
.label { display: block; font-size: 13px; font-weight: 600; color: #33475f; margin-bottom: 7px; }
.help { font-size: 12px; color: var(--lms-ink-muted); margin-top: 6px; }
.field-error { border-color: var(--lms-danger) !important; }

.input-group { position: relative; }
.input-group > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: #93a3b8; pointer-events: none; }
.input-group .input { padding-left: 42px; }

/* Checkbox / radio */
.checkbox, .radio {
  appearance: none;
  width: 18px; height: 18px;
  border: 1.5px solid #c6d3e4;
  background: #fff;
  border-radius: 5px;
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  flex: none;
  transition: all .16s ease;
}
.radio { border-radius: 999px; }
.checkbox::after {
  content: '';
  width: 10px; height: 10px;
  transform: scale(0);
  transition: transform .14s ease;
  box-shadow: inset 1em 1em #fff;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.radio::after {
  content: '';
  width: 8px; height: 8px; border-radius: 999px;
  transform: scale(0);
  transition: transform .14s ease;
  box-shadow: inset 1em 1em #fff;
}
.checkbox:checked, .radio:checked { background: var(--lms-primary); border-color: var(--lms-primary); }
.checkbox:checked::after, .radio:checked::after { transform: scale(1); }
.checkbox:hover, .radio:hover { border-color: var(--lms-primary); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0;
  background: #cfdcec;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color .22s ease;
}
.switch span::before {
  content: '';
  position: absolute;
  height: 19px; width: 19px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(11, 27, 51, .3);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}
.switch input:checked + span { background: var(--lms-secondary); }
.switch input:checked + span::before { transform: translateX(19px); }

/* Quantity stepper */
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--lms-line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}
.qty button {
  width: 34px; height: 36px;
  display: grid; place-items: center;
  color: var(--lms-ink-muted);
  transition: background-color .15s ease, color .15s ease;
}
.qty button:hover { background: var(--lms-primary-soft); color: var(--lms-primary-dark); }
.qty input {
  width: 40px; height: 36px; text-align: center;
  border: 0; font-size: 14px; font-weight: 600;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Dropzone */
.dropzone {
  border: 2px dashed #bcdcff;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.dropzone.is-dragging {
  border-color: var(--lms-secondary);
  background: var(--lms-secondary-soft);
  transform: scale(1.01);
}

/* 6. Cards & surfaces ----------------------------------------------------- */
.card {
  background: #fff;
  border: 1px solid var(--lms-line);
  border-radius: var(--lms-radius);
  box-shadow: 0 1px 2px rgba(11, 27, 51, .04);
}
.card-hover { transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease, border-color .25s ease; }
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(11, 27, 51, .28);
  border-color: #d5e5fb;
}
.glass { background: rgba(255, 255, 255, .72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.surface-grad { background: linear-gradient(180deg, #f2f8ff 0%, #f6f9fc 100%); }
.hero-grad { background: radial-gradient(1100px 520px at 12% -10%, #e4f0ff 0%, rgba(246,249,252,0) 62%),
                         radial-gradient(760px 420px at 92% 6%, #e3faf2 0%, rgba(246,249,252,0) 60%); }
.mesh-dark { background:
  radial-gradient(900px 420px at 8% 0%, rgba(47,128,255,.32) 0%, rgba(11,27,51,0) 60%),
  radial-gradient(760px 400px at 96% 20%, rgba(18,168,130,.28) 0%, rgba(11,27,51,0) 58%),
  linear-gradient(160deg, #0b1b33 0%, #10294c 100%); }
.divider { height: 1px; background: var(--lms-line); border: 0; }

.product-media {
  background: linear-gradient(160deg, #f4f9ff 0%, #eef6ff 100%);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}
.product-media img { transition: transform .45s cubic-bezier(.2,.7,.3,1); }
.card-hover:hover .product-media img { transform: scale(1.06); }

.ring-brand { box-shadow: 0 0 0 4px rgba(47, 128, 255, .12); }

/* 7. Badges & pills ------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
}
.badge svg { width: 13px; height: 13px; }
.badge-primary { background: var(--lms-primary-soft); color: var(--lms-primary-dark); }
.badge-success { background: var(--lms-secondary-soft); color: #0a6b56; }
.badge-warning { background: #fff5e6; color: #b45309; }
.badge-danger  { background: #ffeeee; color: #b91c1c; }
.badge-neutral { background: #f1f5fa; color: #475a73; }
.badge-purple  { background: #f3f0ff; color: #6d28d9; }
.badge-rx      { background: #fff1f2; color: #be123c; }
.badge-dot::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--lms-line);
  background: #fff;
  font-size: 13px; font-weight: 500; color: #475a73;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.chip:hover { border-color: #bcdcff; color: var(--lms-primary-dark); }
.chip.is-active { background: var(--lms-primary); border-color: var(--lms-primary); color: #fff; font-weight: 600; }

/* 8. Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table thead th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #6b7c95;
  background: #f7fafd;
  padding: 12px 16px;
  white-space: nowrap;
  border-bottom: 1px solid var(--lms-line);
}
.table tbody td { padding: 14px 16px; border-bottom: 1px solid #f0f4f9; vertical-align: middle; color: #33475f; }
.table tbody tr { transition: background-color .15s ease; }
.table tbody tr:hover { background: #f9fbfe; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.is-selected { background: var(--lms-primary-soft); }
.table tbody tr.is-selected:hover { background: #e2eefe; }
.table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--lms-primary); }
.tabular-nums { font-variant-numeric: tabular-nums; }
.table .num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--lms-ink); }

/* 9. Navigation ----------------------------------------------------------- */
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px;
  font-size: 14.5px;
  font-weight: 500;
  color: #33475f;
  transition: color .18s ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lms-primary), var(--lms-secondary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .24s cubic-bezier(.4,0,.2,1);
}
.nav-link:hover { color: var(--lms-primary-dark); }
.nav-link:hover::after, .nav-link.is-active::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--lms-primary-dark); font-weight: 600; }

.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.is-stuck { box-shadow: 0 10px 30px -18px rgba(11, 27, 51, .35); }

/* Admin sidebar */
.admin-shell { --sb: var(--lms-sidebar-w); }
.admin-sidebar {
  width: var(--lms-sidebar-w);
  transition: width .26s cubic-bezier(.4,0,.2,1), transform .26s cubic-bezier(.4,0,.2,1);
}
.admin-link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #9fb3cd;
  white-space: nowrap;
  transition: background-color .16s ease, color .16s ease;
}
.admin-link svg { width: 18px; height: 18px; flex: none; }
.admin-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-link.is-active { background: linear-gradient(90deg, rgba(47,128,255,.28), rgba(47,128,255,.06)); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--lms-primary); }
.admin-group-label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: #566b88; font-weight: 700; padding: 0 12px; }

.admin-sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  background: #0b1b33;
  transform: translateX(-100%);
}
.admin-sidebar.is-open { transform: translateX(0); }

.admin-main { display: flex; flex-direction: column; min-height: 100vh; }

@media (min-width: 1024px) {
  .admin-sidebar { transform: none; }
  .admin-main { margin-left: var(--lms-sidebar-w); transition: margin-left .26s cubic-bezier(.4,0,.2,1); }
  .is-collapsed .admin-main { margin-left: var(--lms-sidebar-w-collapsed); }
  .is-collapsed .admin-sidebar { width: var(--lms-sidebar-w-collapsed); }
  .is-collapsed .sb-label, .is-collapsed .admin-group-label, .is-collapsed .sb-hide {
    opacity: 0; width: 0; overflow: hidden; pointer-events: none;
  }
  .is-collapsed .admin-link { justify-content: center; padding: 0; }
  .is-collapsed .admin-group-label { height: 0; margin: 0; padding: 0; }
}
.sb-label { transition: opacity .18s ease; }

.admin-topbar { position: sticky; top: 0; z-index: 40; }

/* 10. Overlays ------------------------------------------------------------ */
.overlay {
  position: fixed; inset: 0;
  background: rgba(9, 20, 38, .55);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
  z-index: 90;
}
.overlay.is-open { opacity: 1; visibility: visible; }

.modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.97);
  opacity: 0;
  visibility: hidden;
  z-index: 100;
  transition: opacity .24s ease, transform .28s cubic-bezier(.2,.8,.3,1), visibility .24s;
}
.modal.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal-panel {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 32px 80px -24px rgba(9, 20, 38, .5);
  max-height: 88vh;
  overflow-y: auto;
}

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(440px, 100vw);
  background: #fff;
  z-index: 100;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.2,.8,.3,1);
  box-shadow: -24px 0 60px -30px rgba(9, 20, 38, .5);
  display: flex;
  flex-direction: column;
}
.drawer.is-open { transform: translateX(0); }
.drawer-left { right: auto; left: 0; transform: translateX(-100%); }

.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  min-width: 280px; max-width: 380px;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--lms-line);
  border-left: 4px solid var(--lms-primary);
  border-radius: 12px;
  box-shadow: 0 18px 40px -18px rgba(9, 20, 38, .38);
  animation: toastIn .32s cubic-bezier(.2,.8,.3,1);
}
.toast.is-out { animation: toastOut .26s ease forwards; }
.toast-success { border-left-color: var(--lms-secondary); }
.toast-warning { border-left-color: var(--lms-warning); }
.toast-danger  { border-left-color: var(--lms-danger); }

.tip { position: relative; }
.tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #0b1b33;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 6px 9px;
  border-radius: 7px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 30;
}
.tip:hover::after { opacity: 1; transform: translateX(-50%) translateY(0); }

.dropdown-menu {
  opacity: 0; visibility: hidden;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.dropdown.is-open > .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }

/* 11. Steppers & timelines ------------------------------------------------ */
.stepper { display: flex; align-items: flex-start; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 19px; left: 50%; right: -50%;
  height: 2px;
  background: var(--lms-line);
  z-index: 0;
}
.step.is-done:not(:last-child)::after { background: var(--lms-secondary); }
.step-bubble {
  width: 38px; height: 38px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: #fff;
  border: 2px solid var(--lms-line);
  color: #93a3b8;
  font-weight: 700; font-size: 14px;
  position: relative; z-index: 1;
  transition: all .22s ease;
}
.step.is-active .step-bubble { border-color: var(--lms-primary); color: var(--lms-primary); box-shadow: 0 0 0 5px rgba(47,128,255,.14); }
.step.is-done .step-bubble { background: var(--lms-secondary); border-color: var(--lms-secondary); color: #fff; }
.step-label { font-size: 12.5px; font-weight: 600; color: #93a3b8; margin-top: 9px; }
.step.is-active .step-label { color: var(--lms-primary-dark); }
.step.is-done .step-label { color: #0a6b56; }

.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--lms-line); }
.timeline-item { position: relative; padding-bottom: 22px; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 999px;
  background: #fff;
  border: 2px solid #cfdcec;
}
.timeline-item.is-done::before { background: var(--lms-secondary); border-color: var(--lms-secondary); }
.timeline-item.is-current::before { background: var(--lms-primary); border-color: var(--lms-primary); box-shadow: 0 0 0 4px rgba(47,128,255,.16); }

/* 12. Reels --------------------------------------------------------------- */
.reel-feed {
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
}
.reel-slide { scroll-snap-align: center; scroll-snap-stop: always; }
.reel-card {
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #0b1b33;
  isolation: isolate;
}
.reel-card::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,27,51,.05) 0%, rgba(11,27,51,0) 35%, rgba(11,27,51,.82) 100%);
  z-index: 1;
  pointer-events: none;
}
.reel-card > .reel-body { position: relative; z-index: 2; }
.reel-action {
  width: 42px; height: 42px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(8px);
  color: #fff;
  transition: transform .18s ease, background-color .18s ease;
}
.reel-action:hover { background: rgba(255,255,255,.3); transform: scale(1.08); }
.reel-action.is-active { color: #ff5470; background: rgba(255,255,255,.92); }
.reel-action.is-saved { color: var(--lms-primary); background: rgba(255,255,255,.92); }
.play-pulse { animation: playPulse 2.4s ease-in-out infinite; }

/* 13. Charts -------------------------------------------------------------- */
.chart-svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid line { stroke: #edf2f8; stroke-width: 1; }
.chart-axis text { fill: #93a3b8; font-size: 11px; font-family: 'Inter', sans-serif; }
.chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-bar { transition: opacity .18s ease; cursor: pointer; }
.chart-bar:hover { opacity: .78; }
.chart-dot { cursor: pointer; transition: r .16s ease; }
.chart-draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: drawLine 1.3s cubic-bezier(.3,.8,.4,1) forwards; }
.chart-rise { transform-origin: bottom; animation: riseUp .7s cubic-bezier(.3,.9,.4,1) backwards; }

/* 14. States -------------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f7fafd 37%, #eef2f7 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 8px;
}
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin .7s linear infinite;
}
.spinner-brand { border-color: rgba(47,128,255,.2); border-top-color: var(--lms-primary); }
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state .icon-wrap {
  width: 76px; height: 76px;
  border-radius: 22px;
  display: grid; place-items: center;
  margin: 0 auto 16px;
  background: var(--lms-primary-soft);
  color: var(--lms-primary);
}

/* 15. Animations ---------------------------------------------------------- */
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(24px) scale(.97); } }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes riseUp { from { transform: scaleY(0); opacity: .2; } to { transform: scaleY(1); opacity: 1; } }
@keyframes playPulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.09); opacity: 1; } }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(18,168,130,.45); } 70% { box-shadow: 0 0 0 12px rgba(18,168,130,0); } 100% { box-shadow: 0 0 0 0 rgba(18,168,130,0); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.animate-float { animation: floatY 6s ease-in-out infinite; }
.animate-pulse-ring { animation: pulseRing 2.2s ease-out infinite; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track:hover { animation-play-state: paused; }

.reveal { opacity: 0; }
.reveal.is-visible { animation: fadeUp .6s cubic-bezier(.2,.8,.3,1) forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; }
}

/* 16. Utilities & responsive tweaks --------------------------------------- */
.container-lms { width: 100%; max-width: 1320px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
@media (min-width: 1024px) { .container-lms { padding-left: 32px; padding-right: 32px; } }

.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.scroll-x { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.scroll-x > * { scroll-snap-align: start; flex: none; }

.body-lock { overflow: hidden; }

/* Responsive table → stacked cards (mobile) */
@media (max-width: 767px) {
  .table-stack thead { display: none; }
  .table-stack tbody tr {
    display: block;
    border: 1px solid var(--lms-line);
    border-radius: 14px;
    margin-bottom: 12px;
    padding: 6px 2px;
    background: #fff;
  }
  .table-stack tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border: 0;
    padding: 9px 14px;
    text-align: right;
  }
  .table-stack tbody td::before {
    content: attr(data-label);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #6b7c95;
    text-align: left;
  }
}

/* Print (order invoices / prescriptions) */
@media print {
  .no-print, .site-header, .admin-sidebar, .admin-topbar, footer { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}

/* 20. Ad slots ------------------------------------------------------------
   A declared slot takes up no space at all until an ad is actually written
   into it. That is the whole point: the page must read identically whether
   or not a campaign is running, with no reserved gap and no placeholder. */
[data-ad]:not([data-ad-filled]) { display: none !important; }
[data-ad][data-ad-filled] { display: block; margin-block: 36px; }

/* In a product grid the slot is one tile, so it follows the grid's spacing
   rather than adding its own. */
.product-grid > [data-ad][data-ad-filled] { margin-block: 0; }
