/* Anek Devanagari, SIL Open Font License 1.1 (see /fonts/OFL.txt) */
@font-face {
  font-family: "Anek";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 125%;
  src: url(/fonts/anek-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191,
    U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Anek";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  font-stretch: 75% 125%;
  src: url(/fonts/anek-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF;
}

:root {
  --leaf: #0b6b45;
  --leaf-deep: #08513a;
  --leaf-wash: #e4f0e8;
  --ink: #0f241d;
  --ink-soft: #4a5f57;
  --marigold: #e9a23b;
  --marigold-wash: #fbf0dc;
  --brick: #a8382a;
  --brick-wash: #f7e5e1;
  --paper: #f3f6f1;
  --surface: #ffffff;
  --foil: #dde4df;
  --foil-strong: #c3cfc8;
  --focus: #1f6feb;
  --font: "Anek", "Noto Sans Devanagari", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --r-board: 6px;
  --r-panel: 14px;
  --r-control: 10px;
  --measure: 72ch;
  --page: 1160px;
  --gutter: clamp(16px, 4vw, 32px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-stretch: 100%;
  overflow-x: hidden;
}
img {
  max-width: 100%;
}
a {
  color: var(--leaf);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover {
  color: var(--leaf-deep);
  text-decoration-thickness: 2px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
.visually-hidden {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  background: var(--ink);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--r-control);
}
.skip:focus {
  top: 12px;
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.mark {
  width: 30px;
  height: 30px;
  flex: none;
  fill: var(--leaf);
}

/* Masthead */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(243 246 241 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--foil);
}
.masthead-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover {
  color: var(--ink);
}
.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.brand-name {
  font-weight: 760;
  font-stretch: 85%;
  font-size: 21px;
}
.brand-place {
  font-size: 13px;
  color: var(--ink-soft);
}
.masthead nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.masthead nav a {
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 560;
  white-space: nowrap;
}
.masthead nav a:hover {
  background: var(--leaf-wash);
}

main {
  max-width: var(--page);
  margin: 0 auto;
  padding: 24px var(--gutter) 72px;
}

/* Buttons and controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1.5px solid var(--leaf);
  border-radius: var(--r-control);
  background: var(--leaf);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 640;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}
.btn:hover {
  background: var(--leaf-deep);
  border-color: var(--leaf-deep);
  color: #fff;
  text-decoration: none;
}
.btn.ghost {
  background: transparent;
  color: var(--leaf);
  border-color: var(--foil-strong);
}
.btn.ghost:hover {
  background: var(--leaf-wash);
  border-color: var(--leaf);
  color: var(--leaf-deep);
}
.btn.danger {
  background: var(--brick);
  border-color: var(--brick);
}
.btn.small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 15px;
}
.btn.full {
  width: 100%;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1.5px solid var(--foil-strong);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
input[type="file"] {
  padding: 9px;
  background: var(--paper);
}
input:not([type="checkbox"]):focus,
select:focus {
  border-color: var(--leaf);
  outline: 3px solid rgb(11 107 69 / 0.18);
  outline-offset: 0;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--leaf);
  flex: none;
}
label {
  display: grid;
  gap: 6px;
  font-weight: 560;
  font-size: 15px;
}
label.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 450;
  font-size: 16px;
  margin-top: 14px;
}
form {
  margin: 0;
}
.fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.form-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Signboard hero */
.board {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}
.board-sign {
  background: var(--leaf);
  border-radius: var(--r-board);
  padding: 12px;
  color: #fff;
  box-shadow: 0 1px 0 var(--leaf-deep), 0 18px 40px -24px rgb(8 81 58 / 0.7);
}
.board-frame {
  height: 100%;
  border: 2px solid var(--marigold);
  outline: 1px solid rgb(233 162 59 / 0.5);
  outline-offset: -8px;
  border-radius: 3px;
  padding: clamp(22px, 4.5vw, 48px) clamp(20px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.board-trade {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  font-size: 18px;
  font-weight: 600;
  color: var(--marigold);
}
.board-trade .mark {
  fill: #fff;
  width: 26px;
  height: 26px;
}
.board-trade .hi {
  color: #cfe5d8;
  font-weight: 500;
}
.board h1 {
  font-size: clamp(46px, 9vw, 104px);
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.9;
  letter-spacing: -0.012em;
  text-wrap: balance;
}
.board-place {
  font-size: clamp(17px, 2vw, 20px);
  color: #d9ece1;
}
.finder {
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  padding: clamp(20px, 3vw, 32px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.finder label {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 700;
  font-stretch: 90%;
  line-height: 1.15;
}
.finder-row {
  position: relative;
  display: flex;
  gap: 8px;
}
.finder-row .icon {
  position: absolute;
  left: 13px;
  top: 13px;
  color: var(--ink-soft);
}
.finder-row input {
  padding-left: 42px;
  min-height: 48px;
}
.finder-row .btn {
  min-height: 48px;
}
.finder p {
  color: var(--ink-soft);
  font-size: 15px;
}

/* Licence strip: a tear-off band with perforations between facts */
.strip {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
}
.strip-cell {
  padding: 16px 20px;
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}
.strip-cell + .strip-cell {
  border-left: 2px dashed var(--foil);
}
.strip-cell span {
  font-size: 14px;
  color: var(--ink-soft);
}
.strip-cell strong {
  font-weight: 640;
  font-size: 17px;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.strip-cell strong.fresh {
  color: var(--leaf);
}
.strip-cell strong.due {
  color: #8a5a10;
}
.pending {
  color: var(--ink-soft);
  font-style: italic;
  font-weight: 450 !important;
}

.finder-call {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 620;
  text-decoration: none;
}

/* Sections */
.section {
  margin-top: clamp(52px, 7vw, 88px);
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.section-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 14px;
}
.section-head h2 {
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 760;
  font-stretch: 80%;
}
.section-head .hi {
  font-size: 18px;
  color: var(--ink-soft);
}
.section-intro {
  max-width: 44ch;
  color: var(--ink-soft);
  font-size: 16px;
}
.note {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--r-control);
  font-size: 16px;
  max-width: var(--measure);
}
.note.fresh {
  background: var(--leaf-wash);
  color: var(--leaf-deep);
}
.note.due {
  background: var(--marigold-wash);
  color: #6f480b;
}
.note .icon {
  margin-top: 1px;
}
.muted {
  color: var(--ink-soft);
  font-size: 15px;
}

/* Stock */
.stock-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-bottom: 14px;
}
.stock-tools .search {
  flex: 1 1 420px;
  margin: 0;
}
.chips {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: 999px;
}
.chips a {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 560;
  font-size: 15px;
  white-space: nowrap;
}
.chips a[aria-current] {
  background: var(--leaf);
  color: #fff;
}
.stock-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
  margin-bottom: 14px;
}
.search {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
}
.search input,
.search select,
.search .btn {
  height: 48px;
  min-height: 48px;
}
.search input {
  flex: 1 1 240px;
  width: auto;
}
.search select {
  flex: 0 1 200px;
  width: auto;
}
.result-line {
  font-size: 15px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}
.table-wrap,
.scroll {
  position: relative;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  background: #f8faf7;
  border-bottom: 1px solid var(--foil);
  padding: 12px 16px;
  white-space: nowrap;
}
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--foil);
  vertical-align: top;
}
tbody tr:last-child td {
  border-bottom: 0;
}
.num {
  text-align: right;
  white-space: nowrap;
}
.med-name {
  display: block;
  font-size: 17px;
  font-weight: 680;
}
.med-detail,
.med-maker,
td .sub {
  display: block;
  font-size: 15px;
  color: var(--ink-soft);
}
.med-maker {
  font-size: 14px;
}
.price {
  font-weight: 700;
}
.avail {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 620;
  white-space: nowrap;
}
.avail.in {
  background: var(--leaf-wash);
  color: var(--leaf-deep);
}
.avail.out {
  background: #eceeec;
  color: #5a625e;
}
tr.empty td {
  padding: 32px 16px;
  text-align: center;
  color: var(--ink-soft);
}
.pager {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* Certificate shelf: framed first-page previews */
.certs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: 22px 18px;
}
.cert {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.cert-open {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.cert-open:hover {
  color: var(--ink);
}
.doc-thumb {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--foil-strong);
  border-radius: 4px;
  box-shadow:
    0 0 0 6px var(--surface),
    0 0 0 7px var(--foil),
    0 14px 24px -18px rgb(15 36 29 / 0.45);
  margin: 7px;
  color: var(--foil-strong);
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.18s ease;
}
.doc-thumb .icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.2;
}
.doc-thumb img,
.doc-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}
.doc-thumb.failed::after {
  content: "Preview unavailable";
  position: absolute;
  bottom: 10px;
  color: var(--ink-soft);
}
a.cert-open:hover .doc-thumb {
  transform: translateY(-3px);
}
@media (prefers-reduced-motion: reduce) {
  .doc-thumb {
    transition: none;
  }
  a.cert-open:hover .doc-thumb {
    transform: none;
  }
}
.cert-body {
  display: grid;
  gap: 2px;
  padding: 0 4px;
}
.cert-body strong {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
}
.cert-body span {
  font-size: 14px;
  color: var(--ink-soft);
}
.cert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px;
}
.cert-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 4px;
  font-size: 15px;
}
.cert.missing .doc-thumb {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
}
.cert.missing .cert-body strong {
  color: var(--ink-soft);
}

/* Register cards */
.register {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}
.register-card {
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  padding: 22px 22px 8px;
  min-width: 0;
}
.register-card h3 {
  font-size: 22px;
  font-stretch: 86%;
  margin-bottom: 6px;
}
dl {
  margin: 0;
}
.fact {
  display: grid;
  gap: 2px;
  padding: 11px 0;
  border-bottom: 1px solid var(--foil);
}
.fact:last-child {
  border-bottom: 0;
}
.fact dt {
  color: var(--ink-soft);
  font-size: 14px;
}
.fact dd {
  margin: 0;
  font-weight: 580;
  overflow-wrap: anywhere;
}
.pharmacist {
  background: var(--leaf-wash);
  border-color: transparent;
}
.pharmacist-body {
  display: grid;
  gap: 14px;
}
.portrait {
  width: 112px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-control);
  border: 4px solid var(--surface);
}
.portrait.placeholder {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: var(--surface);
  color: var(--leaf);
  font-size: 13px;
  text-align: center;
}
.portrait.placeholder .icon {
  width: 40px;
  height: 40px;
  stroke-width: 1.2;
}
.pharmacist .fact {
  border-color: rgb(11 107 69 / 0.15);
}

/* Good to know */
.notes {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}
.notes li {
  padding-top: 16px;
  border-top: 4px solid var(--marigold);
}
.notes h3 {
  font-size: 21px;
  font-stretch: 86%;
  margin-bottom: 8px;
}
.notes p {
  color: var(--ink-soft);
  font-size: 16px;
}

/* Visit */
.visit {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.visit-address {
  display: flex;
  gap: 14px;
  padding: clamp(22px, 3vw, 34px);
  background: var(--leaf);
  color: #fff;
}
.visit-address .icon {
  width: 28px;
  height: 28px;
  color: var(--marigold);
}
.visit-address h3 {
  font-size: 15px;
  font-weight: 600;
  color: #cfe5d8;
  margin-bottom: 6px;
}
.visit-address p {
  font-size: clamp(19px, 2.2vw, 23px);
  line-height: 1.35;
  font-weight: 560;
  max-width: 34ch;
}
.visit-address p.pending {
  color: #cfe5d8;
}
.visit-address .btn {
  margin-top: 18px;
  background: #fff;
  border-color: #fff;
  color: var(--leaf-deep);
}
.visit-address .btn:hover {
  background: var(--marigold-wash);
  border-color: var(--marigold-wash);
}
.visit-list {
  list-style: none;
  margin: 0;
  padding: 8px clamp(18px, 3vw, 30px);
}
.visit-list li {
  display: flex;
  gap: 14px;
  padding: 18px 0;
}
.visit-list li + li {
  border-top: 1px solid var(--foil);
}
.visit-list .icon {
  color: var(--leaf);
  width: 24px;
  height: 24px;
}
.visit-list h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 2px;
}
.visit-list p {
  font-size: 18px;
  overflow-wrap: anywhere;
}

/* Footer */
.site-footer {
  margin-top: 72px;
  background: var(--ink);
  color: #c9d6cf;
}
.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 36px var(--gutter);
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 18px 32px;
  align-items: start;
  font-size: 15px;
}
.footer-name {
  color: #fff;
  font-weight: 700;
  font-size: 19px;
  font-stretch: 85%;
}
.footer-note {
  max-width: 60ch;
}
.site-footer a {
  color: #fff;
}
main {
  padding-bottom: 0;
}

/* Document viewer */
.viewer {
  width: min(960px, 100vw - 24px);
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--r-panel);
  background: #e9ede9;
  color: var(--ink);
  overflow: hidden;
}
.viewer[open] {
  display: flex;
  flex-direction: column;
}
.viewer::backdrop {
  background: rgb(15 36 29 / 0.72);
}
.viewer-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--foil);
}
.viewer-title {
  flex: 1;
  font-size: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.viewer-pages {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: grid;
  justify-items: center;
  gap: 16px;
}
.viewer-page {
  width: 100%;
  max-width: 900px;
  height: auto;
  background: #fff;
  box-shadow: 0 2px 10px rgb(15 36 29 / 0.18);
}
.viewer-status {
  padding: 40px;
  color: var(--ink-soft);
}

/* Shared panels, notices */
.panel {
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  padding: clamp(20px, 3vw, 28px);
}
.panel + .panel,
.panel + .pager,
.certs + .panel,
.people + .panel,
.steps + .panel {
  margin-top: 20px;
}
.panel.narrow {
  max-width: 560px;
  margin: 40px auto;
  display: grid;
  gap: 16px;
}
.panel h1 {
  font-size: 30px;
  font-stretch: 85%;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.panel-head h2,
.panel > h2 {
  font-size: 23px;
  font-stretch: 88%;
}
.panel > h2 {
  margin-bottom: 10px;
}
.hint {
  color: var(--ink-soft);
  font-size: 15px;
  max-width: var(--measure);
  margin-bottom: 16px;
}
.notice,
.status {
  padding: 12px 14px;
  border-radius: var(--r-control);
  font-size: 15px;
  margin: 0 0 16px;
}
.notice {
  background: var(--marigold-wash);
  color: #6f480b;
}
.status {
  background: var(--leaf-wash);
  color: var(--leaf-deep);
}
.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: #eceeec;
  color: #4d5551;
  white-space: nowrap;
}
.tag.public,
.tag.ok {
  background: var(--leaf-wash);
  color: var(--leaf-deep);
}
.tag.bad {
  background: var(--brick-wash);
  color: var(--brick);
}
.empty-note {
  color: var(--ink-soft);
  padding: 18px;
  border: 1.5px dashed var(--foil-strong);
  border-radius: var(--r-control);
  text-align: center;
}

/* Staff portal */
.staff main {
  max-width: 1280px;
  padding-top: 28px;
  padding-bottom: 40px;
}
.staff .site-footer {
  margin-top: 40px;
}
.auth {
  max-width: 440px;
  margin: 6vh auto;
  display: grid;
  gap: 14px;
}
.auth form {
  display: grid;
  gap: 14px;
}
.auth form .btn {
  margin-top: 6px;
}
.auth-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.auth-head .mark {
  width: 38px;
  height: 38px;
}
.auth-head p {
  color: var(--ink-soft);
  font-size: 15px;
}
.password-entry {
  display: flex;
  align-items: center;
  gap: 8px;
}
.password-entry input {
  min-width: 0;
}
.password-entry button {
  flex: none;
  min-height: 46px;
  background: transparent;
  color: var(--leaf);
  border-color: var(--foil-strong);
}
.password-entry button:hover {
  background: var(--leaf-wash);
  color: var(--leaf-deep);
}
.console {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}
.side {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 16px;
}
.side-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--foil);
}
.side-user > .icon {
  width: 36px;
  height: 36px;
  padding: 7px;
  border-radius: 50%;
  background: var(--leaf-wash);
  color: var(--leaf);
}
.side-user > span {
  display: grid;
  line-height: 1.2;
}
.side-user span span {
  font-size: 14px;
  color: var(--ink-soft);
}
.side-nav {
  display: grid;
  gap: 2px;
}
.side-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--r-control);
  color: var(--ink);
  text-decoration: none;
  font-weight: 540;
}
.side-nav a:hover {
  background: var(--leaf-wash);
  color: var(--leaf-deep);
}
.side-nav a[aria-current="page"] {
  background: var(--leaf);
  color: #fff;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--marigold);
  flex: none;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 780;
  font-stretch: 80%;
}
.page-head p {
  color: var(--ink-soft);
  max-width: var(--measure);
}
.page-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: var(--r-panel);
  border-left: 6px solid var(--leaf);
  background: var(--leaf-wash);
}
.review.due {
  border-left-color: var(--marigold);
  background: var(--marigold-wash);
}
.review h2 {
  font-size: 22px;
  font-stretch: 88%;
  margin-bottom: 4px;
}
.review p {
  max-width: 62ch;
  font-size: 15px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 20px 0;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.stat {
  padding: 14px 16px;
  display: grid;
  gap: 2px;
  align-content: space-between;
  color: var(--ink);
  text-decoration: none;
}
a.stat:hover {
  background: var(--leaf-wash);
  color: var(--ink);
}
.stat + .stat {
  border-left: 1px solid var(--foil);
}
.stat span {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.25;
}
.stat strong {
  font-size: 32px;
  font-weight: 720;
  font-stretch: 85%;
  line-height: 1.1;
}
.stat.warn strong {
  color: #9a640f;
}
.stat.bad strong {
  color: var(--brick);
}
.quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.quick-item {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  color: var(--ink);
  text-decoration: none;
}
.quick-item:hover {
  border-color: var(--leaf);
  color: var(--ink);
}
.quick-item strong {
  color: var(--leaf);
  font-size: 17px;
}
.quick-item span {
  font-size: 14px;
  color: var(--ink-soft);
}
.watch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.watch-grid .panel + .panel {
  margin-top: 0;
}
.watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.watch-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 12px;
  padding: 10px 0;
  border-top: 1px solid var(--foil);
}
.watch-list a {
  font-weight: 620;
}
.watch-list span {
  grid-column: 1;
  font-size: 14px;
  color: var(--ink-soft);
}
.watch-list strong {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  font-size: 15px;
  white-space: nowrap;
}
.log {
  list-style: none;
  margin: 0;
  padding: 0;
}
.log li {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 4px 16px;
  padding: 11px 0;
  border-top: 1px solid var(--foil);
}
.log li:first-child {
  border-top: 0;
}
.log-when {
  font-size: 14px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}
.log-detail {
  color: var(--ink-soft);
}
tr.row-expired td:first-child {
  box-shadow: inset 3px 0 var(--brick);
}
tr.row-empty td {
  color: var(--ink-soft);
}
td form {
  display: inline;
}
.danger-zone {
  border-color: #ecc9c2;
  background: #fffafa;
}
.danger-zone label.check {
  margin-top: 0;
}
.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.steps li {
  counter-increment: step;
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
}
.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--leaf);
  color: #fff;
  font-weight: 700;
  margin-bottom: 4px;
}
.steps span {
  font-size: 15px;
  color: var(--ink-soft);
}
.group {
  border: 0;
  margin: 0;
  padding: 0 0 24px;
  min-width: 0;
}
.group + .group {
  padding-top: 22px;
  border-top: 1px solid var(--foil);
}
.group legend {
  float: left;
  width: 100%;
  font-size: 19px;
  font-weight: 700;
  font-stretch: 88%;
  margin-bottom: 14px;
}
.group > :not(legend) {
  clear: both;
}
.admin-certs {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr));
}
.people {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
}
.people li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}
.people li + li {
  border-top: 1px solid var(--foil);
}
.people li > .icon {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 50%;
  background: var(--leaf-wash);
  color: var(--leaf);
}
.people li > div {
  flex: 1;
  display: grid;
  line-height: 1.25;
}
.people li > div span {
  font-size: 14px;
  color: var(--ink-soft);
}
.narrow-panel {
  max-width: 560px;
}
.narrow-panel form {
  display: grid;
  gap: 14px;
}

/* Counter poster */
.poster {
  max-width: 720px;
  background: #fff;
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  overflow: hidden;
}
.poster-sign {
  background: var(--leaf);
  color: #fff;
  padding: 28px 32px;
  border-bottom: 6px solid var(--marigold);
}
.poster-sign .board-trade {
  font-size: 17px;
}
.poster-sign h2 {
  font-size: 56px;
  font-weight: 800;
  font-stretch: 75%;
  line-height: 0.95;
  margin: 8px 0 6px;
}
.poster-sign p:last-child {
  color: #d9ece1;
}
.poster-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 28px;
  align-items: center;
  padding: 32px;
}
.poster-qr svg {
  display: block;
  width: 100%;
  height: auto;
}
.poster-call {
  font-size: 26px;
  font-weight: 700;
  font-stretch: 88%;
  line-height: 1.2;
}
.poster-hi {
  margin-top: 8px;
  font-size: 18px;
  color: var(--ink-soft);
}
.poster-url {
  margin-top: 16px;
  font-size: 22px;
  font-weight: 700;
  color: var(--leaf);
}
.poster-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 20px 32px 28px;
  border-top: 2px dashed var(--foil);
  font-size: 15px;
}
.poster-facts dt {
  color: var(--ink-soft);
  font-size: 13px;
}
.poster-facts dd {
  margin: 0;
  font-weight: 620;
  overflow-wrap: anywhere;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }
  body {
    background: #fff;
  }
  .masthead,
  .side,
  .site-footer,
  .no-print,
  .skip {
    display: none !important;
  }
  main,
  .staff main {
    padding: 0;
    max-width: none;
  }
  .console {
    display: block;
  }
  .poster {
    max-width: none;
    border: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .poster-sign h2 {
    font-size: 64px;
  }
  .poster-body {
    grid-template-columns: 300px 1fr;
  }
}

/* Responsive */
@media (max-width: 1040px) {
  .notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .register {
    grid-template-columns: 1fr 1fr;
  }
  .pharmacist {
    grid-column: 1 / -1;
  }
  .pharmacist-body {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }
  .quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .board {
    grid-template-columns: 1fr;
  }
  .strip {
    grid-template-columns: 1fr 1fr;
  }
  .strip-cell + .strip-cell {
    border-left: 0;
  }
  .strip-cell:nth-child(even) {
    border-left: 2px dashed var(--foil);
  }
  .strip-cell:nth-child(n + 3) {
    border-top: 2px dashed var(--foil);
  }
  .visit {
    grid-template-columns: 1fr;
  }
  .console {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .side {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .side-user {
    border: 0;
    padding: 0;
  }
  .side-nav {
    min-width: 0;
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    overflow-x: auto;
    gap: 4px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }
  .side-nav a {
    white-space: nowrap;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--foil);
  }
  .side-nav a[aria-current="page"] {
    border-color: var(--leaf);
  }
  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stat:nth-child(4) {
    border-left: 0;
  }
  .stat:nth-child(n + 4) {
    border-top: 1px solid var(--foil);
  }
  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .masthead {
    position: static;
  }
  .masthead nav {
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    width: calc(100% + var(--gutter) * 2);
    max-width: none;
  }
  .board-sign {
    padding: 8px;
  }
  .finder-row {
    flex-wrap: wrap;
  }
  .finder-row .btn {
    flex: 1;
  }
  .strip {
    grid-template-columns: 1fr;
  }
  .strip-cell:nth-child(n) {
    border-left: 0;
  }
  .strip-cell + .strip-cell {
    border-top: 2px dashed var(--foil);
  }
  .stock-tools .search {
    flex-basis: 100%;
  }
  .chips {
    width: 100%;
  }
  .chips a {
    flex: 1;
    text-align: center;
  }
  .certs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 12px;
  }
  .register,
  .notes,
  .watch-grid,
  .steps {
    grid-template-columns: 1fr;
  }
  .pharmacist-body {
    grid-template-columns: 1fr;
  }
  .search .btn {
    flex: 1;
  }
  .search select {
    flex: 1 1 140px;
  }
  .stock-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }
  .stock-table,
  .stock-table tbody,
  .stock-table td {
    display: block;
  }
  .stock-table tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--foil);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 12px;
  }
  .stock-table tbody tr:last-child {
    border-bottom: 0;
  }
  .stock-table td {
    padding: 0;
    border: 0;
    text-align: left;
  }
  .stock-table td[data-label="Medicine"],
  .stock-table td[data-label="Availability"] {
    grid-column: 1 / -1;
  }
  .stock-table td[data-label="Pack"]::before,
  .stock-table td.num::before {
    content: attr(data-label);
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
  }
  .stock-table tr.empty {
    display: block;
  }
  .stock-table tr.empty td {
    padding: 18px 0;
    text-align: center;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stat:nth-child(n) {
    border-left: 0;
    border-top: 0;
  }
  .stat:nth-child(even) {
    border-left: 1px solid var(--foil);
  }
  .stat:nth-child(n + 3) {
    border-top: 1px solid var(--foil);
  }
  .quick {
    grid-template-columns: 1fr 1fr;
  }
  .log li {
    grid-template-columns: 1fr;
  }
  .people li {
    flex-wrap: wrap;
  }
  .poster-sign h2 {
    font-size: 40px;
  }
  .poster-body {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .poster-qr {
    width: 200px;
  }
  .poster-facts {
    grid-template-columns: 1fr;
  }
  .viewer {
    width: 100vw;
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
  }
  .viewer-pages {
    padding: 8px;
  }
}

/* Signboard texture: faint painted-board grain */
.board-sign {
  background-image:
    repeating-linear-gradient(
      100deg,
      rgb(255 255 255 / 0.025) 0 2px,
      transparent 2px 9px
    ),
    linear-gradient(160deg, #0d7a4f, var(--leaf) 55%, #095d3c);
}
.strip.three {
  grid-template-columns: 1.6fr 1fr 1fr;
}

/* Homepage stock summary */
.stock-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px 20px;
  margin-bottom: 22px;
}
.stock-search {
  flex: 1 1 420px;
  margin: 0;
  align-self: center;
}
.counts {
  display: flex;
  gap: 10px;
}
.count {
  display: grid;
  min-width: 132px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
}
.count:hover {
  border-color: var(--leaf);
  color: var(--ink);
}
.count strong {
  font-size: 30px;
  font-weight: 760;
  font-stretch: 82%;
}
.count span {
  font-size: 14px;
  color: var(--ink-soft);
}
.count.in strong {
  color: var(--leaf);
}
.preview-title {
  font-size: 19px;
  font-stretch: 88%;
  margin-bottom: 10px;
}
.stock-more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}
.avail-count {
  font-weight: 500;
  opacity: 0.8;
  margin-left: 4px;
}

/* Good to know icons */
.notes li > .icon {
  width: 26px;
  height: 26px;
  color: var(--leaf);
  margin-bottom: 10px;
}

/* Full medicine list page */
.list-head {
  padding: 8px 0 18px;
}
.crumb {
  font-size: 15px;
  margin-bottom: 6px;
}
.list-head h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 780;
  font-stretch: 78%;
}
.list-head .hi {
  font-size: 18px;
  color: var(--ink-soft);
}
.list-search input {
  font-size: 17px;
}
.list-filters {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.chips {
  width: fit-content;
}
.letters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.letters a {
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--foil);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.letters a:hover {
  border-color: var(--leaf);
}
.letters a[aria-current] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.pager.numbered {
  justify-content: center;
  flex-wrap: wrap;
}
.page-numbers {
  display: flex;
  gap: 4px;
  align-items: center;
}
.page-numbers a,
.page-numbers .current {
  min-width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--r-control);
  text-decoration: none;
  font-weight: 600;
}
.page-numbers a {
  color: var(--ink);
}
.page-numbers a:hover {
  background: var(--leaf-wash);
}
.page-numbers .current {
  background: var(--leaf);
  color: #fff;
}
.page-numbers .gap {
  padding: 0 4px;
}
.list-foot {
  margin-top: 18px;
}

/* Hinted form fields */
.field {
  display: grid;
  gap: 6px;
  align-content: start;
}
.field.wide {
  grid-column: 1 / -1;
}
.field label {
  display: block;
  font-weight: 620;
}
.field small {
  font-size: 14px;
  line-height: 1.4;
  color: var(--ink-soft);
}
.optional {
  font-weight: 450;
  font-size: 13px;
  color: var(--ink-soft);
  margin-left: 4px;
}
.group .hint {
  margin-bottom: 14px;
}

/* Staff medicine list with stock controls */
.stock-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
}
.stock-item {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) 110px minmax(0, 1.2fr) auto auto;
  gap: 12px 20px;
  align-items: center;
  padding: 16px 18px;
}
.stock-item + .stock-item {
  border-top: 1px solid var(--foil);
}
.stock-item.is-expired {
  box-shadow: inset 4px 0 var(--brick);
}
.si-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.si-name {
  font-size: 17px;
  font-weight: 680;
  color: var(--ink);
  text-decoration: none;
}
.si-name:hover {
  color: var(--leaf);
  text-decoration: underline;
}
.si-detail,
.si-batch {
  font-size: 14px;
  color: var(--ink-soft);
}
.si-qty {
  display: grid;
  justify-items: start;
  gap: 2px;
  line-height: 1.1;
}
.si-qty strong {
  font-size: 28px;
  font-weight: 760;
  font-stretch: 82%;
  font-variant-numeric: tabular-nums;
}
.si-qty > span:not(.tag) {
  font-size: 13px;
  color: var(--ink-soft);
}
.is-empty .si-qty strong {
  color: var(--ink-soft);
}
.si-price {
  display: grid;
  gap: 1px;
  font-size: 14px;
  color: var(--ink-soft);
}
.si-price strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.si-private {
  font-size: 13px;
}
.si-adjust {
  display: flex;
  align-items: center;
  gap: 6px;
}
.si-amount {
  width: 72px !important;
  min-height: 36px !important;
  height: 36px;
  padding: 4px 8px !important;
  text-align: center;
}
.si-links {
  display: grid;
  gap: 4px;
  font-size: 15px;
  justify-items: end;
}
.si-delete {
  color: var(--brick);
}
.tag.warn {
  background: var(--marigold-wash);
  color: #7a4f0c;
}

/* Document delete disclosure */
.cert-actions {
  flex-wrap: wrap;
  gap: 8px 12px;
}
.cert-delete summary {
  cursor: pointer;
  color: var(--brick);
  font-size: 15px;
}
.cert-delete[open] {
  flex-basis: 100%;
  padding: 10px 12px;
  background: var(--brick-wash);
  border-radius: var(--r-control);
}
.cert-delete form {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.cert-delete label.check {
  margin-top: 8px;
  font-size: 15px;
}

@media (max-width: 1100px) {
  .stock-item {
    grid-template-columns: minmax(0, 1fr) 100px minmax(0, 1fr);
  }
  .si-adjust {
    grid-column: 1 / 3;
  }
  .si-links {
    grid-column: 3;
    display: flex;
    gap: 16px;
    justify-content: flex-end;
  }
}
@media (max-width: 980px) {
  .strip.three {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .strip.three {
    grid-template-columns: 1fr;
  }
  .counts {
    width: 100%;
  }
  .count {
    flex: 1;
    min-width: 0;
  }
  .stock-more .btn {
    flex: 1 1 100%;
  }
  .chips {
    width: 100%;
  }
  .letters a {
    min-width: 34px;
    height: 34px;
  }
  .stock-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .si-main {
    grid-column: 1 / -1;
  }
  .si-qty {
    grid-row: 2;
    grid-column: 2;
    justify-items: end;
    text-align: right;
  }
  .si-price {
    grid-row: 2;
    grid-column: 1;
  }
  .si-adjust {
    grid-column: 1 / -1;
  }
  .si-adjust .btn {
    flex: 1;
  }
  .si-amount {
    width: 84px !important;
  }
  .si-links {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

/* Compact drug licence grid */
.lic {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px 18px;
}
.lic li {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.lic-form {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
.lic-form em {
  font-style: normal;
  font-weight: 450;
}
.lic-no {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.lic-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 16px;
}
.lic-stack .lic-no {
  font-size: 15px;
}

/* Two-row licence strip */
.strip {
  display: block;
}
.strip-licences {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 8px 20px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 2px dashed var(--foil);
}
.strip-label {
  font-size: 14px;
  color: var(--ink-soft);
}
.strip-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.strip-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.strip .strip-row .strip-cell {
  border-top: 0;
  border-left: 0;
}
.strip .strip-row .strip-cell + .strip-cell {
  border-left: 2px dashed var(--foil);
}

/* Poster licences across the full width */
.poster-facts .poster-lic {
  grid-column: 1 / -1;
}
.poster-facts .poster-lic dd {
  margin-top: 4px;
}

/* Quick sale */
.sales-today {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.sales-today > div {
  display: grid;
  gap: 2px;
  padding: 14px 20px;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--foil);
  border-radius: var(--r-panel);
}
.sales-today > div:first-child {
  background: var(--leaf);
  border-color: var(--leaf);
  color: #fff;
}
.sales-today span {
  font-size: 14px;
  opacity: 0.85;
}
.sales-today strong {
  font-size: 32px;
  font-weight: 760;
  font-stretch: 82%;
  font-variant-numeric: tabular-nums;
}
.sales-today small {
  font-size: 14px;
  opacity: 0.85;
}
.pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 20px;
  align-items: start;
}
.pos[hidden] {
  display: none;
}
.pos .panel + .panel {
  margin-top: 0;
}
.pos-label {
  font-size: 20px;
  font-weight: 700;
  font-stretch: 88%;
  margin-bottom: 4px;
}
.pos-hint {
  margin: 8px 0 10px;
}
.pos-results,
.pos-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pos-result,
.pos-line {
  display: grid;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 0;
  border-top: 1px solid var(--foil);
}
.pos-result {
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.pos-line {
  grid-template-columns: minmax(0, 1fr) auto 90px auto;
}
.pos-info {
  display: grid;
  gap: 1px;
  min-width: 0;
}
.pos-info strong {
  font-size: 16px;
}
.pos-info span {
  font-size: 14px;
  color: var(--ink-soft);
}
.pos-meta {
  font-size: 13px !important;
}
.pos-price,
.pos-amount {
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.pos-none {
  padding: 14px 0;
  color: var(--ink-soft);
}
.pos-step {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pos-step .btn {
  min-width: 36px;
  padding: 0;
  font-size: 18px;
}
.pos-qty {
  width: 52px !important;
  min-height: 36px !important;
  height: 36px;
  padding: 4px !important;
  text-align: center;
}
.pos-remove {
  border: 0;
  background: none;
  color: var(--brick);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
}
.pos-bill h2 {
  font-size: 24px;
  font-stretch: 88%;
  margin-bottom: 10px;
}
.pos-sum {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 2px solid var(--ink);
  display: grid;
  gap: 12px;
}
.pos-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}
.pos-adjust {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: end;
}
.pos-or {
  padding-bottom: 12px;
  color: var(--ink-soft);
  font-size: 14px;
}
.pos-adjust input:disabled {
  background: var(--paper);
  color: var(--ink-soft);
}
.pos-total span {
  font-size: 18px;
  font-weight: 650;
}
.pos-total strong {
  font-size: 34px;
  font-weight: 780;
  font-stretch: 82%;
  color: var(--leaf);
}
.pos-error {
  color: var(--brick);
  font-size: 15px;
}
.pos-form .form-actions {
  margin-top: 4px;
}
.pos-complete {
  flex: 1;
  min-height: 52px;
  font-size: 18px;
}
.quick-item.sale {
  background: var(--leaf);
  border-color: var(--leaf);
}
.quick-item.sale strong,
.quick-item.sale span {
  color: #fff;
}
.quick-item.sale:hover {
  background: var(--leaf-deep);
}

@media (max-width: 1100px) {
  .pos {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 980px) {
  .lic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .strip-licences {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .strip-row,
  .strip-row.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .strip .strip-row .strip-cell + .strip-cell {
    border-left: 0;
    border-top: 2px dashed var(--foil);
  }
  .lic-stack {
    grid-template-columns: minmax(0, 1fr);
  }
  .pos-line {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .pos-step {
    grid-row: 2;
  }
  .pos-amount {
    grid-row: 2;
    grid-column: 2;
  }
  .pos-remove {
    grid-row: 1;
    grid-column: 2;
    justify-self: end;
  }
  .pos-adjust {
    grid-template-columns: 1fr;
  }
  .pos-or {
    padding: 0;
  }
  .sales-today > div {
    flex: 1 1 100%;
  }
}
.poster-lic .lic {
  grid-template-columns: repeat(2, max-content);
  gap: 10px 48px;
}
.poster-lic .lic-no {
  font-size: 19px;
  overflow-wrap: normal;
  white-space: nowrap;
}
.poster-lic .lic-form {
  font-size: 14px;
}
@media (max-width: 640px) {
  .poster-lic .lic {
    grid-template-columns: max-content;
  }
}

/* Compact public stock rows on phones */
.med-pack {
  display: none;
}
@media (max-width: 640px) {
  .stock-table tr {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "med price"
      "avail mrp"
      "buy buy";
    gap: 4px 14px;
    padding: 11px 14px;
    align-items: start;
  }
  .stock-table td[data-label="Medicine"] {
    grid-area: med;
    grid-column: auto;
  }
  .stock-table td[data-label="Availability"] {
    grid-area: avail;
    grid-column: auto;
    grid-row: auto;
  }
  .stock-table td[data-label="Our price"] {
    grid-area: price;
    text-align: right;
    font-size: 17px;
  }
  .stock-table td[data-label="MRP"] {
    grid-area: mrp;
    text-align: right;
    font-size: 13px;
    color: var(--ink-soft);
    align-self: center;
  }
  .stock-table td[data-label="Purchase price"] {
    grid-area: buy;
    font-size: 13px;
    color: var(--ink-soft);
  }
  .stock-table td[data-label="Pack"],
  .stock-table .med-maker {
    display: none;
  }
  .stock-table td[data-label="Our price"]::before {
    content: none;
  }
  .stock-table td[data-label="MRP"]::before,
  .stock-table td[data-label="Purchase price"]::before {
    content: attr(data-label) " ";
    display: inline;
    font-size: 13px;
  }
  .stock-table .med-name {
    font-size: 16px;
  }
  .stock-table .med-detail {
    font-size: 13px;
    line-height: 1.35;
  }
  .med-pack {
    display: inline;
  }
  .stock-table .avail {
    font-size: 12px;
    padding: 2px 8px;
  }
}

/* Licence card: one line per licence, form label beside the number */
.lic-stack {
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}
.lic-stack li {
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
}
.lic-stack .lic-no {
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 15px;
}
@media (max-width: 1040px) and (min-width: 641px) {
  .lic-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
