/* Hospital pharmacy: restrained teal, clear unit pricing, generous touch targets. */
#medicine-root { padding-bottom: 20px; }
.med-intro { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:30px 0 22px; }
.med-intro h1 { margin:6px 0 10px; }
.med-intro p:not(.eyebrow) { color:var(--muted); font-size:14px; }
.med-intro > .material-symbols-rounded { color:var(--teal); background:var(--teal-soft); width:64px; height:64px; flex-basis:64px; padding:18px; font-size:28px; border-radius:20px; }
.med-tabs { display:flex; border-bottom:1px solid var(--line); gap:22px; overflow:auto; }
.med-tabs a { flex-shrink:0; padding:12px 0; font-size:13px; color:var(--muted); border-bottom:3px solid transparent; }
.med-tabs a.active { color:var(--teal); border-bottom-color:var(--teal); font-weight:600; }
.med-notice { display:flex; align-items:flex-start; gap:10px; padding:15px 16px; margin:20px 0; background:var(--teal-soft); color:var(--teal); border-radius:12px; font-size:12px; line-height:1.85; }
.med-notice > .material-symbols-rounded { margin-top:2px; font-size:20px; }
.med-search { display:flex; align-items:center; gap:10px; border:1px solid var(--line); border-radius:12px; padding:5px 14px; background:var(--surface); }
.med-search .material-symbols-rounded { color:var(--muted); }
.med-search input { border:0; background:transparent; min-width:0; width:100%; min-height:44px; outline-offset:4px; font-size:14px; }
.med-hint { color:var(--muted); font-size:12px; line-height:1.85; margin-top:8px; }
.med-categories { display:flex; overflow-x:auto; gap:8px; margin:18px 0 10px; padding-bottom:5px; }
.med-categories button { border:1px solid var(--line); background:var(--background); padding:9px 15px; border-radius:24px; flex-shrink:0; min-height:44px; font-size:13px; }
.med-categories button[aria-pressed=true] { color:var(--teal); background:var(--teal-soft); border-color:var(--teal); font-weight:600; }
.med-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; margin-top:16px; }
.med-product { border:1px solid var(--line); border-radius:14px; overflow:hidden; background:var(--background); display:flex; flex-direction:column; }
.med-product-open { display:flex; flex-direction:column; border:0; width:100%; text-align:left; padding:0; background:transparent; flex:1; }
.med-placeholder,.med-product-image { display:flex; align-items:center; justify-content:center; flex-direction:column; gap:10px; width:100%; height:124px; background:var(--surface); color:var(--muted); object-fit:contain; }
.med-placeholder .material-symbols-rounded { color:var(--teal); font-size:34px; width:34px; height:34px; opacity:.65; }
.med-placeholder small { font-size:11px; }
.med-product-copy { padding:14px 14px 2px; display:flex; width:100%; align-items:flex-start; flex-direction:column; gap:6px; min-width:0; }
.med-product-copy > strong { font-size:16px; line-height:1.6; overflow-wrap:anywhere; }
.med-product-copy > small { color:var(--muted); font-size:12px; }
.med-badge { display:inline-block; background:var(--teal-soft); color:var(--teal); padding:2px 7px; border-radius:5px; font-size:10px; }
.med-badge.consult { background:var(--surface); color:var(--muted); }
.med-price { color:var(--teal); font-size:20px; font-weight:700; margin-top:6px; }
.med-price small { font-size:12px; color:var(--muted); font-weight:400; }
.med-product-bottom { padding:10px 14px 14px; }
.med-button { display:inline-flex; justify-content:center; align-items:center; gap:6px; min-height:44px; padding:10px 16px; border:1px solid var(--line); border-radius:9px; font:inherit; font-size:13px; line-height:1.65; background:var(--background); color:var(--teal); text-align:center; }
.med-button:hover { background:var(--teal-soft); }
.med-button.primary { background:var(--teal); border-color:var(--teal); color:var(--background); font-weight:600; }
.med-product-bottom .med-button { width:100%; background:var(--teal-soft); border-color:transparent; }
.med-button:disabled { opacity:.45; cursor:not-allowed; }
.med-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:18px; padding:42px 12px; grid-column:1/-1; color:var(--muted); }
.med-empty > .material-symbols-rounded { font-size:40px; height:40px; width:40px; color:var(--teal); }
.med-empty h2 { font-size:16px; }
.med-cart-dock { position:sticky; bottom:calc(76px + var(--bottom-inset)); display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 16px; border:1px solid var(--line); border-radius:14px; background:var(--background); box-shadow:0 5px 28px #0002; margin-top:24px; z-index:3; }
.med-cart-dock strong { display:block; color:var(--teal); font-size:22px; }.med-cart-dock small { display:block; font-size:11px; color:var(--muted); }
.med-line { display:flex; gap:14px; justify-content:space-between; padding:20px 0; border-bottom:1px solid var(--line); }
.med-line h2 { font-size:15px; }.med-line > div:first-child { min-width:0; }.med-line-right { text-align:right; display:flex; align-items:flex-end; flex-direction:column; gap:10px; flex-shrink:0; }
.med-line-right > strong { font-size:17px; color:var(--teal); }.med-line-right .med-button { font-size:12px; padding:5px 10px; }
.med-quantity { display:inline-flex; border:1px solid var(--line); border-radius:8px; margin-top:12px; overflow:hidden; }
.med-quantity button { width:44px; min-height:44px; border:0; background:var(--surface); }.med-quantity input { width:62px; height:44px; text-align:center; border:0; background:var(--background); font-size:14px; appearance:textfield; }.med-quantity input::-webkit-inner-spin-button { appearance:none; }
.med-total { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:22px; }.med-total strong { font-size:26px; color:var(--teal); }.med-total small { color:var(--muted); font-size:11px; }
.med-actions { display:flex; gap:12px; flex-wrap:wrap; margin:24px 0; }.med-actions > * { flex:1; }
.med-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; }.med-field { display:flex; flex-direction:column; gap:8px; font-size:13px; }.med-field.wide { grid-column:1/-1; }
.med-field input,.med-field textarea,.med-field select { width:100%; min-height:46px; padding:11px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--text); font:inherit; font-size:16px; }.med-field textarea { resize:vertical; }
.med-field :focus-visible,.med-quantity input:focus-visible,.med-search input:focus-visible { outline:2px solid var(--teal); outline-offset:2px; }
.med-consent { display:flex; align-items:flex-start; gap:12px; font-size:13px; padding:18px 0; margin-top:10px; }.med-consent input { margin-top:5px; width:20px; height:20px; flex-shrink:0; accent-color:var(--teal); }.med-consent a { text-decoration:underline; color:var(--teal); }
.med-section-title { margin:24px 0 18px; }.med-recipient { border:1px solid var(--line); border-radius:12px; padding:4px 16px; margin:18px 0; }.med-recipient > div { padding:12px 0; border-bottom:1px solid var(--line); }.med-recipient > div:last-child { border:0; }.med-recipient dt { color:var(--muted); font-size:12px; }.med-recipient dd { margin:4px 0 0; overflow-wrap:anywhere; white-space:pre-wrap; font-size:14px; }
.med-error,.med-banner { padding:14px 16px; border-radius:10px; background:var(--red-soft); color:var(--red); font-size:13px; margin:16px 0; overflow-wrap:anywhere; }
.med-dialog { border:1px solid var(--line); border-radius:18px; padding:24px; background:var(--background); color:var(--text); width:min(92vw,540px); max-height:85dvh; overflow-y:auto; }.med-dialog::backdrop { background:#102722a6; }.med-dialog-heading { display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; color:var(--muted); font-size:13px; }.med-dialog .large { height:160px; border-radius:12px; margin-bottom:18px; }.med-dialog h2 { margin-top:10px; font-size:22px; }.med-dialog > .med-button { width:100%; }
.med-receipt { text-align:center; padding:28px 12px 20px; }.med-receipt-mark { display:inline-flex; padding:12px; background:var(--teal-soft); color:var(--teal); border-radius:50%; margin-bottom:12px; }.med-receipt p { font-size:13px; color:var(--muted); margin:10px auto; max-width:480px; }.med-order-number { display:inline-block; padding:10px 16px; margin-top:6px; border:1px dashed var(--line); border-radius:8px; font-size:12px; }.med-order-number strong { display:block; font-size:17px; font-variant-numeric:tabular-nums; }
.med-status { background:var(--surface); padding:8px 16px; border-radius:12px; }.med-status > div { display:flex; justify-content:space-between; gap:20px; padding:8px 0; font-size:13px; }.med-status dt { color:var(--muted); flex-shrink:0; }.med-status dd { margin:0; text-align:right; }
.med-section-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:24px 0 10px; }.med-order { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid var(--line); padding:20px 0; }.med-order span:not(.material-symbols-rounded) { display:flex; flex-direction:column; min-width:0; gap:6px; }.med-order strong { font-size:13px; overflow-wrap:anywhere; }.med-order small { color:var(--muted); font-size:11px; }.med-order span:nth-child(2) { text-align:right; margin-left:auto; }
.med-staff { border-top:2px solid var(--teal); margin-top:26px; padding-top:22px; }.med-staff > .med-button { margin:16px 0; }.med-staff .med-field { margin-top:16px; }.med-history { padding-left:20px; }.med-history li { margin:16px 0; font-size:13px; }.med-history span,.med-history small { display:block; overflow-wrap:anywhere; white-space:pre-wrap; }.med-history small { color:var(--muted); }
@media(min-width:700px) { .med-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }.med-placeholder,.med-product-image { height:145px; }.med-cart-dock { max-width:480px; margin-left:auto; margin-right:auto; } }
@media(max-width:420px) { .med-intro > .material-symbols-rounded { display:none; }.med-grid { gap:10px; }.med-product-copy { padding:12px 10px 2px; }.med-product-bottom { padding:10px; }.med-product-copy > strong { font-size:14px; }.med-fields { grid-template-columns:minmax(0,1fr); }.med-tabs { gap:16px; }.med-dialog { padding:18px; }.med-placeholder,.med-product-image { height:110px; }.med-actions { gap:8px; }.med-button { padding:10px 12px; } }
@media(prefers-reduced-motion:no-preference) { .med-product { transition:border-color .18s,transform .18s; }.med-product:hover { border-color:var(--teal); transform:translateY(-2px); } }

.med-address-fields{border:0;padding:0;margin:0;min-width:0}.med-address-list{display:grid;gap:16px}.med-address-card{padding:20px;border:1px solid var(--line,#e3e9e7);border-radius:18px;background:#fff}.med-address-card h3{margin:0}.med-address-card .med-recipient{margin:12px 0}.med-section-heading .med-field{flex:1;min-width:0}.med-section-heading select{width:100%;max-width:100%}.med-tabs{overflow-x:auto}.med-tabs a{flex-shrink:0}

.med-image-note{display:block;width:100%;padding:7px 10px;background:var(--surface);color:var(--muted);font-size:11px;line-height:1.65;text-align:center}.med-dialog .med-image-note{border-radius:8px;margin-top:-12px;margin-bottom:16px}
