/* SaaS additions on top of the legacy admin styles: plan gating, billing, usage meters, onboarding. */
.flash-info { background: var(--color-info-tint); color: var(--color-info); border-color: var(--color-info-line); }
.flash .btn { margin-inline-start: auto; }
.demo-bar { background: linear-gradient(90deg, #ecfdf5, #eff6ff); color: var(--brand-navy); border-color: #c7e3d4; }
.side-nav a.locked { opacity: .55; }
.side-nav a .lock-ic { margin-inline-start: auto; display: inline-flex; font-size: 13px; opacity: .8; }
.powered-foot { text-align: center; color: var(--muted); font-size: 12px; margin: 24px 0 8px; }

.status-steps .step.st-awaiting_prescription_review.on, .badge.st-awaiting_prescription_review { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.badge.st-confirmed { background: #eef2ff; color: #4338ca; border-color: #c7d2fe; }
.badge.st-out_for_delivery { background: #ecfeff; color: #0e7490; border-color: #a5f3fc; }
.rx-review { border: 2px solid #fed7aa; background: #fffbf5; }
.rx-review .actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.rx-pdf { display: inline-flex; align-items: center; gap: 8px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--s50); font-weight: 800; }
.history { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.history li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--s200); }
.history li small { color: var(--muted); }

/* usage meters */
.meters { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.meter { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card); }
.meter-top { display: flex; justify-content: space-between; font-weight: 800; font-size: 13px; margin-bottom: 8px; }
.meter-bar { height: 8px; border-radius: 99px; background: var(--s100); overflow: hidden; }
.meter-bar i { display: block; height: 100%; background: var(--brand-cyan); border-radius: 99px; }
.meter.warn .meter-bar i { background: #f59e0b; } .meter.full .meter-bar i { background: var(--brand-red); }
.meter small { color: var(--muted); font-size: 12px; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.plan-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px; background: var(--card); display: flex; flex-direction: column; gap: 10px; }
.plan-card.current { border: 2px solid var(--brand-cyan); }
.plan-card h3 { margin: 0; font-family: 'Cairo', sans-serif; }
.plan-card .price { font: 800 26px 'Cairo', sans-serif; color: var(--brand-navy); }
.plan-card .price small { font-size: 13px; color: var(--muted); font-weight: 600; }
.plan-card ul { list-style: none; margin: 0; padding: 0; font-size: 13px; display: grid; gap: 4px; }
.plan-card li.no { color: var(--s300); text-decoration: line-through; }
.plan-card form { margin-top: auto; }
.cycle-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.cycle-pick label { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; font-weight: 700; }
.cycle-pick input { display: none; } .cycle-pick input:checked + span { color: var(--brand-navy); }
.cycle-pick label:has(input:checked) { border-color: var(--brand-navy); background: #eef4f9; }

/* onboarding */
.steps-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.steps-nav a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 800; font-size: 13px; }
.steps-nav a.on { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }
.steps-nav a.done { border-color: #a7f3d0; color: #047857; }
.qr-box { display: inline-block; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
code.block { display: block; padding: 10px 12px; background: var(--s50); border: 1px solid var(--line); border-radius: 10px; direction: ltr; text-align: left; word-break: break-all; }

/* audit fixes: busy buttons, touch targets on phones/tablets, one-row scrolling status tabs */
.btn.is-busy { opacity: .7; cursor: progress; position: relative; }
.btn.is-busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .7s linear infinite; margin-inline-start: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (pointer: coarse) {
  .btn-sm { min-height: 38px; min-width: 38px; padding-inline: 12px; }
  .chip, button.chip { min-height: 34px; padding-inline: 12px; }
  .icon-btn { width: 40px; height: 40px; }
  .side-nav a { min-height: 44px; }
  a.link { display: inline-block; padding-block: 6px; }
}
@media (max-width: 640px) {
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex-shrink: 0; white-space: nowrap; }
}
