:root {
  --primary: #0B7F83;
  --primary-dark: #075F62;
  --primary-soft: #EAF7F6;
  --accent: #13A779;
  --ink: #17323A;
  --muted: #6E7C82;
  --line: #DFE8E8;
  --surface: #FFFFFF;
  --bg: #F4F8F8;
  --danger: #D74747;
  --warning: #B2780B;
  --success: #138A67;
  --shadow: 0 10px 30px rgba(24, 66, 72, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; max-width: 560px; margin: 0 auto; background: var(--surface); position: relative; box-shadow: 0 0 0 1px rgba(0,0,0,.025); }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: white; display: grid; place-items: center; font-weight: 900; }
.brand-name { font-weight: 900; letter-spacing: .02em; font-size: 14px; }
.brand-name span { color: var(--primary); }
.brand-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.icon-btn { border: 0; background: #EFF6F6; width: 40px; height: 40px; border-radius: 12px; color: var(--ink); font-weight: 800; }
.hidden { display: none !important; }

.content { padding: 20px 18px 96px; min-height: calc(100vh - 72px); }
.hero { padding: 20px 0 8px; }
.eyebrow { color: var(--primary); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
h1 { margin: 8px 0 10px; font-size: clamp(30px, 9vw, 42px); line-height: 1.05; letter-spacing: -.035em; }
h2 { margin: 0 0 8px; font-size: 25px; line-height: 1.14; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 17px; }
p { color: var(--muted); line-height: 1.55; }
.tagline { font-weight: 700; color: var(--ink); margin-top: 18px; }

.hero-visual { margin: 22px 0; min-height: 210px; border-radius: 28px; background: radial-gradient(circle at 80% 20%, rgba(19,167,121,.22), transparent 34%), linear-gradient(145deg, #E8F6F4, #F8FBFB); border: 1px solid #D6ECE9; display: grid; place-items: center; overflow: hidden; position: relative; }
.hero-visual::before, .hero-visual::after { content: ""; position: absolute; border-radius: 999px; background: rgba(11,127,131,.12); }
.hero-visual::before { width: 170px; height: 170px; left: -48px; bottom: -78px; }
.hero-visual::after { width: 110px; height: 110px; right: -20px; top: -35px; }
.medicine-cluster { display: flex; align-items: end; gap: 12px; z-index: 2; }
.bottle, .box, .blister { box-shadow: var(--shadow); }
.bottle { width: 62px; height: 110px; border-radius: 14px 14px 18px 18px; background: white; position: relative; }
.bottle::before { content: ""; width: 44px; height: 22px; background: var(--primary); position: absolute; left: 9px; top: -16px; border-radius: 7px 7px 4px 4px; }
.box { width: 100px; height: 72px; border-radius: 12px; background: linear-gradient(135deg, white 65%, #D2EFEA 65%); transform: rotate(-6deg); }
.blister { width: 88px; height: 54px; border-radius: 13px; background: repeating-radial-gradient(circle at 12px 13px, white 0 5px, #DCEAEA 6px 8px); transform: rotate(8deg); }

.btn { width: 100%; min-height: 52px; border: 0; border-radius: 15px; padding: 14px 18px; font-weight: 800; transition: .16s ease; }
.btn:active { transform: translateY(1px) scale(.995); }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 8px 18px rgba(11,127,131,.19); }
.btn-secondary { background: var(--primary-soft); color: var(--primary-dark); }
.btn-outline { border: 1px solid #BFD8D8; background: white; color: var(--primary-dark); }
.btn-danger { background: #FFF0F0; color: var(--danger); }
.btn-inline { width: auto; min-height: 42px; padding: 10px 14px; }

.stack { display: grid; gap: 12px; }
.section { margin: 24px 0; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 10px; margin-bottom: 12px; }
.section-title small { color: var(--muted); }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 16px; box-shadow: 0 7px 24px rgba(25,62,67,.045); }
.card.soft { background: #F7FBFB; }

.search-wrap { position: relative; }
.search-input { width: 100%; height: 54px; border: 1px solid #CDDDDD; border-radius: 16px; padding: 0 16px 0 44px; outline: none; background: white; font-size: 16px; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,127,131,.1); }
.search-icon { position: absolute; left: 16px; top: 16px; color: var(--muted); }

.product-row { display: grid; grid-template-columns: 50px 1fr auto; gap: 12px; align-items: center; }
.product-icon { width: 50px; height: 50px; border-radius: 14px; background: linear-gradient(145deg, #E9F8F6, #F8FBFB); display: grid; place-items: center; font-size: 24px; }
.meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.pill { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #EFF7F7; color: var(--primary-dark); }
.pill.success { background: #EAF8F2; color: var(--success); }
.pill.warning { background: #FFF6DF; color: var(--warning); }
.pill.danger { background: #FFF0F0; color: var(--danger); }

.quantity-panel { display: grid; grid-template-columns: 54px 1fr 54px; gap: 10px; align-items: center; margin: 18px 0; }
.qty-btn { height: 54px; border-radius: 15px; border: 1px solid #C9DCDC; background: white; font-size: 24px; color: var(--primary); }
.qty-display { height: 54px; border-radius: 15px; background: #F6FAFA; display: grid; place-items: center; font-size: 22px; font-weight: 900; }
.qty-input { width: 100%; height: 54px; border: 1px solid #CDDDDD; border-radius: 15px; background: #F6FAFA; text-align: center; font-size: 22px; font-weight: 900; outline: none; }
.qty-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,127,131,.1); }

.field { display: grid; gap: 7px; }
.field label { font-weight: 800; font-size: 13px; }
.input, .select, .textarea { width: 100%; border: 1px solid #CDDDDD; border-radius: 14px; padding: 14px; outline: none; background: white; }
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,127,131,.1); }

.option-card { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 15px; padding: 14px; }
.option-card.selected { border-color: var(--primary); background: var(--primary-soft); }
.option-card input { margin-top: 3px; transform: scale(1.2); accent-color: var(--primary); }

.summary-row { display: flex; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.summary-row:last-child { border-bottom: 0; }
.summary-label { color: var(--muted); }
.summary-value { font-weight: 800; text-align: right; }

.progress { display: flex; gap: 6px; margin-bottom: 18px; }
.progress span { height: 5px; background: #DCEAEA; border-radius: 999px; flex: 1; }
.progress span.done { background: var(--primary); }

.success-wrap { text-align: center; padding: 32px 0 12px; }
.success-icon { width: 88px; height: 88px; border-radius: 50%; background: #E8F8F1; color: var(--success); display: grid; place-items: center; font-size: 46px; margin: 0 auto 20px; }
.reference { font-size: 20px; font-weight: 900; letter-spacing: .02em; color: var(--primary-dark); }

.quote-card { border: 1px solid var(--line); border-radius: 18px; padding: 16px; background: white; box-shadow: var(--shadow); }
.quote-top { display: flex; justify-content: space-between; gap: 12px; }
.quote-total { font-size: 26px; font-weight: 900; margin: 15px 0 10px; }
.quote-facts { display: grid; gap: 8px; font-size: 13px; margin-bottom: 16px; }
.quote-facts div { display: flex; justify-content: space-between; gap: 10px; }
.verified { color: var(--success); font-size: 12px; font-weight: 800; }

.sticky-actions { position: sticky; bottom: 80px; padding-top: 14px; background: linear-gradient(to top, white 74%, rgba(255,255,255,0)); }

.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); max-width: 560px; width: 100%; height: 74px; border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(12px); display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: env(safe-area-inset-bottom); z-index: 30; }
.nav-item { border: 0; background: transparent; display: grid; place-items: center; align-content: center; gap: 3px; color: #78868A; }
.nav-item span { font-size: 21px; }
.nav-item small { font-size: 10px; font-weight: 700; }
.nav-item.active { color: var(--primary); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 90px; max-width: 480px; width: calc(100% - 32px); background: #17323A; color: white; padding: 13px 16px; border-radius: 14px; box-shadow: var(--shadow); z-index: 60; animation: slideUp .22s ease; }
@keyframes slideUp { from { transform: translate(-50%, 12px); opacity: .2; } }

@media (min-width: 720px) {
  body { padding: 26px 0; }
  .app-shell { min-height: calc(100vh - 52px); border-radius: 28px; overflow: hidden; }
  .bottom-nav { bottom: 26px; border-radius: 0 0 28px 28px; }
}

.otp-input { text-align: center; letter-spacing: .35em; font-size: 24px; font-weight: 900; }
.staging-code { margin-top: 14px; padding: 12px 14px; border: 1px dashed #C9DCDC; border-radius: 12px; background: #F7FBFB; font-size: 13px; }


/* Transaction-first retailer entry */
.entry-grid { display: grid; gap: 12px; margin: 24px 0; }
.entry-card { width: 100%; border: 1px solid var(--line); border-radius: 18px; background: white; padding: 16px; display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; text-align: left; box-shadow: 0 7px 24px rgba(25,62,67,.045); }
.entry-card strong { display: block; color: var(--ink); font-size: 16px; }
.entry-card small { display: block; color: var(--muted); line-height: 1.4; margin-top: 3px; }
.entry-card.entry-primary { border-color: rgba(11,127,131,.3); background: var(--primary-soft); }
.entry-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #EFF7F7; color: var(--primary-dark); font-size: 24px; font-weight: 900; }
.result-card, .facility-summary { width: 100%; border: 1px solid var(--line); border-radius: 16px; background: white; padding: 14px; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left; }
.result-card strong, .facility-summary strong { display: block; color: var(--ink); }
.result-card small, .facility-summary small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.result-card:hover, .result-card:focus { border-color: var(--primary); background: #FAFDFD; outline: none; }
.photo-drop { min-height: 230px; display: grid; align-content: center; gap: 18px; text-align: center; }
.photo-icon { font-size: 54px; }


/* Photo-order interpretation review */
.candidate-card { display: grid; gap: 12px; }
.candidate-warning { border-color: rgba(181, 122, 20, .35); background: #fffaf0; }
.candidate-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.candidate-head strong { display: block; margin-top: 3px; color: var(--ink); }
.candidate-head small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.original-request { margin-top: 5px; padding: 9px 11px; border-radius: 11px; background: var(--primary-soft); border: 1px solid var(--line); }
.original-request span { display: block; margin-bottom: 2px; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; color: var(--primary-dark); }
.original-request strong { margin: 0; font-size: 16px; line-height: 1.25; }
.interpreted-as { font-size: 12px; }
.candidate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.candidate-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pill.muted { background: #eef1f1; color: var(--muted); }
@media (max-width: 420px) {
  .candidate-grid { grid-template-columns: 1fr; }
  .candidate-head { align-items: stretch; flex-direction: column; }
}


/* PPB product matching in photo-order review */
.match-panel { margin-top: 12px; padding: 12px; border-radius: 14px; background: #f7fbfb; border: 1px solid var(--line); display: grid; gap: 8px; }
.match-panel-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.match-option-wrap { border: 1px solid var(--line); background: white; border-radius: 12px; overflow: hidden; }
.match-option { width: 100%; border: 0; background: white; border-radius: 0; padding: 10px 12px; display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left; }
.match-option-wrap:has(.match-option.selected) { border-color: var(--primary); background: var(--primary-soft); }
.match-option strong { display: block; color: var(--ink); }
.match-option small { display: block; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.match-option.selected { background: var(--primary-soft); }
.match-score { font-weight: 800; color: var(--primary-dark); white-space: nowrap; }
.match-details { padding: 0 12px 8px; font-size: 12px; color: var(--muted); }
.match-details summary { cursor: pointer; color: var(--primary-dark); font-weight: 800; list-style: none; }
.match-details summary::-webkit-details-marker { display: none; }
.match-details[open] span { display: block; margin-top: 5px; }
.selected-match { font-size: 14px; color: var(--primary-dark); }


.match-group-label {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.match-more {
  justify-self: start;
  margin-top: 4px;
}


.brand-resolution-note {
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #ead9a8;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}


/* Current wholesaler offers */
.offer-card { display: grid; gap: 14px; }
.offer-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; }
.offer-head h3 { margin-top: 8px; }
.offer-value { color: var(--primary-dark); font-size: 18px; text-align: right; white-space: nowrap; }
.offer-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.offer-facts span { background: #F3F8F8; border-radius: 999px; padding: 7px 10px; font-size: 12px; color: var(--muted); }
@media (max-width: 420px) {
  .offer-head { flex-direction: column; }
  .offer-value { text-align: left; }
}


/* Chemist account, public supplier feed and inbox */
.public-update-card p,.inbox-card p{white-space:pre-wrap}
.inbox-unread{border-color:rgba(11,127,131,.45);box-shadow:0 8px 24px rgba(11,127,131,.09)}
.account-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:5px;background:#EFF6F6;border-radius:15px;margin:18px 0}
.account-switch button{border:0;border-radius:11px;padding:11px;background:transparent;color:var(--muted);font-weight:800}
.account-switch button.active{background:white;color:var(--primary-dark);box-shadow:0 2px 8px rgba(24,66,72,.08)}
.selected-account-facility{display:grid;gap:5px}
.selected-account-facility .pill{justify-self:start}
#accountFacilityResults{display:grid;gap:8px}


/* ACCESS MED Workspace v1: consistent SVG tiles with mobile-first touch targets. */
.workspace-home { padding: 6px 0 22px; }
.workspace-home h1 { font-size: clamp(27px,7vw,35px); margin-bottom: 6px; }
.workspace-home > p { margin: 0 0 18px; font-size: 14px; }
.workspace-section-title { font-size: 13px; font-weight: 800; letter-spacing: .02em; margin: 22px 0 11px; }
.workspace-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.workspace-tile { display: flex; align-items: center; flex-direction: column; text-align: center; gap: 6px; min-height: 131px; padding: 14px 6px 10px; border: 1px solid var(--line); border-radius: 17px; color: var(--ink); background: #fff; box-shadow: 0 3px 10px rgba(14,60,65,.035); }
.workspace-tile:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.workspace-tile:not(:disabled):active { background: var(--primary-soft); transform: scale(.98); }
.workspace-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--primary-dark); flex: none; }
.workspace-icon-svg { width: 29px; height: 29px; }
.workspace-tile strong { font-size: 12.5px; line-height: 1.2; }
.workspace-tile small { font-size: 10.5px; line-height: 1.3; color: var(--muted); }
.workspace-tile-planned { opacity: .63; cursor: default; background: #F8FAFA; }
.workspace-soon { font-size: 9px; font-weight: 700; background: #E9EEEE; color: #51636A; padding: 3px 7px; border-radius: 999px; margin-top: auto; }
.workspace-home .workspace-note { margin: 22px 0 0; font-size: 12px; }
@media(min-width:520px){.workspace-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.workspace-tile{min-height:145px}}

/* Workspace PWA: glossy layered app icons that remain legible on phones and PCs. */
.workspace-icon {
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 19px;
  color: #fff;
  background: radial-gradient(circle at 28% 18%, rgba(255,255,255,.52), transparent 38%), linear-gradient(145deg,#45ddd0 2%,#00a393 54%,#006c79 100%);
  box-shadow: inset 0 2px 2px rgba(255,255,255,.65), inset 0 -5px 8px rgba(0,49,57,.22), 0 8px 0 -4px #00616b, 0 13px 17px -8px rgba(0,72,79,.35);
  position: relative;
}
.workspace-icon::before { content: ""; position: absolute; inset: 4px 8px auto; height: 11px; border-radius: 50%; background: rgba(255,255,255,.16); pointer-events: none; }
.workspace-icon-svg { width: 31px; height: 31px; filter: drop-shadow(0 2px 1px rgba(0,45,52,.4)); }
.workspace-tile { transition: transform .16s ease, box-shadow .16s ease; }
.workspace-tile:not(:disabled):hover { box-shadow: 0 10px 25px rgba(0,94,102,.12); transform: translateY(-1px); }
.workspace-tile-planned .workspace-icon { background: linear-gradient(145deg,#d9e4e5,#9daeb0); box-shadow: inset 0 2px 2px #fff,0 6px 12px -7px #456; }
@media (prefers-reduced-motion: reduce) { .workspace-tile { transition: none; } }

/* Value-first onboarding: a single optional welcome choice above the existing launcher. */
.workspace-welcome { display:flex;flex-direction:column;gap:8px;padding:16px;border:1px solid #cfe9e4;border-radius:18px;background:linear-gradient(135deg,#ecfaf7,#fff);margin:16px 0 22px; }
.workspace-welcome strong { font-size:16px; }
.workspace-welcome span { font-size:12px;color:var(--muted);line-height:1.5; }
.workspace-welcome-actions { display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:6px; }
.workspace-welcome-actions .btn { min-height:44px;padding:10px 8px;font-size:12px; }
.workspace-welcome-actions .btn:first-child { grid-column:1/-1; }
@media (min-width:520px) { .workspace-welcome-actions { grid-template-columns:repeat(3,minmax(0,1fr)); } .workspace-welcome-actions .btn:first-child { grid-column:auto; } }

/* ACCESS MED Premium V4: interior styling, visual only, existing glossy launcher preserved. */
:root{--primary:#008e83;--primary-dark:#005c62;--primary-soft:#e7f8f5;--accent:#18b99d;--ink:#102f37;--muted:#627986;--line:#d8e8e8;--bg:#f2fafa;--shadow:0 12px 28px rgba(15,73,81,.075);--radius:20px}
html,body{background:radial-gradient(circle at 75% 5%,#d9f5ef 0,transparent 34%),#eaf4f4}
body{font-size:14px;-webkit-font-smoothing:antialiased}
.app-shell{background:linear-gradient(180deg,#f9ffff 0%,#f4fafa 56%,#fff 100%);min-width:0}
.topbar{min-height:74px;height:auto;padding:12px 15px;background:rgba(250,255,255,.95);border-color:#e6efef;box-shadow:0 4px 22px rgba(0,53,60,.035)}
.brand{min-width:0;gap:9px}.brand-mark{width:42px;height:42px;background:none;box-shadow:none;border-radius:0;flex-shrink:0}.brand-mark img{width:42px;height:42px;object-fit:contain;filter:drop-shadow(0 3px 5px rgba(0,84,76,.16))}
.brand-name{font-size:16px;letter-spacing:-.025em;white-space:nowrap;color:#0b3136}.brand-name span{color:#069d90}.brand-sub{letter-spacing:.12em;font-size:8px;font-weight:800;color:#58757b}
.icon-btn{border:1px solid #d6eaea;background:linear-gradient(140deg,#fff,#e7f6f5);color:#086d6f;box-shadow:0 3px 9px rgba(3,74,83,.06)}
.content{padding:24px 15px calc(110px + env(safe-area-inset-bottom));min-width:0;overflow-x:clip}
.content>h2,.content>div.eyebrow+h2,.content>.section-title h2{font-size:clamp(25px,6.7vw,33px);color:#0d3139;letter-spacing:-.048em;line-height:1.1}
.content>.eyebrow{display:inline-flex;align-items:center;gap:7px;font-size:10px;letter-spacing:.12em;margin-bottom:10px;color:#078b7f}.content>.eyebrow:before{content:"";width:8px;height:8px;border-radius:50%;background:#17bd9e;box-shadow:0 0 0 4px rgba(23,189,158,.12)}
.content>p{margin:5px 0 22px;font-size:13px;line-height:1.6}
.content :where(.section,.stack,.candidate-grid,.entry-grid){min-width:0}
.content .section-title{align-items:flex-start;margin-bottom:15px}.section-title h3{font-size:18px;letter-spacing:-.025em;color:#123942}
.card,.quote-card,.result-card,.facility-summary,.option-card,.entry-card,.match-option-wrap,.offer-card,.inbox-card,.account-switch,.public-update-card{border:1px solid #e1eeee;border-radius:21px;background:linear-gradient(146deg,#fff 0%,#fbfefe 100%);box-shadow:0 8px 22px rgba(11,60,67,.055)}
.card{padding:17px}.card.soft{background:linear-gradient(135deg,#ecfaf7,#f7fcfc)}
.result-card,.facility-summary{min-height:74px;align-items:center;padding:15px 14px;transition:transform .14s,border-color .14s,box-shadow .14s;max-width:100%}
.result-card:active{transform:scale(.99)}.result-card:hover,.result-card:focus-visible{border-color:#62cfc0;box-shadow:0 10px 25px rgba(2,109,106,.12)}
.result-card strong,.facility-summary strong{font-size:14px;line-height:1.3;overflow-wrap:anywhere}
.result-card small,.facility-summary small{font-size:11px;line-height:1.5;color:#71858b;overflow-wrap:anywhere}
.pill{background:linear-gradient(140deg,#e4f8f3,#c9eee5);color:#08776e;white-space:normal;font-size:10px;min-height:25px;padding:5px 9px}.pill.success{background:#dcf8e9;color:#09764e}
.btn,.v3-main-btn{border-radius:16px;min-height:53px;font-weight:850;letter-spacing:-.008em}.btn-primary{background:linear-gradient(155deg,#11b9a1 0%,#007f82 54%,#035e67 100%);color:white;border:1px solid #22ad9f;box-shadow:inset 0 1px 2px rgba(255,255,255,.4),0 9px 20px rgba(1,99,102,.18)}.btn-outline{border-color:#bbdddb;color:#075f63;background:linear-gradient(#fff,#f6fdfc)}.btn-secondary{background:linear-gradient(140deg,#e8f9f4,#d5f1ed)}.btn-danger{background:#fff1f1;color:#b72b36}
.btn:focus-visible,button:focus-visible{outline:3px solid #f3bf53;outline-offset:2px}
.search-wrap{margin:12px 0 18px}.search-input{min-height:56px;border-radius:20px;border:1px solid #c8e0df;background:#fff;box-shadow:0 6px 17px rgba(10,66,73,.045);padding-right:15px}.search-icon{color:#068d85;font-weight:900}
.input,.select,.textarea{border-radius:16px;min-height:50px;background:#fff;border:1px solid #d0e2e1}.field label{color:#23444b}
.quantity-panel{grid-template-columns:52px minmax(0,1fr) 52px}.qty-btn,.qty-display,.qty-input{border-radius:17px}.qty-btn{background:linear-gradient(140deg,#fff,#def8f2);box-shadow:0 4px 13px rgba(8,80,78,.08)}.qty-input,.qty-display{background:#f6fcfa}
.product-row{min-width:0}.product-row>*{min-width:0}.product-icon{border:1px solid #cce8e5;background:linear-gradient(135deg,#d2f8ed,#efffff);box-shadow:inset 2px 2px 0 rgba(255,255,255,.9),0 6px 13px rgba(3,99,91,.09)}
.quote-card{padding:19px}.quote-total{color:#00786e;letter-spacing:-.03em}.quote-facts{border-top:1px solid #e6eeee;padding-top:12px}.verified{color:#07815c}.offer-head{min-width:0;flex-wrap:wrap}.offer-head>div{min-width:0}.offer-value{white-space:normal;color:#037d74}.offer-facts span{background:#ecf9f7}
.account-switch{padding:5px;background:#e8f7f4}.account-switch button.active{color:#006c68;border-radius:13px;box-shadow:0 3px 10px rgba(0,90,86,.09)}
.progress span{height:6px;background:#dcefeb}.progress span.done{background:linear-gradient(90deg,#069b8a,#d7a43d)}
.sticky-actions{background:linear-gradient(to top,#f6fcfb 74%,rgba(246,252,251,0));padding-bottom:2px}
.bottom-nav{height:calc(70px + env(safe-area-inset-bottom));background:rgba(255,255,255,.97);border-top:1px solid #dceceb;box-shadow:0 -10px 27px rgba(20,70,77,.045);border-radius:22px 22px 0 0}
.nav-item{position:relative;gap:4px;min-width:0;padding:8px 1px 5px}.nav-item span{font-size:23px;line-height:1.1}.nav-item small{font-size:10px}.nav-item.active{color:#007f76}.nav-item.active:after{content:"";position:absolute;bottom:5px;left:32%;right:32%;height:3px;border-radius:5px;background:linear-gradient(90deg,#12b9a2,#d6a23a)}
.toast{background:#073e45;box-shadow:0 12px 27px rgba(0,47,53,.24)}
@media(max-width:380px){.content{padding-left:12px;padding-right:12px}.card,.quote-card{padding:14px}.topbar{padding-left:12px;padding-right:12px}.brand-name{font-size:14px}.brand-sub{font-size:7px}}
@media(min-width:720px){body{padding:24px 0}.app-shell{border-radius:28px}.bottom-nav{bottom:24px;border-radius:20px 20px 28px 28px}}
@media(prefers-reduced-motion:reduce){.result-card,.btn{transition:none}}
/* END ACCESS MED Premium V4 */

/* ACCESS MED module colours: retain the existing glossy three-dimensional treatment. */
/* Procurement and core marketplace */
.workspace-module-rfq { --module-light:#5de3d4;--module-mid:#079c95;--module-dark:#006d78; }
.workspace-module-distributor { --module-light:#65c9ee;--module-mid:#167aa8;--module-dark:#14527f; }
.workspace-module-photo { --module-light:#80e7d9;--module-mid:#2ba8af;--module-dark:#087584; }
.workspace-module-delivery { --module-light:#83c6fd;--module-mid:#2788d5;--module-dark:#1b558c; }
.workspace-module-whatsapp { --module-light:#60eaa2;--module-mid:#18a65d;--module-dark:#087944; }
/* Commercial opportunities */
.workspace-module-offers { --module-light:#ffe18b;--module-mid:#e3a524;--module-dark:#aa6b16; }
/* Organisation and operations */
.workspace-module-account { --module-light:#c0a0f7;--module-mid:#8460c5;--module-dark:#563b98; }
.workspace-module-inventory { --module-light:#86c0ff;--module-mid:#427ad7;--module-dark:#27549b; }
.workspace-module-pos { --module-light:#b2a9fc;--module-mid:#6c67c7;--module-dark:#49418e; }
.workspace-module-dispensing { --module-light:#73e2b4;--module-mid:#17a67a;--module-dark:#087658; }
.workspace-module-patients { --module-light:#91e5a8;--module-mid:#3ba66d;--module-dark:#1d7653; }
.workspace-module-sales { --module-light:#73d9f7;--module-mid:#168fae;--module-dark:#12607f; }
.workspace-module-finance { --module-light:#d0b8fb;--module-mid:#8762c8;--module-dark:#54388c; }
.workspace-tile:not(.workspace-tile-planned) .workspace-icon:not(:has(.workspace-icon-image)) {
  background:radial-gradient(circle at 28% 18%,rgba(255,255,255,.60),transparent 39%),
    linear-gradient(145deg,var(--module-light,#45ddd0) 2%,var(--module-mid,#00a393) 54%,var(--module-dark,#006c79) 100%);
  box-shadow:inset 0 2px 2px rgba(255,255,255,.65),inset 0 -5px 8px rgba(0,38,55,.22),
    0 8px 0 -4px var(--module-dark,#00616b),0 13px 17px -8px rgba(0,55,71,.32);
}
/* Future applications stay visibly unavailable regardless of their assigned palette. */
.workspace-tile-planned .workspace-icon:not(:has(.workspace-icon-image)) {
  background:linear-gradient(145deg,#dae4e6,#9aacae);
  box-shadow:inset 0 2px 2px #fff,0 6px 12px -7px #456;
}

/* Optional one-tap mobile PWA installation: no changes to launcher or glossy icons. */
.pwa-install-panel[hidden],.pwa-install-help[hidden]{display:none!important}
.pwa-install-panel{display:flex;align-items:center;gap:10px;padding:12px 14px;margin:9px 12px 0;border:1px solid #b9e4db;border-radius:17px;background:linear-gradient(125deg,#e1f8f1,#fff);box-shadow:0 5px 12px rgba(4,83,83,.06)}
.pwa-install-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.pwa-install-copy strong{font-size:13px;color:#075c62}
.pwa-install-copy span{font-size:11px;color:#59777b;line-height:1.35}
.pwa-install-button{border:0;border-radius:13px;background:linear-gradient(135deg,#13bba2,#007c80);color:#fff;padding:11px 13px;min-height:44px;font-size:12px;font-weight:800;cursor:pointer}
.pwa-install-dismiss,.pwa-install-close{border:0;background:transparent;color:#57787e;font-size:24px;min-width:28px;min-height:40px;cursor:pointer}
.pwa-install-help{position:fixed;inset:0;z-index:9999;background:rgba(4,31,38,.55);display:grid;place-items:center;padding:20px}
.pwa-install-help-card{position:relative;background:white;max-width:400px;width:100%;border-radius:22px;padding:25px 20px;box-shadow:0 18px 60px rgba(0,0,0,.2)}
.pwa-install-help-card h2{margin:0 30px 12px 0;color:#103c43;font-size:22px}
.pwa-install-help-card p{color:#445f65;line-height:1.55}
.pwa-install-close{position:absolute;right:11px;top:9px}
.pwa-install-help-card .pwa-install-button{width:100%}
@media(max-width:380px){.pwa-install-panel{padding:9px;gap:6px}.pwa-install-button{padding:9px 8px}}

/* Preserve draft without allowing a generic install link to reopen it. */
.workspace-resume{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 13px;margin:10px 0 16px;border:1px solid #cbe7e2;border-radius:16px;background:#f0faf7}
.workspace-resume span{font-size:12px;color:#25575b;font-weight:650}
.workspace-resume .btn{flex-shrink:0;min-height:42px;font-size:12px;padding:9px 12px}

/* Request review: keep both actions in normal document flow.
   A sticky submit bar previously obscured Add another item on small screens. */
.request-basket-actions { display: grid; gap: 12px; margin: 20px 0 24px; padding-bottom: env(safe-area-inset-bottom); }
.request-basket-actions .btn { width: 100%; min-height: 48px; }

/* Desktop pharmacy workspace: preserve touch-first mobile screens but use
   available laptop/desktop width for catalogue, RFQ and inventory workflows. */
@media (min-width: 900px) {
  .app-shell {
    max-width: 1120px;
    width: calc(100% - 48px);
    margin: 0 auto;
  }
  .content {
    padding: 28px 38px 112px;
  }
  .bottom-nav {
    max-width: 1120px;
    width: calc(100% - 48px);
  }
  .workspace-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .workspace-tile {
    min-height: 158px;
    padding: 19px 12px 16px;
  }
  .workspace-tile strong {
    font-size: 14px;
  }
  .workspace-tile small {
    font-size: 12px;
  }
  .pwa-install-panel {
    margin: 14px 38px 0;
  }
}
@media (min-width: 1250px) {
  .app-shell {
    max-width: 1280px;
  }
  .bottom-nav {
    max-width: 1280px;
  }
  .workspace-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* Shared ACCESS MED desktop icon: easy role switching in either pathway. */
.workspace-switch-link{margin-left:auto;margin-right:10px;color:var(--primary-dark);font-size:12px;font-weight:800;text-decoration:none;padding:9px 10px;border-radius:10px;background:var(--primary-soft);white-space:nowrap}
.workspace-switch-link:focus-visible{outline:3px solid #e4b341;outline-offset:2px}
@media(max-width:390px){.workspace-switch-link{font-size:10px;padding:8px 5px;margin-right:4px}}
