/* Tailwind utility styles used by the welcome page. */
/*! tailwindcss v4.0.7 | MIT License | https://tailwindcss.com */
@layer properties {@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}
@layer theme {:root,:host{--font-sans:"Instrument Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-serif:ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-red-50:oklch(97.1% .013 17.38);--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-50:oklch(98% .016 73.684);--color-orange-100:oklch(95.4% .038 75.164);--color-orange-200:oklch(90.1% .076 70.697);--color-orange-300:oklch(83.7% .128 66.29);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-orange-600:oklch(64.6% .222 41.116);--color-orange-700:oklch(55.3% .195 38.402);--color-orange-800:oklch(47% .157 37.304);--color-orange-900:oklch(40.8% .123 38.172);--color-orange-950:oklch(26.6% .079 36.259);--color-amber-50:oklch(98.7% .022 95.277);--color-amber-100:oklch(96.2% .059 95.617);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-600:oklch(66.6% .179 58.318);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-100:oklch(97.3% .071 103.193);--color-yellow-200:oklch(94.5% .129 101.54);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-700:oklch(55.4% .135 66.442);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-lime-50:oklch(98.6% .031 120.757);--color-lime-100:oklch(96.7% .067 122.328);--color-lime-200:oklch(93.8% .127 124.321);--color-lime-300:oklch(89.7% .196 126.665);--color-lime-400:oklch(84.1% .238 128.85);--color-lime-500:oklch(76.8% .233 130.85);--color-lime-600:oklch(64.8% .2 131.684);--color-lime-700:oklch(53.2% .157 131.589);--color-lime-800:oklch(45.3% .124 130.933);--color-lime-900:oklch(40.5% .101 131.063);--color-lime-950:oklch(27.4% .072 132.109);--color-green-50:oklch(98.2% .018 155.826);--color-green-100:oklch(96.2% .044 156.743);--color-green-200:oklch(92.5% .084 155.995);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-700:oklch(52.7% .154 150.069);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-green-950:oklch(26.6% .065 152.934);--color-emerald-50:oklch(97.9% .021 166.113);--color-emerald-100:oklch(95% .052 163.051);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-emerald-700:oklch(50.8% .118 165.612);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-emerald-950:oklch(26.2% .051 172.552);--color-teal-50:oklch(98.4% .014 180.72);--color-teal-100:oklch(95.3% .051 180.801);--color-teal-200:oklch(91% .096 180.426);--color-teal-300:oklch(85.5% .138 181.071);--color-teal-400:oklch(77.7% .152 181.912);--color-teal-500:oklch(70.4% .14 182.503);--color-teal-600:oklch(60% .118 184.704);--color-teal-700:oklch(51.1% .096 186.391);--color-teal-800:oklch(43.7% .078 188.216);--color-teal-900:oklch(38.6% .063 188.416);--color-teal-950:oklch(27.7% .046 192.524);--color-cyan-50:oklch(98.4% .019 200.873);--color-cyan-100:oklch(95.6% .045 203.388);--color-cyan-200:oklch(91.7% .08 205.041);--color-cyan-300:oklch(86.5% .127 207.078);--color-cyan-400:oklch(78.9% .154 211.53);--color-cyan-500:oklch(71.5% .143 215.221);--color-cyan-600:oklch(60.9% .126 221.723);--color-cyan-700:oklch(52% .105 223.128);--color-cyan-800:oklch(45% .085 224.283);--color-cyan-900:oklch(39.8% .07 227.392);--color-cyan-950:oklch(30.2% .056 229.695);--color-sky-50:oklch(97.7% .013 236.62);--color-sky-100:oklch(95.1% .026 236.824);--color-sky-200:oklch(90.1% .058 230.902);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-sky-700:oklch(50% .134 242.749);--color-sky-800:oklch(44.3% .11 240.79);--color-sky-900:oklch(39.1% .09 240.876);--color-sky-950:oklch(29.3% .066 243.157);--color-blue-50:oklch(97% .014 254.604);--color-blue-100:oklch(93.2% .032 255.585);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-blue-950:oklch(28.2% .091 267.935);--color-indigo-50:oklch(96.2% .018 272.314);--color-indigo-100:oklch(93% .034 272.788);--color-indigo-200:oklch(87% .065 274.039);--color-indigo-300:oklch(78.5% .115 274.713);--color-indigo-400:oklch(67.3% .182 276.935);--color-indigo-500:oklch(58.5% .233 277.117);--color-indigo-600:oklch(51.1% .262 276.966);--color-indigo-700:oklch(45.7% .24 277.023);--color-indigo-800:oklch(39.8% .195 277.366);--color-indigo-900:oklch(35.9% .144 278.697);--color-indigo-950:oklch(25.7% .09 281.288);--color-violet-50:oklch(96.9% .016 293.756);--color-violet-100:oklch(94.3% .029 294.588);--color-violet-200:oklch(89.4% .057 293.283);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-violet-500:oklch(60.6% .25 292.717);--color-violet-600:oklch(54.1% .281 293.009);--color-violet-700:oklch(49.1% .27 292.581);--color-violet-800:oklch(43.2% .232 292.759);--color-violet-900:oklch(38% .189 293.745);--color-violet-950:oklch(28.3% .141 291.089);--color-purple-50:oklch(97.7% .014 308.299);--color-purple-100:oklch(94.6% .033 307.174);--color-purple-200:oklch(90.2% .063 306.703);--color-purple-300:oklch(82.7% .119 306.383);--color-purple-400:oklch(71.4% .203 305.504);--color-purple-500:oklch(62.7% .265 303.9);--color-purple-600:oklch(55.8% .288 302.321);--color-purple-700:oklch(49.6% .265 301.924);--color-purple-800:oklch(43.8% .218 303.724);--color-purple-900:oklch(38.1% .176 304.987);--color-purple-950:oklch(29.1% .149 302.717);--color-fuchsia-50:oklch(97.7% .017 320.058);--color-fuchsia-100:oklch(95.2% .037 318.852);--color-fuchsia-200:oklch(90.3% .076 319.62);--color-fuchsia-300:oklch(83.3% .145 321.434);--color-fuchsia-400:oklch(74% .238 322.16);--color-fuchsia-500:oklch(66.7% .295 322.15);--color-fuchsia-600:oklch(59.1% .293 322.896);--color-fuchsia-700:oklch(51.8% .253 323.949);--color-fuchsia-800:oklch(45.2% .211 324.591);--color-fuchsia-900:oklch(40.1% .17 325.612);--color-fuchsia-950:oklch(29.3% .136 325.661);--color-pink-50:oklch(97.1% .014 343.198);--color-pink-100:oklch(94.8% .028 342.258);--color-pink-200:oklch(89.9% .061 343.231);--color-pink-300:oklch(82.3% .12 346.018);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-pink-600:oklch(59.2% .249 .584);--color-pink-700:oklch(52.5% .223 3.958);--color-pink-800:oklch(45.9% .187 3.815);--color-pink-900:oklch(40.8% .153 2.432);--color-pink-950:oklch(28.4% .109 3.907);--color-rose-50:oklch(96.9% .015 12.422);--color-rose-100:oklch(94.1% .03 12.58);--color-rose-200:oklch(89.2% .058 10.001);--color-rose-300:oklch(81% .117 11.638);--color-rose-400:oklch(71.2% .194 13.428);--color-rose-500:oklch(64.5% .246 16.439);--color-rose-600:oklch(58.6% .253 17.585);--color-rose-700:oklch(51.4% .222 16.935);--color-rose-800:oklch(45.5% .188 13.697);--color-rose-900:oklch(41% .159 10.272);--color-rose-950:oklch(27.1% .105 12.094);--color-slate-50:oklch(98.4% .003 247.858);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-gray-50:oklch(98.5% .002 247.839);--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-600:oklch(44.6% .03 256.802);--color-gray-700:oklch(37.3% .034 259.733);--color-gray-800:oklch(27.8% .033 256.848);--color-gray-900:oklch(21% .034 264.665);--color-gray-950:oklch(13% .028 261.692);--color-zinc-50:oklch(98.5% 0 0);--color-zinc-100:oklch(96.7% .001 286.375);--color-zinc-200:oklch(92% .004 286.32);--color-zinc-300:oklch(87.1% .006 286.286);--color-zinc-400:oklch(70.5% .015 286.067);--color-zinc-500:oklch(55.2% .016 285.938);--color-zinc-600:oklch(44.2% .017 285.786);--color-zinc-700:oklch(37% .013 285.805);--color-zinc-800:oklch(27.4% .006 286.033);--color-zinc-900:oklch(21% .006 285.885);--color-zinc-950:oklch(14.1% .005 285.823);--color-neutral-50:oklch(98.5% 0 0);--color-neutral-100:oklch(97% 0 0);--color-neutral-200:oklch(92.2% 0 0);--color-neutral-300:oklch(87% 0 0);--color-neutral-400:oklch(70.8% 0 0);--color-neutral-500:oklch(55.6% 0 0);--color-neutral-600:oklch(43.9% 0 0);--color-neutral-700:oklch(37.1% 0 0);--color-neutral-800:oklch(26.9% 0 0);--color-neutral-900:oklch(20.5% 0 0);--color-neutral-950:oklch(14.5% 0 0);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-stone-800:oklch(26.8% .007 34.298);--color-stone-900:oklch(21.6% .006 56.043);--color-stone-950:oklch(14.7% .004 49.25);--color-black:#000;--color-white:#fff;--spacing:.25rem;--breakpoint-sm:40rem;--breakpoint-md:48rem;--breakpoint-lg:64rem;--breakpoint-xl:80rem;--breakpoint-2xl:96rem;--container-3xs:16rem;--container-2xs:18rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--text-7xl:4.5rem;--text-7xl--line-height:1;--text-8xl:6rem;--text-8xl--line-height:1;--text-9xl:8rem;--text-9xl--line-height:1;--font-weight-thin:100;--font-weight-extralight:200;--font-weight-light:300;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-normal:0em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--leading-loose:2;--radius-xs:.125rem;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--radius-4xl:2rem;--shadow-2xs:0 1px #0000000d;--shadow-xs:0 1px 2px 0 #0000000d;--shadow-sm:0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;--shadow-md:0 4px 6px -1px #0000001a, 0 2px 4px -2px #0000001a;--shadow-lg:0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--shadow-xl:0 20px 25px -5px #0000001a, 0 8px 10px -6px #0000001a;--shadow-2xl:0 25px 50px -12px #00000040;--inset-shadow-2xs:inset 0 1px #0000000d;--inset-shadow-xs:inset 0 1px 1px #0000000d;--inset-shadow-sm:inset 0 2px 4px #0000000d;--drop-shadow-xs:0 1px 1px #0000000d;--drop-shadow-sm:0 1px 2px #00000026;--drop-shadow-md:0 3px 3px #0000001f;--drop-shadow-lg:0 4px 4px #00000026;--drop-shadow-xl:0 9px 7px #0000001a;--drop-shadow-2xl:0 25px 25px #00000026;--ease-in:cubic-bezier(.4, 0, 1, 1);--ease-out:cubic-bezier(0, 0, .2, 1);--ease-in-out:cubic-bezier(.4, 0, .2, 1);--animate-spin:spin 1s linear infinite;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--animate-bounce:bounce 1s infinite;--blur-xs:4px;--blur-sm:8px;--blur-md:12px;--blur-lg:16px;--blur-xl:24px;--blur-2xl:40px;--blur-3xl:64px;--perspective-dramatic:100px;--perspective-near:300px;--perspective-normal:500px;--perspective-midrange:800px;--perspective-distant:1200px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}
@layer base {*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}
@layer components;
@layer utilities {.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.right-0{right:calc(var(--spacing) * 0)}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.-mt-\[6\.6rem\]{margin-top:-6.6rem}.-mt-px{margin-top:-1px}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mr-2{margin-right:calc(var(--spacing) * 2)}.-mb-px{margin-bottom:-1px}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.-ml-8{margin-left:calc(var(--spacing) * -8)}.-ml-px{margin-left:-1px}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-4{margin-left:calc(var(--spacing) * 4)}.ml-12{margin-left:calc(var(--spacing) * 12)}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[335\/364\]{aspect-ratio:335/364}.h-1{height:calc(var(--spacing) * 1)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-5{height:calc(var(--spacing) * 5)}.h-8{height:calc(var(--spacing) * 8)}.h-14{height:calc(var(--spacing) * 14)}.h-14\.5{height:calc(var(--spacing) * 14.5)}.h-16{height:calc(var(--spacing) * 16)}.min-h-screen{min-height:100vh}.w-1{width:calc(var(--spacing) * 1)}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-5{width:calc(var(--spacing) * 5)}.w-8{width:calc(var(--spacing) * 8)}.w-\[438px\]{width:438px}.w-auto{width:auto}.w-full{width:100%}.max-w-6xl{max-width:var(--container-6xl)}.max-w-\[335px\]{max-width:335px}.max-w-none{max-width:none}.max-w-xl{max-width:var(--container-xl)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.translate-y-0{--tw-translate-y:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-default{cursor:default}.cursor-not-allowed{cursor:not-allowed}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-items-center{justify-items:center}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 1) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-x-reverse)))}.overflow-hidden{overflow:hidden}.rounded-full{border-radius:3.40282e38px}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.rounded-l-md{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.rounded-r-md{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}.rounded-br-lg{border-bottom-right-radius:var(--radius-lg)}.rounded-bl-lg{border-bottom-left-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-\[\#19140035\]{border-color:#19140035}.border-\[\#e3e3e0\]{border-color:#e3e3e0}.border-black{border-color:var(--color-black)}.border-gray-200{border-color:var(--color-gray-200)}.border-gray-300{border-color:var(--color-gray-300)}.border-gray-400{border-color:var(--color-gray-400)}.border-transparent{border-color:#0000}.bg-\[\#1b1b18\]{background-color:#1b1b18}.bg-\[\#FDFDFC\]{background-color:#fdfdfc}.bg-\[\#dbdbd7\]{background-color:#dbdbd7}.bg-\[\#fff2f2\]{background-color:#fff2f2}.bg-gray-100{background-color:var(--color-gray-100)}.bg-gray-200{background-color:var(--color-gray-200)}.bg-white{background-color:var(--color-white)}.p-6{padding:calc(var(--spacing) * 6)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-4{padding-block:calc(var(--spacing) * 4)}.pt-8{padding-top:calc(var(--spacing) * 8)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-12{padding-bottom:calc(var(--spacing) * 12)}.text-center{text-align:center}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\[13px\]{font-size:13px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-7{--tw-leading:calc(var(--spacing) * 7);line-height:calc(var(--spacing) * 7)}.leading-\[20px\]{--tw-leading:20px;line-height:20px}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.text-\[\#1B1B18\],.text-\[\#1b1b18\]{color:#1b1b18}.text-\[\#706f6c\]{color:#706f6c}.text-\[\#F3BEC7\]{color:#f3bec7}.text-\[\#F8B803\]{color:#f8b803}.text-\[\#F53003\],.text-\[\#f53003\]{color:#f53003}.text-gray-200{color:var(--color-gray-200)}.text-gray-300{color:var(--color-gray-300)}.text-gray-400{color:var(--color-gray-400)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-gray-700{color:var(--color-gray-700)}.text-gray-800{color:var(--color-gray-800)}.text-gray-900{color:var(--color-gray-900)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-100{opacity:1}.mix-blend-color{mix-blend-mode:color}.mix-blend-darken{mix-blend-mode:darken}.mix-blend-hard-light{mix-blend-mode:hard-light}.mix-blend-multiply{mix-blend-mode:multiply}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0px_0px_1px_0px_rgba\(0\,0\,0\,0\.03\)\,0px_1px_2px_0px_rgba\(0\,0\,0\,0\.06\)\]{--tw-shadow:0px 0px 1px 0px var(--tw-shadow-color,#00000008), 0px 1px 2px 0px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0px_0px_0px_1px_rgba\(26\,26\,0\,0\.16\)\]{--tw-shadow:inset 0px 0px 0px 1px var(--tw-shadow-color,#1a1a0029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-gray-300{--tw-ring-color:var(--color-gray-300)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.delay-200{transition-delay:.2s}.delay-300{transition-delay:.3s}.delay-400{transition-delay:.4s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-750{--tw-duration:.75s;transition-duration:.75s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.\[--stroke-color\:\#1B1B18\]{--stroke-color:#1b1b18}.not-has-\[nav\]\:hidden:not(:has(:is(nav))){display:none}.before\:absolute:before{content:var(--tw-content);position:absolute}.before\:top-0:before{content:var(--tw-content);top:calc(var(--spacing) * 0)}.before\:top-1\/2:before{content:var(--tw-content);top:50%}.before\:bottom-0:before{content:var(--tw-content);bottom:calc(var(--spacing) * 0)}.before\:bottom-1\/2:before{content:var(--tw-content);bottom:50%}.before\:left-\[0\.4rem\]:before{content:var(--tw-content);left:.4rem}.before\:border-l:before{content:var(--tw-content);border-left-style:var(--tw-border-style);border-left-width:1px}.before\:border-\[\#e3e3e0\]:before{content:var(--tw-content);border-color:#e3e3e0}@media(hover:hover){.hover\:border-\[\#1915014a\]:hover{border-color:#1915014a}.hover\:border-\[\#19140035\]:hover{border-color:#19140035}.hover\:border-black:hover{border-color:var(--color-black)}.hover\:bg-black:hover{background-color:var(--color-black)}.hover\:bg-gray-100:hover{background-color:var(--color-gray-100)}.hover\:text-gray-400:hover{color:var(--color-gray-400)}.hover\:text-gray-700:hover{color:var(--color-gray-700)}}.focus\:border-blue-300:focus{border-color:var(--color-blue-300)}.focus\:ring:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.active\:bg-gray-100:active{background-color:var(--color-gray-100)}.active\:text-gray-500:active{color:var(--color-gray-500)}.active\:text-gray-700:active{color:var(--color-gray-700)}.active\:text-gray-800:active{color:var(--color-gray-800)}@media(min-width:40rem){.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:flex-1{flex:1}.sm\:items-center{align-items:center}.sm\:justify-between{justify-content:space-between}.sm\:justify-start{justify-content:flex-start}.sm\:gap-2{gap:calc(var(--spacing) * 2)}.sm\:px-6{padding-inline:calc(var(--spacing) * 6)}.sm\:pt-0{padding-top:calc(var(--spacing) * 0)}}@media(min-width:64rem){.lg\:mt-10{margin-top:calc(var(--spacing) * 10)}.lg\:mb-0{margin-bottom:calc(var(--spacing) * 0)}.lg\:mb-6{margin-bottom:calc(var(--spacing) * 6)}.lg\:-ml-px{margin-left:-1px}.lg\:ml-0{margin-left:calc(var(--spacing) * 0)}.lg\:block{display:block}.lg\:aspect-auto{aspect-ratio:auto}.lg\:w-\[438px\]{width:438px}.lg\:max-w-4xl{max-width:var(--container-4xl)}.lg\:grow{flex-grow:1}.lg\:flex-row{flex-direction:row}.lg\:justify-center{justify-content:center}.lg\:rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.lg\:rounded-tl-lg{border-top-left-radius:var(--radius-lg)}.lg\:rounded-r-lg{border-top-right-radius:var(--radius-lg);border-bottom-right-radius:var(--radius-lg)}.lg\:rounded-br-none{border-bottom-right-radius:0}.lg\:p-8{padding:calc(var(--spacing) * 8)}.lg\:p-20{padding:calc(var(--spacing) * 20)}.lg\:px-8{padding-inline:calc(var(--spacing) * 8)}.lg\:pb-10{padding-bottom:calc(var(--spacing) * 10)}}.rtl\:flex-row-reverse:where(:dir(rtl),[dir=rtl],[dir=rtl] *){flex-direction:row-reverse}@media(prefers-color-scheme:dark){.dark\:border-\[\#3E3E3A\]{border-color:#3e3e3a}.dark\:border-\[\#eeeeec\]{border-color:#eeeeec}.dark\:border-gray-600{border-color:var(--color-gray-600)}.dark\:bg-\[\#0a0a0a\]{background-color:#0a0a0a}.dark\:bg-\[\#1D0002\]{background-color:#1d0002}.dark\:bg-\[\#3E3E3A\]{background-color:#3e3e3a}.dark\:bg-\[\#161615\]{background-color:#161615}.dark\:bg-\[\#eeeeec\]{background-color:#eeeeec}.dark\:bg-gray-700{background-color:var(--color-gray-700)}.dark\:bg-gray-800{background-color:var(--color-gray-800)}.dark\:bg-gray-900{background-color:var(--color-gray-900)}.dark\:text-\[\#1C1C1A\]{color:#1c1c1a}.dark\:text-\[\#4B0600\]{color:#4b0600}.dark\:text-\[\#391800\]{color:#391800}.dark\:text-\[\#733000\]{color:#733000}.dark\:text-\[\#A1A09A\]{color:#a1a09a}.dark\:text-\[\#EDEDEC\]{color:#ededec}.dark\:text-\[\#F61500\]{color:#f61500}.dark\:text-\[\#FF4433\]{color:#f43}.dark\:text-black{color:var(--color-black)}.dark\:text-gray-200{color:var(--color-gray-200)}.dark\:text-gray-300{color:var(--color-gray-300)}.dark\:text-gray-400{color:var(--color-gray-400)}.dark\:text-gray-600{color:var(--color-gray-600)}.dark\:mix-blend-hard-light{mix-blend-mode:hard-light}.dark\:mix-blend-normal{mix-blend-mode:normal}.dark\:shadow-\[inset_0px_0px_0px_1px_\#fffaed2d\]{--tw-shadow:inset 0px 0px 0px 1px var(--tw-shadow-color,#fffaed2d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.dark\:\[--stroke-color\:\#FF750F\]{--stroke-color:#ff750f}.dark\:before\:border-\[\#3E3E3A\]:before{content:var(--tw-content);border-color:#3e3e3a}@media(hover:hover){.dark\:hover\:border-\[\#3E3E3A\]:hover{border-color:#3e3e3a}.dark\:hover\:border-\[\#62605b\]:hover{border-color:#62605b}.dark\:hover\:border-white:hover{border-color:var(--color-white)}.dark\:hover\:bg-gray-900:hover{background-color:var(--color-gray-900)}.dark\:hover\:bg-white:hover{background-color:var(--color-white)}.dark\:hover\:text-gray-200:hover{color:var(--color-gray-200)}.dark\:hover\:text-gray-300:hover{color:var(--color-gray-300)}}.dark\:focus\:border-blue-700:focus{border-color:var(--color-blue-700)}.dark\:focus\:border-blue-800:focus{border-color:var(--color-blue-800)}.dark\:active\:bg-gray-700:active{background-color:var(--color-gray-700)}.dark\:active\:text-gray-300:active{color:var(--color-gray-300)}}@starting-style{.starting\:opacity-0{opacity:0}}@media(prefers-reduced-motion:no-preference){@starting-style{.motion-safe\:starting\:-translate-x-\[26px\]{--tw-translate-x: -26px ;translate:var(--tw-translate-x) var(--tw-translate-y)}}@starting-style{.motion-safe\:starting\:-translate-x-\[51px\]{--tw-translate-x: -51px ;translate:var(--tw-translate-x) var(--tw-translate-y)}}@starting-style{.motion-safe\:starting\:-translate-x-\[78px\]{--tw-translate-x: -78px ;translate:var(--tw-translate-x) var(--tw-translate-y)}}@starting-style{.motion-safe\:starting\:-translate-x-\[102px\]{--tw-translate-x: -102px ;translate:var(--tw-translate-x) var(--tw-translate-y)}}@starting-style{.motion-safe\:starting\:translate-y-6{--tw-translate-y:calc(var(--spacing) * 6);translate:var(--tw-translate-x) var(--tw-translate-y)}}}}
@property --tw-translate-x {syntax:"*";inherits:false;initial-value:0}
@property --tw-translate-y {syntax:"*";inherits:false;initial-value:0}
@property --tw-translate-z {syntax:"*";inherits:false;initial-value:0}
@property --tw-rotate-x {syntax:"*";inherits:false}
@property --tw-rotate-y {syntax:"*";inherits:false}
@property --tw-rotate-z {syntax:"*";inherits:false}
@property --tw-skew-x {syntax:"*";inherits:false}
@property --tw-skew-y {syntax:"*";inherits:false}
@property --tw-space-x-reverse {syntax:"*";inherits:false;initial-value:0}
@property --tw-border-style {syntax:"*";inherits:false;initial-value:solid}
@property --tw-leading {syntax:"*";inherits:false}
@property --tw-font-weight {syntax:"*";inherits:false}
@property --tw-tracking {syntax:"*";inherits:false}
@property --tw-shadow {syntax:"*";inherits:false;initial-value:0 0 #0000}
@property --tw-shadow-color {syntax:"*";inherits:false}
@property --tw-shadow-alpha {syntax:"<percentage>";inherits:false;initial-value:100%}
@property --tw-inset-shadow {syntax:"*";inherits:false;initial-value:0 0 #0000}
@property --tw-inset-shadow-color {syntax:"*";inherits:false}
@property --tw-inset-shadow-alpha {syntax:"<percentage>";inherits:false;initial-value:100%}
@property --tw-ring-color {syntax:"*";inherits:false}
@property --tw-ring-shadow {syntax:"*";inherits:false;initial-value:0 0 #0000}
@property --tw-inset-ring-color {syntax:"*";inherits:false}
@property --tw-inset-ring-shadow {syntax:"*";inherits:false;initial-value:0 0 #0000}
@property --tw-ring-inset {syntax:"*";inherits:false}
@property --tw-ring-offset-width {syntax:"<length>";inherits:false;initial-value:0}
@property --tw-ring-offset-color {syntax:"*";inherits:false;initial-value:#fff}
@property --tw-ring-offset-shadow {syntax:"*";inherits:false;initial-value:0 0 #0000}
@property --tw-blur {syntax:"*";inherits:false}
@property --tw-brightness {syntax:"*";inherits:false}
@property --tw-contrast {syntax:"*";inherits:false}
@property --tw-grayscale {syntax:"*";inherits:false}
@property --tw-hue-rotate {syntax:"*";inherits:false}
@property --tw-invert {syntax:"*";inherits:false}
@property --tw-opacity {syntax:"*";inherits:false}
@property --tw-saturate {syntax:"*";inherits:false}
@property --tw-sepia {syntax:"*";inherits:false}
@property --tw-drop-shadow {syntax:"*";inherits:false}
@property --tw-drop-shadow-color {syntax:"*";inherits:false}
@property --tw-drop-shadow-alpha {syntax:"<percentage>";inherits:false;initial-value:100%}
@property --tw-drop-shadow-size {syntax:"*";inherits:false}
@property --tw-duration {syntax:"*";inherits:false}
@property --tw-ease {syntax:"*";inherits:false}
@property --tw-content {syntax:"*";inherits:false;initial-value:""}
@keyframes spin {to{transform:rotate(360deg)}}
@keyframes ping {75%,to{opacity:0;transform:scale(2)}}
@keyframes pulse {50%{opacity:.5}}
@keyframes bounce {0%,to{animation-timing-function:cubic-bezier(.8,0,1,1);transform:translateY(-25%)}50%{animation-timing-function:cubic-bezier(0,0,.2,1);transform:none}}
/* VitalOS shared application styles. */
:root {
    color-scheme: light;
    --hospital-font: "Inter", "Segoe UI", Arial, sans-serif;
    --hospital-display: "Inter", "Segoe UI", Arial, sans-serif;
    --hospital-blue-900: #0d3f9f;
    --hospital-blue-700: #1565d8;
    --hospital-blue-500: #21b7ff;
    --hospital-green-600: #1fc84d;
    --hospital-green-400: #8ff227;
    --hospital-orange-600: #ff5f31;
    --hospital-orange-500: #ff7a36;
    --hospital-ink: #10264a;
    --hospital-slate: #607089;
    --hospital-surface: #ffffff;
    --hospital-soft: #f6f9ff;
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #06173d 0%, #04112d 100%);
    color: #eaf2ff;
    font-family: var(--hospital-font);
}
a {
    color: inherit;
}
@keyframes hospital-rise {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
body.hospital-auth-body,
body.hospital-dashboard-body {
    position: relative;
    min-height: 100dvh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(33, 183, 255, 0.22), transparent 34%),
        radial-gradient(circle at 86% 18%, rgba(143, 242, 39, 0.18), transparent 28%),
        linear-gradient(150deg, #f8fbff 0%, #eef5ff 55%, #f6fbf7 100%);
    color: var(--hospital-ink);
}
body.hospital-auth-body::before,
body.hospital-auth-body::after,
body.hospital-dashboard-body::before,
body.hospital-dashboard-body::after {
    content: "";
    position: fixed;
    z-index: 0;
    pointer-events: none;
    filter: blur(10px);
}
body.hospital-auth-body::before,
body.hospital-dashboard-body::before {
    left: -120px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border-radius: 42% 58% 58% 42%;
    background: linear-gradient(135deg, rgba(21, 101, 216, 0.24), rgba(33, 183, 255, 0.12));
}
body.hospital-auth-body::after,
body.hospital-dashboard-body::after {
    top: 40px;
    right: -60px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(143, 242, 39, 0.18), rgba(255, 95, 49, 0.12));
}
.hospital-page {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vw, 24px) 16px;
}
.hospital-shell {
    width: min(1180px, 100%);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 32px 90px rgba(14, 44, 103, 0.18);
    backdrop-filter: blur(20px);
    animation: hospital-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hospital-shell-grid {
    display: grid;
}
@media (min-width: 1024px) {
    body.hospital-auth-body {
        overflow: hidden;
    }
    body.hospital-dashboard-body {
        overflow: hidden;
    }
    .hospital-page {
        padding-block: 16px;
    }
    .hospital-shell {
        height: min(820px, calc(100dvh - 32px));
    }
    .hospital-shell-grid {
        height: 100%;
        grid-template-columns: 1.08fr 0.92fr;
    }
}
.hospital-hero,
.hospital-form-panel {
    min-height: 100%;
    padding: clamp(22px, 3vw, 44px);
}
.hospital-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 2.5vh, 32px);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0) 34%),
        linear-gradient(135deg, #0c4bc1 0%, #1587e3 54%, #2ad25b 100%);
    color: #fff;
}
.hospital-hero::before,
.hospital-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}
.hospital-hero::before {
    right: -90px;
    bottom: -150px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 68%);
}
.hospital-hero::after {
    top: 26px;
    right: 26px;
    width: 150px;
    height: 150px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
    transform: rotate(24deg);
}
.hospital-hero-top,
.hospital-hero-card {
    position: relative;
    z-index: 1;
}
.hospital-hero-top {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.hospital-lockup {
    width: min(100%, 620px);
    margin-inline: auto;
}
.hospital-logo-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 26px 52px rgba(7, 37, 97, 0.16);
}
.hospital-hero h1,
.hospital-dashboard-title {
    margin: 18px 0 0;
    line-height: 1;
    font-family: var(--hospital-display);
    font-size: clamp(1.85rem, 3.6vw, 2.8rem);
}
.hospital-hero h1 {
    max-width: 12ch;
    color: #fff;
}
.hospital-hero p,
.hospital-form-panel p,
.hospital-dashboard p {
    line-height: 1.6;
}
.hospital-copy {
    margin-top: 16px;
    max-width: 30rem;
    margin-inline: auto;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--fs-lg);
    text-align: center;
}
.hospital-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.hospital-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    font-size: var(--fs-sm);
    font-weight: 600;
}
.hospital-chip--green {
    background: rgba(77, 234, 94, 0.16);
}
.hospital-chip--orange {
    background: rgba(255, 122, 54, 0.16);
}
.hospital-hero-card {
    padding: 22px;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.1));
    box-shadow: 0 24px 40px rgba(4, 24, 67, 0.16);
    animation: hospital-rise 0.8s ease 0.08s both;
}
.hospital-card-title {
    margin: 0 0 14px;
    font-size: var(--fs-lg);
    font-weight: 600;
}
.hospital-steps {
    display: grid;
    gap: 12px;
}
.hospital-step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: flex-start;
}
.hospital-step-index {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    font-family: var(--hospital-display);
    font-weight: 600;
    font-size: var(--fs-md);
}
.hospital-step strong {
    display: block;
    margin-bottom: 2px;
    font-size: var(--fs-md);
}
.hospital-step p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: var(--fs-md);
}
.hospital-form-panel {
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.96));
}
.hospital-form-shell {
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: clamp(18px, 2.4vw, 28px);
    border-radius: 28px;
    border: 1px solid rgba(13, 63, 159, 0.08);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 24px 44px rgba(16, 38, 74, 0.08);
    animation: hospital-rise 0.8s ease 0.14s both;
}
.hospital-form-eyebrow {
    display: inline-flex;
    align-items: center;
    margin: 0 0 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(21, 101, 216, 0.08);
    color: var(--hospital-blue-900);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}
.hospital-form-shell h2 {
    margin: 0;
    font-size: var(--fs-xl);
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
}
.hospital-subtle {
    margin-top: 6px;
    color: var(--hospital-slate);
}
.hospital-alert {
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: var(--fs-md);
}
.hospital-alert--success {
    border: 1px solid rgba(31, 200, 77, 0.28);
    background: rgba(31, 200, 77, 0.1);
    color: #136c31;
}
.hospital-alert--danger {
    border: 1px solid rgba(255, 95, 49, 0.28);
    background: rgba(255, 95, 49, 0.1);
    color: #b3391d;
}
.hospital-alert--spaced {
    margin-top: 0;
    margin-bottom: 24px;
}
.hospital-form {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hospital-form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hospital-field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: var(--fs-md);
    font-weight: 600;
    color: var(--hospital-ink);
}
.hospital-field-hint {
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--hospital-slate);
}
.hospital-required-star {
    margin-left: 2px;
    color: #d94722;
    font-weight: 600;
}
.hospital-field--full {
    grid-column: 1 / -1;
}
.hospital-detail-pair-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hospital-detail-number-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.doctor-fee-pair {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hospital-input {
    width: 100%;
    padding: 13px 15px;
    border-radius: 16px;
    border: 1px solid rgba(96, 112, 137, 0.24);
    background: #f7fbff;
    color: var(--hospital-ink);
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.hospital-input::placeholder {
    color: #8b99ad;
}
.hospital-input:focus {
    background: #fff;
    border-color: rgba(21, 101, 216, 0.64);
    box-shadow: 0 0 0 4px rgba(33, 183, 255, 0.16), 0 12px 24px rgba(21, 101, 216, 0.08);
    transform: translateY(-1px);
}
.hospital-input--invalid {
    border-color: rgba(255, 95, 49, 0.5);
    background: #fff8f7;
}
.hospital-error {
    margin-top: 8px;
    color: #d94722;
    font-size: var(--fs-md);
    font-weight: 600;
}
.hospital-button {
    width: 100%;
    padding: 13px 18px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--hospital-orange-500), var(--hospital-orange-600));
    color: #fff;
    font-size: var(--fs-lg);
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 18px 30px rgba(255, 95, 49, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.hospital-button:hover {
    transform: translateY(-2px);
    filter: saturate(1.04);
    box-shadow: 0 22px 34px rgba(255, 95, 49, 0.3);
}
.hospital-button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.hospital-button--compact {
    width: auto;
    min-width: 132px;
    align-self: end;
}
.hospital-button--secondary {
    background: rgba(21, 101, 216, 0.1);
    color: var(--hospital-blue-900);
    box-shadow: none;
}
.hospital-button--secondary:hover {
    box-shadow: 0 14px 26px rgba(16, 38, 74, 0.08);
}
.hospital-button:focus-visible {
    outline: 3px solid rgba(21, 101, 216, 0.2);
    outline-offset: 3px;
}
.hospital-support-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(96, 112, 137, 0.14);
    color: var(--hospital-slate);
    font-size: var(--fs-md);
}
.hospital-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    flex-shrink: 0;
    padding: 4px 12px;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-align: center;
}
.hospital-footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
}
.hospital-footer-copy {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    line-height: 1.15;
}
.hospital-footer-version {
    grid-column: 3;
    justify-self: end;
    margin: 0;
    color: var(--hospital-slate);
    line-height: 1.15;
}
.hospital-footer strong {
    color: var(--hospital-blue-900);
    font-weight: 600;
}
.hospital-footer-divider {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: rgba(96, 112, 137, 0.38);
}
.hospital-footer--app {
    padding-top: 3px;
    padding-bottom: 3px;
    border-top: 1px solid rgba(96, 112, 137, 0.14);
    background: rgba(248, 251, 255, 0.86);
}
.hospital-footer--auth {
    padding-top: 0;
    padding-bottom: 6px;
}
.hospital-auth-body .hospital-page {
    flex-direction: column;
    gap: 8px;
}
.hospital-dashboard {
    position: relative;
    z-index: 1;
    min-height: 100dvh;
    height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    overflow: hidden;
}
.hospital-dashboard-shell {
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 32px 90px rgba(14, 44, 103, 0.16);
    backdrop-filter: blur(20px);
    animation: hospital-rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hospital-app-shell {
    min-height: 100dvh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hospital-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 8px 8px 7px;
    border-bottom: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(248, 251, 255, 0.92));
    flex-shrink: 0;
    /* Owner 02-11-2026: the user menu / bell opened from the header stay above the page (OP care's sticky section bar
       is z-index 30, its drawer 50, Amend 55). Kept below the access-note strip (61) and the full-screen pop-ups
       (.pw-modal 80, .prx-modal 90, .vx-pp 200…), which still cover the header. */
    position: relative;
    z-index: 58;
}
.hospital-app-hospital {
    min-width: 0;
}
.hospital-app-hospital-name {
    margin: 0;
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.15;
    word-break: break-word;
}
.hospital-user-menu {
    position: relative;
}
.hospital-user-menu summary {
    list-style: none;
}
.hospital-user-menu summary::-webkit-details-marker {
    display: none;
}
.hospital-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 10px;
    border: 1px solid rgba(21, 101, 216, 0.12);
    background: rgba(21, 101, 216, 0.08);
    box-shadow: 0 8px 16px rgba(16, 38, 74, 0.05);
    cursor: pointer;
    user-select: none;
}
.hospital-user-menu[open] .hospital-user-trigger {
    background: rgba(21, 101, 216, 0.12);
}
.hospital-user-avatar {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--hospital-blue-700), var(--hospital-green-600));
    color: #fff;
    font-family: var(--hospital-display);
    font-size: var(--fs-sm);
    font-weight: 600;
    box-shadow: 0 8px 16px rgba(14, 44, 103, 0.16);
    flex-shrink: 0;
}
.hospital-user-copy {
    min-width: 0;
    display: flex;
    align-items: center;
    min-height: 26px;
}
.hospital-user-copy strong {
    color: var(--hospital-ink);
    font-size: var(--fs-md);
    line-height: 1.2;
    white-space: nowrap;
}
.hospital-user-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: 184px;
    display: grid;
    gap: 4px;
    padding: 7px;
    border-radius: 13px;
    border: 1px solid rgba(96, 112, 137, 0.12);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 28px rgba(16, 38, 74, 0.1);
}
.hospital-user-panel form {
    margin: 0;
}
.hospital-user-action {
    display: flex;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--hospital-ink);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.hospital-user-action:hover {
    background: rgba(21, 101, 216, 0.08);
}
.hospital-user-action--danger {
    color: #d94722;
}
.hospital-user-action--danger:hover {
    background: rgba(255, 95, 49, 0.08);
}
.hospital-app-layout {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: 0;
    flex: 1;
    overflow: hidden;
}
.hospital-app-main {
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
}
.hospital-sidebar {
    padding: 12px 8px;
    border-right: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.72), rgba(243, 249, 255, 0.94));
    overflow: hidden;
}
.hospital-sidebar-brand {
    padding: 2px 2px 10px;
    border-bottom: 1px solid rgba(96, 112, 137, 0.14);
}
.hospital-sidebar-logo {
    display: block;
    width: min(100%, 126px);
    height: auto;
    margin: 0 auto;
}
.hospital-sidebar-nav {
    margin-top: 10px;
    display: grid;
    gap: 5px;
}
.hospital-sidebar-link {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    text-decoration: none;
    font-weight: 600;
    overflow-wrap: anywhere;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.hospital-sidebar-link:hover {
    background: rgba(21, 101, 216, 0.08);
    color: var(--hospital-blue-900);
    transform: translateX(2px);
}
/* Menu search: the menu ↑ / ↓ point at (owner 14-10-2026, keyboard rule). */
.hospital-sidebar-link--kbd {
    background: rgba(21, 101, 216, 0.16);
    color: var(--hospital-blue-900);
    box-shadow: inset 3px 0 0 #1565d8;
}
.hospital-sidebar-link--active {
    background: linear-gradient(135deg, rgba(21, 101, 216, 0.12), rgba(31, 200, 77, 0.12));
    color: var(--hospital-blue-900);
    box-shadow: inset 0 0 0 1px rgba(21, 101, 216, 0.08);
}
.hospital-sidebar-group {
    min-width: 0;
}
.hospital-sidebar-group summary {
    list-style: none;
}
.hospital-sidebar-group summary::-webkit-details-marker {
    display: none;
}
.hospital-sidebar-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 12px;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.hospital-sidebar-summary span {
    min-width: 0;
    overflow-wrap: anywhere;
}
.hospital-sidebar-summary::after {
    content: ">";
    margin-left: auto;
    font-size: var(--fs-xs);
    transition: transform 0.2s ease;
}
.hospital-sidebar-summary:hover {
    background: rgba(21, 101, 216, 0.08);
    color: var(--hospital-blue-900);
    transform: translateX(2px);
}
.hospital-sidebar-summary--active {
    background: linear-gradient(135deg, rgba(21, 101, 216, 0.12), rgba(31, 200, 77, 0.12));
    color: var(--hospital-blue-900);
    box-shadow: inset 0 0 0 1px rgba(21, 101, 216, 0.08);
}
.hospital-sidebar-group[open] .hospital-sidebar-summary::after {
    transform: rotate(90deg);
}
.hospital-sidebar-subnav {
    display: grid;
    gap: 4px;
    padding: 4px 0 1px 10px;
}
.hospital-sidebar-sublink {
    padding: 6px 8px;
    font-size: var(--fs-sm);
}
.hospital-sidebar-empty {
    margin: 0;
    padding: 12px;
    border-radius: 14px;
    background: rgba(96, 112, 137, 0.08);
    color: var(--hospital-slate);
    font-size: var(--fs-md);
    font-weight: 600;
    text-align: center;
}
.hospital-app-content {
    flex: 1;
    padding: 22px;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}
.hospital-page-heading {
    margin-bottom: 24px;
}
.hospital-dashboard-title {
    margin: 14px 0 0;
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    color: var(--hospital-ink);
}
.hospital-page-heading > .hospital-dashboard-title:first-child {
    margin-top: 0;
}
.hospital-dashboard-copy {
    max-width: 44rem;
    margin-top: 10px;
    color: var(--hospital-slate);
}
.hospital-card-grid {
    display: grid;
    gap: 18px;
}
@media (min-width: 768px) {
    .hospital-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.hospital-stat {
    padding: 22px;
    border-radius: 22px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 255, 0.98));
    box-shadow: 0 20px 38px rgba(16, 38, 74, 0.08);
}
.hospital-stat .label {
    color: var(--hospital-slate);
    font-size: var(--fs-md);
    font-weight: 600;
}
.hospital-stat .value {
    margin-top: 8px;
    color: var(--hospital-ink);
    font-size: var(--fs-xl);
    font-weight: 600;
    word-break: break-word;
}
.hospital-form-card {
    max-width: 720px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 255, 0.98));
    box-shadow: 0 20px 38px rgba(16, 38, 74, 0.08);
}
.hospital-form-card--wide {
    max-width: 980px;
}
.hospital-card-grid--compact {
    margin-bottom: 24px;
}
.hospital-form-actions {
    display: grid;
    grid-template-columns: minmax(120px, 0.32fr) minmax(0, 1fr);
    gap: 12px;
}
.hospital-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.hospital-meta-note {
    margin: 0;
    color: var(--hospital-slate);
    font-size: var(--fs-md);
    font-weight: 600;
}
.hospital-meta-note strong {
    color: var(--hospital-ink);
}
.hospital-meta-divider {
    display: inline-flex;
    margin-left: 14px;
    color: var(--hospital-slate);
}
.hospital-filter-form {
    max-width: 1080px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 18px;
}
.hospital-filter-form--doctor {
    grid-template-columns: minmax(220px, 1.1fr) minmax(190px, 0.9fr) auto auto;
}
.hospital-table-card {
    max-width: 1080px;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 255, 0.98));
    box-shadow: 0 20px 38px rgba(16, 38, 74, 0.08);
}
.hospital-table-card--wide {
    max-width: 1280px;
}
.hospital-table-scroll {
    overflow-x: auto;
}
.hospital-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    color: var(--hospital-ink);
}
.hospital-table--masters {
    min-width: 980px;
}
.hospital-table th,
.hospital-table td {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(96, 112, 137, 0.12);
    text-align: left;
    vertical-align: middle;
}
.hospital-table th {
    background: rgba(21, 101, 216, 0.06);
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}
.hospital-table tr:last-child td {
    border-bottom: 0;
}
.hospital-table td {
    font-size: var(--fs-md);
}
.hospital-table-action-heading {
    text-align: right;
}
.hospital-table-actions {
    display: flex;
    justify-content: flex-end;
}
.hospital-inline-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 8px 11px;
    border-radius: 12px;
    background: rgba(21, 101, 216, 0.08);
    color: var(--hospital-blue-900);
    font-size: var(--fs-md);
    font-weight: 600;
    text-decoration: none;
}
.hospital-inline-link:hover {
    background: rgba(21, 101, 216, 0.14);
}
.hospital-row-title {
    display: block;
    color: var(--hospital-ink);
    line-height: 1.35;
}
.hospital-row-meta {
    display: block;
    margin-top: 4px;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    line-height: 1.35;
}
.hospital-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
}
.hospital-status-badge--active {
    background: rgba(31, 200, 77, 0.12);
    color: #136c31;
}
.hospital-status-badge--inactive {
    background: rgba(96, 112, 137, 0.12);
    color: #55657a;
}
.hospital-table-empty {
    color: var(--hospital-slate);
    font-weight: 600;
    text-align: center;
}
.navigation-master-heading,
.department-master-heading,
.hospital-detail-heading,
.hospital-configuration-heading,
.doctor-master-heading,
.hospital-users-heading,
.user-access-heading,
.rate-card-master-heading,
.rate-type-master-heading,
.service-group-master-heading,
.service-master-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.navigation-master-heading .hospital-dashboard-title,
.department-master-heading .hospital-dashboard-title,
.hospital-detail-heading .hospital-dashboard-title,
.hospital-configuration-heading .hospital-dashboard-title,
.doctor-master-heading .hospital-dashboard-title,
.hospital-users-heading .hospital-dashboard-title,
.user-access-heading .hospital-dashboard-title,
.rate-card-master-heading .hospital-dashboard-title,
.rate-type-master-heading .hospital-dashboard-title,
.service-group-master-heading .hospital-dashboard-title,
.service-master-heading .hospital-dashboard-title {
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.15;
}
.navigation-master-counts,
.department-master-counts,
.doctor-master-counts,
.hospital-users-counts,
.rate-card-master-counts,
.rate-type-master-counts,
.service-group-master-counts,
.service-master-counts {
    flex: 0 0 auto;
    text-align: right;
    white-space: nowrap;
    font-size: var(--fs-sm);
}
.navigation-master-counts .hospital-meta-divider,
.department-master-counts .hospital-meta-divider,
.doctor-master-counts .hospital-meta-divider,
.hospital-users-counts .hospital-meta-divider,
.rate-card-master-counts .hospital-meta-divider,
.rate-type-master-counts .hospital-meta-divider,
.service-group-master-counts .hospital-meta-divider,
.service-master-counts .hospital-meta-divider {
    margin-left: 10px;
}
.navigation-master-filter .hospital-button--compact,
.department-master-filter .hospital-button--compact,
.doctor-master-filter .hospital-button--compact,
.hospital-users-add-user,
.rate-card-master-filter .hospital-button--compact,
.rate-type-master-filter .hospital-button--compact,
.service-group-master-filter .hospital-button--compact,
.service-master-filter .hospital-button--compact {
    min-width: 96px;
    padding: 9px 13px;
    border-radius: 13px;
    font-size: var(--fs-sm);
}
.navigation-master-filter,
.department-master-filter,
.rate-card-master-filter {
    grid-template-columns: minmax(220px, 560px) auto auto minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
}
.navigation-master-filter {
    max-width: 1280px;
}
.rate-card-master-filter {
    max-width: 1280px;
}
.department-master-filter {
    max-width: 1080px;
}
.doctor-master-filter,
.rate-type-master-filter,
.service-group-master-filter,
.service-master-filter {
    max-width: 1280px;
    grid-template-columns: minmax(200px, 420px) minmax(180px, 280px) auto auto minmax(0, 1fr) auto;
    gap: 10px;
    margin-bottom: 12px;
}
.navigation-master-add-menu,
.department-master-add-department,
.rate-card-master-add-rate-card {
    grid-column: 5;
    justify-self: end;
}
.doctor-master-add-doctor,
.rate-type-master-add-rate-type,
.service-group-master-add-service-group,
.service-master-add-service {
    grid-column: 6;
    justify-self: end;
}
.navigation-master-filter .hospital-field label,
.department-master-filter .hospital-field label,
.doctor-master-filter .hospital-field label,
.rate-card-master-filter .hospital-field label,
.rate-type-master-filter .hospital-field label,
.service-group-master-filter .hospital-field label,
.service-master-filter .hospital-field label {
    margin-bottom: 5px;
    font-size: var(--fs-sm);
}
.navigation-master-filter .hospital-field-hint,
.department-master-filter .hospital-field-hint,
.doctor-master-filter .hospital-field-hint,
.rate-card-master-filter .hospital-field-hint,
.rate-type-master-filter .hospital-field-hint,
.service-group-master-filter .hospital-field-hint,
.service-master-filter .hospital-field-hint {
    font-size: var(--fs-xs);
}
.navigation-master-filter .hospital-input,
.department-master-filter .hospital-input,
.doctor-master-filter .hospital-input,
.rate-card-master-filter .hospital-input,
.rate-type-master-filter .hospital-input,
.service-group-master-filter .hospital-input,
.service-master-filter .hospital-input {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: var(--fs-md);
}
.navigation-master-table-card,
.department-master-table-card,
.doctor-master-table-card,
.hospital-users-table-card,
.rate-card-master-table-card,
.rate-type-master-table-card,
.service-group-master-table-card,
.service-master-table-card {
    border-radius: 16px;
}
.navigation-master-table,
.department-master-table,
.doctor-master-table,
.rate-card-master-table,
.rate-type-master-table,
.service-group-master-table {
    min-width: 920px;
}
.service-master-table {
    min-width: 1080px;
}
.hospital-users-table {
    min-width: 720px;
}
.navigation-master-table th,
.navigation-master-table td,
.department-master-table th,
.department-master-table td,
.doctor-master-table th,
.doctor-master-table td,
.hospital-users-table th,
.hospital-users-table td,
.rate-card-master-table th,
.rate-card-master-table td,
.rate-type-master-table th,
.rate-type-master-table td,
.service-group-master-table th,
.service-group-master-table td,
.service-master-table th,
.service-master-table td {
    padding: 7px 10px;
}
.navigation-master-table th,
.department-master-table th,
.doctor-master-table th,
.hospital-users-table th,
.rate-card-master-table th,
.rate-type-master-table th,
.service-group-master-table th,
.service-master-table th {
    font-size: var(--fs-xs);
}
.navigation-master-table td,
.department-master-table td,
.doctor-master-table td,
.hospital-users-table td,
.rate-card-master-table td,
.rate-type-master-table td,
.service-group-master-table td,
.service-master-table td {
    font-size: var(--fs-sm);
}
.navigation-master-table .hospital-row-title,
.department-master-table .hospital-row-title,
.doctor-master-table .hospital-row-title,
.hospital-users-table strong,
.rate-card-master-table .hospital-row-title,
.rate-type-master-table .hospital-row-title,
.service-group-master-table .hospital-row-title,
.service-master-table .hospital-row-title {
    line-height: 1.25;
}
.navigation-master-table .hospital-row-meta,
.department-master-table .hospital-row-meta,
.doctor-master-table .hospital-row-meta,
.rate-card-master-table .hospital-row-meta,
.rate-type-master-table .hospital-row-meta,
.service-group-master-table .hospital-row-meta,
.service-master-table .hospital-row-meta {
    margin-top: 2px;
    font-size: var(--fs-xs);
    line-height: 1.25;
}
.navigation-master-table .hospital-status-badge,
.department-master-table .hospital-status-badge,
.doctor-master-table .hospital-status-badge,
.rate-card-master-table .hospital-status-badge,
.rate-type-master-table .hospital-status-badge,
.service-group-master-table .hospital-status-badge,
.service-master-table .hospital-status-badge {
    min-width: 66px;
    padding: 5px 8px;
    font-size: var(--fs-xs);
}
.navigation-master-table .hospital-inline-link,
.department-master-table .hospital-inline-link,
.doctor-master-table .hospital-inline-link,
.hospital-users-table .hospital-inline-link,
.rate-card-master-table .hospital-inline-link,
.rate-type-master-table .hospital-inline-link,
.service-group-master-table .hospital-inline-link,
.service-master-table .hospital-inline-link {
    min-width: 54px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: var(--fs-sm);
}
.navigation-master-form-card,
.department-master-form-card,
.hospital-detail-form-card,
.hospital-configuration-form-card,
.doctor-master-form-card,
.hospital-users-form-card,
.user-access-card,
.rate-card-master-form-card,
.rate-type-master-form-card,
.service-group-master-form-card,
.service-master-form-card {
    max-width: 980px;
    padding: 16px 18px;
    border-radius: 16px;
}
.hospital-users-form-card {
    max-width: 620px;
}
.navigation-master-form,
.department-master-form,
.hospital-detail-form,
.hospital-configuration-form,
.doctor-master-form,
.hospital-users-form,
.hospital-access-user-form,
.hospital-access-permission-form,
.rate-card-master-form,
.rate-type-master-form,
.service-group-master-form,
.service-master-form {
    margin-top: 0;
    gap: 10px;
}
.navigation-master-form .hospital-form-grid,
.department-master-form .hospital-form-grid,
.hospital-detail-form .hospital-form-grid,
.hospital-configuration-form .hospital-form-grid,
.doctor-master-form .hospital-form-grid,
.rate-card-master-form .hospital-form-grid,
.rate-type-master-form .hospital-form-grid,
.service-group-master-form .hospital-form-grid,
.service-master-form .hospital-form-grid {
    gap: 10px 12px;
}
.navigation-master-form .hospital-field label,
.department-master-form .hospital-field label,
.hospital-detail-form .hospital-field label,
.hospital-configuration-form .hospital-field label,
.doctor-master-form .hospital-field label,
.hospital-users-form .hospital-field label,
.user-access-card .hospital-field label,
.rate-card-master-form .hospital-field label,
.rate-type-master-form .hospital-field label,
.service-group-master-form .hospital-field label,
.service-master-form .hospital-field label {
    margin-bottom: 5px;
    font-size: var(--fs-sm);
}
.navigation-master-form .hospital-field-hint,
.department-master-form .hospital-field-hint,
.hospital-detail-form .hospital-field-hint,
.hospital-configuration-form .hospital-field-hint,
.doctor-master-form .hospital-field-hint,
.hospital-users-form .hospital-field-hint,
.user-access-card .hospital-field-hint,
.rate-card-master-form .hospital-field-hint,
.rate-type-master-form .hospital-field-hint,
.service-group-master-form .hospital-field-hint,
.service-master-form .hospital-field-hint {
    font-size: var(--fs-xs);
}
.navigation-master-form .hospital-input,
.department-master-form .hospital-input,
.hospital-detail-form .hospital-input,
.hospital-configuration-form .hospital-input,
.doctor-master-form .hospital-input,
.hospital-users-form .hospital-input,
.user-access-card .hospital-input,
.rate-card-master-form .hospital-input,
.rate-type-master-form .hospital-input,
.service-group-master-form .hospital-input,
.service-master-form .hospital-input {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: var(--fs-md);
}
.navigation-master-form .hospital-textarea,
.department-master-form .hospital-textarea,
.hospital-detail-form .hospital-textarea,
.doctor-master-form .hospital-textarea,
.rate-card-master-form .hospital-textarea,
.rate-type-master-form .hospital-textarea,
.service-group-master-form .hospital-textarea,
.service-master-form .hospital-textarea {
    min-height: 76px;
}
.navigation-master-form .hospital-error,
.department-master-form .hospital-error,
.hospital-detail-form .hospital-error,
.hospital-configuration-form .hospital-error,
.doctor-master-form .hospital-error,
.hospital-users-form .hospital-error,
.rate-card-master-form .hospital-error,
.rate-type-master-form .hospital-error,
.service-group-master-form .hospital-error,
.service-master-form .hospital-error {
    margin-top: 5px;
    font-size: var(--fs-sm);
}
.navigation-master-form-actions,
.department-master-form-actions,
.doctor-master-form-actions,
.hospital-users-form-actions,
.rate-card-master-form-actions,
.rate-type-master-form-actions,
.service-group-master-form-actions,
.service-master-form-actions {
    grid-template-columns: minmax(90px, 0.24fr) minmax(0, 1fr);
    gap: 10px;
}
.navigation-master-form-actions .hospital-button,
.department-master-form-actions .hospital-button,
.doctor-master-form-actions .hospital-button,
.hospital-users-form-actions .hospital-button,
.hospital-access-user-form .hospital-button--compact,
.hospital-access-save,
.rate-card-master-form-actions .hospital-button,
.rate-type-master-form-actions .hospital-button,
.service-group-master-form-actions .hospital-button,
.service-master-form-actions .hospital-button,
.hospital-detail-form > .hospital-button,
.hospital-configuration-form > .hospital-button {
    padding: 9px 13px;
    border-radius: 13px;
    font-size: var(--fs-sm);
}
.hospital-configuration-form {
    max-width: 980px;
}
.hospital-configuration-form-card h3 {
    margin: 0 0 10px;
    color: var(--hospital-ink);
    font-size: var(--fs-md);
}
.hospital-configuration-form > .hospital-field-hint {
    margin: 0;
}
.hospital-configuration-form-card > .hospital-field-hint {
    margin: 0 0 10px;
}
.hospital-configuration-form .hospital-field > .hospital-field-hint {
    display: block;
    margin: 5px 0 0;
    line-height: 1.4;
}
.hospital-configuration-form output.hospital-input {
    display: block;
    overflow-wrap: anywhere;
}
.doctor-master-form .hospital-day-grid {
    gap: 6px;
}
.doctor-master-form .hospital-day-option {
    min-height: 36px;
    padding: 7px 8px;
    border-radius: 11px;
    font-size: var(--fs-sm);
}
.doctor-master-form .hospital-day-option input,
.doctor-master-form .hospital-check-inline input {
    width: 14px;
    height: 14px;
}
.doctor-master-form .hospital-check-inline {
    gap: 7px;
    padding: 8px 10px;
    border-radius: 11px;
    font-size: var(--fs-sm);
}
.service-master-form .hospital-form-section {
    gap: 10px;
    margin-top: 2px;
    padding-top: 12px;
}
.service-master-form .hospital-form-section-header {
    gap: 10px;
}
.service-master-form .hospital-form-section-header h3 {
    font-size: var(--fs-md);
}
.service-master-form .hospital-form-section-header p {
    margin-top: 3px;
    font-size: var(--fs-sm);
}
.service-master-form .hospital-form-section-header .hospital-button--compact {
    min-width: 96px;
    padding: 9px 13px;
    border-radius: 13px;
    font-size: var(--fs-sm);
}
.service-master-form .hospital-rate-lines {
    gap: 8px;
}
.service-master-form .hospital-rate-row {
    --service-charge-control-height: 40px;
    gap: 8px;
    padding: 9px;
    border-radius: 13px;
}
.service-master-form .hospital-rate-row .hospital-input {
    height: var(--service-charge-control-height);
    min-height: var(--service-charge-control-height);
    padding-top: 8px;
    padding-bottom: 8px;
}
.service-master-form .hospital-rate-row-actions {
    min-height: 58px;
}
.service-master-form .hospital-rate-check {
    min-height: var(--service-charge-control-height);
}
.service-master-form .hospital-rate-remove {
    width: var(--service-charge-control-height);
    min-width: var(--service-charge-control-height);
    height: var(--service-charge-control-height);
    min-height: var(--service-charge-control-height);
    border-radius: 12px;
}
.hospital-detail-form .hospital-logo-panel {
    gap: 6px;
    margin-bottom: 8px;
    padding: 9px;
    border-radius: 14px;
}
.hospital-detail-form .hospital-logo-preview {
    max-height: 86px;
}
.hospital-detail-form .hospital-logo-note {
    font-size: var(--fs-xs);
}
.hospital-access-user-form {
    margin-top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}
.hospital-access-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(21, 101, 216, 0.1);
    background: rgba(21, 101, 216, 0.06);
}
.hospital-access-summary strong {
    display: block;
    margin-top: 2px;
    color: var(--hospital-ink);
    font-size: var(--fs-md);
}
.hospital-access-kicker {
    margin: 0;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}
.hospital-access-badge {
    flex-shrink: 0;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(31, 200, 77, 0.12);
    color: #136c31;
    font-size: var(--fs-xs);
    font-weight: 600;
}
.hospital-access-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hospital-access-tree {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hospital-access-group {
    display: grid;
    gap: 5px;
    align-content: start;
}
.hospital-access-submenus {
    display: grid;
    gap: 5px;
    margin-left: 12px;
    padding-left: 10px;
    border-left: 2px solid rgba(21, 101, 216, 0.14);
}
.hospital-access-submenus[hidden] {
    display: none;
}
.hospital-check-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 7px;
    align-items: flex-start;
    min-height: 44px;
    padding: 7px 10px;
    border-radius: 11px;
    border: 1px solid rgba(96, 112, 137, 0.16);
    background: rgba(255, 255, 255, 0.72);
    color: var(--hospital-ink);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.hospital-check-option:hover {
    border-color: rgba(21, 101, 216, 0.24);
    background: #fff;
    box-shadow: 0 14px 26px rgba(16, 38, 74, 0.08);
    transform: translateY(-1px);
}
.hospital-access-check-control {
    display: inline-flex;
    align-items: center;
    align-self: start;
    cursor: pointer;
}
.hospital-check-option input {
    width: 15px;
    height: 15px;
    margin-top: 1px;
    accent-color: var(--hospital-blue-700);
}
.hospital-check-option strong {
    display: block;
    font-size: var(--fs-sm);
}
.hospital-check-option small {
    display: block;
    margin-top: 3px;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    line-height: 1.3;
}
.hospital-check-option--main {
    min-height: 42px;
}
.hospital-check-option--toggle {
    grid-template-columns: auto minmax(0, 1fr) auto;
}
.hospital-check-option--toggle::after {
    content: ">";
    align-self: center;
    color: var(--hospital-blue-900);
    font-size: var(--fs-xs);
    font-weight: 600;
    transition: transform 0.2s ease;
}
.hospital-check-option--toggle[aria-expanded="true"]::after {
    transform: rotate(90deg);
}
.hospital-check-option--sub {
    min-height: 38px;
    padding: 6px 9px;
    background: rgba(246, 249, 255, 0.88);
}
.hospital-access-empty {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    border: 1px dashed rgba(96, 112, 137, 0.28);
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-align: center;
}
.hospital-textarea {
    min-height: 112px;
    resize: vertical;
}
.hospital-day-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}
.hospital-day-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(96, 112, 137, 0.18);
    background: rgba(255, 255, 255, 0.72);
    color: var(--hospital-ink);
    font-size: var(--fs-md);
    font-weight: 600;
    cursor: pointer;
}
.hospital-day-option:hover {
    border-color: rgba(21, 101, 216, 0.24);
    background: #fff;
}
.hospital-day-option input,
.hospital-check-inline input {
    width: 16px;
    height: 16px;
    accent-color: var(--hospital-blue-700);
}
.hospital-check-inline {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 0;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(96, 112, 137, 0.18);
    background: rgba(255, 255, 255, 0.72);
    color: var(--hospital-ink);
    cursor: pointer;
}
.hospital-form-section {
    display: grid;
    gap: 14px;
    margin-top: 8px;
    padding-top: 20px;
    border-top: 1px solid rgba(96, 112, 137, 0.14);
}
.hospital-form-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}
.hospital-form-section-header h3 {
    margin: 0;
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: var(--fs-lg);
}
.hospital-form-section-header p {
    margin: 5px 0 0;
    color: var(--hospital-slate);
    font-size: var(--fs-md);
}
.hospital-rate-lines {
    display: grid;
    gap: 12px;
}
.hospital-rate-row {
    display: grid;
    grid-template-columns:
        minmax(150px, 1.1fr)
        minmax(130px, 0.8fr)
        minmax(108px, 0.72fr)
        minmax(108px, 0.72fr)
        minmax(76px, 0.45fr)
        auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: rgba(246, 249, 255, 0.72);
}
.hospital-rate-row-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    min-height: 72px;
}
.hospital-rate-check {
    min-height: 46px;
}
.hospital-rate-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 14px;
    border: 0;
    color: #b42318;
    cursor: pointer;
}
.hospital-rate-remove svg {
    width: 18px;
    height: 18px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.hospital-rate-remove:hover {
    color: #8f1d14;
}
.hospital-logo-panel {
    display: inline-flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
    padding: 14px;
    border: 1px solid rgba(13, 63, 159, 0.08);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(246, 249, 255, 0.92), rgba(255, 255, 255, 0.92));
}
.hospital-logo-preview {
    display: block;
    max-width: min(240px, 100%);
    max-height: 120px;
    object-fit: contain;
}
.hospital-logo-note {
    margin: 0;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--hospital-slate);
}
.opd-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 6px;
}
.opd-page-heading .hospital-dashboard-title {
    margin-top: 0;
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.15;
}
.opd-page-heading .hospital-button--compact {
    min-width: 96px;
    padding: 9px 13px;
    border-radius: 13px;
    font-size: var(--fs-sm);
}
.opd-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}
.opd-eyebrow {
    margin: 0 0 5px;
    color: var(--hospital-blue-900);
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}
.opd-stat-grid {
    max-width: 1280px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.opd-stat {
    position: relative;
    overflow: hidden;
}
.opd-stat::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 18px;
    height: 4px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, var(--hospital-blue-700), var(--hospital-green-600), var(--hospital-orange-500));
}
.hospital-filter-form--opd {
    max-width: 1280px;
    grid-template-columns: minmax(200px, 420px) minmax(160px, 265px) minmax(150px, 245px) auto auto;
    gap: 10px;
    margin-bottom: 12px;
}
.hospital-filter-form--opd .hospital-field label {
    margin-bottom: 5px;
    font-size: var(--fs-sm);
}
.hospital-filter-form--opd .hospital-field-hint {
    font-size: var(--fs-xs);
}
.hospital-filter-form--opd .hospital-input {
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: var(--fs-md);
}
.hospital-filter-form--opd .hospital-button--compact {
    min-width: 96px;
    padding: 9px 13px;
    border-radius: 13px;
    font-size: var(--fs-sm);
}
.opd-registration-table-card {
    border-radius: 16px;
}
.opd-table-scroll {
    overflow-x: hidden;
}
.hospital-table--opd {
    min-width: 0;
    table-layout: fixed;
}
.hospital-table--opd th,
.hospital-table--opd td {
    padding: 7px 10px;
    overflow-wrap: anywhere;
}
.hospital-table--opd th {
    font-size: var(--fs-xs);
    white-space: nowrap;
}
.hospital-table--opd td {
    font-size: var(--fs-sm);
}
.hospital-table--opd .hospital-row-title {
    line-height: 1.25;
}
.hospital-table--opd .hospital-row-meta {
    margin-top: 2px;
    font-size: var(--fs-xs);
    line-height: 1.25;
}
.hospital-table--opd .hospital-status-badge {
    min-width: 66px;
    padding: 5px 8px;
    font-size: var(--fs-xs);
}
.hospital-table--opd th:nth-child(1),
.hospital-table--opd td:nth-child(1) {
    width: 24%;
}
.hospital-table--opd th:nth-child(2),
.hospital-table--opd td:nth-child(2) {
    width: 12%;
}
.hospital-table--opd th:nth-child(3),
.hospital-table--opd td:nth-child(3) {
    width: 12%;
}
.hospital-table--opd th:nth-child(4),
.hospital-table--opd td:nth-child(4) {
    width: 14%;
}
.hospital-table--opd th:nth-child(5),
.hospital-table--opd td:nth-child(5) {
    width: 12%;
}
.hospital-table--opd th:nth-child(6),
.hospital-table--opd td:nth-child(6) {
    width: 10%;
}
.hospital-table--opd th:nth-child(7),
.hospital-table--opd td:nth-child(7) {
    width: 10%;
}
.hospital-table--opd th:nth-child(8),
.hospital-table--opd td:nth-child(8) {
    width: 6%;
}
.hospital-table--opd .hospital-table-actions {
    justify-content: flex-start;
}
.hospital-table--opd .hospital-inline-link {
    min-width: 56px;
    padding: 6px 9px;
    border-radius: 10px;
    font-size: var(--fs-sm);
}
.opd-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 66px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
}
.opd-priority--normal {
    background: rgba(21, 101, 216, 0.1);
    color: var(--hospital-blue-900);
}
.opd-priority--urgent {
    background: rgba(255, 122, 54, 0.14);
    color: #a84418;
}
.opd-priority--emergency {
    background: rgba(217, 71, 34, 0.12);
    color: #b22e16;
}
.opd-registration-form {
    max-width: 1280px;
}
.opd-registration-layout {
    display: block;
}
.opd-form-main {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    align-items: start;
    gap: 8px;
    min-width: 0;
}
.opd-intake-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(21, 101, 216, 0.14);
    background:
        linear-gradient(135deg, rgba(21, 101, 216, 0.95), rgba(13, 63, 159, 0.94) 52%, rgba(31, 200, 77, 0.86)),
        #0d3f9f;
    color: #fff;
    box-shadow: 0 22px 42px rgba(13, 63, 159, 0.18);
}
.opd-intake-band .opd-eyebrow {
    color: rgba(255, 255, 255, 0.78);
}
.opd-intake-band h3 {
    margin: 0;
    color: #fff;
    font-family: var(--hospital-display);
    font-size: var(--fs-xl);
}
.opd-intake-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}
.opd-intake-chips span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: var(--fs-sm);
    font-weight: 600;
}
.opd-form-section {
    display: grid;
    align-content: start;
    gap: 8px;
    height: auto;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.98));
    box-shadow: 0 10px 18px rgba(16, 38, 74, 0.05);
}
.opd-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
}
.opd-section-header h3 {
    margin: 0;
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: var(--fs-md);
}
.opd-section-header p {
    margin: 2px 0 0;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    line-height: 1.25;
}
.opd-grid {
    display: grid;
    gap: 7px 10px;
}
.opd-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.opd-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.opd-visit-desk-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.opd-visit-patient-field {
    grid-column: 1 / -1;
}
.opd-contact-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.opd-contact-grid > .hospital-field {
    grid-column: span 2;
}
.opd-contact-grid > .hospital-field:nth-child(1),
.opd-contact-grid > .hospital-field:nth-child(2) {
    grid-column: span 3;
}
.opd-contact-grid > .hospital-field--full {
    grid-column: 1 / -1;
}
.opd-registration-form .hospital-field label {
    gap: 6px;
    margin-bottom: 4px;
    font-size: var(--fs-xs);
    line-height: 1.08;
}
.opd-registration-form .hospital-field-hint {
    font-size: var(--fs-xs);
}
.opd-registration-form .hospital-input {
    min-height: 36px;
    padding: 7px 10px;
    border-radius: 11px;
    font-size: var(--fs-sm);
}
.opd-registration-form .hospital-textarea {
    min-height: 62px;
}
.opd-age-group {
    min-width: 0;
}
.opd-age-inputs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
}
.opd-age-inputs .hospital-input {
    min-width: 0;
    padding-inline: 6px;
    text-align: center;
}
.opd-switch-stack {
    display: grid;
    gap: 6px;
    align-content: end;
    min-height: auto;
}
.opd-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 11px;
    border: 1px solid rgba(96, 112, 137, 0.16);
    background: rgba(255, 255, 255, 0.76);
    color: var(--hospital-ink);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
}
.opd-switch input {
    width: 14px;
    height: 14px;
    accent-color: var(--hospital-blue-700);
}
.opd-form-actions {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(120px, 0.28fr) minmax(0, 1fr);
    gap: 8px;
}
.opd-form-actions .hospital-button {
    padding: 9px 13px;
    border-radius: 13px;
    font-size: var(--fs-sm);
}
.opd-summary-panel {
    position: sticky;
    top: 0;
    display: grid;
    gap: 14px;
    min-width: 0;
}
.opd-summary-card {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 34px rgba(16, 38, 74, 0.08);
}
.opd-summary-card h3 {
    margin: 0;
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: var(--fs-xl);
    overflow-wrap: anywhere;
}
.opd-summary-lines {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}
.opd-summary-lines p {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(96, 112, 137, 0.12);
}
.opd-summary-lines p:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}
.opd-summary-lines span {
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
}
.opd-summary-lines strong {
    color: var(--hospital-ink);
    font-size: var(--fs-md);
    text-align: right;
    overflow-wrap: anywhere;
}
.opd-summary-card--accent {
    display: grid;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 122, 54, 0.14), rgba(31, 200, 77, 0.12), rgba(21, 101, 216, 0.1));
}
.opd-summary-card--accent strong {
    color: var(--hospital-ink);
    line-height: 1.35;
}
.opd-summary-card--accent span {
    color: var(--hospital-slate);
    font-size: var(--fs-md);
    font-weight: 600;
    line-height: 1.45;
}
.opd-slip {
    max-width: 1080px;
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.98));
    box-shadow: 0 20px 38px rgba(16, 38, 74, 0.08);
}
.opd-slip-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(96, 112, 137, 0.14);
}
.opd-slip-kicker {
    margin: 0 0 6px;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}
.opd-slip h3 {
    margin: 0;
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: var(--fs-xl);
}
.opd-slip p {
    margin: 6px 0 0;
    color: var(--hospital-slate);
}
.opd-slip-number {
    min-width: 220px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(21, 101, 216, 0.08);
    text-align: right;
}
.opd-slip-number span,
.opd-detail span {
    display: block;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: none;
}
.opd-slip-number strong {
    display: block;
    margin-top: 5px;
    color: var(--hospital-blue-900);
    font-family: var(--hospital-display);
    font-size: var(--fs-xl);
}
.opd-detail-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.opd-detail {
    min-height: 86px;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(96, 112, 137, 0.12);
    background: rgba(255, 255, 255, 0.72);
}
.opd-detail strong {
    display: block;
    margin-top: 8px;
    color: var(--hospital-ink);
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.opd-slip-section {
    padding-top: 2px;
}
.opd-slip-section h3 {
    font-size: var(--fs-lg);
}
@media (max-width: 1023px) {
    body.hospital-auth-body,
    body.hospital-dashboard-body {
        overflow-y: auto;
    }
    .hospital-shell {
        height: auto;
        border-radius: 28px;
    }
    .hospital-hero {
        min-height: auto;
    }
    .hospital-dashboard {
        min-height: auto;
        padding: 0;
    }
    .hospital-app-shell {
        min-height: auto;
        height: auto;
        overflow: visible;
    }
    .hospital-app-layout {
        grid-template-columns: 1fr;
        overflow: visible;
    }
    .hospital-app-main {
        min-height: auto;
        height: auto;
        overflow: visible;
    }
    .hospital-sidebar {
        padding: 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(96, 112, 137, 0.14);
        overflow: visible;
    }
    .hospital-sidebar-brand {
        padding-bottom: 16px;
    }
    .hospital-sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hospital-sidebar-link {
        justify-content: center;
        text-align: center;
    }
    .hospital-sidebar-summary {
        justify-content: center;
        text-align: center;
    }
    .hospital-sidebar-subnav {
        padding-left: 0;
    }
    .hospital-access-grid,
    .hospital-access-tree {
        grid-template-columns: 1fr;
    }
    .hospital-rate-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opd-registration-layout {
        grid-template-columns: 1fr;
    }
    .opd-form-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .opd-summary-panel {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opd-grid--3,
    .opd-visit-desk-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opd-visit-patient-field {
        grid-column: 1 / -1;
    }
    .opd-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opd-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .hospital-rate-row-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        min-height: auto;
    }
    .hospital-app-content {
        padding: 20px;
        overflow: visible;
    }
}
@media (max-width: 640px) {
    .hospital-form-grid {
        grid-template-columns: 1fr;
    }
    .hospital-detail-pair-row,
    .hospital-detail-number-row {
        grid-template-columns: 1fr;
    }
    .doctor-fee-pair {
        grid-template-columns: 1fr;
    }
    .hospital-access-user-form {
        grid-template-columns: 1fr;
    }
    .hospital-button--compact {
        width: 100%;
    }
    .hospital-meta-divider {
        display: block;
        margin-left: 0;
        margin-top: 6px;
    }
    .navigation-master-heading,
    .department-master-heading,
    .doctor-master-heading,
    .hospital-users-heading,
    .user-access-heading,
    .rate-card-master-heading,
    .rate-type-master-heading,
    .service-group-master-heading,
    .service-master-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
    .navigation-master-counts,
    .department-master-counts,
    .doctor-master-counts,
    .hospital-users-counts,
    .rate-card-master-counts,
    .rate-type-master-counts,
    .service-group-master-counts,
    .service-master-counts {
        white-space: normal;
        text-align: left;
    }
    .hospital-filter-form,
    .hospital-filter-form--doctor,
    .hospital-filter-form--opd {
        grid-template-columns: 1fr;
    }
    .navigation-master-add-menu,
    .department-master-add-department,
    .doctor-master-add-doctor,
    .rate-card-master-add-rate-card,
    .rate-type-master-add-rate-type,
    .service-group-master-add-service-group,
    .service-master-add-service {
        grid-column: auto;
        justify-self: stretch;
    }
    .hospital-form-actions,
    .opd-form-actions,
    .hospital-action-row {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }
    .opd-page-heading,
    .opd-slip-header,
    .opd-intake-band {
        align-items: stretch;
        flex-direction: column;
    }
    .opd-heading-actions,
    .opd-intake-chips {
        justify-content: flex-start;
    }
    .opd-heading-actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hospital-form-section-header {
        align-items: stretch;
        flex-direction: column;
    }
    .hospital-rate-row {
        grid-template-columns: 1fr;
    }
    .hospital-rate-row-actions {
        align-items: stretch;
        flex-direction: column;
    }
    .hospital-rate-check {
        width: 100%;
        justify-content: center;
    }
    .hospital-rate-remove {
        width: 46px;
        justify-content: center;
    }
    .hospital-day-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opd-stat-grid,
    .opd-summary-panel,
    .opd-contact-grid,
    .opd-grid--2,
    .opd-grid--3,
    .opd-visit-desk-grid,
    .opd-detail-grid {
        grid-template-columns: 1fr;
    }
    .opd-contact-grid > .hospital-field,
    .opd-contact-grid > .hospital-field:nth-child(1),
    .opd-contact-grid > .hospital-field:nth-child(2),
    .opd-contact-grid > .hospital-field--full {
        grid-column: auto;
    }
    .opd-age-inputs {
        grid-template-columns: 1fr;
    }
    .opd-slip-number {
        min-width: 0;
        text-align: left;
    }
    .hospital-access-summary {
        align-items: flex-start;
        flex-direction: column;
    }
    body.hospital-auth-body::before,
    body.hospital-auth-body::after,
    body.hospital-dashboard-body::before,
    body.hospital-dashboard-body::after,
    .hospital-hero::after {
        display: none;
    }
    .hospital-page {
        min-height: auto;
        padding: 14px;
    }
    .hospital-hero,
    .hospital-form-panel {
        padding: 20px;
    }
    .hospital-form-shell {
        padding: 20px 18px;
    }
    .hospital-lockup {
        width: min(100%, 460px);
    }
    .hospital-field label {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
    .hospital-dashboard-shell {
        border-radius: 0;
    }
    .hospital-app-header {
        padding: 8px 8px 7px;
        align-items: flex-start;
        flex-direction: column;
    }
    .hospital-user-menu {
        width: 100%;
    }
    .hospital-user-trigger {
        width: 100%;
    }
    .hospital-user-panel {
        position: static;
        width: 100%;
        margin-top: 6px;
    }
    .hospital-sidebar {
        padding: 12px;
    }
    .hospital-sidebar-nav {
        grid-template-columns: 1fr;
    }
    .hospital-access-submenus {
        margin-left: 12px;
        padding-left: 12px;
    }
    .hospital-app-content {
        padding: 16px;
    }
    .hospital-form-card {
        padding: 20px 18px;
    }
    .hospital-footer {
        padding-inline: 10px;
    }
    .hospital-footer-inner {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .hospital-footer-copy,
    .hospital-footer-version {
        grid-column: auto;
        justify-self: center;
    }
}
@media (max-height: 820px) and (min-width: 1024px) {
    .hospital-page {
        padding-block: 12px;
    }
    .hospital-shell {
        height: calc(100dvh - 24px);
    }
    .hospital-hero,
    .hospital-form-panel {
        padding: 20px 24px;
    }
    .hospital-lockup {
        width: min(100%, 520px);
    }
    .hospital-copy {
        font-size: var(--fs-md);
    }
    .hospital-dashboard {
        padding-block: 0;
    }
    .hospital-app-shell {
        min-height: calc(100dvh - 8px);
    }
    .hospital-app-header {
        padding: 8px 8px 7px;
    }
    .hospital-app-layout {
        grid-template-columns: 178px minmax(0, 1fr);
    }
    .hospital-sidebar {
        padding: 10px 7px;
    }
    .hospital-sidebar-brand {
        padding: 1px 2px 8px;
    }
    .hospital-sidebar-logo {
        width: min(100%, 118px);
    }
    .hospital-sidebar-nav {
        margin-top: 9px;
        gap: 4px;
    }
    .hospital-sidebar-link,
    .hospital-sidebar-summary {
        padding: 7px 9px;
        font-size: var(--fs-sm);
    }
    .hospital-sidebar-sublink {
        padding: 5px 8px;
        font-size: var(--fs-xs);
    }
    .hospital-app-content {
        padding: 14px 18px;
    }
    .opd-page-heading {
        margin-bottom: 6px;
    }
    .opd-form-section {
        gap: 7px;
        padding: 9px 10px;
        border-radius: 13px;
    }
    .opd-form-main {
        gap: 8px;
    }
}
@media (min-width: 1024px) {
    .hospital-auth-body .hospital-shell {
        height: min(820px, calc(100dvh - 76px));
    }
}
@media (max-height: 820px) and (min-width: 1024px) {
    .hospital-auth-body .hospital-shell {
        height: calc(100dvh - 64px);
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
.opd-billing-table-scroll {
    overflow-x: auto;
}
.hospital-table--billing {
    min-width: 1120px;
    table-layout: auto;
}
.hospital-table--billing th,
.hospital-table--billing td {
    width: auto;
}
.hospital-table--billing th:nth-child(1),
.hospital-table--billing td:nth-child(1) {
    width: 13%;
}
.hospital-table--billing th:nth-child(2),
.hospital-table--billing td:nth-child(2) {
    width: 18%;
}
.hospital-table--billing th:nth-child(3),
.hospital-table--billing td:nth-child(3) {
    width: 12%;
}
.hospital-table--billing th:nth-child(4),
.hospital-table--billing td:nth-child(4),
.hospital-table--billing th:nth-child(5),
.hospital-table--billing td:nth-child(5) {
    width: 12%;
}
.hospital-table--billing th:nth-child(6),
.hospital-table--billing td:nth-child(6),
.hospital-table--billing th:nth-child(7),
.hospital-table--billing td:nth-child(7),
.hospital-table--billing th:nth-child(8),
.hospital-table--billing td:nth-child(8) {
    width: 8%;
    text-align: right;
}
.hospital-table--billing th:nth-child(9),
.hospital-table--billing td:nth-child(9) {
    width: 8%;
}
.hospital-table--billing th:nth-child(10),
.hospital-table--billing td:nth-child(10) {
    width: 7%;
}
.opd-billing-form {
    max-width: 1280px;
    padding: 20px;
    border-radius: 16px;
}
.opd-billing-form .hospital-form {
    margin-top: 0;
    gap: 20px;
}
.opd-billing-top-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}
.opd-billing-visit-field,
.opd-billing-rate-field {
    grid-column: span 2;
}
.opd-billing-form .hospital-field {
    min-width: 0;
}
.opd-billing-top-grid .hospital-field label,
.opd-billing-form .hospital-field label {
    margin-bottom: 6px;
    gap: 6px;
    flex-wrap: wrap;
    font-size: var(--fs-sm);
    line-height: 1.4;
}
.opd-billing-top-grid .hospital-field-hint,
.opd-billing-form .hospital-field-hint {
    font-size: var(--fs-xs);
}
.opd-billing-form .hospital-input {
    min-width: 0;
    min-height: 40px;
    padding: 9px 11px;
    border-radius: 8px;
    font-size: var(--fs-md);
    background: #fff;
}
.opd-billing-form .hospital-textarea {
    min-height: 62px;
}
.opd-billing-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
    margin-top: 0;
}
.opd-billing-lines-panel {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.opd-billing-form .hospital-form-section-header {
    gap: 8px;
}
.opd-billing-form .hospital-form-section-header h3 {
    margin: 0;
    font-size: var(--fs-md);
}
.opd-billing-form .hospital-form-section-header .hospital-button--compact {
    min-width: 88px;
    padding: 8px 11px;
    border-radius: 12px;
    font-size: var(--fs-sm);
}
.opd-billing-lines {
    display: grid;
    gap: 16px;
    counter-reset: bill-item;
}
.opd-billing-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 12px;
    align-items: end;
    min-width: 0;
    padding: 16px;
    border: 1px solid #dce5ef;
    border-radius: 12px;
    background: #f8fafc;
    counter-increment: bill-item;
}
.opd-billing-row-header {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
}
.opd-billing-row-title::after {
    content: counter(bill-item);
}
.opd-billing-row-title {
    font-size: var(--fs-sm);
    color: var(--hospital-ink);
}
.opd-billing-service-select,
.opd-billing-item-name,
.opd-billing-notes {
    grid-column: span 2;
}
.opd-billing-help {
    margin: 0;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    line-height: 1.5;
}
.opd-billing-notice {
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid #ecd7a5;
    border-radius: 10px;
    color: #795418;
    background: #fff9ed;
    font-size: var(--fs-md);
    line-height: 1.5;
}
.opd-billing-additional {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: 16px;
    margin-top: 4px;
}
.opd-billing-line-total {
    display: grid;
    align-content: center;
    min-height: 64px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(21, 101, 216, 0.08);
}
.opd-billing-line-total span {
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: none;
}
.opd-billing-line-total strong {
    color: var(--hospital-blue-900);
    font-size: var(--fs-lg);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}
.opd-billing-row-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
}
.opd-billing-row-actions .hospital-button {
    min-width: 0;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: var(--fs-sm);
    background: #fff;
    border: 1px solid #e5c9c9;
    color: #a13737;
}
.opd-billing-summary {
    min-width: 0;
    display: grid;
    gap: 8px;
}
.opd-billing-summary .opd-summary-card {
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(16, 38, 74, 0.04);
}
.opd-billing-summary .opd-summary-card h3 {
    font-size: var(--fs-lg);
}
.opd-billing-summary .opd-summary-lines {
    gap: 6px;
    margin-top: 10px;
}
.opd-billing-summary .opd-summary-lines p {
    gap: 8px;
    padding-bottom: 6px;
}
.opd-billing-summary .opd-summary-lines span {
    font-size: var(--fs-sm);
}
.opd-billing-summary .opd-summary-lines strong {
    font-size: var(--fs-md);
    font-variant-numeric: tabular-nums;
}
.opd-billing-adjustments {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}
.opd-billing-net {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 10px 0 8px;
    padding: 14px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(21, 101, 216, 0.12), rgba(31, 200, 77, 0.12));
}
.opd-billing-net span {
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: none;
}
.opd-billing-net strong {
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: var(--fs-xl);
}
.opd-billing-form .hospital-form-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}
.opd-billing-form .hospital-form-actions .hospital-button {
    min-width: 120px;
    min-height: 42px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: var(--fs-sm);
}
.opd-bill-slip {
    max-width: 1180px;
}
.opd-bill-table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}
.opd-bill-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}
.opd-bill-table th,
.opd-bill-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(96, 112, 137, 0.14);
    color: var(--hospital-ink);
    font-size: var(--fs-md);
    text-align: right;
    vertical-align: top;
}
.opd-bill-table th {
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: none;
}
.opd-bill-table th:first-child,
.opd-bill-table td:first-child {
    text-align: left;
}
.opd-bill-table td strong,
.opd-bill-table td span {
    display: block;
}
.opd-bill-table td span {
    margin-top: 4px;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
}
.opd-bill-total-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 18px;
    align-items: start;
}
.opd-bill-total-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: rgba(255, 255, 255, 0.78);
}
.opd-bill-total-card p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
}
.opd-bill-total-card span {
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
}
.opd-bill-total-card strong {
    color: var(--hospital-ink);
    font-size: var(--fs-md);
}
.opd-bill-total-card-main {
    padding-block: 8px;
    border-top: 1px solid rgba(96, 112, 137, 0.14);
    border-bottom: 1px solid rgba(96, 112, 137, 0.14);
}
.opd-bill-total-card-main strong {
    color: var(--hospital-blue-900);
    font-size: var(--fs-xl);
}
@media (max-width: 1200px) {
    .opd-billing-workspace {
        grid-template-columns: 1fr;
    }
    .opd-billing-summary {
        width: 100%;
        max-width: 480px;
        justify-self: end;
    }
}
@media (max-width: 820px) {
    .opd-bill-total-grid {
        grid-template-columns: 1fr;
    }
    .opd-billing-top-grid,
    .opd-billing-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .opd-billing-service-select,
    .opd-billing-item-name,
    .opd-billing-notes {
        grid-column: 1 / -1;
    }
    .opd-billing-additional {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .opd-billing-form { padding: 14px; }
    .opd-billing-row { padding: 12px; }
    .opd-billing-top-grid { grid-template-columns: 1fr; }
    .opd-billing-visit-field,
    .opd-billing-rate-field { grid-column: 1 / -1; }
    .opd-billing-form .hospital-form-actions .hospital-button { flex: 1; }
}
@media print {
    body.hospital-dashboard-body {
        background: #fff;
        color: #000;
    }
    body.hospital-dashboard-body::before,
    body.hospital-dashboard-body::after,
    .hospital-app-header,
    .hospital-sidebar,
    .opd-heading-actions {
        display: none !important;
    }
    .hospital-dashboard,
    .hospital-dashboard-shell,
    .hospital-app-shell,
    .hospital-app-layout,
    .hospital-app-main,
    .hospital-app-content {
        display: block;
        height: auto;
        min-height: 0;
        overflow: visible;
        padding: 0;
        border: 0;
        box-shadow: none;
        background: #fff;
    }
    .opd-slip {
        max-width: none;
        border: 0;
        box-shadow: none;
    }
    .opd-bill-table-wrap {
        overflow: visible;
    }
    .opd-bill-table {
        min-width: 0;
    }
}
/* Login security: forgot password link, password policy hint */
.hospital-auth-link {
    margin: -4px 0 0;
    text-align: right;
    font-size: var(--fs-sm);
}
.hospital-auth-link a {
    color: var(--hospital-blue-700);
    font-weight: 600;
    text-decoration: none;
}
.hospital-auth-link a:hover {
    text-decoration: underline;
}
.hospital-auth-link--left {
    text-align: left;
}
.hospital-password-hint {
    margin: 0;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(21, 101, 216, 0.06);
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    line-height: 1.45;
}
/* Platform admin: compact inputs inside the purchased modules table */
.platform-table-input {
    min-width: 120px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: var(--fs-sm);
}
.platform-entitlement-save {
    margin-top: 14px;
    margin-bottom: 24px;
}
/* Third-level sidebar menus (main → sub → third level) */
.hospital-sidebar-summary--nested {
    padding: 6px 8px;
    font-size: var(--fs-sm);
    font-weight: 600;
}
.hospital-sidebar {
    overflow-y: auto;
}
/* Roles & Menu Access */
.access-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 14px;
}
.access-tab {
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid rgba(96, 112, 137, 0.18);
    background: #fff;
    color: var(--hospital-slate);
    font-size: var(--fs-md);
    font-weight: 600;
    text-decoration: none;
}
.access-tab--active {
    border-color: transparent;
    background: linear-gradient(135deg, var(--hospital-blue-700), var(--hospital-blue-900));
    color: #fff;
}
.access-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.access-role-list {
    display: grid;
    gap: 6px;
}
.access-role {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    color: var(--hospital-ink);
    text-decoration: none;
}
.access-role span {
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
}
.access-role--active {
    border-color: var(--hospital-blue-700);
    background: rgba(21, 101, 216, 0.06);
}
.access-new-role {
    margin-top: 10px;
}
.access-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 10px;
    align-items: start;
}
.access-override-table td,
.access-override-table th {
    white-space: nowrap;
}
@media (max-width: 900px) {
    .access-layout {
        grid-template-columns: 1fr;
    }
}
/* Users: security card and reset requests */
.hospital-users-security-card {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}
/* Audit log */
.audit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: 16px;
    align-items: start;
}
.audit-row--selected td {
    background: rgba(33, 183, 255, 0.1);
}
.audit-row-link {
    color: var(--hospital-blue-700);
    font-weight: 600;
    text-decoration: none;
}
.audit-detail {
    display: grid;
    gap: 8px;
}
@media (max-width: 1000px) {
    .audit-layout {
        grid-template-columns: 1fr;
    }
}
/* Settings hub */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.settings-card {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: #fff;
    color: var(--hospital-ink);
    text-decoration: none;
}
.settings-card:hover {
    border-color: rgba(21, 101, 216, 0.4);
    box-shadow: 0 8px 18px rgba(16, 38, 74, 0.08);
}
.settings-card span {
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    line-height: 1.45;
}
/* OP patient list: status pills, tab counts, row actions */
.opd-tab-count {
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 6px;
    background: rgba(96, 112, 137, 0.14);
    font-size: var(--fs-xs);
}
.access-tab--active .opd-tab-count {
    background: rgba(255, 255, 255, 0.24);
}
.opd-status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    background: rgba(96, 112, 137, 0.12);
    color: var(--hospital-slate);
}
.opd-status--registered { background: rgba(21, 101, 216, 0.12); color: var(--hospital-blue-900); }
.opd-status--waiting { background: #fff1d6; color: #8a5a00; }
.opd-status--in_consultation { background: rgba(33, 183, 255, 0.18); color: #0b5c8a; }
.opd-status--consulted { background: rgba(31, 200, 77, 0.16); color: #136c31; }
.opd-status--cancelled { background: rgba(255, 95, 49, 0.14); color: #b3391d; }
/* "Final billed" in red everywhere (owner 19-11-2026, ip-care-list-final-billed.html L6). */
.opd-status--final-billed { background: #fee2e2; color: #b91c1c; }
.vx-final-billed { color: #b91c1c; font-weight: 700; }
.opd-row-actions {
    flex-wrap: wrap;
    gap: 6px;
}
.opd-row-actions .hospital-inline-link {
    min-width: 0;
    padding: 6px 9px;
}
.opd-link--danger {
    color: #b3391d !important;
    background: rgba(255, 95, 49, 0.08) !important;
}
/* OP registration: old patient badge and follow-up window message */
.opd-old-patient {
    margin: 6px 0 0;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(31, 200, 77, 0.12);
    color: #136c31;
    font-size: var(--fs-sm);
    font-weight: 600;
}
.opd-followup-note {
    margin: 6px 0 0;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(31, 200, 77, 0.12);
    color: #136c31;
    font-size: var(--fs-sm);
    line-height: 1.4;
}
.opd-followup-note--new {
    background: rgba(21, 101, 216, 0.08);
    color: var(--hospital-blue-900);
}
/* Doctor Desk */
.dd-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dd-filter {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.dd-filter .hospital-input {
    width: auto;
    padding: 8px 12px;
}
.dd-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.dd-queue {
    display: grid;
    gap: 6px;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
}
.dd-queue-title {
    margin: 6px 0 0;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: none;
}
.dd-queue-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    padding: 6px 8px;
    border-radius: 10px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    color: var(--hospital-ink);
    text-decoration: none;
}
.dd-queue-item strong,
.dd-queue-item small {
    display: block;
}
.dd-queue-item small {
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
}
.dd-queue-item--active {
    border-color: var(--hospital-blue-700);
    background: rgba(21, 101, 216, 0.06);
}
.dd-queue-item--done {
    opacity: 0.75;
}
.dd-token {
    display: grid;
    place-items: center;
    min-height: 34px;
    border-radius: 8px;
    background: rgba(21, 101, 216, 0.1);
    color: var(--hospital-blue-900);
    font-family: var(--hospital-display);
    font-size: var(--fs-sm);
    font-weight: 600;
}
.dd-urgent {
    color: #b3391d;
}
.dd-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}
.dd-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(21, 101, 216, 0.12);
    background: linear-gradient(135deg, rgba(21, 101, 216, 0.08), rgba(31, 200, 77, 0.08));
    font-size: var(--fs-sm);
}
.dd-strip > span {
    color: var(--hospital-slate);
}
.dd-strip b {
    color: var(--hospital-ink);
}
.dd-version {
    margin-left: auto;
    font-weight: 600;
}
.dd-tabs {
    flex-wrap: wrap;
    margin-bottom: 0;
}
.dd-tabs .access-tab {
    cursor: pointer;
}
.dd-card {
    display: grid;
    gap: 10px;
}
.dd-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}
.dd-panel[hidden] {
    display: none;
}
.dd-grid {
    display: grid;
    gap: 10px 12px;
}
.dd-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dd-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dd-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dd-output {
    min-height: 44px;
    display: flex;
    align-items: center;
    background: #eef3fa;
}
.dd-table input,
.dd-table select {
    min-width: 0;
}
.dd-wide {
    min-width: 200px;
}
.dd-narrow {
    width: 80px;
    min-width: 0;
}
.dd-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(96, 112, 137, 0.14);
}
.dd-footer .hospital-field-hint {
    margin-right: auto;
}
.dd-order-form {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 130px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}
.dd-previous {
    padding: 8px 0;
    border-bottom: 1px solid rgba(96, 112, 137, 0.12);
}
.dd-previous-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.dd-amend {
    align-items: end;
}
@media (max-width: 1100px) {
    .dd-layout { grid-template-columns: 1fr; }
    .dd-grid--5, .dd-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dd-order-form { grid-template-columns: 1fr; }
}
/* OPD bill list KPIs */
.opd-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.opd-kpi {
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: #fff;
}
.opd-kpi span {
    display: block;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: none;
}
.opd-kpi strong {
    display: block;
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: var(--fs-xl);
    font-variant-numeric: tabular-nums;
}
.opd-kpi em {
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-style: normal;
}
.opd-kpi--green strong { color: #136c31; }
.opd-kpi--red strong { color: #b3391d; }
/* Appointment */
.apt-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    max-height: calc(100dvh - 300px);
    overflow-y: auto;
}
.apt-slot {
    display: grid;
    gap: 3px;
    align-content: start;
    min-height: 64px;
    padding: 7px 9px;
    border: 1px solid #dbe5f3;
    border-radius: 10px;
    background: var(--hospital-surface);
    font-size: var(--fs-sm);
}
.apt-slot b {
    color: var(--hospital-ink);
    font-family: var(--hospital-display);
    font-size: var(--fs-md);
}
.apt-slot a {
    overflow: hidden;
    color: var(--hospital-blue-900);
    font-weight: 600;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.apt-slot--free { background: #f2fbf4; border-color: #bfe8c9; }
.apt-slot--part { background: #fff8ec; border-color: #f5d9a8; }
.apt-slot--full { background: #eef3fb; border-color: #c9d6ea; }
.apt-slot--selected { outline: 2px solid var(--hospital-blue-700); }
.apt-slot .apt-book-link {
    color: #136c31;
    font-size: var(--fs-xs);
}
.apt-side {
    display: grid;
    gap: 10px;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
}
.apt-inline-form {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}
.apt-inline-form .hospital-input {
    min-width: 0;
    flex: 1;
}
@media (max-width: 1100px) {
    .apt-side { max-height: none; }
}
.apt-side,
.apt-side .dd-card {
    grid-template-columns: minmax(0, 1fr);
}
.apt-slots-card,
.apt-side .hospital-form-card {
    max-width: none;
    padding: 16px;
}
.apt-nav {
    min-width: 0;
    padding: 9px 14px;
}
.apt-inline-form .hospital-button--compact {
    min-width: 0;
}
/* OP reports */
.report-filter {
    margin-bottom: 12px;
}
.report-table-scroll {
    max-height: calc(100dvh - 330px);
    overflow: auto;
}
.report-table th.num,
.report-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.report-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}
.report-table tfoot td {
    border-top: 2px solid var(--hospital-ink);
    font-weight: 600;
}
.report-note {
    margin: 8px 2px 0;
}
/* Dashboard OPD tiles */
.dash-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}
.dash-tile {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff, var(--hospital-soft));
    box-shadow: 0 12px 26px rgba(16, 38, 74, 0.06);
    color: var(--hospital-ink);
    text-decoration: none;
}
.dash-tile[href]:hover {
    border-color: var(--hospital-blue-700);
}
.dash-tile h3 {
    margin: 0;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: none;
}
.dash-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.dash-split span {
    display: block;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
}
.dash-split strong {
    font-family: var(--hospital-display);
    font-size: var(--fs-2xl);
    font-variant-numeric: tabular-nums;
}
.dash-tile small {
    color: var(--hospital-slate);
}
.dash-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
.dash-card {
    max-width: none;
    padding: 16px;
}
.dash-card .hospital-table {
    min-width: 0;
}
.dash-card .num {
    text-align: right;
}
.dash-kpis {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.dash-bar {
    height: 8px;
    border-radius: 99px;
    background: #e6edf7;
    overflow: hidden;
}
.dash-bar i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--hospital-blue-700), var(--hospital-green-600));
}
.dash-session {
    opacity: 0.85;
}
@media (max-width: 1000px) {
    .dash-tiles,
    .dash-row {
        grid-template-columns: minmax(0, 1fr);
    }
}
.report-filter {
    max-width: none;
    grid-template-columns: repeat(4, minmax(130px, 1fr)) auto auto auto;
}
.report-filter .hospital-button--compact {
    min-width: 88px;
}
.report-table {
    min-width: 0;
    font-size: var(--fs-sm);
}
.report-table th,
.report-table td {
    padding: 6px 8px;
    white-space: nowrap;
}
.report-table td:nth-child(n) {
    vertical-align: middle;
}
@media (max-width: 1100px) {
    .report-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.report-filter .hospital-button {
    justify-self: start;
}
/* Users: security actions and sessions */
.hospital-link-button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--hospital-blue-700);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.hospital-link-button--danger {
    color: #b3391d;
}
.users-action-panel {
    margin-top: 10px;
    border: 1px solid rgba(96, 112, 137, 0.16);
    border-radius: 14px;
    background: var(--hospital-surface);
}
.users-action-panel summary {
    padding: 9px 14px;
    color: var(--hospital-ink);
    font-weight: 600;
    cursor: pointer;
}
.users-action-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
    padding: 0 14px 14px;
}
.users-action-form .hospital-field-hint,
.users-action-form .hospital-button {
    grid-column: 1 / -1;
    justify-self: start;
}
.users-subtitle {
    margin: 16px 0 6px;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-transform: none;
}
.devices-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.devices-note {
    margin-top: 10px;
}
/* Header bell: open work tasks */
.hospital-header-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}
.hospital-bell {
    position: relative;
}
.hospital-bell-trigger {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 7px 10px;
    border-radius: 13px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: #fff;
    color: var(--hospital-blue-900);
    cursor: pointer;
}
.hospital-bell-trigger::-webkit-details-marker {
    display: none;
}
.hospital-bell-trigger svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}
.hospital-bell-count {
    min-width: 18px;
    padding: 0 5px;
    border-radius: 99px;
    background: var(--hospital-blue-700);
    color: #fff;
    font-size: var(--fs-xs);
    line-height: 18px;
    text-align: center;
}
.hospital-bell-count--urgent {
    background: #d8342c;
    animation: hospital-bell-pulse 1.6s infinite;
}
@keyframes hospital-bell-pulse {
    50% { box-shadow: 0 0 0 5px rgba(216, 52, 44, 0.18); }
}
@media (prefers-reduced-motion: reduce) {
    .hospital-bell-count--urgent { animation: none; }
}
.hospital-bell-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 25;
    width: 310px;
    display: grid;
    gap: 5px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(96, 112, 137, 0.14);
    background: #fff;
    box-shadow: 0 18px 38px rgba(16, 38, 74, 0.14);
}
/* Every open task (dashboard v3, 10-10-2026): the list scrolls inside the bell. */
.hospital-bell-list { display: grid; gap: 5px; max-height: min(420px, 62vh); overflow: auto; }
.hospital-bell-title {
    margin: 0 0 2px;
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: none;
}
.hospital-bell-item {
    display: grid;
    padding: 6px 9px;
    border-left: 3px solid #c9d6ea;
    border-radius: 9px;
    color: var(--hospital-ink);
    text-decoration: none;
}
.hospital-bell-item:hover {
    background: var(--hospital-soft);
}
.hospital-bell-item span {
    color: var(--hospital-slate);
    font-size: var(--fs-xs);
}
.hospital-bell-item--urgent {
    border-left-color: #d8342c;
    background: #fff5f4;
}
.hospital-bell-empty {
    margin: 4px 0;
    color: var(--hospital-slate);
    font-size: var(--fs-sm);
}
.hospital-bell-all {
    justify-self: end;
    color: var(--hospital-blue-700);
    font-weight: 600;
    font-size: var(--fs-sm);
    text-decoration: none;
}
.dash-welcome {
    margin: -4px 0 10px;
    color: var(--hospital-slate);
}
.dash-tasks {
    margin-bottom: 12px;
}
.dash-tasks-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.dash-task-tabs {
    margin-bottom: 8px;
}
.dash-tasks .hospital-table {
    min-width: 0;
}
/* Platform: customer set-up */
.setup-card {
    margin-bottom: 12px;
    border-color: rgba(216, 52, 44, 0.3);
}
.setup-retry-form {
    display: flex;
    align-items: end;
    gap: 10px;
}
.new-admin-card code {
    padding: 2px 8px;
    border-radius: 6px;
    background: #fff;
    font-size: var(--fs-lg);
    letter-spacing: 0.04em;
}
.hospital-choice-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.hospital-choice-grid .hospital-day-option {
    justify-content: flex-start;
    text-align: left;
}
.hospital-users-security-card {
    max-width: 980px;
    grid-template-columns: minmax(0, 1fr);
}
.hospital-users-security-card .hospital-table {
    min-width: 0;
}
/* Phase 2: IP screens */
.ip-list-card {
    max-width: none;
    padding: 14px;
}
.ip-filter {
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.ip-table-scroll {
    max-height: calc(100dvh - 330px);
    overflow: auto;
}
.ip-table-scroll .hospital-table,
.ip-patient-table {
    min-width: 0;
}
.ip-row--selected td {
    background: #eef4ff;
}
.ip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.ip-inline-search {
    display: flex;
    gap: 8px;
}
.ip-form-stack {
    display: grid;
    gap: 10px;
    align-content: start;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
}
.ip-form-stack .hospital-form-card,
.ip-board {
    max-width: none;
    padding: 14px 16px;
}
.ip-search-results {
    display: grid;
    gap: 4px;
    margin-top: 4px;
    padding: 6px;
    border: 1px solid rgba(96, 112, 137, 0.18);
    border-radius: 12px;
    background: #fff;
}
.ip-search-result {
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: var(--hospital-soft);
    color: var(--hospital-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.ip-search-result:disabled {
    color: var(--hospital-slate);
    cursor: not-allowed;
}
.ip-board {
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
}
.ip-beds {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}
.ip-transfer-form {
    margin-top: 8px;
}
@media (max-width: 1100px) {
    .ip-form-stack { max-height: none; }
}
.ip-strip {
    margin-bottom: 10px;
}
.ip-care-card {
    max-width: none;
    padding: 14px 16px;
    max-height: calc(100dvh - 300px);
    overflow-y: auto;
}
.ip-two {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 16px;
    align-items: start;
}
.ip-compact-table {
    min-width: 0;
    font-size: var(--fs-sm);
}
.ip-compact-table td,
.ip-compact-table th {
    padding: 6px 8px;
}
.ip-note-form,
.ip-dose-form {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 8px;
}
.ip-dose-form {
    margin: 0;
}
.ip-dose-form .hospital-input {
    width: auto;
    min-width: 110px;
    padding-top: 6px;
    padding-bottom: 6px;
}
.ip-row--stopped td {
    opacity: 0.6;
}
.ip-rx-save {
    margin-top: 8px;
}
.ip-rx-save .hospital-input,
.ip-actions > .hospital-input {
    width: auto;
    flex: 1;
    min-width: 160px;
}
.ip-mar-date {
    margin-bottom: 8px;
}
@media (max-width: 1100px) {
    .ip-two { grid-template-columns: minmax(0, 1fr); }
}
.ip-package-form {
    max-width: none;
    padding: 14px 16px;
    max-height: calc(100dvh - 190px);
    overflow-y: auto;
}
.ip-mini-panel summary {
    color: var(--hospital-blue-700);
    font-weight: 600;
    cursor: pointer;
}
.ip-mini-panel[open] {
    width: 100%;
    margin-bottom: 8px;
}
.ip-qty {
    max-width: 90px;
}
.ip-date {
    max-width: 150px;
}
.ip-inline-alert form {
    display: inline;
}
.ip-discount-form {
    margin-top: 8px;
    align-items: end;
}
.ip-discount-form .hospital-field--full {
    grid-column: 1 / -1;
}
/* IP discharge, final bill and discharge summary */
.ip-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.ip-step { padding: 4px 10px; border: 1px solid #d6e0ee; border-radius: 99px; background: #fff; color: var(--hospital-slate); font-size: var(--fs-sm); }
.ip-step--done { background: #effaf2; border-color: #b8e5c4; color: #136c31; }
.ip-step--now { background: var(--hospital-blue-700); border-color: var(--hospital-blue-700); color: #fff; }
.ip-facts { display: grid; grid-template-columns: 110px 1fr; gap: 4px 10px; margin: 0 0 10px; font-size: var(--fs-md); }
.ip-facts dt { color: var(--hospital-slate); }
.ip-facts dd { margin: 0; }
.ip-status-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 10px 0; }
.ip-actions--split { justify-content: space-between; margin-top: 10px; }
.ip-final-layout { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.ip-form-block { margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf1f7; }
.ip-summary-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start; }
.ip-summary-main textarea { resize: vertical; }
.ip-summary-main .hospital-table input { min-width: 0; width: 100%; }
.ip-summary-view { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 900px) {
    .ip-summary-layout, .ip-final-layout, .ip-summary-view { grid-template-columns: 1fr; }
}
/* Hospital Configuration: IP settings */
.hospital-config-table { max-width: 720px; margin-top: 8px; }
.hospital-config-table .hospital-input { max-width: 180px; padding-top: 4px; padding-bottom: 4px; }
/* Pharmacy: header store selector */
.hospital-store-pick { display: flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-sm); color: var(--hospital-slate); }
.hospital-store-pick .hospital-input { min-width: 140px; padding: 5px 8px; font-weight: 600; color: var(--hospital-blue-900); }
.hospital-store-none { font-weight: 600; color: #b3391d; }
/* Pharmacy: product picker and entry grids */
.ph-picker-list { position: absolute; z-index: 30; top: 100%; left: 0; min-width: 420px; max-height: 260px; overflow: auto; margin-top: 2px; padding: 4px; border: 1px solid #c9d6e8; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(22, 62, 92, .16); }
.ph-picker-option { display: block; width: 100%; padding: 6px 8px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: var(--fs-sm); color: var(--hospital-ink); cursor: pointer; }
.ph-picker-option:hover, .ph-picker-option:focus { background: #eef4ff; }
.ph-picker-empty { display: block; padding: 6px 8px; font-size: var(--fs-sm); color: var(--hospital-slate); }
.ph-grid td { padding: 3px 4px; vertical-align: middle; }
.ph-grid .hospital-input { min-width: 0; width: 100%; padding: 4px 6px; font-size: var(--fs-sm); }
.ph-grid td.num .hospital-input { text-align: right; }
.ph-grid tfoot td { font-weight: 600; background: #f4f7fb; }
.ph-net { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; padding: 10px 14px; border-radius: 10px; background: linear-gradient(135deg, #1565d8, #163e5c); color: #fff; font-weight: 600; }
.ph-net strong { font-size: var(--fs-xl); }
.ph-match { color: #136c31; font-weight: 600; }
.ph-mismatch { color: #b3391d; font-weight: 600; }
/* Pharmacy entry grids use the full content width. */
.hospital-form-card.ph-full { max-width: none; }
/* Pharmacy Reports: 17 tabs wrap onto two or three short lines. */
.access-tabs.ph-report-tabs { flex-wrap: wrap; gap: 4px; }
.ph-report-tabs .access-tab { padding: 5px 10px; font-size: var(--fs-sm); white-space: nowrap; }
/*
 * VitalOS shared compact design standard (all hospital screens: OPD, IPD, Pharmacy, masters, settings).
 * Started as the approved pharmacy density; tokens are listed in docs/phases/ui-fit-evidence/fit-report.md.
 */
.hospital-app-content { padding: 12px 16px; }
.hospital-app-content > .hospital-alert--spaced { margin-bottom: 8px; padding: 6px 12px; border-radius: 10px; font-size: var(--fs-sm); }
.hospital-app-content .hospital-page-heading { margin-bottom: 8px; gap: 6px 12px; }
.hospital-app-content .hospital-dashboard-title { margin: 0; font-size: var(--fs-xl); line-height: 1.25; }
.hospital-app-content .hospital-alert { margin-top: 0; padding: 6px 12px; border-radius: 10px; font-size: var(--fs-sm); }
.hospital-app-content .hospital-alert--spaced { margin-bottom: 8px; }
.hospital-app-content .hospital-form { margin-top: 0; gap: 8px; }
.hospital-app-content .hospital-form-card { padding: 10px 12px; border-radius: 12px; box-shadow: 0 6px 16px rgba(16, 38, 74, .05); }
.hospital-app-content .hospital-form-grid { gap: 8px 10px; }
.hospital-app-content .hospital-card-title { margin: 0 0 6px; font-size: var(--fs-md); }
.hospital-app-content .hospital-field label { margin-bottom: 3px; gap: 8px; font-size: var(--fs-sm); }
.hospital-app-content .hospital-field-hint { font-size: var(--fs-xs); letter-spacing: 0; }
.hospital-app-content .hospital-error { margin-top: 2px; font-size: var(--fs-xs); }
.hospital-app-content .hospital-input { padding: 6px 9px; border-radius: 8px; font-size: var(--fs-sm); }
.hospital-app-content .hospital-input:focus { box-shadow: 0 0 0 3px rgba(33, 183, 255, .16); transform: none; }
.hospital-app-content textarea.hospital-input { min-height: 0; }
.hospital-app-content .hospital-button { padding: 7px 14px; border-radius: 9px; font-size: var(--fs-sm); box-shadow: none; }
.hospital-app-content .hospital-button:hover { transform: none; box-shadow: 0 6px 14px rgba(16, 38, 74, .12); }
.hospital-app-content .hospital-button--compact { min-width: 0; }
:where(.hospital-app-content) .hospital-table { min-width: 0; }
.hospital-app-content .hospital-table th, .hospital-app-content .hospital-table td { padding: 5px 8px; }
.hospital-app-content .hospital-table th { font-size: var(--fs-xs); letter-spacing: .04em; }
.hospital-app-content .hospital-table td { font-size: var(--fs-sm); }
.hospital-app-content .hospital-table-empty { padding: 8px; font-size: var(--fs-sm); }
.hospital-app-content .ph-grid td { padding: 3px 4px; }
.hospital-app-content .ph-grid th { padding: 5px 4px; }
.hospital-app-content .ph-grid .hospital-input { padding: 3px 6px; border-radius: 6px; font-size: var(--fs-sm); }
.hospital-app-content .access-tabs { margin-bottom: 8px; }
.hospital-app-content .access-tab { padding: 5px 12px; border-radius: 8px; font-size: var(--fs-sm); }
.hospital-app-content .dd-strip { padding: 5px 10px; border-radius: 10px; font-size: var(--fs-sm); }
.hospital-app-content .ph-net { margin-top: 6px; padding: 7px 12px; }
.hospital-app-content .ph-net strong { font-size: var(--fs-xl); }
.hospital-app-content .hospital-meta-note { font-size: var(--fs-sm); }
.hospital-app-content .hospital-filter-form { max-width: none; gap: 8px; margin-bottom: 8px; }
.hospital-app-content .hospital-form-actions { gap: 8px; }
.hospital-app-content .hospital-table-card { border-radius: 12px; box-shadow: 0 6px 16px rgba(16, 38, 74, .05); }
.hospital-app-content > * > .hospital-table-card:not(:first-child) { margin-top: 8px; }
.hospital-app-content .hospital-table-card > .hospital-card-title { margin: 0; padding: 8px 12px 6px; }
.hospital-app-content .opd-kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.hospital-app-content .opd-kpi { padding: 6px 10px; border-radius: 10px; }
.hospital-app-content .opd-kpi strong { font-size: var(--fs-lg); }
/* List and report tables wrap text instead of pushing the row actions out of view. */
.hospital-app-content .report-table td:not(.num) { white-space: normal; }
.hospital-app-content .hospital-table td .hospital-button { padding: 4px 10px; border-radius: 7px; font-size: var(--fs-sm); }
.hospital-app-content:has(.ph-report-tabs) .report-table-scroll { max-height: calc(100dvh - 370px); }
.hospital-app-content .hospital-table-actions { flex-wrap: wrap; gap: 4px; }
.hospital-app-content .hospital-inline-link { min-width: 0; padding: 3px 8px; border-radius: 7px; font-size: var(--fs-sm); }
/* "Find the patient / bill" cards: title and search on one line, results below. */
.hospital-app-content .dd-card:has(> .dd-filter) { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; }
.hospital-app-content .dd-card:has(> .dd-filter) > .hospital-card-title { margin: 0; }
.hospital-app-content .dd-card:has(> .dd-filter) > .dd-filter { justify-self: end; }
.hospital-app-content .dd-card:has(> .dd-filter) > :not(.hospital-card-title):not(.dd-filter) { grid-column: 1 / -1; margin-top: 6px; }
/* Entry grids: no spin buttons, so short number boxes show the whole amount. */
.hospital-app-content .ph-grid input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.hospital-app-content .ph-grid input[type="number"]::-webkit-inner-spin-button, .hospital-app-content .ph-grid input[type="number"]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.hospital-app-content .ph-grid select[name$="[disposition]"] { min-width: 170px; }
.hospital-app-content select[name="size"].hospital-input { min-width: 180px; }
.hospital-app-content .hospital-form-actions:has(> select[name="size"]) { grid-template-columns: auto minmax(0, 1fr); }
/* Shared standard, part 2: page frame, full-width lists, sticky grid headers, fill-height grids. */
.hospital-app-hospital-name { font-size: var(--fs-xl); line-height: 1.2; }
.hospital-app-content { padding: 12px 16px; }
.hospital-app-content > .hospital-alert--spaced { margin-bottom: 8px; }
.hospital-app-content .hospital-page-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.hospital-app-content .hospital-page-heading > p,
.hospital-app-content .hospital-page-heading .hospital-meta-note { margin: 0; }
.hospital-app-content .hospital-table-card,
.hospital-app-content .hospital-filter-form,
.hospital-app-content .hospital-form-card--wide { max-width: none; }
.hospital-app-content .hospital-filter-form { align-items: end; }
.hospital-app-content .hospital-table-card { overflow: hidden; }
/* Column headers stay on screen while a grid scrolls inside its own box. */
.hospital-app-content .hospital-table-scroll > .hospital-table > thead th,
.hospital-app-content [data-fill-height] > table > thead th { position: sticky; top: 0; z-index: 2; background: #eef4fc; }
.hospital-app-content [data-fill-height] { overflow: auto; }
/* Row actions: one tidy line (wraps only when the column is narrow). */
.hospital-app-content .hospital-table .hospital-table-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.hospital-app-content .hospital-table .hospital-table-actions form { display: inline-flex; margin: 0; }
.hospital-app-content .hospital-table .hospital-link-button { padding: 3px 6px; font-size: var(--fs-sm); }
.hospital-app-content .hospital-row-meta { font-size: var(--fs-xs); line-height: 1.25; }
/* Status pills and badges. */
.hospital-app-content .opd-status,
.hospital-app-content .opd-priority,
.hospital-app-content .hospital-status-badge { padding: 3px 8px; font-size: var(--fs-xs); min-width: 0; }
/* IP Patient Care → Medicine Indent: compact entry so the indent history shows several rows at 1366×768. */
[data-indent-form] .hospital-input { min-height: 30px; height: 30px; padding: 3px 10px; font-size: var(--fs-sm); }
[data-indent-form] .ph-grid td, [data-indent-form] .ph-grid th { padding-top: 3px; padding-bottom: 3px; }
[data-indent-form] .hospital-row-meta { font-size: var(--fs-xs); line-height: 1.2; }
[data-indent-form] .hospital-button { min-height: 34px; padding: 6px 16px; }
.ip-indent-history td, .ip-indent-history th { padding-top: 4px; padding-bottom: 4px; }
.ip-indent-history td form { display: inline; margin-left: 8px; }
/* Sidebar menu search (stays at the top while the menu list scrolls). */
.hospital-sidebar-search {
    position: sticky;
    top: 0;
    z-index: 2;
    margin: 0 -8px;
    padding: 8px 8px 6px;
    background: rgba(246, 250, 255, 0.97);
}
.hospital-sidebar-search-input {
    width: 100%;
    min-width: 0;
    height: 32px;
    padding: 4px 10px;
    border: 1px solid rgba(96, 112, 137, 0.24);
    border-radius: 10px;
    background: #fff;
    color: var(--hospital-blue-900);
    font: inherit;
    font-size: var(--fs-sm);
}
.hospital-sidebar-search-input:focus {
    outline: none;
    border-color: rgba(21, 101, 216, 0.55);
    box-shadow: 0 0 0 3px rgba(21, 101, 216, 0.12);
}
.hospital-sidebar-nav [hidden] {
    display: none !important;
}
/* Type-to-search select (select[data-searchable-select], e.g. suppliers). */
.hospital-combo {
    position: relative;
    min-width: 0;
}
.hospital-combo-input {
    width: 100%;
}
.hospital-combo-native {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.hospital-combo-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 40;
    max-height: 260px;
    margin: 0;
    padding: 4px;
    overflow-y: auto;
    list-style: none;
    border: 1px solid rgba(96, 112, 137, 0.22);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(24, 43, 64, 0.16);
}
.hospital-combo-item,
.hospital-combo-empty {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: var(--fs-sm);
}
.hospital-combo-item {
    color: var(--hospital-blue-900);
    cursor: pointer;
}
.hospital-combo-item:hover,
.hospital-combo-item--active {
    background: rgba(21, 101, 216, 0.1);
}
.hospital-combo-empty {
    color: var(--hospital-slate);
}
.dd-filter .hospital-combo {
    min-width: 280px;
}
/* ===== Phase 1 / Phase 2 screen layouts on the shared standard (UI fit-and-finish, 1366×768) ===== */
@media (min-width: 1024px) {
    /* OP Patient List / OP Bill List: fixed columns, row actions in two short lines. */
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(1), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(1) { width: 18%; }
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(2), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(2) { width: 10%; }
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(3), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(3) { width: 15%; }
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(4), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(4) { width: 11%; }
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(5), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(5) { width: 8%; }
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(6), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(6) { width: 11%; }
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(7), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(7) { width: 9%; }
    .hospital-app-content .opd-table-scroll .hospital-table--opd th:nth-child(8), .hospital-app-content .opd-table-scroll .hospital-table--opd td:nth-child(8) { width: 18%; }
    .hospital-app-content .hospital-table--opd th, .hospital-app-content .hospital-table--opd td { padding: 5px 8px; }
    .hospital-app-content .opd-row-actions { gap: 3px; }
    .hospital-app-content .opd-row-actions .hospital-inline-link { padding: 2px 7px; font-size: var(--fs-xs); }
    .opd-registration-form .hospital-input { min-height: 32px; padding: 5px 9px; }
    .opd-registration-form .hospital-textarea { min-height: 46px; }
    .opd-registration-form .opd-form-section { gap: 6px; padding: 8px 10px; }
}
@media (min-width: 1024px) {
    /* Dashboard: tasks in a short scroll box, one module section at a time (tabs), session details as one line. */
    .dash-welcome { margin: -4px 0 6px; font-size: var(--fs-sm); }
    .dash-tasks { margin-bottom: 8px; padding: 8px 12px; }
    .dash-task-tabs { margin-bottom: 4px; }
    .dash-task-scroll { max-height: 214px; overflow: auto; }
    .dash-module-tabs { margin-bottom: 8px; }
    .dash-tiles { gap: 8px; margin-bottom: 8px; }
    .dash-tile { gap: 4px; padding: 8px 12px; border-radius: 12px; box-shadow: 0 6px 16px rgba(16, 38, 74, .05); }
    .dash-split strong { font-size: var(--fs-xl); }
    .dash-tile small { font-size: var(--fs-xs); }
    .dash-row { gap: 8px; margin-bottom: 8px; }
    .dash-card { padding: 8px 12px; }
    .dash-kpis { gap: 6px; }
    .dash-session { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 6px 10px; border-radius: 10px; border: 1px solid rgba(96, 112, 137, .14); background: #fff; opacity: 1; }
    .dash-session .hospital-stat { display: flex; align-items: baseline; gap: 6px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .dash-session .hospital-stat .label { margin: 0; font-size: var(--fs-xs); }
    .dash-session .hospital-stat .value { margin: 0; font-size: var(--fs-sm); }
}
@media (min-width: 1024px) {
    .hospital-page-heading > .dash-welcome { margin: 0 auto 0 4px; }
    .dash-task-scroll { max-height: 182px; }
    .dash-kpis .opd-kpi { padding: 4px 8px; }
    .dash-kpis .opd-kpi strong { font-size: var(--fs-lg); }
    .dash-card .hospital-card-title { margin-bottom: 4px; }
}
@media (min-width: 1024px) {
    /* Appointment: slot grid and side panel fill the screen height and scroll inside. */
    .apt-slots[data-fill-height], .apt-side[data-fill-height] { max-height: none; }
    .apt-side { gap: 8px; }
}
/* Grid cells may shrink below their content's natural width (date-time inputs, long selects): no overflow, no overlap. */
.hospital-app-content .dd-grid > *,
.hospital-app-content .hospital-form-grid > *,
.hospital-app-content .opd-grid > * { min-width: 0; }
.hospital-app-content .hospital-input { min-width: 0; max-width: 100%; }
@media (min-width: 1024px) {
    /* IP Admission: form stack fills the screen height; identity check and reason on one line. */
    .ip-form-stack[data-fill-height] { max-height: none; }
    .hospital-app-content .ip-form-stack { gap: 8px; }
    .hospital-app-content .ip-form-stack .hospital-form-card { padding: 8px 12px; }
    .ip-identity-row { display: flex; align-items: center; gap: 8px; }
    .ip-identity-row > .hospital-check-inline { flex: none; margin: 0; }
    .ip-identity-row > .hospital-input { flex: 1; }
}
@media (min-width: 1024px) {
    /* Create OPD Bill: header fields on one line, each bill item as one slim row. */
    .hospital-app-content .opd-billing-form { max-width: none; padding: 8px 12px; }
    .opd-billing-form .hospital-form { gap: 8px; }
    .opd-billing-notice { margin-bottom: 6px; padding: 5px 10px; font-size: var(--fs-sm); line-height: 1.35; }
    .opd-billing-top-grid { grid-template-columns: 2.4fr 1fr 1fr 1.6fr 1fr 1fr; gap: 8px; padding-bottom: 8px; }
    .opd-billing-visit-field, .opd-billing-rate-field { grid-column: auto; }
    .opd-billing-top-grid .hospital-field label, .opd-billing-form .hospital-field label { margin-bottom: 2px; font-size: var(--fs-xs); line-height: 1.2; }
    .opd-billing-form .hospital-input { min-height: 30px; padding: 4px 8px; font-size: var(--fs-sm); }
    .opd-billing-workspace { grid-template-columns: minmax(0, 1fr) 270px; gap: 10px; }
    .opd-billing-lines-panel { gap: 6px; }
    .opd-billing-lines { gap: 6px; }
    .opd-billing-row { grid-template-columns: 2.1fr 1.9fr .7fr 1fr .8fr .9fr .7fr 1.3fr 1fr; gap: 2px 6px; padding: 5px 8px; }
    .opd-billing-service-select, .opd-billing-item-name, .opd-billing-notes { grid-column: auto; }
    .opd-billing-row-header { padding-bottom: 3px; }
    .opd-billing-row-title { font-size: var(--fs-sm); }
    .opd-billing-row-actions .hospital-button { min-height: 24px; padding: 2px 8px; }
    .opd-billing-line-total { min-height: 0; padding: 3px 8px; }
    .opd-billing-line-total strong { font-size: var(--fs-md); }
    .opd-billing-help { font-size: var(--fs-xs); line-height: 1.3; }
    .opd-billing-additional { gap: 8px; margin-top: 0; }
    .opd-billing-summary .opd-summary-card { padding: 8px 12px; }
    .opd-billing-summary .opd-summary-lines { gap: 3px; margin-top: 4px; }
    .opd-billing-summary .opd-summary-lines p { padding-bottom: 3px; }
    .opd-billing-adjustments { gap: 8px; margin-top: 8px; }
    .opd-billing-net { margin: 6px 0 4px; padding: 7px 10px; }
    .opd-billing-form .hospital-form-actions { gap: 8px; padding-top: 8px; }
    .opd-billing-form .hospital-form-actions .hospital-button { min-height: 32px; padding: 6px 16px; }
}
@media (min-width: 1024px) {
    /* OPD slips (registration / bill view): compact document card. */
    .hospital-app-content .opd-slip { max-width: none; gap: 8px; padding: 10px 14px; border-radius: 12px; box-shadow: 0 6px 16px rgba(16, 38, 74, .05); }
    .hospital-app-content .opd-slip-header { gap: 12px; padding-bottom: 8px; }
    .hospital-app-content .opd-slip-kicker { margin-bottom: 2px; font-size: var(--fs-xs); }
    .hospital-app-content .opd-slip h3 { font-size: var(--fs-lg); }
    .hospital-app-content .opd-slip p { margin-top: 2px; font-size: var(--fs-sm); }
    .hospital-app-content .opd-slip-number { min-width: 180px; padding: 6px 10px; border-radius: 10px; }
    .hospital-app-content .opd-slip-number strong { margin-top: 2px; font-size: var(--fs-lg); }
    .hospital-app-content .opd-detail-grid { gap: 6px; }
    .hospital-app-content .opd-detail { min-height: 0; padding: 6px 10px; border-radius: 10px; }
    .hospital-app-content .opd-detail strong { margin-top: 2px; font-size: var(--fs-md); }
    .hospital-app-content .opd-slip-number span, .hospital-app-content .opd-detail span { font-size: var(--fs-xs); }
    .hospital-app-content .opd-slip-section h3 { font-size: var(--fs-md); }
    .hospital-app-content .opd-bill-table-wrap { margin-top: 4px; }
    .hospital-app-content .opd-bill-table { min-width: 0; }
    .hospital-app-content .opd-bill-table th, .hospital-app-content .opd-bill-table td { padding: 5px 8px; font-size: var(--fs-sm); }
    .hospital-app-content .opd-bill-total-grid { gap: 10px; }
    .hospital-app-content .opd-bill-total-card { gap: 3px; padding: 8px 12px; border-radius: 10px; }
    .hospital-app-content .opd-bill-total-card span { font-size: var(--fs-sm); }
    .hospital-app-content .opd-bill-total-card strong { font-size: var(--fs-md); }
    .hospital-app-content .opd-bill-total-card-main { padding-block: 4px; }
    .hospital-app-content .opd-bill-total-card-main strong { font-size: var(--fs-lg); }
    /* Bill view: the bill on the left, "Collect balance" beside it. */
    .opd-bill-show-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: start; }
    .opd-bill-show-layout:has(> #collect) { grid-template-columns: minmax(0, 1fr) 300px; }
    .opd-bill-show-layout > #collect { grid-column: 2; grid-row: 1; margin: 0; gap: 6px; }
    .opd-bill-show-layout > .opd-slip { grid-column: 1; grid-row: 1; }
}
@media (min-width: 1024px) {
    .opd-billing-form .hospital-form-actions .hospital-button { width: auto; }
    .opd-billing-top-grid .hospital-field label { flex-wrap: nowrap; white-space: nowrap; }
    .hospital-app-content .opd-bill-total-card { grid-template-columns: 1fr 1fr; column-gap: 18px; }
    .hospital-app-content .opd-bill-total-card-main { grid-column: 1 / -1; }
    .opd-bill-show-layout > #collect p { font-size: var(--fs-sm); margin: 0; }
}
/* Shared input height token: 30px everywhere in the app (entry grids stay slimmer). */
.hospital-app-content .hospital-input { min-height: 30px; }
.hospital-app-content .ph-grid .hospital-input { min-height: 0; }
@media (min-width: 1024px) {
    /* Master and settings forms: use the screen width (4 fields a row), compact choice chips, sticky actions. */
    .hospital-app-content :is(.doctor-master-form-card, .rate-card-master-form-card, .rate-type-master-form-card, .service-group-master-form-card, .service-master-form-card, .hospital-users-form-card, .user-access-card) { max-width: none; padding: 10px 12px; border-radius: 12px; }
    .hospital-app-content :is(.navigation-master-form, .department-master-form, .hospital-detail-form, .doctor-master-form, .rate-card-master-form, .rate-type-master-form, .service-group-master-form, .service-master-form) .hospital-form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 10px; }
    .hospital-app-content .doctor-fee-pair { grid-column: span 2; gap: 10px; }
    .hospital-app-content :is(.navigation-master-form, .department-master-form, .hospital-detail-form, .hospital-configuration-form, .doctor-master-form, .hospital-users-form, .user-access-card, .rate-card-master-form, .rate-type-master-form, .service-group-master-form, .service-master-form) .hospital-field label { margin-bottom: 2px; font-size: var(--fs-xs); }
    .hospital-app-content .hospital-day-grid { gap: 6px; }
    .hospital-app-content .hospital-day-option { min-height: 30px; padding: 4px 8px; border-radius: 8px; font-size: var(--fs-sm); }
    /* Users: the account fields in three columns; role / ward / store chips full width. */
    .hospital-app-content .hospital-users-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
    .hospital-app-content .hospital-users-form > :not(.hospital-field):not(input),
    .hospital-app-content .hospital-users-form > .hospital-field:has(.hospital-day-grid),
    .hospital-app-content .hospital-users-form > .hospital-field:has(.hospital-choice-grid) { grid-column: 1 / -1; }
    .hospital-app-content .hospital-choice-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    /* A long form keeps its Save / Back bar on screen. */
    .hospital-app-content .hospital-form-actions { position: sticky; bottom: -12px; z-index: 5; margin-bottom: -12px; padding: 6px 0 12px; background: linear-gradient(180deg, rgba(247, 250, 255, .92), #f7faff 40%); }
}
@media (min-width: 1024px) {
    .hospital-app-content .doctor-master-form .hospital-textarea { min-height: 44px; }
    /* Edit User: account form and sign-in & security side by side (security scrolls inside). */
    .hospital-users-edit-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 10px; align-items: start; }
    .hospital-users-edit-layout > .hospital-users-security-card { margin: 0; overflow: auto; }
    .hospital-users-edit-layout .hospital-users-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
    /* Hospital Configuration: sections two a row, a section bar at the top, Save always on screen. */
    .hospital-app-content .hospital-configuration-form { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
    .hospital-app-content .hospital-configuration-form > :not(.hospital-configuration-form-card),
    .hospital-app-content .hospital-configuration-form > #ip-settings,
    .hospital-app-content .hospital-configuration-form > #pharmacy-settings,
    .hospital-app-content .hospital-configuration-form > #number-series { grid-column: 1 / -1; }
    .hospital-app-content .hospital-configuration-form-card { margin: 0; scroll-margin-top: 44px; }
    .hospital-app-content .hospital-configuration-form-card h3 { margin-bottom: 6px; font-size: var(--fs-md); }
    .hospital-app-content .hospital-configuration-form-card > .hospital-field-hint { margin-bottom: 6px; }
    .hospital-config-nav { position: sticky; top: -12px; z-index: 6; display: flex; flex-wrap: wrap; gap: 4px; margin: 0 -2px; padding: 6px 2px; background: #f7faff; }
    .hospital-config-nav a { padding: 3px 10px; border-radius: 8px; border: 1px solid rgba(96, 112, 137, .18); background: #fff; color: var(--hospital-blue-900); font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
    .hospital-app-content .hospital-configuration-form > .hospital-button { position: sticky; bottom: 0; z-index: 5; justify-self: end; width: auto; padding-inline: 28px; box-shadow: 0 8px 20px rgba(255, 95, 49, .28); }
}
@media (min-width: 1024px) {
    /* Roles & Menu Access: role list and menu tree scroll inside their own boxes; compact menu chips. */
    .access-layout { grid-template-columns: 230px minmax(0, 1fr); gap: 10px; }
    .access-role-list { gap: 4px; overflow: auto; }
    .access-role { padding: 4px 8px; border-radius: 8px; }
    .access-role strong { font-size: var(--fs-sm); }
    .access-role span { font-size: var(--fs-xs); }
    .access-menu-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; overflow: auto; padding: 2px; }
    .hospital-app-content .hospital-access-group, .hospital-app-content .hospital-access-submenus { gap: 3px; }
    .hospital-app-content .hospital-check-option { min-height: 28px; padding: 4px 8px; border-radius: 8px; gap: 6px; }
    .hospital-app-content .hospital-check-option--sub { min-height: 26px; padding: 3px 8px; }
    .hospital-app-content .hospital-check-option strong { font-size: var(--fs-sm); }
    .hospital-app-content .hospital-check-option small { margin-top: 1px; font-size: var(--fs-xs); }
    .hospital-app-content .hospital-check-option:hover { transform: none; box-shadow: none; }
    .hospital-app-content .hospital-check-inline { padding: 4px 10px; font-size: var(--fs-sm); }
    .hospital-app-content .hospital-access-save { width: auto; align-self: flex-end; justify-self: end; padding-inline: 24px; }
    .hospital-app-content .hospital-access-summary { padding: 6px 10px; }
}
@media (min-width: 1024px) {
    /* IP screens with a list + side panel (IP Billing, Bed Board, Admission Request, Admission): both fill the height. */
    /* Record Discharge Summary: section list and form scroll inside; Save draft / Sign stay at the bottom of the form. */
    .ip-summary-sections[data-fill-height], .ip-summary-main[data-fill-height] { overflow: auto; }
    .hospital-app-content .ip-summary-main { max-width: none; }
    .ip-summary-main .ip-actions--split { position: sticky; bottom: -10px; z-index: 3; margin: 6px -12px -10px; padding: 6px 12px 10px; background: #f7faff; border-top: 1px solid rgba(96, 112, 137, .14); }
}
@media (min-width: 1024px) {
    /* Inputs inside tables (discharge medicines, rate rows, prescription grids): slim cells. */
    .hospital-app-content .hospital-table td > .hospital-input,
    .hospital-app-content .hospital-table td > input.platform-table-input,
    .hospital-app-content .hospital-table td > select.platform-table-input { min-height: 26px; padding: 3px 6px; font-size: var(--fs-sm); }
    .hospital-app-content .ip-summary-main textarea.hospital-input { min-height: 44px; }
}
@media (min-width: 1024px) {
    .hospital-app-content .hospital-page-heading > .dash-welcome { margin: 0 auto 0 6px; }
    .dash-task-scroll { max-height: 156px; }
}
@media (min-width: 1024px) {
    /* Doctor Desk: queue fills the height; the consultation uses the full width; tabs on one line; prescription columns sized. */
    .dd-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 10px; }
    .dd-queue[data-fill-height] { max-height: none; }
    .dd-queue { gap: 4px; }
    .dd-queue-item { padding: 4px 8px; }
    .hospital-app-content .dd-card, .hospital-app-content .dd-main > .hospital-form-card { max-width: none; }
    .hospital-app-content .dd-tabs { gap: 4px; }
    .hospital-app-content .dd-tabs .access-tab { padding: 4px 10px; font-size: var(--fs-sm); }
    .dd-table[data-dd-rows="prescription"] { table-layout: fixed; }
    .dd-table[data-dd-rows="prescription"] th:nth-child(1) { width: 3%; }
    .dd-table[data-dd-rows="prescription"] th:nth-child(2) { width: 30%; }
    .dd-table[data-dd-rows="prescription"] th:nth-child(3) { width: 8%; }
    .dd-table[data-dd-rows="prescription"] th:nth-child(4) { width: 15%; }
    .dd-table[data-dd-rows="prescription"] th:nth-child(5),
    .dd-table[data-dd-rows="prescription"] th:nth-child(6) { width: 7%; }
    .dd-table[data-dd-rows="prescription"] th:nth-child(7) { width: 10%; }
    .dd-table[data-dd-rows="prescription"] th:nth-child(8) { width: 20%; }
    .dd-table[data-dd-rows="prescription"] td > * { width: 100%; }
}
@media (min-width: 1024px) {
    .ip-care-card[data-fill-height] { max-height: none; }
}
@media (min-width: 1024px) {
    /* Packages: the form fills the height; payer choices on one line. */
    .ip-package-form[data-fill-height] { max-height: none; }
    .ip-package-form .dd-grid > .dd-wide { grid-column: span 2; }
    .hospital-app-content .ip-actions .hospital-check-inline { padding: 3px 8px; }
}
@media (min-width: 1024px) {
    /* Filter bars: buttons take their own width, not a whole grid column. */
    .hospital-app-content .hospital-filter-form .hospital-button { width: auto; white-space: nowrap; }
}
@media (min-width: 1024px) {
    /* Fold-out action panels (Reject, Cancel discharge, Reset password, Lock user): compact header. */
    .hospital-app-content .users-action-panel { margin-top: 6px; border-radius: 10px; }
    .hospital-app-content .users-action-panel > summary { padding: 5px 10px; font-size: var(--fs-sm); }
}
@media (min-width: 1024px) {
    .dash-task-scroll { max-height: 136px; }
    .hospital-app-content .opd-slip { gap: 6px; }
    .hospital-app-content .opd-slip-section h3 { margin: 0; }
    .opd-bill-show-layout > #collect .hospital-field label { margin-bottom: 1px; }
    .hospital-app-content .hospital-users-form .hospital-day-option { min-height: 28px; padding: 3px 8px; }
    .hospital-app-content .hospital-users-form .hospital-day-grid { gap: 4px; }
    .hospital-app-content .doctor-master-form .hospital-textarea { min-height: 34px; }
    .hospital-app-content .doctor-master-form .hospital-form-grid { row-gap: 4px; }
}
@media (min-width: 1024px) {
    .hospital-app-content .doctor-master-form .hospital-textarea { height: 48px; }
    .opd-bill-show-layout { margin-bottom: 0; }
    .hospital-app-content .opd-bill-show-layout > .opd-slip { padding-bottom: 8px; }
}
@media (min-width: 1024px) {
    /* Stat cards (profile, platform): compact. */
    .hospital-app-content .hospital-card-grid { gap: 8px; }
    .hospital-app-content .hospital-stat { padding: 8px 12px; border-radius: 12px; box-shadow: 0 6px 16px rgba(16, 38, 74, .05); }
    .hospital-app-content .hospital-stat .label { font-size: var(--fs-xs); }
    .hospital-app-content .hospital-stat .value { margin-top: 2px; font-size: var(--fs-md); }
}
@media (min-width: 1024px) {
    .hospital-app-content [class*="-master-filter"] .hospital-button { width: auto; white-space: nowrap; }
}
@media (min-width: 1024px) {
    /* IP prescription grid: room for the medicine name. */
    .ip-rx-table { table-layout: fixed; }
    .ip-rx-table th:nth-child(1) { width: 21%; }
    .ip-rx-table th:nth-child(2) { width: 9%; }
    .ip-rx-table th:nth-child(3), .ip-rx-table th:nth-child(4) { width: 8%; }
    .ip-rx-table th:nth-child(5) { width: 12%; }
    .ip-rx-table th:nth-child(6) { width: 11%; }
    .ip-rx-table th:nth-child(7) { width: 12%; }
    .ip-rx-table th:nth-child(8) { width: 8%; }
    .ip-rx-table th:nth-child(9) { width: 11%; }
    .ip-rx-table td > * { width: 100%; }
}
@media (min-width: 1024px) {
    /* OPD Bill List: ten fixed columns; row actions on one or two short lines. */
    .hospital-table--billing th:nth-child(1) { width: 14%; }
    .hospital-table--billing th:nth-child(2) { width: 14%; }
    .hospital-table--billing th:nth-child(3) { width: 12%; }
    .hospital-table--billing th:nth-child(4) { width: 10%; }
    .hospital-table--billing th:nth-child(5) { width: 8%; }
    .hospital-table--billing th:nth-child(6),
    .hospital-table--billing th:nth-child(7),
    .hospital-table--billing th:nth-child(8) { width: 7%; }
    .hospital-table--billing th:nth-child(9) { width: 7%; }
    .hospital-table--billing th:nth-child(10) { width: 14%; }
    .hospital-app-content .hospital-table--billing .hospital-inline-link { min-width: 0; padding: 2px 7px; font-size: var(--fs-xs); }
}
@media (min-width: 1024px) {
    .hospital-app-content .hospital-table--billing { min-width: 0; table-layout: fixed; }
}
@media (min-width: 1024px) {
    /* Session details on the dashboard stay a one-line strip (after the shared stat-card rule). */
    .hospital-app-content .dash-session { gap: 4px 18px; }
    .hospital-app-content .dash-session .hospital-stat { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
    .hospital-app-content .dash-session .hospital-stat .label { font-size: var(--fs-xs); }
    .hospital-app-content .dash-session .hospital-stat .value { margin: 0; font-size: var(--fs-sm); }
}
.dd-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* IP Admission: the Admit button stays at the bottom of the right panel while that panel scrolls. */
.ip-admit-actions { position: sticky; bottom: 0; z-index: 3; display: grid; gap: 6px; padding: 6px 0 0; background: linear-gradient(180deg, rgba(247, 250, 255, 0), #f7faff 30%); }
.ip-admit-actions .hospital-field-hint { margin: 0; }
/* ---------- Sign-in page ---------- */
.auth-login-body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 12% 18%, #dcecff 0, transparent 40%), radial-gradient(circle at 88% 82%, #dff6e6 0, transparent 38%), #f4f8fd; }
.auth-login { display: grid; grid-template-columns: 1.05fr 1fr; width: min(1180px, calc(100vw - 48px)); min-height: min(620px, calc(100vh - 48px)); margin: 24px auto; overflow: hidden;
    border-radius: 24px; background: #fff; box-shadow: 0 24px 60px rgba(22, 62, 92, .16); }
.auth-login-brand { display: flex; flex-direction: column; justify-content: center; gap: 16px; padding: 40px 52px; color: #fff;
    background: linear-gradient(145deg, #163e5c 0%, #1565d8 55%, #1fb24d 140%); }
.auth-login-logo { width: 160px; padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .12); }
.auth-login-logo img { display: block; width: 100%; height: auto; }
.auth-login-brand h1 { margin: 6px 0 0; color: #fff; font-size: 1.9rem; line-height: 1.25; }
.auth-login-lead { max-width: 440px; margin: 0; font-size: var(--fs-md); line-height: 1.5; opacity: .9; }
.auth-login-contact { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 6px; margin: 0; font-size: .8rem; opacity: .92; }
.auth-login-contact svg { flex: 0 0 auto; opacity: .85; }
.auth-login-contact a { color: #fff; font-weight: 600; text-decoration: none; }
.auth-login-contact a:hover { text-decoration: underline; }
.auth-login-contact i { font-style: normal; opacity: .55; }
.auth-login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 40px; background: #f9fbfe; }
.auth-login-card { width: 100%; max-width: 380px; }
.auth-login-card h2 { margin: 0; color: #163e5c; font-size: var(--fs-2xl); }
.auth-login-hint { margin: 4px 0 14px; color: var(--hospital-slate); font-size: var(--fs-md); }
.auth-login-alert { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; font-size: var(--fs-sm); }
.auth-login-form { display: grid; }
.auth-login-label { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 4px; color: #182b40; font-size: var(--fs-sm); font-weight: 600; }
.auth-login-input { display: flex; align-items: center; gap: 8px; height: 42px; padding: 0 10px; border: 1px solid #cfdae6; border-radius: 11px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.auth-login-input:focus-within { border-color: #1565d8; box-shadow: 0 0 0 3px rgba(21, 101, 216, .14); }
.auth-login-input--invalid { border-color: #d64545; }
.auth-login-input svg { flex-shrink: 0; width: 18px; height: 18px; fill: #7b8ca3; }
.auth-login-input input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #182b40; font: inherit; font-size: var(--fs-md); }
.auth-login-eye { flex-shrink: 0; padding: 4px 9px; border: 0; border-radius: 8px; background: #eef4fc; color: #163e5c; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.auth-login-remember { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: #475569; font-size: var(--fs-sm); cursor: pointer; }
.auth-login-caps { margin: 5px 0 0; color: #b3561d; font-size: var(--fs-sm); font-weight: 600; }
.auth-login-form .hospital-error { margin: 4px 0 0; }
.auth-login-submit { width: 100%; height: 44px; margin-top: 16px; }
.auth-login-links { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 12px; color: var(--hospital-slate); font-size: var(--fs-sm); text-align: center; }
.auth-login-links a { color: #1565d8; font-weight: 600; text-decoration: none; }
.auth-login-foot { margin: 18px 0 0; color: #94a3b8; font-size: var(--fs-xs); }
@media (max-width: 900px) {
    .auth-login { grid-template-columns: 1fr; width: calc(100vw - 32px); margin: 16px auto; }
    .auth-login-brand { padding: 28px; }
    .auth-login-brand h1 { font-size: var(--fs-xl); }
}
.auth-login { position: relative; z-index: 1; }
/* Sign-in page: same sizes as the approved preview (ui-preview/login.html). */
.auth-login { height: min(640px, calc(100vh - 70px)); min-height: 0; margin: 24px auto 0; }
.auth-login-brand { gap: 14px; padding: 40px 48px; }
.auth-login-logo { width: 338px; }
/* owner 30-09-2026: logo 50% bigger twice (150 → 225 → 338px) */
.auth-login-brand h1 { font-size: 1.75rem; }
.auth-login-lead { font-size: var(--fs-md); line-height: normal; }
.auth-login-input i { font-style: normal; font-size: var(--fs-md); opacity: .75; }
.auth-login-input input { height: auto; }
@media (max-width: 900px) {
    .auth-login { height: auto; }
}
/* ---------- Laboratory (Phase 4) ---------- */
.lab-tube { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--hospital-ink); white-space: nowrap; }
.lab-tube::before { content: ""; width: 10px; height: 16px; border-radius: 3px 3px 5px 5px; border: 1px solid rgba(0, 0, 0, .2); background: var(--tube, #ccc); flex-shrink: 0; }
.lab-spec { display: grid; gap: 4px; padding: 7px 9px; border: 1px solid #d6e0ee; border-radius: 10px; background: #fff; }
.lab-spec-head { display: flex; align-items: center; gap: 8px; }
.lab-spec-head .hospital-field-hint { margin-left: auto; }
.lab-spec-tests { display: flex; flex-wrap: wrap; gap: 4px; }
.lab-spec-tests span { padding: 1px 7px; border-radius: 6px; background: #eef4fc; color: var(--hospital-blue-900); font-size: var(--fs-xs); }
.lab-spec--done { border-color: #b8e5c4; background: #f3fbf5; }
.lab-spec--recollect { border-color: #f3a894; background: #fff6f3; }
.lab-acc { font: 600 var(--fs-sm) ui-monospace, Consolas, monospace; color: var(--hospital-blue-900); white-space: nowrap; }
.lab-flag { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 5px; font-size: var(--fs-xs); font-weight: 600; text-align: center; }
.lab-flag--h { background: rgba(255, 95, 49, .14); color: #b3391d; }
.lab-flag--l { background: rgba(21, 101, 216, .12); color: var(--hospital-blue-900); }
.lab-flag--c { background: #b3391d; color: #fff; }
.lab-in--h { color: #b3391d !important; font-weight: 600; }
.lab-in--l { color: var(--hospital-blue-700) !important; font-weight: 600; }
.lab-in--c { color: #fff !important; background: #b3391d !important; font-weight: 600; }
.lab-row-crit td { background: #fff1ee !important; }
.lab-row-group td { background: #f3f7fc !important; color: var(--hospital-blue-900); font-size: var(--fs-sm); font-weight: 600; }
.lab-formula { padding: 1px 6px; border-radius: 5px; background: #f1ecff; color: #4b2aa8; font: 600 var(--fs-xs) ui-monospace, Consolas, monospace; white-space: nowrap; }
.lab-delta { color: var(--hospital-slate); font-size: var(--fs-xs); }
.lab-tat { font-size: var(--fs-xs); font-weight: 600; color: #136c31; white-space: nowrap; }
.lab-tat--warn { color: #8a5a00; }
.lab-tat--late { color: #b3391d; }
.lab-chip { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: var(--fs-xs); font-weight: 600; }
.lab-chip--op { background: #e3eeff; color: #1a4fa8; }
.lab-chip--ip { background: #ffe7dc; color: #b3391d; }
.lab-chip--urgent { background: #b3391d; color: #fff; }
.lab-chip--recollect { background: #fff1d6; color: #8a5a00; }
.lab-chip--ok { background: rgba(31, 200, 77, .16); color: #136c31; }
.lab-chip--muted { background: #eef2f6; color: var(--hospital-slate); }
.lab-meta { display: block; color: var(--hospital-slate); font-size: var(--fs-xs); }
.lab-urgent-row td:first-child { box-shadow: inset 3px 0 0 #d94722; }
.lab-selected td { background: #eef4ff !important; }
tr[data-href] { cursor: pointer; }
.lab-split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; min-height: 0; }
.lab-split--wide { grid-template-columns: minmax(0, 1fr) 330px; }
.lab-side { display: grid; gap: 8px; align-content: start; min-width: 0; }
.lab-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 10px; border-radius: 10px; background: linear-gradient(90deg, #eef5ff, #effaf2); font-size: var(--fs-sm); }
.lab-strip b { font-size: var(--fs-md); }
.lab-stat-row { display: flex; flex-wrap: wrap; gap: 5px; }
.lab-sir { display: inline-flex; gap: 3px; }
.lab-sir label { position: relative; display: inline-grid; place-items: center; width: 24px; height: 22px; border: 1px solid #d6e0ee; border-radius: 5px; background: #fff; color: var(--hospital-slate); font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.lab-sir input { position: absolute; opacity: 0; pointer-events: none; }
.lab-sir label:has(input[value="S"]:checked) { border-color: #8fd3a3; background: rgba(31, 200, 77, .16); color: #136c31; }
.lab-sir label:has(input[value="I"]:checked) { border-color: #f2d49b; background: #fff1d6; color: #8a5a00; }
.lab-sir label:has(input[value="R"]:checked) { border-color: #f3a894; background: rgba(255, 95, 49, .16); color: #b3391d; }
.lab-dialog { width: min(620px, 94vw); margin: auto; padding: 16px; border: 0; border-radius: 14px; box-shadow: 0 20px 50px rgba(22, 62, 92, .3); }
.lab-dialog::backdrop { background: rgba(15, 30, 50, .35); }
.lab-dialog--crit { border-left: 5px solid #b3391d; }
.lab-dialog .hospital-form-grid { margin-bottom: 8px; }
.lab-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.lab-alert-crit { padding: 7px 10px; border-radius: 10px; background: #fff1ee; color: #a4281b; font-size: var(--fs-sm); }
.lab-stages { display: flex; flex-wrap: wrap; gap: 4px; }
.lab-stages span { padding: 2px 9px; border-radius: 99px; border: 1px solid #d6e0ee; font-size: var(--fs-xs); font-weight: 600; color: var(--hospital-slate); }
.lab-stages span.is-done { border-color: #b8e5c4; background: #f3fbf5; color: #136c31; }
.lab-stages span.is-now { border-color: #1565d8; background: #1565d8; color: #fff; }
.lab-results-inline { display: flex; flex-wrap: wrap; gap: 3px 10px; font-size: var(--fs-xs); }
.lab-results-inline span b { font-weight: 600; }
.lab-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.lab-textarea { min-height: 64px; }
.lab-entry-scroll { max-height: calc(100vh - 250px); overflow: auto; }
.lab-mono { font-family: ui-monospace, Consolas, monospace; }
.lab-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin-bottom: 8px; }
.lab-bar .access-tabs { margin: 0; }
.lab-inline-form { display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 4px; }
.lab-inline-form .hospital-input { width: auto; min-width: 0; max-width: 150px; padding: 3px 6px; font-size: var(--fs-sm); }
.lab-dl { display: grid; grid-template-columns: 76px 1fr; gap: 3px 8px; margin: 0; font-size: var(--fs-sm); }
.lab-dl dt { color: var(--hospital-slate); }
.lab-dl dd { margin: 0; }
.lab-order-lab { display: block; margin-top: 3px; }
.lab-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; }
.lab-form-grid .lab-span2 { grid-column: span 2; }
.lab-form-grid .hospital-field--full { grid-column: 1 / -1; }
.lab-nowrap { white-space: nowrap; }
.lab-split { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.lab-split--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.lab-entry-scroll { max-height: calc(100vh - 330px); }
.lab-param-scroll { max-height: calc(100vh - 500px); overflow: auto; }
.lab-param-scroll { max-height: calc(100vh - 580px); min-height: 120px; }
td.lab-acc { white-space: normal; word-break: break-word; }
/* Dashboard (OP + IP + Pharmacy, NABH) — 30-09-2026. Tabs: overview · NABH · live operations · tasks · lab. */
.dash-shell { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.dash-tab-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dash-tab-row .dash-module-tabs { margin: 0; }
.dash-module-tabs .access-tab, .nabh-chapters .access-tab { cursor: pointer; }
.dash-tab-count { margin-left: 4px; padding: 0 6px; border-radius: 6px; background: rgba(96, 112, 137, .14); font-size: var(--fs-xs); }
.access-tab--active .dash-tab-count { background: rgba(255, 255, 255, .25); }
.dash-legend { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-panel { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.dash-panel[hidden], .is-filtered-out { display: none !important; }
.dash-tiles--overview { grid-template-columns: repeat(var(--dash-tiles, 3), minmax(0, 1fr)); margin-bottom: 0; }
.dash-tiles--overview .dash-split strong { font-size: var(--fs-lg); white-space: nowrap; }
.dash-tiles--overview .dash-tile small { font-size: var(--fs-xs); line-height: 1.35; }
.dash-tile h3 { display: flex; align-items: center; gap: 6px; }
.dash-dept--opd { --dept: var(--hospital-blue-700); }
.dash-dept--ipd { --dept: var(--hospital-orange-600); }
.dash-dept--ph { --dept: var(--hospital-green-600); }
i.dash-dept { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 3px; background: var(--dept); vertical-align: 1px; }
.dash-bar[class*="dash-dept--"] i { background: var(--dept); }
.dash-overview-row { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 8px; min-height: 0; }
.dash-overview-row--single { grid-template-columns: minmax(0, 1fr); }
.dash-card--flex { display: flex; flex-direction: column; gap: 6px; min-height: 0; margin: 0; }
.dash-card--flex .hospital-card-title { display: flex; align-items: center; gap: 8px; margin: 0; }
.dash-card-link { margin-left: auto; font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; }
.dash-revenue th { white-space: normal; line-height: 1.15; }
.dash-share { display: flex; align-items: center; gap: 6px; min-width: 70px; }
.dash-share .dash-bar { flex: 1; min-width: 30px; }
.dash-share em { width: 34px; color: var(--hospital-slate); font-size: var(--fs-xs); font-style: normal; text-align: right; }
.dash-modes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: var(--hospital-slate); font-size: var(--fs-sm); }
.dash-modes span { padding: 2px 9px; border-radius: 999px; background: #f1f5fb; }
.dash-modes b { color: var(--hospital-ink); font-variant-numeric: tabular-nums; }
.dash-attention-title { margin-top: 4px !important; }
.dash-attention { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.dash-attention .opd-kpi { padding: 5px 9px; text-decoration: none; color: inherit; }
.dash-attention .opd-kpi strong { font-size: var(--fs-lg); }
.nabh-chapters { margin: 0; }
.dash-ops { display: grid; grid-template-columns: repeat(var(--dash-ops, 3), minmax(0, 1fr)); gap: 8px; min-height: 0; }
.dash-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.dash-mini--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-mini .opd-kpi { padding: 4px 8px; }
.dash-mini .opd-kpi strong { font-size: var(--fs-lg); }
.dash-sub { margin: 2px 0 0; color: var(--hospital-blue-700); font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; }
.dash-ward-bar { width: 50%; }
.dash-indent-scroll { max-height: 128px; overflow: auto; }
/* Dashboard v3 (owner 10-10-2026): attention in 2 columns beside the revenue, Pharmacy tab in 3 columns, one-line cells. */
.dash-attention--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dash-moved { margin: 0; }
.dash-ph { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 8px; min-height: 0; }
.hospital-table.dash-fixed { table-layout: fixed; width: 100%; }
.hospital-table.dash-fixed td, .hospital-table.dash-fixed th { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dash-fixed .opd-status { margin-right: 4px; }
.dash-late { color: #b3391d; }
.dash-ph .dash-attention { gap: 5px; }
.dash-ph .dash-attention .opd-kpi { padding: 3px 8px; gap: 0; }
.dash-ph .dash-attention .opd-kpi strong { font-size: var(--fs-md); line-height: 1.2; }
.dash-ph .dash-attention .opd-kpi em, .dash-ph .dash-attention .opd-kpi span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-fixed .opd-status { padding: 0 5px; font-size: var(--fs-xs); }
@media (max-width: 1000px) {
    .dash-ph { grid-template-columns: minmax(0, 1fr); }
}
.hospital-table .nw { white-space: nowrap; }
/* NABH indicators: status pills, trend marks, source tags, chapter rows. */
.nabh-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.nabh-trend { margin-left: 4px; font-weight: 600; color: var(--hospital-slate); }
.nabh-table .nabh-group td { background: #eef3fa; color: var(--hospital-blue-900); font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; }
.nabh-table .nabh-code { white-space: nowrap; font-weight: 600; }
.nabh-table .nabh-remark td { padding-top: 0; border-top: 0; }
.nabh-entry-table .hospital-input { min-height: 30px; padding: 4px 7px; }
.nabh-entry-table .nabh-in { width: 90px; text-align: right; }
.nabh-entry-table tr.nabh-auto td { color: var(--hospital-slate); }
.nabh-entry-table tr[data-attention] td { background: #fff7f5; }
.nabh-entry-table .hospital-input.is-invalid { border-color: #b3391d; background: #fff5f2; }
@media (min-width: 1024px) {
    .hospital-app-content .dash-shell .hospital-page-heading { margin-bottom: 4px; }
    .dash-overview-row .dash-card--flex { min-height: 0; }
}
@media (max-width: 1000px) {
    .dash-tiles--overview, .dash-overview-row, .dash-ops { grid-template-columns: minmax(0, 1fr); }
    .dash-attention { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.dash-panel .hospital-form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin: 0; }
.dash-panel .hospital-form-actions .hospital-button { width: auto; }
.dash-panel .hospital-form-actions > .hospital-field-hint { margin-right: auto; }
.dash-panel .hospital-form-actions > .hospital-input { flex: 1; max-width: 420px; }
.nabh-add-card > summary { cursor: pointer; list-style: none; }
.nabh-add-card[open] > summary { margin-bottom: 8px; }
/* Dashboard period filter (30-09-2026). */
.dash-period { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; }
.dash-period .access-tab { padding: 5px 9px; font-size: var(--fs-sm); }
.dash-period .hospital-input { width: auto; min-height: 30px; padding: 3px 7px; font-size: var(--fs-sm); }
.dash-period .hospital-button--compact { min-height: 30px; padding: 4px 12px; }
.dash-period-range { display: inline-flex; align-items: center; gap: 4px; color: var(--hospital-slate); font-size: var(--fs-xs); }
.dash-period [data-period-field][hidden] { display: none !important; }
.dash-chg { display: inline-block; margin-left: 3px; padding: 0 5px; border-radius: 6px; font-family: var(--hospital-body, inherit); font-size: var(--fs-xs); font-style: normal; font-weight: 600; vertical-align: middle; }
.dash-chg--up { background: rgba(31, 200, 77, .16); color: #136c31; }
.dash-chg--down { background: rgba(255, 95, 49, .14); color: #b3391d; }
.dash-live { padding: 0 6px; border-radius: 6px; background: #fff1d6; color: #8a5a00; font-size: var(--fs-xs); font-weight: 600; letter-spacing: 0; text-transform: none; }
.dash-tiles--overview .dash-split span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-period .access-tab { padding: 4px 8px; font-size: var(--fs-xs); }
.dash-period input[type="date"] { width: 128px; }
.dash-period input[type="month"] { width: 140px; }
.dash-card--flex .hospital-card-title .hospital-row-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Common patient search (30-09-2026): UHID / name / mobile / OP / IP no. */
.patient-search { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.patient-search > label { display: flex; justify-content: space-between; gap: 8px; }
.patient-search-req { color: #b3391d; }
.patient-search-box { position: relative; }
.patient-search-input { width: 100%; padding-left: 30px !important; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23607089' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 10px center; }
.patient-search-results { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 3px); max-height: 340px; overflow: auto; border: 1px solid #c9d4e3; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(16, 38, 74, .16); }
.patient-search-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; width: 100%; padding: 6px 10px; border: 0; border-bottom: 1px solid #eef2f7; background: #fff; color: var(--hospital-ink); text-align: left; font: inherit; font-size: var(--fs-sm); cursor: pointer; }
.patient-search-result:hover, .patient-search-result.is-active { background: #eef6ff; }
.patient-search-result[disabled] { cursor: not-allowed; background: #f6f7f9; color: #7b8799; }
.patient-search-result em { font-style: normal; font-size: var(--fs-xs); color: var(--hospital-slate); }
.patient-search-result em:last-child { text-align: right; }
.patient-search-name { font-weight: 600; }
.patient-search-tag { justify-self: end; padding: 0 6px; border-radius: 6px; background: rgba(21, 101, 216, .1); color: var(--hospital-blue-900); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.patient-search-tag:empty { visibility: hidden; padding: 0; }
.patient-search-tag--ip { background: #111; color: #fff; }
.patient-search-result[disabled] .patient-search-tag--ip { background: #b3391d; }
.patient-search-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 10px; border: 1px solid #b9d4f5; border-radius: 10px; background: #f1f7ff; font-size: var(--fs-sm); }
.patient-search-picked[hidden], .patient-search-box[hidden] { display: none !important; }
.patient-search-change { margin-left: auto; border: 0; background: none; cursor: pointer; font: inherit; font-size: var(--fs-sm); }
.patient-search-note:empty { display: none; }
/* Create OPD Bill: patient, then the OP visits of the last 7 days; collection after the net amount. */
.opd-billing-patient-field { grid-column: span 2; }
.opd-billing-top-grid .opd-billing-visit-field { grid-column: 1 / span 3; grid-row: 2; }
.opd-billing-top-grid .opd-billing-rate-field { grid-column: 4; grid-row: 2; }
.opd-visit-placeholder { margin: 0; padding: 8px 10px; border: 1px dashed #c9d4e3; border-radius: 8px; color: var(--hospital-slate); font-size: var(--fs-sm); }
.opd-visit-placeholder[hidden], .opd-visit-empty[hidden] { display: none !important; }
.opd-visit-list { display: grid; gap: 4px; max-height: 132px; overflow: auto; }
.opd-visit-list:empty { display: none; }
.opd-visit-list--invalid { outline: 1px solid #b3391d; border-radius: 8px; }
.opd-visit-option { display: grid; grid-template-columns: auto 110px 110px minmax(0, 1fr) minmax(0, 1fr) auto auto; align-items: center; gap: 8px; margin: 0 !important; padding: 5px 10px; border: 1px solid #d8e1ec; border-radius: 8px; background: #fff; font-size: var(--fs-sm) !important; cursor: pointer; }
.opd-visit-option:has(input:checked) { border-color: var(--hospital-blue-700, #1565d8); background: #eef6ff; }
.opd-visit-option.is-disabled { cursor: not-allowed; background: #f6f7f9; color: #7b8799; }
.opd-visit-option span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opd-visit-tag { padding: 0 6px; border-radius: 6px; background: rgba(21, 101, 216, .1); color: var(--hospital-blue-900); font-size: var(--fs-xs); font-style: normal; font-weight: 600; white-space: nowrap; }
.opd-visit-tag--off { background: #fdecea; color: #b3391d; }
.opd-visit-tag--orders { background: #fff4dc; color: #795418; }
.opd-visit-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border: 1px solid #ecd7a5; border-radius: 8px; background: #fff9ed; color: #795418; font-size: var(--fs-sm); font-weight: 600; }
.opd-billing-collection { display: grid; gap: 8px; margin: 8px 0 4px; }
.opd-billing-additional { grid-template-columns: 1fr; }
@media (max-width: 900px) {
    .opd-billing-top-grid .opd-billing-visit-field, .opd-billing-top-grid .opd-billing-rate-field { grid-column: 1 / -1; grid-row: auto; }
    .opd-visit-option { grid-template-columns: auto 1fr 1fr; }
}
.collection-fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 10px; }
.collection-fields > .hospital-field:last-child { grid-column: 1 / -1; }
/* Bill summary fits 1366×768: totals in pairs, mode | reference side by side, received / due / status in one row. */
.opd-billing-summary .opd-summary-lines--pair { grid-template-columns: 1fr 1fr; column-gap: 14px; }
.opd-billing-summary .opd-summary-lines--pair p:nth-last-child(2) { padding-bottom: 0; border-bottom: 0; }
.opd-billing-summary .opd-summary-lines--due { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.opd-billing-summary .opd-summary-lines--due p { display: grid; gap: 2px; padding: 0; border: 0; }
.opd-billing-summary .opd-summary-lines--due strong { text-align: left; }
.opd-billing-summary .opd-billing-collection { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.opd-billing-summary .opd-billing-collection > .hospital-field:last-child { grid-column: 1 / -1; }
/* Patient search in a narrow side panel (Admission Request, Appointment): one column, the tag on its own line. */
.patient-search-results { container-type: inline-size; }
@container (max-width: 520px) {
    .patient-search-result { grid-template-columns: minmax(0, 1fr); }
    .patient-search-tag { justify-self: start; white-space: normal; }
    .patient-search-tag:empty { display: none; }
    .patient-search-result em:last-child { text-align: left; }
}
.opd-billing-summary .opd-summary-lines--pair p { gap: 6px; }
.opd-billing-summary .opd-summary-lines--pair span, .opd-billing-summary .opd-summary-lines--pair strong { white-space: nowrap; }
.opd-billing-summary .opd-summary-lines--pair span { font-size: var(--fs-sm); }
/* Live Bed Availability (owner decisions 30-09-2026): compact button + popup; bed facts only. */
.bed-availability-actions { display: flex; align-items: center; gap: 8px; }
.dd-heading .bed-availability-button { margin-left: auto; }
.bed-availability-button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.bed-availability-button b { padding: 0 6px; border-radius: 6px; background: #e3f6e8; color: #136c31; font-size: var(--fs-xs); line-height: 1.5; }
.ip-bed-info:empty { display: none; }
.ip-bed-info { margin: 4px 0 0; color: var(--hospital-ink); font-weight: 600; }
.patient-search-note--error { color: #b3391d; font-weight: 600; }
/* Appointment: doctor search in place of the dropdown (no default doctor). */
.apt-doctor-search { min-width: 260px; }
.apt-doctor-search--empty { border-color: var(--hospital-blue-700, #1565d8); box-shadow: 0 0 0 2px rgba(21, 101, 216, .12); }
.dd-filter .apt-doctor-search { width: 280px; min-width: 0; }
/* Row "Action" drop-down (OP / IP patient lists, owner request 30-09-2026). */
.row-action-menu { position: relative; display: inline-block; }
.row-action-menu > summary { list-style: none; cursor: pointer; white-space: nowrap; }
.row-action-menu > summary::-webkit-details-marker { display: none; }
.row-action-button::after { content: " ▾"; font-size: .7em; }
.row-action-menu[open] > .row-action-button { border-color: var(--hospital-blue-700, #1565d8); }
.row-action-list { position: fixed; z-index: 60; display: grid; min-width: 180px; max-height: 70vh; overflow: auto; padding: 4px; border: 1px solid #c9d4e3; border-radius: 10px; background: #fff; box-shadow: 0 12px 28px rgba(16, 38, 74, .18); }
.row-action-list > a, .row-action-list > button { display: block; width: 100%; padding: 6px 10px; border: 0; border-radius: 6px; background: none; text-align: left; font: inherit; font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer; }
.row-action-list > a:hover, .row-action-list > a:focus-visible, .row-action-list > button:hover { background: #eef6ff; }
.row-action-list > .opd-link--danger { color: #b3391d; }
/* Patient Info & History (owner decisions 30-09-2026). */
/* Patient Info & History v2 (owner 12-10-2026, patient-history-v2.html): search strip, one-line banner, totals row. */
.ph-search-strip { padding: 8px 12px; margin-bottom: 8px; background: #fff; border: 1px solid var(--hospital-line, #e2e8f0); border-radius: 12px; }
/* Search v3 (owner 13-10-2026, patient-history-search-v3.html): OP ID · IP ID · UHID · Name · Mobile in one row, floating list. */
.ph5 { position: relative; display: flex; flex-wrap: nowrap; align-items: center; gap: 14px; padding: 7px 12px; }
.ph5 .ph5-field { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: var(--fs-sm); font-weight: 600; color: var(--hospital-ink); white-space: nowrap; }
.ph5 .ph5-field .hospital-input { height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; font-size: var(--fs-sm); box-shadow: none; transform: none; }
.ph5 .ph5-field .hospital-input:focus { border-color: #1565d8; box-shadow: 0 0 0 3px rgba(21, 101, 216, .14); }
.ph5 .ph5-field .hospital-input.ph5-has { border-color: #60a5fa; background: #f5f9ff; }
.ph5 .ph5-field--op .hospital-input, .ph5 .ph5-field--ip .hospital-input { width: 118px; }
.ph5 .ph5-field--uhid .hospital-input { width: 112px; }
.ph5 .ph5-field--mobile .hospital-input { width: 116px; }
.ph5 .ph5-field--name { flex: 1 1 auto; min-width: 0; }
.ph5 .ph5-field--name .hospital-input { min-width: 150px; }
.ph5 .ph5-clear { height: 30px; white-space: nowrap; }
@media (max-width: 1100px) {
    .ph5 { flex-wrap: wrap; row-gap: 8px; }
}
.ph5-head, .ph5-row { display: grid; grid-template-columns: 120px minmax(0, 1fr) 110px 130px 170px; gap: 10px; align-items: center; padding: 0 12px; }
.ph5-head { height: 28px; border-bottom: 1px solid var(--hospital-line, #e2e8f0); background: #f8fafc; color: var(--hospital-slate); font-size: var(--fs-xs); font-weight: 600; }
.ph5-row { height: 30px; border-bottom: 1px solid #f1f5f9; font-size: var(--fs-sm); cursor: pointer; }
.ph5-row:hover, .ph5-row.is-active { background: #e8f1ff; }
.ph5-row > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph5-uhid { font-weight: 600; color: #334155; }
.ph5-name { font-weight: 700; }
.ph5-muted { color: var(--hospital-slate); font-size: var(--fs-xs); }
.ph5-row mark { padding: 0 1px; border-radius: 2px; background: #fde68a; color: inherit; }
.ph5-adm { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #ffedd5; color: #c2410c; font-size: 10.5px; font-weight: 700; }
.ph5-more, .ph5-empty { padding: 8px 12px; color: var(--hospital-slate); font-size: var(--fs-xs); text-align: center; }
.ph5-empty { padding: 14px 12px; font-size: var(--fs-sm); }
.ph-banner-change { white-space: nowrap; }
.ph-tabs { margin-bottom: 0; }
.ph-table tbody tr:hover td { background: #f8fbff; }
.ph-table td, .ph-table th { font-size: var(--fs-sm); }
.ph-type { padding: 0 6px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; }
.row-action-list > .row-action-group { padding: 6px 10px 2px; color: var(--hospital-slate); font-size: var(--fs-xs); font-style: normal; font-weight: 600; text-transform: none; }
/* Create OPD Bill rows (owner request 30-09-2026): column names once above the rows, remove beside the service,
   a green "+ Add Item" below the rows, a one-line remarks box. */
.opd-billing-lines-head { display: none; }
.opd-billing-service-line { display: flex; align-items: center; gap: 4px; min-width: 0; }
.opd-billing-service-line select { flex: 1; min-width: 0; }
.opd-billing-remove { flex: none; width: 28px; height: 28px; border: 1px solid #f1c5bb; border-radius: 8px; background: #fdecea; color: #b3391d; font: inherit; font-size: var(--fs-sm); font-weight: 600; line-height: 1; cursor: pointer; }
.opd-billing-remove:hover, .opd-billing-remove:focus-visible { border-color: #b3391d; background: #b3391d; color: #fff; }
.opd-billing-row .opd-order-badge { display: inline-block; margin-top: 2px; font-size: var(--fs-xs); }
.hospital-button--add { border-color: transparent; background: linear-gradient(135deg, #22b455, #15803d); color: #fff; box-shadow: 0 4px 10px rgba(21, 128, 61, .22); }
.hospital-button--add:hover { filter: brightness(1.06); }
.opd-billing-add-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.opd-billing-add-line .hospital-button { min-width: 0; min-height: 30px; padding: 4px 14px; }
.opd-billing-form .opd-billing-remarks { min-height: 32px; height: 34px; resize: vertical; }
@media (min-width: 1024px) {
    .opd-billing-lines-head { display: grid; grid-template-columns: 2.1fr 1.9fr .7fr 1fr .8fr .9fr .7fr 1.3fr 1fr; gap: 6px; padding: 0 9px; color: var(--hospital-slate); font-size: var(--fs-xs); font-weight: 600; text-transform: none; }
    .opd-billing-lines-head span:last-child { text-align: right; }
    .opd-billing-row { align-items: center; }
    .opd-billing-row .hospital-field > label, .opd-billing-row .opd-billing-line-total > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .opd-billing-row .opd-billing-line-total { text-align: right; }
}
/* IP Billing & Advance: add services as on the OPD bill, change added services in place (owner decisions 30-09-2026). */
.ip-add-head, .ip-add-row { display: grid; grid-template-columns: minmax(0, 2.2fr) .6fr 1.4fr .8fr minmax(0, 1.3fr) .9fr 28px; gap: 6px; align-items: center; }
.ip-add-row .hospital-input { min-height: 30px; padding: 3px 8px; font-size: var(--fs-sm); }
.ip-add-rate { font-size: var(--fs-sm); font-weight: 600; color: var(--hospital-ink); }
.ip-add-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 2px; }
.ip-add-actions .hospital-button { min-width: 0; min-height: 30px; padding: 4px 14px; }
.ip-add-actions .ip-add-save { margin-left: auto; }
.ip-add-save:disabled { opacity: .55; cursor: not-allowed; }
.ip-edit-date { width: 128px; min-height: 26px !important; padding: 2px 6px !important; font-size: var(--fs-sm) !important; }
.ip-edit-qty { width: 64px; min-height: 26px !important; padding: 2px 6px !important; font-size: var(--fs-sm) !important; text-align: right; }
.ip-edit-note { display: block; width: 100%; margin-top: 2px; min-height: 24px !important; padding: 2px 6px !important; font-size: var(--fs-xs) !important; }
/* Service search box in the OPD bill and IP "Add services" rows (owner request 30-09-2026). */
.opd-billing-service-line .hospital-combo { flex: 1; min-width: 0; }
.ip-add-row .hospital-combo { min-width: 0; }
.opd-billing-service-line .hospital-combo-list, .ip-add-row .hospital-combo-list { z-index: 30; min-width: 280px; }
/* Edit details of an OP visit / admission (owner decisions 30-09-2026). */
.patient-edit-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.patient-edit-age { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.patient-edit-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.patient-edit-actions { display: flex; align-items: end; gap: 10px; margin-top: 10px; }
.patient-edit-reason { flex: 1; max-width: 640px; margin-right: auto; }
.patient-edit-form .hospital-input { min-height: 32px; padding: 4px 9px; font-size: var(--fs-sm); }
@media (max-width: 1100px) {
    .patient-edit-grid { grid-template-columns: 1fr; }
}
/* Back button (owner request 30-09-2026): blue "← Back" before the page title (vitalos.js), and the form Back links. */
.hospital-page-back-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hospital-page-back { display: inline-flex; align-items: center; flex: none; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: linear-gradient(135deg, #1565d8, #0d4aa6); color: #fff; font: inherit; font-size: var(--fs-sm); font-weight: 600; box-shadow: 0 4px 10px rgba(21, 101, 216, .25); cursor: pointer; }
.hospital-page-back:hover { filter: brightness(1.08); }
.hospital-page-back:focus-visible { outline: 2px solid #0d4aa6; outline-offset: 2px; }
.hospital-button--back { background: #1565d8; color: #fff; box-shadow: none; }
.hospital-button--back:hover { background: #0d4aa6; color: #fff; }
/* Unsaved changes on Back (owner decision 11-10-2026). */
.vx-unsaved { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .45); }
.vx-unsaved-card { width: min(480px, 100%); padding: 18px 20px; border-radius: 12px; background: #fff; box-shadow: 0 18px 40px rgba(15, 23, 42, .25); }
.vx-unsaved-card h3 { margin: 0 0 6px; font-size: var(--fs-lg, 16px); color: #0f172a; }
.vx-unsaved-card p { margin: 0 0 14px; color: #475569; }
.vx-unsaved-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.vx-unsaved-actions .hospital-button { width: auto; min-width: 0; }
.vx-unsaved-leave { border-color: transparent; background: #dc2626; color: #fff; }
.vx-unsaved-leave:hover { background: #b91c1c; color: #fff; }
/* Cash / Cashless / Mediclaim on IP Admission and Edit details; cashless and mediclaim chips on the IP list (owner decisions 30-09-2026). */
.ip-claim-radio { flex: 1; display: flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #cfdbea; border-radius: 9px; background: #f7faff; color: #10264a; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.ip-claim-radio input { margin: 0; accent-color: #1565d8; }
.ip-claim-radio small { display: block; color: #5b6b82; font-size: var(--fs-xs); font-weight: 500; }
.ip-claim-radio.is-on { border-color: #1565d8; background: #eaf2ff; }
.ip-claim .is-off { opacity: .45; }
.ip-claim-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; line-height: 1.5; }
.ip-claim-chip--cashless { border: 1px solid #ffb67a; background: #ffe7d1; color: #8a3b00; }
.hospital-row-meta .ip-claim-chip { margin-top: 2px; }
/* Cashless and mediclaim in their own colours: the list label and the chosen radio (owner request 30-09-2026). */
.ip-claim-radio--cash.is-on { border-color: #5b6b82; background: #f1f4f8; }
.ip-claim-radio--cashless.is-on { border-color: #ff8a3d; background: #ffe7d1; color: #8a3b00; }
.ip-claim-radio--mediclaim.is-on { border-color: #1565d8; background: #e0edff; color: #0b4a8f; }
.ip-claim-radio { padding: 4px 8px; }
.ip-claim .ip-claim-wide { grid-column: span 2; }
.ip-claim .ip-claim-hint { margin: 4px 0 0; }
/* OP / IP registration details in capital letters (owner request 30-09-2026); placeholders stay as written. */
.is-uppercase { text-transform: uppercase; }
.is-uppercase::placeholder { text-transform: none; }
/* Page loading (owner decisions 01-10-2026): thin line at the top on a menu / Back click or a form send, and a
   heartbeat over the content (not the header or sidebar) when the next screen takes longer than 0.2 s. */
.hospital-page-progress { position: fixed; top: 0; left: 0; z-index: 10000; width: 0; height: 3px; border-radius: 0 3px 3px 0; opacity: 0; pointer-events: none;
    background: linear-gradient(90deg, #1565d8, #21b7ff, #1fc84d); box-shadow: 0 0 10px rgba(33, 183, 255, .7); }
.hospital-page-progress.is-on { opacity: 1; animation: hospital-progress 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes hospital-progress { 0% { width: 0; } 10% { width: 35%; } 40% { width: 65%; } 100% { width: 92%; } }
.hospital-app-main { position: relative; }
.hospital-page-loading { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; opacity: 0; visibility: hidden;
    background: rgba(246, 249, 255, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); transition: opacity .18s ease, visibility .18s; }
.hospital-page-loading.is-on { opacity: 1; visibility: visible; }
.hospital-page-loading-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 26px 14px; border: 1px solid #e2eaf5; border-radius: 16px; background: #fff; box-shadow: 0 18px 40px rgba(13, 63, 159, .16); }
.hospital-page-loading.is-on .hospital-page-loading-card { animation: hospital-loading-pop .25s ease; }
@keyframes hospital-loading-pop { from { transform: translateY(6px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.hospital-page-loading-text { margin: 0; color: var(--hospital-blue-900); font-size: var(--fs-sm); font-weight: 600; text-align: center; }
.hospital-page-loading-text small { display: block; margin-top: 1px; color: #7a8aa3; font-size: var(--fs-xs); font-weight: 500; }
.hospital-ecg { width: 150px; height: 46px; overflow: visible; }
.hospital-ecg path { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.hospital-ecg-base { stroke: #e3ecf8; }
.hospital-ecg-pulse { stroke: url(#hospital-ecg-gradient); stroke-dasharray: 70 330; filter: drop-shadow(0 0 3px rgba(33, 183, 255, .55)); }
.hospital-page-loading.is-on .hospital-ecg-pulse { animation: hospital-ecg 1.3s linear infinite; }
@keyframes hospital-ecg { from { stroke-dashoffset: 400; } to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
    .hospital-page-progress.is-on { animation: none; width: 65%; }
    .hospital-page-loading.is-on .hospital-ecg-pulse, .hospital-page-loading.is-on .hospital-page-loading-card { animation: none; }
    .hospital-ecg-pulse { stroke-dasharray: none; }
}
@media print {
    .hospital-page-progress, .hospital-page-loading { display: none !important; }
}
/* Sign-in screens: the page loading heartbeat covers the whole window. */
.hospital-page-loading--page { position: fixed; z-index: 9000; }
/* Dashboard: how a calculated figure is counted (owner request 01-10-2026). The ƒx mark sits on the tile / heading;
   vitalos.js shows the hidden .dash-formula text in one tip on <body> on hover (0.25 s) or focus. */
[data-formula] { cursor: help; }
.dash-tile[href][data-formula] { cursor: pointer; }
.dash-tile[data-formula] { position: relative; }
.dash-fx { position: absolute; top: 8px; right: 10px; display: inline-grid; place-items: center; width: 20px; height: 16px; border-radius: 5px;
    background: #eaf2ff; color: #1565d8; font: italic 600 var(--fs-xs)/1 Georgia, serif; letter-spacing: -.02em; opacity: .75; transition: background .15s, color .15s, opacity .15s; }
.dash-fx-th .dash-fx, .dash-fx-cell .dash-fx { position: static; margin-left: 4px; vertical-align: middle; }
[data-formula]:hover .dash-fx, [data-formula]:focus-visible .dash-fx { opacity: 1; background: #1565d8; color: #fff; }
[data-formula]:focus-visible { outline: 2px solid #1565d8; outline-offset: 2px; }
.dash-formula-tip { position: fixed; z-index: 9500; top: 0; left: 0; width: max-content; max-width: min(360px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 12px;
    background: #0f2747; color: #e8f0ff; box-shadow: 0 16px 36px rgba(13, 39, 71, .35); font-size: var(--fs-xs); font-weight: 500; line-height: 1.45; text-align: left; text-transform: none;
    letter-spacing: 0; white-space: normal; pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.dash-formula-tip.is-on { opacity: 1; visibility: visible; transform: none; }
.dash-formula-tip .dash-formula-title { display: block; margin-bottom: 4px; color: #8fd0ff; font-size: var(--fs-xs); letter-spacing: normal; text-transform: none; }
.dash-formula-tip code { display: block; margin: 2px 0 4px; padding: 4px 7px; border-radius: 7px; background: rgba(255, 255, 255, .09); color: #fff; font: 600 var(--fs-xs)/1.4 var(--hospital-font); }
.dash-formula-tip em { display: block; color: #b9c8e0; font-size: var(--fs-xs); font-style: normal; }
@media (prefers-reduced-motion: reduce) {
    .dash-formula-tip { transition: none; transform: none; }
}
@media print {
    .dash-fx, .dash-formula-tip { display: none !important; }
}
/* Voice typing on Doctor Desk (owner decisions 01-10-2026): mic inside each [data-voice] box (vitalos.js). */
.voice-wrap { position: relative; display: block; }
.voice-wrap > textarea, .voice-wrap > input { width: 100%; padding-right: 38px; }
.voice-mic { position: absolute; top: 6px; right: 6px; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 1px solid #cfdbea; border-radius: 50%;
    background: #fff; color: #1565d8; box-shadow: 0 2px 6px rgba(16, 38, 74, .08); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.voice-wrap--line > .voice-mic { top: 50%; width: 24px; height: 24px; transform: translateY(-50%); }
.voice-mic svg { width: 14px; height: 14px; fill: currentColor; }
.voice-mic:hover { border-color: #1565d8; background: #eaf2ff; }
.voice-mic:focus-visible { outline: 2px solid #1565d8; outline-offset: 2px; }
.voice-mic.is-on { border-color: #e5383b; background: #e5383b; color: #fff; animation: voice-pulse 1.2s ease-out infinite; }
@keyframes voice-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 56, 59, .55); } 100% { box-shadow: 0 0 0 10px rgba(229, 56, 59, 0); } }
.voice-wrap.is-listening > textarea, .voice-wrap.is-listening > input { border-color: #e5383b; box-shadow: 0 0 0 3px rgba(229, 56, 59, .12); }
.voice-live { display: block; overflow: hidden; min-height: 0; color: #8a94a6; font-size: var(--fs-xs); font-style: italic; white-space: nowrap; text-overflow: ellipsis; }
.voice-live:empty { display: none; }
.voice-lang { display: inline-flex; align-items: center; gap: 4px; color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; }
.voice-lang[hidden] { display: none; }
.voice-lang select { height: 30px; padding: 0 8px; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; color: #10264a; font: inherit; font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
    .voice-mic.is-on { animation: none; }
}
@media print {
    .voice-mic, .voice-live, .voice-lang { display: none !important; }
}
/* IP Partial / Final Bill (owner decisions 01-10-2026). Sections: IP blue, Investigation violet, Pharmacy green, Total navy. */
.pb-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pb-mode-hint { padding: 3px 10px; border-radius: 999px; background: #eaf2ff; color: #0d3f9f; font-size: var(--fs-xs); font-weight: 600; }
.pb-modes { display: flex; gap: 4px; margin-left: auto; }
.pb-modes .access-tab { text-decoration: none; }
.pb-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pb-sec { padding: 5px 10px 6px; border-radius: 10px; color: #fff; }
.pb-sec h4 { margin: 0 0 3px; font-size: var(--fs-xs); letter-spacing: normal; text-transform: none; opacity: .92; }
.pb-sec h4 small { text-transform: none; letter-spacing: 0; font-weight: 600; opacity: .85; }
.pb-sec--ip { background: linear-gradient(135deg, #1565d8, #0d4aa6); }
.pb-sec--inv { background: linear-gradient(135deg, #8a4fe0, #6430b8); }
.pb-sec--ph { background: linear-gradient(135deg, #17a159, #0f7a41); }
.pb-sec--tot { background: linear-gradient(135deg, #1b3a66, #0f2747); }
.pb-sec dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin: 0; }
.pb-sec dt { font-size: var(--fs-2xs); font-weight: 600; opacity: .82; }
.pb-sec dd { margin: 0; font: 600 var(--fs-md)/1.2 var(--hospital-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-sec dd.is-due { margin-left: -5px; padding: 0 5px; border-radius: 6px; background: rgba(255, 255, 255, .18); }
.pb-pt { display: grid; grid-template-columns: 2.2fr 1fr 2fr 1.3fr 1.6fr 1.1fr; gap: 4px 12px; padding: 6px 10px; border: 1px solid #e3eaf4; border-radius: 10px; background: #f7faff; font-size: var(--fs-xs); }
.pb-pt > div { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-pt span { margin-right: 4px; color: #5b6b82; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; }
.pb-pt b { color: #10264a; }
.pb-pt select, .pb-pt input { max-width: 100%; height: 22px; padding: 0 6px; border: 1px solid #cfdbea; border-radius: 6px; font: inherit; font-size: var(--fs-xs); }
.pb-pt-search { grid-column: span 2; }
.pb-pt-search input { width: 72%; }
.pb-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-xs); }
.pb-grid thead th { position: sticky; top: 0; z-index: 2; padding: 6px 5px; background: #0f2747; color: #fff; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-align: left; text-transform: none; white-space: nowrap; }
.pb-grid thead th small { text-transform: none; }
.pb-grid th.num, .pb-grid td.num { text-align: right; }
.pb-grid td { padding: 3px 5px; border-bottom: 1px solid #eef2f8; vertical-align: middle; white-space: nowrap; }
.pb-grid tbody tr:hover td { background: #f5f9ff; }
.pb-grid tr.is-audited td { background: #f1fbf4; }
.pb-grid tr.pb-row--package td { background: #fff8e6; }
.pb-grid input, .pb-grid select { height: 24px; padding: 0 5px; border: 1px solid #d6e0ec; border-radius: 6px; background: #fff; font: inherit; font-size: var(--fs-xs); }
.pb-check { width: 26px; text-align: center; }
.pb-qty { width: 56px; text-align: right; }
.pb-disc { width: 58px; text-align: right; }
.pb-pa { width: 40px; margin-right: 3px; padding: 0 2px !important; }
.pb-doc { width: 140px; }
.pb-remark { width: 130px; }
.pb-sec-bar { display: inline-block; width: 4px; height: 16px; margin-right: 5px; border-radius: 2px; vertical-align: middle; }
.pb-sec-bar--ip { background: #1565d8; }
.pb-sec-bar--investigation { background: #7a3fd1; }
.pb-sec-bar--pharmacy { background: #138a4b; }
.pb-src { display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px; background: #eef3fa; color: #3b4d66; font-size: var(--fs-2xs); font-weight: 600; vertical-align: middle; }
.pb-muted { color: #7a8aa3; font-size: var(--fs-xs); }
.pb-bottom { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 8px; }
.pb-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pb-left label { color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; }
.pb-left textarea { width: 100%; height: 48px; padding: 6px 8px; border: 1px solid #cfdbea; border-radius: 8px; font: inherit; font-size: var(--fs-sm); resize: vertical; }
.pb-btns { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pb-btn { display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border: 0; border-radius: 8px; font: inherit; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; text-decoration: none; }
.pb-btn--add { background: #1fa64a; color: #fff; }
.pb-btn--del { border: 1px solid #f0b7b7; background: #fff; color: #c62f2f; }
.pb-btn--del:disabled { opacity: .45; cursor: default; }
.pb-btn--log { border: 1px solid #c9d8ef; background: #eef3fa; color: #0d3f9f; }
.pb-btn--save { background: #1565d8; color: #fff; }
.pb-btn--print { background: #0f2747; color: #fff; }
.pb-btn--final { background: #e8701f; color: #fff; }
.pb-new { display: flex; flex-direction: column; gap: 4px; }
.pb-new-row { display: grid; grid-template-columns: minmax(200px, 2fr) minmax(130px, 1fr) 64px 92px 46px 70px minmax(110px, 1fr) 26px; gap: 4px; align-items: center; padding: 4px 6px; border: 1px dashed #b9cbe3; border-radius: 8px; background: #fffdf2; }
.pb-new-row .hospital-input { min-height: 28px; padding: 2px 6px; font-size: var(--fs-xs); }
.pb-new-doc[hidden] { display: none; }
.pb-new-rate { color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; }
.pb-calc { overflow: hidden; border: 1px solid #e3eaf4; border-radius: 10px; background: #fff; font-size: var(--fs-sm); }
.pb-calc > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 10px; border-bottom: 1px solid #f0f4f9; }
.pb-calc > div > span:first-child { color: #3b4d66; }
.pb-calc b { color: #10264a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pb-calc .sub { background: #f7faff; }
.pb-calc .sub span, .pb-calc .sub b { font-weight: 600; }
.pb-calc .minus b { color: #c62f2f; }
.pb-calc-in { display: inline-flex; align-items: center; gap: 4px; }
.pb-calc-in input { width: 70px; height: 22px; padding: 0 6px; border: 1px solid #cfdbea; border-radius: 6px; font: inherit; text-align: right; }
.pb-calc-in input[type="text"] { width: 92px; text-align: left; }
.pb-calc .pb-pa { height: 22px; border: 1px solid #cfdbea; border-radius: 6px; font: inherit; font-size: var(--fs-xs); }
.pb-calc .pb-pending { background: #fff4e0; color: #8a5a00; font-size: var(--fs-xs); font-weight: 600; }
.pb-calc .net { padding: 7px 10px; border: 0; background: linear-gradient(135deg, #1b3a66, #0f2747); }
.pb-calc .net span, .pb-calc .net b { color: #fff; font-size: var(--fs-md); font-weight: 600; }
.pb-foot { display: flex; align-items: center; gap: 8px; }
.pb-spacer { flex: 1; }
@media (max-width: 1200px) {
    .pb-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pb-bottom { grid-template-columns: 1fr; }
    .pb-pt { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* Type-to-search list over the page (owner decisions 01-10-2026): IP bill services / doctors, Service Master doctors. */
.vx-search-list { position: fixed; z-index: 9600; max-height: 230px; overflow: auto; margin: 0; padding: 4px; list-style: none; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; box-shadow: 0 12px 26px rgba(13, 39, 71, .18); }
.vx-search-list li { padding: 5px 9px; border-radius: 6px; color: #10264a; font-size: var(--fs-sm); white-space: nowrap; cursor: pointer; }
.vx-search-list li:hover { background: #f1f6ff; }
.vx-search-list li.is-active { background: #dbe9ff; box-shadow: inset 3px 0 0 #1565d8; }
/* keyboard highlight (owner 14-10-2026) */
.vx-search-list li em { margin-left: 6px; padding: 0 5px; border-radius: 5px; background: #e0edff; color: #0b4a8f; font-size: var(--fs-xs); font-style: normal; font-weight: 600; }
.vx-search-list li.vx-sl-two { display: flex; align-items: center; gap: 12px; }
.vx-search-list li.vx-sl-two > span { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.vx-search-list li.vx-sl-two b { font-weight: 500; }
.vx-search-list li.vx-sl-two small { color: #64748b; font-size: var(--fs-xs); }
.vx-search-list li.vx-sl-two strong { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.vx-search-list li.is-none { color: #8a94a6; font-style: italic; cursor: default; }
.pb-cb { display: inline-block; }
.pb-grid .pb-cb-in, .pb-grid .pb-entry-in { padding-right: 22px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237a8aa3'%3E%3Cpath d='M10 4a6 6 0 1 0 3.7 10.7l4.3 4.3 1.4-1.4-4.3-4.3A6 6 0 0 0 10 4Zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8Z'/%3E%3C/svg%3E") no-repeat right 5px center / 13px; }
.pb-grid .pb-cb-in { width: 180px; border-color: #9fbbe6; }
.pb-grid .pb-cb-in.is-invalid { border-color: #d64545; background-color: #fff5f5; }
.pb-grid tr.pb-entry td { border-top: 1px dashed #9fbbe6; background: #f3f8ff; }
.pb-grid .pb-entry-plus { color: #1fa64a; font-size: var(--fs-md); font-weight: 600; }
.pb-grid .pb-entry-in { width: 330px; border-color: #1fa64a; }
.pb-grid .pb-entry-hint { white-space: normal; font-style: italic; }
.pb-grid tr.pb-row--new td { background: #fffbe8; }
.pb-remove-new { width: 20px; height: 20px; padding: 0; border: 1px solid #f0b7b7; border-radius: 50%; background: #fff; color: #c62f2f; font-size: var(--fs-xs); font-weight: 600; line-height: 1; cursor: pointer; }
.service-doctors-field { grid-column: 1 / -1; }
.service-doctors-tick { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #cfdbea; border-radius: 10px; background: #f7faff; cursor: pointer; }
.service-doctors-tick input { width: 18px; height: 18px; accent-color: #1565d8; }
.service-doctors-tick b { display: block; color: #10264a; font-size: var(--fs-sm); }
.service-doctors-tick small { color: #5b6b82; font-size: var(--fs-xs); }
.service-doctors-tick.is-on { border-color: #1565d8; background: #eaf2ff; }
.service-doctors-box { margin-top: 8px; padding: 10px; border: 1px dashed #9fbbe6; border-radius: 10px; background: #fff; }
.service-doctors-box[hidden] { display: none; }
.service-doctors-title { margin: 0 0 6px; color: #0d3f9f; font-size: var(--fs-sm); font-weight: 600; }
.service-doctors-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.service-doctors-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 6px 3px 10px; border: 1px solid #a9c8f5; border-radius: 999px; background: #e0edff; color: #0b4a8f; font-size: var(--fs-sm); font-weight: 600; }
.service-doctors-chip button { width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #c62f2f; font-weight: 600; line-height: 1; cursor: pointer; }
.service-doctors-none { color: #8a94a6; font-size: var(--fs-xs); font-style: italic; }
.service-doctors-search { position: relative; max-width: 460px; }
/* Service Master: the rate card first (owner decisions 01-10-2026). */
.service-master-card select { min-width: 220px; border: 2px solid #1565d8; color: #0d3f9f; font-weight: 600; }
.service-master-missing { display: inline-flex; align-items: center; gap: 6px; align-self: end; min-height: 38px; color: #3b4d66; font-size: var(--fs-sm); font-weight: 600; }
.service-master-pick { display: grid; place-items: center; gap: 4px; margin-top: 10px; padding: 46px 10px; border: 2px dashed #b9cbe3; border-radius: 12px; background: #fff; color: #5b6b82; text-align: center; }
.service-master-pick > span:first-child { color: #1565d8; font-size: var(--fs-2xl); }
.service-master-pick b { color: #10264a; font-size: var(--fs-md); }
.service-master-stats { display: flex; gap: 8px; margin: 6px 0; }
.service-master-stats span { padding: 3px 10px; border: 1px solid #e3eaf4; border-radius: 8px; background: #fff; color: #3b4d66; font-size: var(--fs-xs); }
.service-master-stats b { color: #10264a; }
.service-master-stats .is-missing { color: #a12323; }
.service-master-no-rate { display: inline-block; padding: 1px 8px; border-radius: 999px; background: #ffe1e1; color: #a12323; font-size: var(--fs-xs); font-weight: 600; }
/* Service Master OP / IP charges on the list's rate card (owner decisions 01-10-2026). */
.service-rate-op { color: #0d3f9f; }
.service-rate-ip { color: #8a3b00; }
.service-rate-same { font-style: italic; }
.service-master-stats .is-card { border-color: #a9c8f5; background: #e0edff; color: #0b4a8f; }
.service-card-line { margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: linear-gradient(135deg, #1565d8, #0d4aa6); color: #fff; font-size: var(--fs-sm); font-weight: 600; }
.service-card-line small { font-weight: 600; opacity: .85; }
.service-card-boxes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: start; }
.service-card-box { display: flex; flex-direction: column; gap: 4px; padding: 10px; border: 2px solid; border-radius: 12px; background: #fff; }
.service-card-box label { font-size: var(--fs-sm); font-weight: 600; }
.service-card-box input { font-size: var(--fs-lg); font-weight: 600; text-align: right; }
.service-card-box--op { border-color: #a9c8f5; }
.service-card-box--op label { color: #0d3f9f; }
.service-card-box--ip { border-color: #ffc89c; }
.service-card-box--ip label { color: #8a3b00; }
@media (max-width: 1100px) {
    .service-card-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Add / Edit Service on one screen (owner decisions 01-10-2026). */
.service-edit-heading { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.service-edit-chip { padding: 2px 9px; border-radius: 6px; background: #eef3fa; color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; }
.service-edit-spacer { flex: 1; }
.service-edit-save { background: #1fa64a; }
.service-edit-save:hover { background: #188a3c; }
.service-edit { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.service-edit-card { padding: 10px 12px; border: 1px solid #e3eaf4; border-radius: 12px; background: #fff; box-shadow: 0 6px 16px rgba(16, 38, 74, .05); }
.service-edit-title { margin: 0 0 8px; color: #0d3f9f; font-size: var(--fs-sm); letter-spacing: normal; text-transform: none; }
.service-edit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.service-edit-field { min-width: 0; }
.service-edit-field--2 { grid-column: span 2; }
.service-edit-field > label, .service-edit-label { display: flex; justify-content: space-between; margin-bottom: 2px; color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; }
.service-edit-field label i, .service-edit-label i { color: #8a94a6; font-style: normal; font-weight: 600; }
.service-edit-field label b, .service-edit-label b { color: #d64545; }
.service-edit input[type="text"], .service-edit input[type="number"], .service-edit input[type="date"], .service-edit select, .service-edit textarea {
    width: 100%; height: 32px; padding: 0 9px; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; color: #10264a; font: inherit; font-size: var(--fs-sm); }
.service-edit textarea { height: 48px; padding: 5px 9px; resize: none; }
.service-edit .is-invalid { border-color: #d64545; }
.service-edit .hospital-error { margin: 2px 0 0; font-size: var(--fs-xs); }
.service-edit-switch { display: flex; gap: 4px; }
.service-edit-switch label { flex: 1; margin: 0; }
.service-edit-switch input { position: absolute; opacity: 0; pointer-events: none; }
.service-edit-switch span { display: grid; place-items: center; height: 32px; border: 1px solid #cfdbea; border-radius: 8px; background: #fff; color: #5b6b82; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.service-edit-switch input:checked + span { border-color: #1fa64a; background: #e8f8ee; color: #0b6b2a; }
.service-edit-switch .is-no input:checked + span { border-color: #d64545; background: #ffecec; color: #a12323; }
.service-edit-switch input:focus-visible + span { outline: 2px solid #1565d8; outline-offset: 1px; }
.service-edit-meta { margin: 8px 0 0; color: #8a94a6; font-size: var(--fs-xs); }
.service-edit-side { display: flex; flex-direction: column; gap: 10px; }
.service-edit .service-card-line { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 6px 10px; font-size: var(--fs-sm); }
.service-edit .service-card-line small { margin-left: auto; font-size: var(--fs-xs); }
.service-edit-rates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.service-edit .service-card-box { padding: 7px 9px; gap: 2px; }
.service-edit .service-card-box input { height: 34px; font: 600 var(--fs-md) var(--hospital-display); text-align: right; }
.service-edit .service-card-box small { color: #5b6b82; font-size: var(--fs-xs); }
.service-edit-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.service-edit .service-doctors-tick { padding: 6px 9px; }
.service-edit .service-doctors-tick b { font-size: var(--fs-sm); }
.service-edit .service-doctors-tick small { font-size: var(--fs-xs); }
.service-edit .service-doctors-box { margin-top: 6px; padding: 8px; }
.service-edit .service-doctors-chips { margin-bottom: 6px; }
@media (max-width: 1100px) {
    .service-edit { grid-template-columns: 1fr; }
}
/* A service not on the patient's rate card (owner decisions 01-10-2026): a red line in the search list. */
.hospital-combo-list .vx-not-on-card, .vx-search-list .vx-not-on-card { display: block; margin: 2px 0; padding: 7px 9px; border: 1px solid #f0b7b7; border-radius: 7px; background: #fff5f5; color: #a12323; font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; white-space: normal; cursor: default; }
.vx-not-on-card a { display: inline-block; margin-top: 4px; padding: 2px 9px; border-radius: 6px; background: #1565d8; color: #fff; font-size: var(--fs-xs); text-decoration: none; }
.vx-search-list li.vx-not-on-card:hover { background: #fff5f5; }
/* Active / Inactive on one rate card (owner request 01-10-2026). */
.service-edit-card-status { margin-bottom: 8px; }
.service-edit-card-status .service-edit-switch span { font-size: var(--fs-xs); }
.pb-rate { width: 80px; text-align: right; }
/* Auto Charges on an IP admission (owner decisions 01-10-2026; 06-11-2026 service-auto-hours.html: once Yes / No, daily
   Yes / No → every 12 / 24 hours). */
.service-auto-field .service-edit-switch span { font-size: var(--fs-xs); }
.service-auto-chip { color: #0b6b2a; font-weight: 600; }
.service-edit-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.service-auto-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px 9px; border: 1px solid #cfdbea; border-radius: 10px; background: #f7faff; }
.service-auto-row + .service-auto-row { margin-top: 6px; }
.service-auto-row.is-on { border-color: #1fa64a; background: #effaf2; }
.service-auto-label { flex: 1; min-width: 180px; }
.service-auto-label b { display: block; color: #10264a; font-size: var(--fs-sm); }
.service-auto-label small { color: #5b6b82; font-size: var(--fs-xs); }
.service-auto-yn { flex: 0 0 120px; }
.service-auto-every { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; width: 100%; padding-top: 6px; border-top: 1px dashed #9fe0b3; }
.service-auto-every[hidden] { display: none; }
.service-auto-every label { color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; }
.service-auto-every .hospital-input { width: 120px; padding: 4px 8px; font-size: var(--fs-sm); }
.service-auto-every small { flex-basis: 100%; color: #166534; font-size: var(--fs-xs); }
/* Service code made from the group (owner decisions 01-10-2026). */
.service-code-box { display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 48px; padding: 0 10px; border: 1px dashed #9fc0f0; border-radius: 8px; background: #f5f9ff; }
.service-code-box b { align-self: flex-start; padding: 1px 8px; border-radius: 6px; background: #1565d8; color: #fff; font-size: var(--fs-sm); letter-spacing: .04em; }
.service-code-box b.is-wait { background: #c3cfe0; }
.service-code-box small { color: #5b6b82; font-size: var(--fs-xs); }
/* OP Bill (owner decisions 01-10-2026): compact one-screen bill — search, patient strip, service grid, payments,
   calculation and Save / Submit fit 1366 × 768. */
.ob-heading { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ob-flow { color: #5b6b82; font-size: var(--fs-xs); font-weight: 600; }
.ob-flow b { color: #1565d8; }
.ob-list-link { margin-left: auto; }
.ob-results { position: absolute; z-index: 40; top: 31px; right: 0; left: 0; margin: 0; padding: 4px; border: 1px solid #cfdbea; border-radius: 9px; background: #fff; box-shadow: 0 14px 30px rgba(13, 39, 71, .2); font-size: var(--fs-xs); list-style: none; }
.ob-results[hidden] { display: none; }
.ob-results li { display: grid; grid-template-columns: 100px minmax(0, 1.4fr) 90px 100px minmax(0, 1.8fr); gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; }
.ob-results li:hover { background: #eaf2ff; }
.ob-results li.is-active { background: #dbe9ff; box-shadow: inset 3px 0 0 #1565d8; }
/* keyboard highlight (owner 14-10-2026) */
.ob-results li span { color: #5b6b82; }
.ob-results li.is-off { cursor: not-allowed; opacity: .55; }
.ob-results li.is-none { display: block; color: #c62f2f; font-weight: 600; cursor: default; }
.ob-pt { display: grid; grid-template-columns: 2.1fr 1.5fr 1.6fr 1.5fr; gap: 3px 14px; padding: 5px 10px; border: 1px solid #dfe7f1; border-left: 4px solid #1565d8; border-radius: 9px; background: #f7faff; font-size: var(--fs-xs); }
.ob-pt > div { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ob-pt .k { min-width: 76px; color: #5b6b82; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; }
.ob-pt b { overflow: hidden; color: #10264a; text-overflow: ellipsis; }
.ob-pt select, .ob-pt input { flex: 1; min-width: 0; height: 22px; padding: 0 6px; border: 1px solid #cfdbea; border-radius: 6px; font: inherit; font-size: var(--fs-xs); }
.ob-pt.is-empty { display: block; border-left-color: #cfdbea; color: #8a98ad; font-style: italic; }
.ob-due { color: #c62f2f; font-weight: 600; }
.ob-due.is-clear { color: #138a4b; }
.ob-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-xs); }
.ob-grid thead th { position: sticky; top: 0; z-index: 2; padding: 6px 5px; background: #0f2747; color: #fff; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-align: left; text-transform: none; white-space: nowrap; }
.ob-grid thead th small { text-transform: none; }
.ob-grid th.num, .ob-grid td.num { text-align: right; }
.ob-grid td { padding: 3px 5px; border-bottom: 1px solid #eef2f8; vertical-align: middle; white-space: nowrap; }
.ob-grid tbody tr:hover td { background: #f5f9ff; }
.ob-grid tr.is-error td { background: #fff5f5; }
.ob-grid tr[hidden] { display: none; }
.ob-grid input, .ob-grid select { height: 24px; padding: 0 5px; border: 1px solid #d6e0ec; border-radius: 6px; background: #fff; font: inherit; font-size: var(--fs-xs); }
.ob-doc-in { width: 160px; }
.ob-doc-in.is-invalid { border-color: #c62f2f !important; background: #fff5f5 !important; }
.ob-na { color: #a3aec0; font-size: var(--fs-xs); font-style: italic; }
.ob-rate { color: #10264a; font-weight: 600; }
.ob-rate small { display: block; color: #8a98ad; font-size: var(--fs-2xs); font-weight: 600; }
/* Rate Card Master v2: rate of the default charge type */
.ob-row { display: flex; align-items: center; gap: 6px; }
.ob-btn { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 12px; border: 0; border-radius: 7px; font: inherit; font-size: var(--fs-xs); font-weight: 600; text-decoration: none; cursor: pointer; }
.ob-btn--add { border: 1px solid #b6e3c8; background: #e8f6ee; color: #0d6a39; }
.ob-btn--small { height: 22px; margin-left: auto; font-size: var(--fs-xs); letter-spacing: 0; text-transform: none; }
.ob-btn--del { border: 1px solid #f3c0c0; background: #fdecec; color: #a32020; }
.ob-btn--del:disabled { cursor: not-allowed; opacity: .5; }
.ob-btn--back { background: linear-gradient(135deg, #1565d8, #0d4aa6); color: #fff; }
.ob-btn--save { border: 1px solid #c9d8ef; background: #eef3fa; color: #0d3f9f; }
.ob-btn--submit { padding: 0 22px; background: #138a4b; color: #fff; }
.ob-hint { color: #5b6b82; font-size: var(--fs-xs); }
.ob-remark-row { display: flex; align-items: center; gap: 8px; }
.ob-remark-row label { color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; text-transform: none; white-space: nowrap; }
.ob-remark-row label i { color: #c62f2f; font-style: normal; }
.ob-remark-row input { flex: 1; height: 28px; padding: 0 9px; border: 1px solid #cfdbea; border-radius: 7px; font: inherit; font-size: var(--fs-xs); }
.ob-remark-row input.is-bad { border-color: #c62f2f; background: #fff5f5; }
.ob-pay { border: 1px solid #dfe7f1; border-radius: 9px; background: #fff; }
.ob-pay h4 { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 9px; border-bottom: 1px solid #dfe7f1; border-radius: 9px 9px 0 0; background: #f1f5fb; color: #3b4d66; font-size: var(--fs-xs); letter-spacing: normal; text-transform: none; }
.ob-pay h4 small { color: #5b6b82; font-weight: 600; letter-spacing: 0; text-transform: none; }
.ob-pay table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.ob-pay th { padding: 3px 5px; color: #5b6b82; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-align: left; text-transform: none; }
.ob-pay td { padding: 2px 5px 3px; }
.ob-pay input, .ob-pay select { width: 100%; height: 25px; padding: 0 6px; border: 1px solid #d6e0ec; border-radius: 6px; background: #fff; font: inherit; font-size: var(--fs-xs); }
.ob-pay input:disabled { border-color: #e6eaf0; background: #f1f3f6; color: #a3aec0; }
.ob-pay input.amt { font-weight: 600; text-align: right; }
.ob-pay-amt { width: 12%; }
.ob-calc { padding: 2px 10px 4px; border: 1px solid #dfe7f1; border-radius: 9px; background: #fff; font-size: var(--fs-xs); }
.ob-calc > div { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 0; border-bottom: 1px dashed #edf1f6; }
.ob-calc > div > span:first-child { display: inline-flex; align-items: center; gap: 4px; color: #3b4d66; font-weight: 600; }
.ob-calc b { color: #0d1b2e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ob-calc .minus b { color: #a32020; }
.ob-calc .sub { margin: 0 -10px; padding: 3px 10px; background: #f1f5fb; }
.ob-calc .net { margin: 2px -10px; padding: 3px 10px; border: 0; background: #0f2747; }
.ob-calc .net span, .ob-calc .net b { color: #fff !important; font-size: var(--fs-md); font-weight: 600; }
.ob-calc .os { margin: 2px -10px -4px; padding: 4px 10px; border: 0; border-radius: 0 0 8px 8px; background: #fdecec; }
.ob-calc .os span, .ob-calc .os b { color: #c62f2f !important; font-size: var(--fs-md); font-weight: 600; }
.ob-calc .os.is-clear { background: #e9f7ef; }
.ob-calc .os.is-clear span, .ob-calc .os.is-clear b { color: #138a4b !important; }
.ob-banner--ok { border-color: #b6e3c8; background: #e9f7ef; color: #0d5a31; }
/* ===================================================================================================================
   Doctor Desk – OP Patient Care (owner spec 02-10-2026; previews doctor-desk-queue.html, doctor-desk-consult.html).
   Queue (dq-) and the one-page consultation (cx-): sections one below the other with a sticky jump bar, right summary,
   sticky Save Draft / Print / Complete, and a drawer for history, previous visits and documents.
   =================================================================================================================== */
.dq-f { display: flex; flex-direction: column; gap: 1px; }
.dq-f > span:first-child { font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #5b6b82; }
.dq-f .hospital-input { height: 30px; min-height: 30px; padding: 0 8px; font-size: var(--fs-sm); }
.dq-card { --c: #8a98ad; display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px; border: 1px solid #dfe7f1; border-left: 4px solid var(--c); border-radius: 8px; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; }
.dq-card b { font-size: var(--fs-lg); font-weight: 600; color: #0d1b2e; font-variant-numeric: tabular-nums; }
.dq-card:hover { box-shadow: 0 4px 12px rgba(16, 38, 74, .08); }
.dq-card.is-on { background: #eef5ff; border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.dq-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.dq-tbl th { position: sticky; top: 0; z-index: 1; padding: 6px 8px; background: #e6f6ec; color: #14532d; border-bottom: 1px solid #bfe3cc; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; text-align: left; white-space: nowrap; }
.dq-tbl td { padding: 5px 8px; border-top: 1px solid #edf1f6; white-space: nowrap; color: #0d1b2e; }
.dq-tbl td form { margin: 0; }
.dq-tbl tr:hover td { background: #f8fbff; }
.dq-tbl tr.is-in td { background: #f3f8ff; }
.dq-vt { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; background: #eef2f7; color: #3b4d66; }
.dq-st { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; }
.dq-st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cx-title { white-space: nowrap; }
.cx-state { padding: 2px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; background: #e6f0ff; color: #0d4aa6; white-space: nowrap; }
.cx-state.is-done { background: #e6f6ed; color: #0d6a39; }
.cx-qb { height: 27px; padding: 0 10px; border: 1px solid #c9d8ef; border-radius: 7px; background: #fff; color: #0d3f9f; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; text-decoration: none; white-space: nowrap; }
.cx-qb:hover { background: #eef5ff; }
.cx-qb.is-on { background: #0f2747; color: #fff; border-color: #0f2747; }
.cx-h .voice-lang { margin-left: 6px; text-transform: none; letter-spacing: 0; }
.cx-h .voice-lang select { height: 22px; padding: 0 4px; font-size: var(--fs-xs); }
.cx-nav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 3px; margin: 0 0 4px; padding: 5px 8px; background: #fff; border-bottom: 1px solid #dfe7f1; overflow-x: auto; }
.cx-nav button { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; height: 27px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #2b3d56; cursor: pointer; white-space: nowrap; }
.cx-nav button:hover { background: #f1f6fd; border-color: #d6e0ec; }
.cx-nav button.is-on { background: #e6f0ff; border-color: #9fc0ee; color: #0d3f9f; font-weight: 600; }
.cx-nav .n { min-width: 17px; padding: 0 5px; border-radius: 999px; background: #e8eef7; color: #3b4d66; font-size: var(--fs-2xs); font-weight: 600; text-align: center; }
.cx-nav .n:empty { display: none; }
.cx-nav .is-on .n { background: #1565d8; color: #fff; }
.cx-nav .req { color: #c62f2f; font-weight: 600; margin-left: -3px; }
.cx-sec-t { display: flex; align-items: center; gap: 8px; margin: 0 0 7px; font: 600 var(--fs-sm)/1.2 var(--hospital-display); color: #0f2747; }
.cx-sec-t .no { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #1565d8; color: #fff; font-size: var(--fs-xs); font-weight: 600; }
.cx-sec-t .sp { flex: 1; }
.cx-h { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #3b4d66; }
.cx-h .sp { flex: 1; }
.cx-v label { display: block; font-size: var(--fs-2xs); font-weight: 600; color: #3b4d66; text-transform: none; letter-spacing: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-v label em { font-style: normal; color: #8a98ad; font-weight: 600; text-transform: none; }
.cx-v input { width: 100%; height: 26px; padding: 0 6px; border: 1px solid #cfdbea; border-radius: 6px; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: #0d1b2e; background: #fff; }
.cx-v input[readonly] { background: #eef3f9; color: #0d3f9f; }
.cx-v input.is-high { border-color: #e59a9a; background: #fff3f3; color: #a32020; }
.cx-f > label { display: flex; align-items: center; gap: 5px; margin-bottom: 2px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #3b4d66; }
.cx-f > label i { color: #c62f2f; font-style: normal; }
.cx-f > label small { color: #5b6b82; font-weight: 600; text-transform: none; letter-spacing: 0; }
.cx-f textarea, .cx-in, .cx-sel { width: 100%; border: 1px solid #cfdbea; border-radius: 7px; font: inherit; font-size: var(--fs-sm); color: #0d1b2e; background: #fff; }
.cx-f textarea { min-height: 44px; padding: 5px 34px 5px 8px; resize: vertical; line-height: 1.35; }
.cx-in, .cx-sel { height: 27px; padding: 0 7px; }
.cx-f textarea:focus, .cx-in:focus, .cx-sel:focus { outline: 0; border-color: #1565d8; box-shadow: 0 0 0 3px rgba(21, 101, 216, .12); }
.cx-f.is-bad textarea { border-color: #c62f2f; background: #fff6f6; }
.cx-err { display: none; color: #c62f2f; font-size: var(--fs-xs); font-weight: 600; margin-top: 2px; }
.cx-f.is-bad .cx-err { display: block; }
.cx-qt-menu { position: absolute; right: 0; top: 21px; z-index: 40; width: 280px; max-height: 260px; overflow: auto; padding: 4px; background: #fff; border: 1px solid #cfdbea; border-radius: 8px; box-shadow: 0 12px 26px rgba(13, 39, 71, .18); text-transform: none; letter-spacing: 0; }
.cx-qt-menu .row { display: flex; align-items: flex-start; gap: 4px; }
.cx-qt-menu button { display: block; width: 100%; padding: 5px 8px; border: 0; border-radius: 5px; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #0d1b2e; text-align: left; cursor: pointer; white-space: normal; }
.cx-qt-menu button:hover { background: #f1f6fd; }
.cx-qt-menu button.x { width: auto; flex-shrink: 0; color: #a32020; font-weight: 600; }
.cx-qt-menu .add { color: #5a2fa8; font-weight: 600; border-top: 1px dashed #dfe7f1; border-radius: 0; margin-top: 2px; }
.cx-qt-menu .none { padding: 5px 8px; color: #8a98ad; font-size: var(--fs-xs); }
.cx-btn { height: 27px; padding: 0 12px; border: 0; border-radius: 7px; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; text-decoration: none; }
.cx-btn--star { background: #fff; color: #b88400; border: 1px solid #ecd48a; padding: 0 9px; }
.cx-btn--star.is-on { background: #fff6d6; }
.cx-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 45; margin: 2px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #cfdbea; border-radius: 8px; box-shadow: 0 12px 26px rgba(13, 39, 71, .18); max-height: 220px; overflow: auto; font-size: var(--fs-xs); min-width: 280px; }
.cx-list[hidden] { display: none; }
.cx-list li { display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: 6px; cursor: pointer; }
.cx-list li:hover, .cx-list li.is-hi { background: #eaf2ff; }
.cx-list li em { margin-left: auto; color: #5b6b82; font-style: normal; font-weight: 600; font-size: var(--fs-xs); }
.cx-list li .star { color: #e0a800; }
.cx-list li.free { color: #8a4b00; }
.cx-list li.none { color: #8a98ad; cursor: default; }
.cx-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.cx-tbl th { padding: 5px 6px; background: #eef4fb; color: #3b4d66; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; text-align: left; white-space: nowrap; }
.cx-tbl td { padding: 5px 6px; border-top: 1px solid #edf1f6; vertical-align: top; color: #0d1b2e; }
.cx-tbl td.nw { white-space: nowrap; }
.cx-tbl tr.is-edit td { background: #fff8e1; }
.cx-tbl tr.is-copied td { background: #fffbea; }
.cx-tbl tr.is-cancel td { background: #fdf3f3; color: #8a98ad; text-decoration: line-through; }
.cx-tbl .med b { display: block; }
.cx-tbl .empty td { padding: 14px; text-align: center; color: #5b6b82; }
.cx-ra { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.cx-ra button, .cx-ra a { height: 22px; padding: 0 7px; border: 1px solid #d6e0ec; border-radius: 5px; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; color: #0d3f9f; display: inline-flex; align-items: center; text-decoration: none; }
.cx-ra .del { color: #a32020; }
/* Medicine picker M1 (26-10-2026): stock in the sale stores, in the search list and on the prescription line. */
.cx-grp-h { display: flex; align-items: center; gap: 6px; }
.cx-grp-h small { color: #5b6b82; }
.cx-grp-h .sp { flex: 1; }
.cx-grp-save { width: 470px; }
.cx-grp-save label { display: block; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; color: #3b4d66; margin-bottom: 1px; }
.cx-grp-save .cx-grp-share { display: flex; gap: 5px; align-items: center; margin: 0 0 6px; text-transform: none; font-size: var(--fs-xs); font-weight: 600; }
.cx-tools { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; position: relative; }
.cx-tools .sp { flex: 1; }
.cx-note { margin: 6px 0 0; font-size: var(--fs-xs); color: #5b6b82; line-height: 1.45; }
.cx-pop { position: absolute; z-index: 46; top: 31px; right: 0; width: 440px; max-height: 340px; overflow: auto; padding: 8px; background: #fff; border: 1px solid #cfdbea; border-radius: 9px; box-shadow: 0 14px 30px rgba(13, 39, 71, .2); font-size: var(--fs-xs); }
.cx-pop[hidden] { display: none; }
.cx-pop h5 { margin: 0 0 5px; font-size: var(--fs-xs); text-transform: none; letter-spacing: normal; color: #3b4d66; }
.cx-pop .pv { padding: 6px 7px; border: 1px solid #dfe7f1; border-radius: 7px; margin-bottom: 5px; }
.cx-pop .pv-h { font-weight: 600; }
.cx-pop .pv-h span { color: #5b6b82; font-weight: 600; }
.cx-pop .pv ul { margin: 3px 0 4px; padding-left: 16px; color: #2b3d56; }
.cx-pop .fav { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; cursor: pointer; }
.cx-pop .fav:hover { background: #f1f6fd; }
.cx-pop .fav small { margin-left: auto; color: #5b6b82; }
.cx-pop .fav .x { border: 0; background: none; color: #a32020; font-weight: 600; cursor: pointer; }
.cx-fu { display: grid; grid-template-columns: auto 1fr 1fr 1.4fr; gap: 6px 10px; align-items: end; padding: 7px 8px; border: 1px solid #e3ebf5; border-radius: 9px; background: #f5f8fc; margin: 8px 0; }
.cx-fu label, .cx-fu .lbl { display: block; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; letter-spacing: normal; color: #3b4d66; margin-bottom: 1px; }
.cx-seg { display: inline-flex; border: 1px solid #cfdbea; border-radius: 7px; overflow: hidden; }
.cx-seg button { height: 27px; padding: 0 14px; border: 0; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; }
.cx-seg button.is-on { background: #1565d8; color: #fff; }
.cx-box { border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; padding: 6px 8px; font-size: var(--fs-xs); }
.cx-box h4 { display: flex; align-items: center; margin: 0 0 4px; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #3b4d66; }
.cx-box h4 button { margin-left: auto; border: 0; background: none; padding: 0; font: inherit; font-size: var(--fs-2xs); text-transform: none; letter-spacing: 0; color: #1565d8; cursor: pointer; }
.cx-box ul { margin: 0; padding: 0; list-style: none; }
.cx-box li { padding: 2px 0; border-top: 1px dashed #edf1f6; color: #2b3d56; }
.cx-box li:first-child { border-top: 0; }
.cx-box li small { color: #5b6b82; }
.cx-box .none { color: #8a98ad; font-style: italic; }
.cx-box--alert { border-color: #f1c4c4; background: #fffafa; }
.cx-box--alert li { color: #8f1d1d; font-weight: 600; }
.cx-box--alert li.w { color: #8a4b00; }
.cx-box--alert li.ok { color: #0d6a39; }
.cx-foot { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; box-shadow: 0 -4px 14px rgba(16, 38, 74, .05); }
.cx-foot form { margin: 0; }
.cx-foot .info { font-size: var(--fs-xs); color: #5b6b82; }
.cx-foot .info b { color: #2b3d56; }
.cx-dirty { display: none; font-size: var(--fs-xs); font-weight: 600; color: #b26a00; }
.cx-dirty.is-on { display: inline; }
.cx-autosave { font-size: var(--fs-xs); font-weight: 600; color: #0d6a39; }
.cx-autosave.is-err { color: #a32020; }
.cx-foot .sp { flex: 1; }
.cx-amend { position: absolute; right: 10px; bottom: 50px; z-index: 55; width: 380px; padding: 10px; background: #fff; border: 1px solid #f3cf8a; border-radius: 10px; box-shadow: 0 14px 30px rgba(13, 39, 71, .2); font-size: var(--fs-xs); }
.cx-amend[hidden] { display: none; }
.cx-amend textarea { width: 100%; min-height: 56px; margin: 5px 0; padding: 5px 8px; border: 1px solid #cfdbea; border-radius: 7px; font: inherit; font-size: var(--fs-xs); }
.cx-amend .row { display: flex; gap: 6px; justify-content: flex-end; }
.cx-drawer { position: absolute; top: 0; right: 0; bottom: 0; z-index: 50; width: 500px; max-width: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid #cfdbea; border-radius: 12px; box-shadow: -14px 0 34px rgba(13, 39, 71, .18); transform: translateX(105%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
.cx-drawer.is-open { transform: none; visibility: visible; }
.cx-dr-head { display: flex; align-items: center; gap: 4px; padding: 8px 10px 0; border-bottom: 1px solid #dfe7f1; }
.cx-dr-head .tab { height: 30px; padding: 0 12px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; }
.cx-dr-head .tab.is-on { color: #1565d8; border-bottom-color: #1565d8; }
.cx-dr-head .x { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 7px; background: #f1f5fb; font-size: var(--fs-lg); cursor: pointer; color: #3b4d66; }
.cx-dr-pane { display: none; }
.cx-dr-pane.is-on { display: block; }
.cx-up { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 7px; border: 1px dashed #b9cbe4; border-radius: 8px; background: #f7faff; margin-bottom: 7px; }
.cx-up label { display: block; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #3b4d66; margin-bottom: 1px; }
.cx-up .full { grid-column: 1 / -1; display: flex; gap: 6px; align-items: center; }
.cx-toast { position: fixed; right: 18px; bottom: 58px; z-index: 80; max-width: 440px; padding: 8px 14px; border-radius: 8px; background: #0f2747; color: #fff; font-size: var(--fs-xs); font-weight: 600; box-shadow: 0 10px 24px rgba(0, 0, 0, .25); }
.cx-toast.is-err { background: #a32020; }
.cx-toast.is-ok { background: #0f7a41; }
.dd-config-checks .dd-config-check { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--hospital-ink); }
/* ---- Nursing Station → IP Nursing Desk (owner spec 02-10-2026) ---------------------------------------------- */
.nd { display: flex; flex-direction: column; gap: 7px; }
.nd-pages { margin-left: auto; display: flex; gap: 4px; }
.nd-pages a { padding: 2px 8px; border: 1px solid #d6e0ec; border-radius: 6px; background: #fff; font-weight: 600; color: #3b4d66; text-decoration: none; }
.nd-pages a.on { background: #0f2747; color: #fff; border-color: #0f2747; }
/* Patient Care workspace */
.pc { display: flex; flex-direction: column; gap: 5px; position: relative; overflow: hidden; min-height: 0; }
.pc > * { flex-shrink: 0; }
.pc-act { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 5px 8px; border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; }
.pc-act .l, .pc-act .r { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }
.pc-act > .hospital-page-back-title, .pc-act > .pc-title { justify-self: center; }
.pc-act .r { justify-content: flex-end; }
.pc-title { margin: 0 !important; font-size: var(--fs-lg) !important; white-space: nowrap; }
.pc-a { height: 27px; padding: 0 8px; border: 1px solid #c9d8ef; border-radius: 7px; background: #fff; color: #0d3f9f; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap; }
.pc-a:hover { background: #eef5ff; }
.pc-a.is-on { background: #0f2747; border-color: #0f2747; color: #fff; }
.pc-av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #18a058, #0d6a39); color: #fff; font-size: var(--fs-xs); font-weight: 600; flex-shrink: 0; }
.pc-ban { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; padding: 5px 10px; border: 1px solid #cfe0f5; border-radius: 10px; background: linear-gradient(90deg, #f3f8ff, #fff 70%); font-size: var(--fs-xs); color: #5b6b82; }
.pc-ban b { color: #0d1b2e; }
.pc-ban .nm { font: 600 var(--fs-lg)/1.1 var(--hospital-display); color: #0d1b2e; }
.pc-nav { display: flex; gap: 3px; padding: 4px; border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; overflow-x: auto; }
.pc-nav button { flex-shrink: 0; height: 28px; padding: 0 11px; border: 0; border-radius: 7px; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #2b3d56; cursor: pointer; white-space: nowrap; }
.pc-nav button b { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 4px; border-radius: 4px; background: #e8eef7; color: #0d3f9f; font-size: var(--fs-xs); }
.pc-nav button:hover { background: #f1f6fd; }
.pc-nav button.is-on { background: linear-gradient(135deg, #1565d8, #0d4aa6); color: #fff; }
.pc-nav button.is-on b { background: rgba(255, 255, 255, .25); color: #fff; }
.pc-pane, .pc-subpane { display: none; }
.pc-pane.is-on, .pc-subpane.is-on { display: block; }
.pc-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; font: 600 var(--fs-sm)/1.2 var(--hospital-display); color: #0f2747; }
.pc-h .sp, .pc-sec > h4 .sp, .pc-ti .hd .sp, .pc-pm .sp { flex: 1; }
.pc-sec { border: 1px solid #e3ebf5; border-radius: 9px; padding: 7px 9px; margin-bottom: 7px; background: #fbfdff; }
.pc-sec > h4 { margin: 0 0 5px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #3b4d66; display: flex; align-items: center; gap: 8px; }
.pc-sec > h4 small { text-transform: none; letter-spacing: 0; }
.pc-g { display: grid; gap: 5px 8px; }
.pc-g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pc-span2 { grid-column: span 2; }
.pc-span3 { grid-column: span 3; }
.pc-span4 { grid-column: span 4; }
.pc-mt { margin-top: 5px; }
.pc-f label { display: block; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #3b4d66; margin-bottom: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-f label em { font-style: normal; color: #8a98ad; text-transform: none; }
.pc-f input, .pc-f select, .pc-f textarea, .pc-tbl--in input, .pc-tbl--in select, .pc-in, .pc-row > input, .pc-row > select, .pc-plan-st input, .pc-plan-st select, .pc-pmh-row input, .pc-crit-row input { width: 100%; border: 1px solid #cfdbea; border-radius: 6px; font: inherit; font-size: var(--fs-xs); color: #0d1b2e; background: #fff; }
.pc-f input, .pc-f select, .pc-tbl--in input, .pc-tbl--in select, .pc-in, .pc-row > input, .pc-row > select, .pc-plan-st input, .pc-plan-st select, .pc-pmh-row input, .pc-crit-row input { height: 26px; padding: 0 6px; }
.pc-in { width: 260px; }
.pc-tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.pc-tbl th { padding: 5px 6px; background: #eef4fb; color: #3b4d66; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; text-align: left; white-space: nowrap; }
.pc-tbl td { padding: 4px 6px; border-top: 1px solid #edf1f6; vertical-align: top; color: #0d1b2e; }
.pc-tbl td.nw { white-space: nowrap; }
.pc-stopped td input { color: #8a98ad; }
.pc-scroll { overflow-x: auto; }
.pc-rx { min-width: 980px; }
.pc-b { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; }
.pc .b-ok { background: #e6f6ed; color: #0d6a39; }
.pc .b-due { background: #fff4e0; color: #8a4b00; }
.pc .b-late { background: #fdecec; color: #a32020; }
.pc .b-info { background: #e6f0ff; color: #0d4aa6; }
.pc .b-grey { background: #eef2f7; color: #3b4d66; }
.pc .b-crit { background: #a32020; color: #fff; }
.pc-sub { display: flex; gap: 3px; margin-bottom: 7px; border-bottom: 1px solid #e3ebf5; flex-wrap: wrap; }
.pc-sub--inline { margin: 0; border: 0; }
.pc-sub button { height: 27px; padding: 0 10px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; }
.pc-sub button.is-on { color: #1565d8; border-bottom-color: #1565d8; }
.pc-tot { display: grid; grid-template-columns: 1fr 1fr 1fr 2fr; gap: 6px; margin: 6px 0; }
.pc-tot > div { padding: 5px 8px; border-radius: 8px; background: #f5f8fc; border: 1px solid #e3ebf5; font-size: var(--fs-xs); color: #5b6b82; font-weight: 600; }
.pc-tot b { display: block; font-size: var(--fs-md); color: #0d1b2e; }
.pc-tot .neg b { color: #a32020; }
.pc-tot-sh { display: flex; flex-direction: column; justify-content: center; gap: 1px; }
.pc-tot-sh span.on { color: #0d3f9f; font-weight: 600; }
.pc-ti { position: relative; margin-bottom: 6px; padding: 6px 8px; border: 1px solid #dfe7f1; border-radius: 8px; font-size: var(--fs-xs); background: #fff; }
.pc-ti[hidden] { display: none; }
.pc-ti::before { content: ""; position: absolute; left: -15px; top: 9px; width: 10px; height: 10px; border-radius: 50%; background: #1565d8; border: 2px solid #fff; box-shadow: 0 0 0 1px #1565d8; }
.pc-ti .hd { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.pc-ti .hd b { color: #0d1b2e; }
.pc-ti .hd span { color: #5b6b82; }
.pc-chips { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.pc-chips--inline { margin: 0; }
.pc-chips button, .pc-chips a { height: 24px; padding: 0 10px; border: 1px solid #d6e0ec; border-radius: 999px; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.pc-chips .is-on { background: #0f2747; color: #fff; border-color: #0f2747; }
.mar-cell { display: inline-flex; align-items: center; gap: 3px; margin: 1px 2px 1px 0; padding: 2px 6px; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; border: 1px solid transparent; white-space: nowrap; }
.mar-cell[data-mar] { cursor: pointer; }
.mar-due { background: #fff4e0; color: #8a4b00; border-color: #f3cf8a; }
.mar-late { background: #fdecec; color: #a32020; border-color: #f1b4b4; }
.mar-given { background: #e6f6ed; color: #0d6a39; }
.mar-held { background: #eef2f7; color: #3b4d66; }
.mar-pan { position: sticky; bottom: 0; z-index: 5; margin-top: 7px; padding: 8px; border: 1px solid #b9d0f0; border-radius: 9px; background: #f4f8fe; box-shadow: 0 -6px 18px rgba(13, 39, 71, .08); }
.mar-pan[hidden] { display: none; }
.pc-dr { position: absolute; top: 0; right: 0; bottom: 0; z-index: 50; width: 580px; max-width: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid #cfdbea; border-radius: 12px; box-shadow: -14px 0 34px rgba(13, 39, 71, .18); transform: translateX(105%); transition: transform .2s, visibility .2s; visibility: hidden; }
.pc-dr.is-open { transform: none; visibility: visible; }
.pc-dr-h { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #dfe7f1; }
.pc-dr-h b { font: 600 var(--fs-md)/1 var(--hospital-display); color: #0f2747; }
.pc-dr-h .x { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 7px; background: #f1f5fb; cursor: pointer; }
.pc-dv { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pc-dv .box { border: 1px solid #dfe7f1; border-radius: 9px; padding: 6px 8px; font-size: var(--fs-xs); }
.pc-dv .box h5 { margin: 0 0 3px; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; color: #3b4d66; }
.pc-dv .box ul { margin: 0; padding-left: 14px; }
.pc-pm { position: absolute; z-index: 60; top: 40px; right: 40px; width: 400px; padding: 10px; background: #fff; border: 1px solid #b9d0f0; border-radius: 10px; box-shadow: 0 14px 30px rgba(13, 39, 71, .22); font-size: var(--fs-xs); }
.pc-pm[hidden] { display: none; }
.pc-pm h5 { margin: 0 0 6px; font-size: var(--fs-xs); text-transform: none; letter-spacing: normal; color: #3b4d66; }
.pc-pm .q { display: grid; gap: 4px; margin-bottom: 8px; }
.pc-pm .q a { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #dfe7f1; border-radius: 7px; color: #0d1b2e; text-decoration: none; font-weight: 600; }
.pc-pm .q a[hidden] { display: none; }
.pc-pm .q a:hover { background: #f1f6fd; border-color: #9fc0ee; }
.pc-pm .q a small { margin-left: auto; color: #5b6b82; font-weight: 600; }
.pc-pm .ck { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; margin-bottom: 7px; }
.pc-pm .ck label { display: flex; gap: 5px; align-items: center; font-weight: 600; }
.pc-pm .row { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.pc-pm .row[hidden] { display: none; }
.pc form.is-editing { border-color: #f3cf8a; background: #fffcf3; }
.pc [hidden] { display: none !important; }
@media (max-width: 1023px) {
    .pc { height: auto !important; overflow: visible; }
    .pc-pane { overflow-x: auto; }
}
.service-care-type { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; }
.service-care-type .hospital-input { flex: 1; padding: 4px 8px; font-size: var(--fs-sm); }
/* Patient Care → IP bill (owner decisions 02-10-2026): service request, care entry charge, indent. */
.pc-g-order { grid-template-columns: 2.6fr .5fr .8fr 1.4fr 1.4fr auto; }
.pc-request-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-top: 1px solid #f0f4f9; color: #0d1b2e; cursor: pointer; }
.pc-request-item:hover, .pc-request-item:focus, .pc-request-item.is-on { background: #e6f0ff; outline: none; }
.pc-request-item em { font-style: normal; font-size: var(--fs-2xs); font-weight: 600; color: #6a34b5; }
.pc-request-item small { margin-left: auto; color: #5b6b82; white-space: nowrap; }
/* Emergency checkbox beside MLC (owner decisions 02-10-2026): red while ticked. */
.opd-switch-stack--row { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-end; align-content: flex-end; grid-column: span 2; }
.opd-switch--emergency input { accent-color: #c62828; }
.opd-switch--emergency.is-on { border-color: #d32f2f; background: #fdecea; color: #b71c1c; box-shadow: 0 0 0 3px rgba(211, 47, 47, .14); }
.opd-switch--emergency.is-on::after { content: 'EMERGENCY'; padding: 1px 7px; border-radius: 999px; background: #d32f2f; color: #fff; font-size: var(--fs-2xs); letter-spacing: .06em; }
.opd-emergency-note { margin: 2px 0 0; font-size: var(--fs-xs); font-weight: 600; color: #b71c1c; }
.ip-emergency-chip { display: inline-block; margin-top: 2px; padding: 1px 7px; border-radius: 999px; background: #d32f2f; color: #fff; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: .05em; }
.opd-priority--emergency { background: #d32f2f; color: #fff; }
/* Payment lines (owner decisions 02-10-2026): billing/_payment_lines, the OP Bill block for IP billing and pharmacy.
   Wide boxes show one row per line; narrow side panels wrap each line in two rows. */
.pay-lines { container-type: inline-size; display: grid; gap: 4px; border: 1px solid #dfe7f1; border-radius: 9px; background: #fff; }
.pay-lines-head { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: #f1f5fb; border-bottom: 1px solid #dfe7f1; border-radius: 9px 9px 0 0; font-size: var(--fs-xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: #3b4d66; }
.pay-lines-head small { text-transform: none; letter-spacing: 0; font-weight: 600; color: #5b6b82; }
.pay-add { margin-left: auto; height: 22px; padding: 0 9px; border: 0; border-radius: 6px; background: #16a34a; color: #fff; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap; }
.pay-lines-cols { display: none; padding: 0 8px; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; letter-spacing: normal; color: #5b6b82; }
.pay-lines-rows { display: grid; gap: 5px; padding: 2px 8px; }
.pay-line { display: grid; grid-template-columns: 1fr 1fr 1fr 24px; grid-template-areas: "mode mode amount x" "agency card ref ref" "note note note note"; gap: 4px; padding-bottom: 5px; border-bottom: 1px dashed #e6ecf4; }
.pay-line:last-child { border-bottom: 0; padding-bottom: 0; }
.pay-line select, .pay-line input { width: 100%; min-width: 0; height: 27px; padding: 0 6px; border: 1px solid #d6e0ec; border-radius: 6px; font: inherit; font-size: var(--fs-xs); background: #fff; box-sizing: border-box; }
.pay-line input:disabled { background: #f1f3f6; border-color: #e6eaf0; color: #a3aec0; }
.pay-line [data-pay-mode] { grid-area: mode; }
.pay-line .pay-amt { grid-area: amount; text-align: right; font-weight: 600; }
.pay-line [data-pay-noncash]:not([data-pay-ref]) { grid-area: agency; }
.pay-line [data-pay-card] { grid-area: card; }
.pay-line [data-pay-ref] { grid-area: ref; }
.pay-line input[name$="[note]"] { grid-area: note; }
.pay-x { grid-area: x; justify-self: center; width: 24px; height: 27px; border: 0; border-radius: 6px; background: #fdecea; color: #b3391d; font-weight: 600; cursor: pointer; }
.pay-x:disabled { opacity: .35; cursor: default; }
.pay-lines-sum { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 8px; border-top: 1px solid #dfe7f1; background: #fbfcfe; border-radius: 0 0 9px 9px; font-size: var(--fs-xs); color: #3b4d66; }
.pay-lines-sum b { font-size: var(--fs-sm); }
/* Cash transaction limit (owner 20-11-2026, cash-limit.html C2): strip + "Cash paid by" under the payment lines. */
.cash-limit { display: grid; gap: 4px; padding: 5px 8px; border-top: 1px dashed #dfe7f1; font-size: var(--fs-xs); }
.cash-limit-strip { display: flex; flex-wrap: wrap; gap: 4px 12px; color: #475569; }
.cash-limit-strip b { color: #0f172a; font-weight: 600; font-variant-numeric: tabular-nums; }
.cash-limit-left { padding: 0 8px; border-radius: 999px; background: #fffbeb; border: 1px solid #fcd34d; }
.cash-limit-left b { color: #92400e; }
.cash-limit-thr { color: #94a3b8; }
.cash-limit [data-cash-strip]:empty { display: none; }
.cash-limit-payer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cash-limit-payer select, .cash-limit-payer input { height: 24px; border: 1px solid #c9d5e6; border-radius: 5px; font: inherit; font-size: var(--fs-xs); padding: 0 6px; min-width: 0; }
.cash-limit-payer input { width: 150px; }
.cash-limit-msg { margin: 0; padding: 4px 8px; border-radius: 6px; }
.cash-limit-msg.is-bad { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; font-weight: 600; }
.cash-limit-msg.is-warn { background: #fffbeb; border: 1px solid #fcd34d; color: #92400e; }
.pay-lines-sum .is-ok b { color: #138a4b; }
.pay-lines-sum .is-due b { color: #c62f2f; }
.pay-lines-sum .is-bad { color: #c62f2f; font-weight: 600; }
.pay-lines .hospital-error { margin: 0 8px 6px; }
@container (min-width: 620px) {
    .pay-lines-cols { display: grid; grid-template-columns: 1.1fr 1.1fr .8fr 1.1fr .9fr 1.3fr 48px; gap: 4px; }
    .pay-lines-cols > span:last-child { text-align: center; }
    .pay-line { grid-template-columns: 1.1fr 1.1fr .8fr 1.1fr .9fr 1.3fr 48px; grid-template-areas: "mode agency card ref amount note x"; border-bottom: 0; padding-bottom: 0; }
}
/* Narrow panels: a cash line hides the agency / card / reference boxes it never uses, so it takes one row less. */
.pay-line.is-cash { grid-template-areas: "mode mode amount x" "note note note note"; }
.pay-line.is-cash [data-pay-noncash], .pay-line.is-cash [data-pay-card] { display: none; }
@container (min-width: 620px) {
    .pay-line.is-cash { grid-template-areas: "mode agency card ref amount note x"; }
    .pay-line.is-cash [data-pay-noncash], .pay-line.is-cash [data-pay-card] { display: block; }
}
@container (max-width: 619px) {
    .pay-lines-head { padding: 3px 8px; }
    .pay-lines-head small { display: none; }
}
/* ===== Pharmacy Purchase / GRN workspace (owner spec 03-10-2026, preview pharmacy-purchase-grn.html) ===== */
.pw { --pw-line: #dfe7f1; --pw-mute: #5b6b82; --pw-bad: #c62f2f; --pw-warn: #b86a00; --pw-ok: #138a4b; --pw-soft: #f4f7fb;
    display: flex; flex-direction: column; gap: 6px; height: calc(100dvh - 128px); min-height: 560px; margin: -12px -8px -14px; font-size: var(--fs-sm); }
.pw-pill--posted { background: rgba(31, 200, 77, .16); color: #136c31; }
.pw-pill--cancelled { background: rgba(255, 95, 49, .14); color: #b3391d; }
.pw kbd, .pw-modal kbd { font: 600 var(--fs-2xs)/1 ui-monospace, Consolas, monospace; padding: 2px 4px; border-radius: 4px; background: #eef2f8; border: 1px solid #d3dcea; color: #3b4d66; }
.pw-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; }
.pw-f label { font-size: var(--fs-2xs); font-weight: 600; text-transform: none; letter-spacing: normal; color: var(--pw-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-f label .req { color: var(--pw-bad); }
.pw-in, .pw .hospital-combo-input.pw-in { height: 28px; padding: 0 7px; border: 1px solid #d3dcea; border-radius: 7px; font: inherit; font-size: var(--fs-sm); background: #fff; min-width: 0; width: 100%; box-sizing: border-box; }
.pw .hospital-combo { width: 100%; }
.pw-in[readonly] { background: var(--pw-soft); color: #3b4d66; }
.pw-in.is-bad { border-color: var(--pw-bad); background: #fff5f4; }
.pw-in--num { text-align: right; font-weight: 600; }
.pw-auto { font-weight: 600; color: var(--pw-mute) !important; font-style: italic; }
.pw-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-xs); table-layout: fixed; }
.pw-grid th { position: sticky; top: 0; z-index: 2; background: #eef3fa; color: #3b4d66; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; letter-spacing: normal; padding: 5px 3px; text-align: left; border-bottom: 1px solid var(--pw-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-grid th.num { text-align: right; }
.pw-grid td { padding: 2px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.pw-grid tr.is-active td { background: #f2f7ff; }
.pw-grid tr.is-active td:first-child { box-shadow: inset 3px 0 0 #1565d8; }
.pw-grid tr.has-err td { background: #fff5f4; }
.pw-grid input, .pw-grid select { width: 100%; height: 25px; padding: 0 4px; border: 1px solid #dbe3ee; border-radius: 5px; font: inherit; font-size: var(--fs-xs); background: #fff; box-sizing: border-box; }
.pw-grid input.num { text-align: right; }
.pw-grid input.is-bad { border-color: var(--pw-bad); background: #fff3f1; }
.pw-grid input.is-warn { border-color: #e2a23b; background: #fff8ea; }
.pw-grid input.is-derived, .pw-grid input[readonly] { background: var(--pw-soft); color: var(--pw-mute); }
.pw-grid input:focus, .pw-grid select:focus, .pw-in:focus { outline: 2px solid rgba(21, 101, 216, .35); outline-offset: 0; border-color: #1565d8; }
.pw-grid tr.is-new input { border-style: dashed; background: #fbfdff; }
.pw-prod { position: relative; }
.pw-prod input[data-pw-product] { font-weight: 600; }
.pw-prod .ph-picker-list { min-width: 420px; z-index: 30; }
.pw-acts { display: flex; gap: 2px; justify-content: center; }
.pw-acts button { width: 20px; height: 20px; border: 0; border-radius: 5px; background: #eef3fa; color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; padding: 0; }
.pw-acts button.x { background: #fdecea; color: #b3391d; }
.pw-grid tr.is-new .pw-acts { visibility: hidden; }
.pw-v { font-size: var(--fs-sm); font-weight: 600; font-variant-numeric: tabular-nums; padding: 5px 0; }
.pw-v.is-ok { color: var(--pw-ok); }
.pw-v.is-bad { color: var(--pw-bad); }
.pw-errs { font-size: var(--fs-xs); color: var(--pw-bad); max-height: 48px; overflow: auto; display: none; }
.pw-errs.is-on { display: block; }
.pw-errs.is-soft { color: var(--pw-warn); }
.pw-modal { position: fixed; inset: 0; z-index: 80; display: none; background: rgba(16, 38, 74, .38); align-items: center; justify-content: center; font-size: var(--fs-sm); }
.pw-modal.is-open { display: flex; }
.pw-box { background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(16, 38, 74, .3); display: flex; flex-direction: column; max-height: 88vh; width: min(560px, 94vw); }
.pw-box > header { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid #dfe7f1; }
.pw-box > header h3 { margin: 0; font-family: var(--hospital-display); font-size: var(--fs-lg); color: #0f2747; }
.pw-box > header small { color: #5b6b82; font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-box > header .x { margin-left: auto; border: 0; background: #eef2f8; border-radius: 7px; height: 26px; padding: 0 9px; font-weight: 600; cursor: pointer; color: #3b4d66; font-size: var(--fs-xs); flex-shrink: 0; }
.pw-box > .bd { padding: 10px 14px; overflow: auto; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); min-height: 0; }
.pw-t { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.pw-t th { text-align: left; background: #f1f5fb; color: #3b4d66; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; padding: 5px; position: sticky; top: 0; white-space: nowrap; }
.pw-t td { padding: 4px 5px; border-bottom: 1px solid #edf1f6; white-space: nowrap; }
.pw-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.pw-t tr.me td { background: #f2f7ff; }
.pw-t input[data-cn-amt] { width: 84px; height: 23px; text-align: right; border: 1px solid #d3dcea; border-radius: 5px; font: inherit; font-size: var(--fs-xs); padding: 0 4px; }
.pw-t input.is-bad { border-color: #c62f2f; background: #fff3f1; }
.pw-chips, .pw-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pw-chips button, .pw-tabs button { border: 1px solid #c9d5e6; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; color: #3b4d66; }
.pw-chips button.is-on, .pw-tabs button.is-on { background: #1565d8; border-color: #1565d8; color: #fff; }
.pw-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pw-kv div { border: 1px solid #dfe7f1; border-radius: 8px; padding: 6px 8px; background: #fbfcfe; }
.pw-kv span { display: block; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; color: #5b6b82; font-weight: 600; }
.pw-kv b { font-size: var(--fs-md); color: #0f2747; }
.pw-kv .is-ok b { color: #138a4b; }
.pw-kv .is-bad b { color: #c62f2f; }
.pw-toast { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 90; background: #1d2b40; color: #fff; padding: 8px 16px; border-radius: 10px; font-size: var(--fs-sm); font-weight: 600; display: none; }
.pw-toast.is-on { display: block; }
/* Purchase / GRN dialogs on the view page (cancel, posted) and the Purchase List filter row (03-10-2026). */
/* Purchase Return (03-10-2026, preview pharmacy-purchase-return-v2.html) */
.pr { display: flex; flex-direction: column; gap: 6px; height: calc(100dvh - 128px); min-height: 560px; margin: -12px -8px -14px; font-size: var(--fs-sm); }
.pr-grns { max-height: 150px; overflow: auto; border-top: 1px solid #dfe7f1; }
.pr-grns table { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.pr-grns td, .pr-grns th { padding: 4px 6px; border-bottom: 1px solid #edf1f6; text-align: left; white-space: nowrap; }
.pr-grns th { position: sticky; top: 0; background: #f1f5fb; font-size: var(--fs-2xs); text-transform: none; color: #3b4d66; }
.pr-grns tr.is-on td { background: #f2f7ff; }
.pr-grid td, .pr-grid th { white-space: nowrap; }
.pr-grid input { width: 64px; text-align: right; }
.pr-grid .pr-av { font-weight: 600; color: #138a4b; }
.pr-grid tr.is-off td { color: #a3aec0; }
.pr-grid tr.is-on td { background: #f6fbf7; }
.pr-opt { display: flex; flex-direction: column; gap: 4px; }
.pr-opt label { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-xs); border: 1px solid #dfe7f1; border-radius: 8px; padding: 5px 8px; cursor: pointer; }
.pr-opt label.is-on { border-color: #1565d8; background: #f2f7ff; }
/* Supplier Credit Note (03-10-2026, preview pharmacy-supplier-credit-note.html) */
.scn-reasons { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.scn-reasons label { border: 1px solid #dfe7f1; border-radius: 8px; padding: 6px 8px; font-size: var(--fs-xs); cursor: pointer; display: flex; flex-direction: column; gap: 2px; background: #fff; }
.scn-reasons label b { color: #1d2b40; }
.scn-reasons label em { font-style: normal; color: #5b6b82; font-size: var(--fs-xs); line-height: 1.3; }
.scn-reasons input { position: absolute; opacity: 0; pointer-events: none; }
.scn-reasons label.is-on { border-color: #1565d8; background: #f2f7ff; box-shadow: inset 0 0 0 1px #1565d8; }
.scn-src { font-size: var(--fs-xs); font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.scn-state { padding: 2px 8px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; }
.pw-grid input[type="checkbox"], .pr-grid input[type="checkbox"] { width: 16px; height: 16px; padding: 0; }
/* ===== Pharmacy Sale + DC workspace (owner spec 04-10-2026, preview pharmacy-sale-v2.html) ===== */
.ps { --ps-line: #dfe7f1; --ps-mute: #5b6b82; --ps-bad: #c62f2f; --ps-warn: #b86a00; --ps-ok: #138a4b; --ps-soft: #f4f7fb; --ps-ip: #6a3fd1;
    display: flex; flex-direction: column; gap: 5px; height: calc(100dvh - 128px); min-height: 560px; margin: -12px -8px -14px; font-size: var(--fs-sm); }
.ps kbd, .ps-modal kbd { font: 600 var(--fs-2xs)/1 ui-monospace, Consolas, monospace; padding: 2px 4px; border-radius: 4px; background: #eef2f8; border: 1px solid #d3dcea; color: #3b4d66; }
.ps-bell { position: relative; height: 28px; padding: 0 8px 0 6px; border: 1px solid #c9d5e6; border-radius: 8px; background: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #2b3b52; }
.ps-bell svg { width: 19px; height: 19px; flex-shrink: 0; }
.ps-bell--ind svg { color: #16a34a; }
.ps-bell--ret svg { color: #111418; }
.ps-bell .cnt { position: absolute; top: -7px; left: 14px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e0262b; color: #fff; font-size: var(--fs-xs); font-weight: 600; display: grid; place-items: center; border: 2px solid #fff; box-sizing: border-box; }
.ps-bell .cnt.is-zero { display: none; }
@keyframes ps-ring { 0%, 60%, 100% { transform: rotate(0); } 10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(9deg); } 40% { transform: rotate(-6deg); } 50% { transform: rotate(3deg); } }
.ps-card { border: 1px solid var(--ps-line); border-radius: 10px; background: #fff; flex-shrink: 0; }
.ps-seg { display: flex; flex-direction: column; gap: 2px; }
.ps-seg[hidden] { display: none; }
.ps-seg > span, .ps-f label { font-size: var(--fs-2xs); font-weight: 600; text-transform: none; letter-spacing: normal; color: var(--ps-mute); white-space: nowrap; }
.ps-seg > div { display: inline-flex; border: 1px solid #c9d5e6; border-radius: 8px; overflow: hidden; }
.ps-seg button { height: 27px; padding: 0 11px; border: 0; border-left: 1px solid #dbe3ee; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; white-space: nowrap; }
.ps-seg button:first-child { border-left: 0; }
.ps-seg button.is-on { background: #1565d8; color: #fff; }
.ps-seg button[disabled] { color: #a9b4c4; background: #f6f8fb; cursor: not-allowed; }
.ps-seg--settle button.is-on { background: var(--ps-ip); }
.ps-f { display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; }
.ps-f label .req { color: var(--ps-bad); }
.ps-in { height: 27px; padding: 0 7px; border: 1px solid #d3dcea; border-radius: 7px; font: inherit; font-size: var(--fs-sm); background: #fff; min-width: 0; box-sizing: border-box; width: 100%; }
.ps-in[readonly] { background: var(--ps-soft); color: #3b4d66; }
.ps-in.is-bad, .ps-t select.is-bad, .ps-t input.is-bad { border-color: var(--ps-bad); background: #fff3f1; }
.ps-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 40; margin-top: 2px; background: #fff; border: 1px solid #c9d5e6; border-radius: 8px; box-shadow: 0 12px 28px rgba(16, 38, 74, .18); max-height: 280px; overflow: auto; }
.ps-results[hidden] { display: none; }
.ps-results button { display: block; width: 100%; padding: 6px 9px; border: 0; border-bottom: 1px solid #edf1f6; background: #fff; text-align: left; font: inherit; font-size: var(--fs-xs); cursor: pointer; }
.ps-results button:hover, .ps-results button.is-active { background: #f2f7ff; }
.ps-strip { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border-top: 1px solid var(--ps-line); background: #f7faff; font-size: var(--fs-xs); white-space: nowrap; overflow: hidden; }
.ps-strip[hidden] { display: none; }
.ps-strip b { color: #0f2747; }
.ps-strip .lbl { color: var(--ps-mute); font-size: var(--fs-xs); font-weight: 600; }
.ps-strip .nm { font-size: var(--fs-sm); }
.ps-strip .sep { color: #c3cfdf; }
.ps-chip { padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.ps-chip--adm { background: rgba(31, 200, 77, .16); color: #136c31; }
.ps-chip--proc { background: #fff1d6; color: #8a5200; }
.ps-chip--dis { background: #c62f2f; color: #fff; }
.ps-chip--fb { background: #dc2626; color: #fff; } /* Final billed (owner 19-11-2026, L6) */
/* PTR price / package patient (owner 31-10-2026, charge-type-package-ptr.html). */
.ps-chip--ptr { background: #0f766e; color: #fff; }
.ps-chip--pkg { background: #7c3aed; color: #fff; }
/* Pharmacy bill of the charge type + open pharmacy credit (owner 31-10-2026, charge-type-pharmacy-bill.html). */
.ps-chip--rule { background: #1d4ed8; color: #fff; }
.ps-chip--credit { background: #b45309; color: #fff; text-decoration: none; }
.ps-chip--urg { background: #fdecea; color: #b3391d; }
.ps-chip--ind { background: #eaf2ff; color: #1553b0; }
.ps-chip--ip { background: #efe9ff; color: var(--ps-ip); }
.ps-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-xs); table-layout: fixed; }
.ps-grid th { position: sticky; top: 0; z-index: 2; background: #eef3fa; color: #3b4d66; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; letter-spacing: normal; padding: 5px 3px; text-align: left; border-bottom: 1px solid var(--ps-line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-grid th.num { text-align: right; }
.ps-grid td { padding: 2px 2px; border-bottom: 1px solid #edf1f6; vertical-align: middle; }
.ps-grid tr.is-active td { background: #f2f7ff; }
.ps-grid tr.is-active td:first-child { box-shadow: inset 3px 0 0 #1565d8; }
.ps-grid input, .ps-grid select { width: 100%; height: 24px; padding: 0 4px; border: 1px solid #dbe3ee; border-radius: 5px; font: inherit; font-size: var(--fs-xs); background: #fff; box-sizing: border-box; }
.ps-grid input.num { text-align: right; }
.ps-grid input.is-bad { border-color: var(--ps-bad); background: #fff3f1; }
.ps-grid input.is-warn { border-color: #e2a23b; background: #fff8ea; }
.ps-grid .ro { text-align: right; font-variant-numeric: tabular-nums; padding-right: 4px; color: #2b3b52; white-space: nowrap; overflow: hidden; }
.ps-grid .ro.tot { font-weight: 600; color: #0f2747; }
.ps-grid .ro.bad { color: var(--ps-bad); font-weight: 600; }
.ps-grid .sr { text-align: center; color: var(--ps-mute); font-weight: 600; }
.ps-grid .pk { font-size: var(--fs-xs); color: #3b4d66; line-height: 1.15; white-space: nowrap; overflow: hidden; }
.ps-grid .exp { font-size: var(--fs-xs); white-space: nowrap; }
.ps-grid .exp.warn { color: var(--ps-warn); font-weight: 600; }
.ps-grid tr.is-new input { border-style: dashed; background: #fbfdff; }
.ps-grid tr.has-err td { background: #fff7f6; }
.ps-prod { position: relative; }
.ps-prod input { font-weight: 600; }
.ps-prod .src { position: absolute; right: 3px; top: 5px; font-size: var(--fs-2xs); font-weight: 600; color: #1553b0; background: #eaf2ff; border-radius: 4px; padding: 1px 3px; pointer-events: none; }
.ps-acts { display: flex; gap: 2px; justify-content: center; }
.ps-acts button { width: 20px; height: 20px; border: 0; border-radius: 5px; background: #eef3fa; color: #3b4d66; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; padding: 0; }
.ps-acts button.x { background: #fdecea; color: #b3391d; }
.ps-info { display: flex; align-items: center; gap: 12px; padding: 4px 10px; border: 1px solid var(--ps-line); border-radius: 8px; background: #fbfcfe; font-size: var(--fs-xs); flex-shrink: 0; white-space: nowrap; overflow: hidden; min-height: 26px; box-sizing: border-box; }
.ps-info b { color: #0f2747; }
.ps-info .warn { color: var(--ps-warn); font-weight: 600; }
.ps-info .bad { color: var(--ps-bad); font-weight: 600; }
.ps-paytop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--ps-line); }
.ps-paytop > div { padding: 4px 9px; border-left: 1px solid var(--ps-line); }
.ps-paytop > div:first-child { border-left: 0; }
.ps-paytop span { display: block; font-size: var(--fs-2xs); font-weight: 600; letter-spacing: normal; text-transform: none; color: var(--ps-mute); }
.ps-paytop b { font-size: var(--fs-md); font-variant-numeric: tabular-nums; color: #0f2747; }
.ps-paytop .ip b { color: var(--ps-ip); }
.ps-paytop .bal b { color: var(--ps-ok); }
.ps-paytop .bal.is-bad b { color: var(--ps-bad); }
.ps-pay { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); table-layout: fixed; }
.ps-pay th { text-align: left; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; letter-spacing: normal; color: var(--ps-mute); padding: 2px 3px; }
.ps-pay td { padding: 1px 3px; }
.ps-pay input, .ps-pay select { width: 100%; height: 23px; padding: 0 5px; border: 1px solid #d3dcea; border-radius: 5px; font: inherit; font-size: var(--fs-xs); box-sizing: border-box; background: #fff; }
.ps-pay input.num { text-align: right; }
.ps-pay .x { width: 20px; height: 20px; border: 0; border-radius: 5px; background: #fdecea; color: #b3391d; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.ps-pay .chg { font-size: var(--fs-xs); color: var(--ps-ok); font-weight: 600; white-space: nowrap; }
.ps-payfoot { display: flex; align-items: center; gap: 6px; padding: 4px 9px; border-top: 1px solid var(--ps-line); font-size: var(--fs-xs); }
.ps-payfoot[hidden] { display: none; }
.ps-payfoot .msg { font-weight: 600; color: var(--ps-bad); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-payfoot .msg.ok { color: var(--ps-ok); }
.ps-paynote { padding: 10px 12px; font-size: var(--fs-xs); color: #3b4d66; line-height: 1.45; }
.ps-paynote b { color: #0f2747; }
.ps-paynote .big { font-size: var(--fs-md); color: var(--ps-ip); }
.ps-sl { display: flex; justify-content: space-between; gap: 6px; font-size: var(--fs-xs); padding: 1px 0; font-variant-numeric: tabular-nums; }
.ps-sl span { color: #3b4d66; }
.ps-sl b { color: #1d2b40; }
.ps-sl.neg b { color: #b3391d; }
.ps-sl.big { margin-top: 2px; padding-top: 3px; border-top: 1px dashed #b9c8dc; }
.ps-sl.big span { font-weight: 600; color: #0f2747; font-size: var(--fs-xs); text-transform: none; letter-spacing: normal; }
.ps-sl.big b { font-size: var(--fs-lg); color: #0f2747; }
.ps-sl.ip b { color: var(--ps-ip); }
.ps-sl.ok b { color: var(--ps-ok); }
.ps-actbar { display: flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--ps-line); border-radius: 10px; background: #fff; flex-shrink: 0; box-shadow: 0 -4px 14px rgba(16, 38, 74, .05); }
.ps-actbar .st { font-size: var(--fs-xs); color: var(--ps-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-actbar .st b { color: #2b3b52; }
.ps-act--black { border: 0; background: #111418; color: #fff; }
.ps-modal { position: fixed; inset: 0; z-index: 1200; display: none; background: rgba(16, 38, 74, .38); align-items: center; justify-content: center; }
.ps-modal.is-open { display: flex; }
.ps-modal--top { align-items: flex-start; justify-content: flex-end; padding: 58px 14px 0 0; }
.ps-box { background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(16, 38, 74, .3); display: flex; flex-direction: column; max-height: 90vh; width: min(560px, 94vw); font-size: var(--fs-sm); }
.ps-box > header { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid #dfe7f1; }
.ps-box > header h3 { margin: 0; font-family: var(--hospital-display); font-size: var(--fs-lg); color: #0f2747; }
.ps-box > header small { color: #5b6b82; font-size: var(--fs-xs); }
.ps-box > header svg { width: 20px; height: 20px; }
.ps-box > header .x { margin-left: auto; border: 0; background: #eef2f8; border-radius: 7px; height: 26px; padding: 0 9px; font-weight: 600; cursor: pointer; color: #3b4d66; font-size: var(--fs-xs); }
.ps-box > .bd { padding: 10px 14px; overflow: auto; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-sm); }
.ps-t { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.ps-t th { text-align: left; background: #f1f5fb; color: #3b4d66; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; padding: 5px 5px; position: sticky; top: 0; white-space: nowrap; z-index: 1; }
.ps-t td { padding: 4px 5px; border-bottom: 1px solid #edf1f6; white-space: nowrap; }
.ps-t td.wrap { white-space: normal; }
.ps-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.ps-t tr.me td, .ps-t tr.sel td { background: #f2f7ff; }
.ps-t tr.off td { color: #a0aaba; background: #fbf6f6; }
.ps-t tr.pick { cursor: pointer; }
.ps-t tr.pick:hover td { background: #f5f9ff; }
.ps-t tr.urg td:first-child { box-shadow: inset 3px 0 0 #e0262b; }
.ps-t tr.added td { background: #f2fbf5; }
.ps-t tr.addrow td { background: #fbfdff; }
.ps-t input { width: 64px; height: 22px; text-align: right; border: 1px solid #d3dcea; border-radius: 5px; font: inherit; font-size: var(--fs-xs); padding: 0 4px; }
.ps-t input.wide { width: 100%; text-align: left; box-sizing: border-box; }
.ps-t select { height: 24px; border: 1px solid #d3dcea; border-radius: 5px; font: inherit; font-size: var(--fs-xs); padding: 0 3px; max-width: 100%; }
.ps-t select.is-empty { border-color: #e2a23b; background: #fff8ea; }
.ps-dbtn--ret { background: #111418; }
.ps-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ps-kv div { border: 1px solid #dfe7f1; border-radius: 8px; padding: 6px 8px; background: #fbfcfe; }
.ps-kv span { display: block; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; color: #5b6b82; font-weight: 600; }
.ps-kv b { font-size: var(--fs-md); color: #0f2747; }
.ps-kv .ip b { color: #6a3fd1; }
.ps-note { font-size: var(--fs-xs); color: #5b6b82; background: #f7f9fc; border-radius: 8px; padding: 6px 9px; line-height: 1.45; }
.ps-note b { color: #2b3b52; }
.ps-note.warn { background: #fff6e2; color: #7a4a00; }
.ps-note.bad { background: #fff1ef; color: #8f2a1a; }
.ps-confirm { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: var(--fs-sm); }
.ps-confirm span { color: #5b6b82; }
.ps-confirm b { text-align: right; font-variant-numeric: tabular-nums; }
.ps-confirm .big { font-size: var(--fs-lg); color: #0f2747; }
.ps-confirm .ip { color: #6a3fd1; }
.ps-toast { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 1300; background: #1d2b40; color: #fff; padding: 8px 16px; border-radius: 10px; font-size: var(--fs-sm); font-weight: 600; display: none; max-width: 80vw; }
.ps-toast.is-on { display: block; }
.ps-pstrip { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; padding: 6px 9px; border-radius: 8px; background: #f6f3ff; font-size: var(--fs-xs); }
.ps-pstrip b { color: #0f2747; }
.ps-pstrip .lbl { color: #5b6b82; font-size: var(--fs-xs); font-weight: 600; }
.ps-sec { border: 1px solid #dfe7f1; border-radius: 10px; padding: 7px 9px; display: flex; flex-direction: column; gap: 6px; }
.ps-sec[hidden] { display: none; }
.ps-sec h4 { margin: 0; font-size: var(--fs-xs); color: #0f2747; display: flex; align-items: center; gap: 8px; }
.ps-removed { display: flex; flex-direction: column; gap: 4px; padding: 6px 9px; border: 1px dashed #f0c6bd; border-radius: 8px; background: #fffaf9; font-size: var(--fs-xs); }
.ps-removed[hidden] { display: none; }
.ps-removed .rr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ps-removed .rr b { color: #8f2a1a; }
.ps-cancel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid #f0c6bd; border-radius: 8px; background: #fff1ef; font-size: var(--fs-xs); color: #8f2a1a; }
.ps-cancel[hidden] { display: none; }
.ps-cancel .note { flex-basis: 100%; font-size: var(--fs-xs); color: #7a3b2e; }
.row-action-list > span.is-disabled { display: block; padding: 6px 10px; font-size: var(--fs-sm); font-weight: 600; color: #a0aaba; white-space: nowrap; cursor: not-allowed; }
/* Pharmacy messages to the ward (owner decisions 04-10-2026) */
.pc-msg { margin-top: 4px; padding: 5px 8px; border-radius: 7px; border-left: 4px solid #1565d8; background: #eef5ff; color: #1d3b66; font-size: var(--fs-xs); line-height: 1.4; }
.pc-msg b { color: #0d4aa6; }
.pc-msg small { display: block; color: #6b7c93; }
.pc-msg--bad { border-left-color: #c62f2f; background: #fdecea; color: #7a1f14; }
.pc-msg--bad b { color: #a31f12; }
.pc-msg--ok { border-left-color: #138a4b; background: #ecf8f1; color: #14532d; }
.pc-msg--ok b { color: #0d6a39; }
.pc-msg--grey { border-left-color: #9aa6b8; background: #f3f5f8; color: #3b4d66; }
.ip-ph-lines { width: 100%; margin-top: 3px; border-collapse: collapse; font-size: var(--fs-xs); background: #f7f9fc; }
.ip-ph-lines td { padding: 2px 6px; border-bottom: 1px solid #e6ecf3; }
.ip-ph-lines .num { text-align: right; }
/* ---- Patient Care → Medicines v2 (owner decisions 04-10-2026; preview ip-care-medicines-v2.html) ---- */
.pm-card { min-height: 0; border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; display: flex; flex-direction: column; overflow: hidden; }
.pm-card > header { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-bottom: 1px solid #dfe7f1; font-size: var(--fs-sm); font-weight: 600; color: #0f2747; flex-shrink: 0; }
.pm-card > header small { font-weight: 600; color: #5b6b82; font-size: var(--fs-xs); }
.pm-card > header .sp, .pm-foot .sp, .pm-cart header .sp, .pm-cart-foot .sp, .pm-prod .sp { flex: 1; }
.pm-chips { display: flex; gap: 4px; padding: 6px 10px; flex-shrink: 0; }
.pm-chips button { height: 24px; padding: 0 10px; border: 1px solid #c9d5e6; border-radius: 999px; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; }
.pm-chips button.is-on { background: #0f2747; border-color: #0f2747; color: #fff; }
.pm-list, .pm-t { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.pm-list th, .pm-t th { position: sticky; top: 0; z-index: 1; text-align: left; background: #f1f5fb; color: #3b4d66; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; padding: 5px 6px; }
.pm-list td, .pm-t td { padding: 5px 6px; border-bottom: 1px solid #edf1f6; vertical-align: top; }
.pm-list .num, .pm-t .num { text-align: right; }
.pm-row { cursor: pointer; }
.pm-row:hover td { background: #f7faff; }
.pm-row.is-sel td { background: #eaf2ff; }
.pm-row.is-sel td:first-child { box-shadow: inset 4px 0 0 #1565d8; }
.pm-drop { position: absolute; left: 0; right: 0; top: 31px; z-index: 6; max-height: 260px; overflow: auto; border: 1px solid #c9d5e6; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(15, 39, 71, .18); }
.pm-drop div { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 9px; border-bottom: 1px solid #edf1f6; font-size: var(--fs-xs); cursor: pointer; }
.pm-drop div:hover, .pm-drop div.is-hi { background: #eef5ff; }
.pm-drop b { color: #0f2747; }
.pm-drop small { color: #5b6b82; font-size: var(--fs-2xs); }
.pm-drop .stk { text-align: right; font-weight: 600; color: #0d6a39; white-space: nowrap; }
.pm-drop .stk.zero { color: #b3391d; }
.pm-tabs { display: flex; gap: 4px; padding: 6px 10px 0; border-bottom: 1px solid #dfe7f1; flex-shrink: 0; }
.pm-tabs button { height: 30px; padding: 0 13px; border: 1px solid #d3dcea; border-bottom: 0; border-radius: 8px 8px 0 0; background: #f4f7fb; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pm-tabs button i { font-style: normal; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: #dfe7f1; font-size: var(--fs-xs); }
.pm-tabs button.is-on { background: #fff; color: #1565d8; box-shadow: inset 0 3px 0 #1565d8; }
.pm-tabs button.is-on i { background: #1565d8; color: #fff; }
.pm-pane { display: none; flex: 1; min-height: 0; overflow: auto; padding: 8px 11px; flex-direction: column; gap: 7px; }
.pm-pane.is-on { display: flex; }
form.pm-pane[data-pm-order] { padding: 0; gap: 0; }
.pm-body { flex: 1; min-height: 0; overflow: auto; padding: 8px 11px; display: flex; flex-direction: column; gap: 7px; }
.pm-body[hidden] { display: none; }
.pm-prod { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border: 1px solid #cfe0f7; border-radius: 9px; background: #f5f9ff; font-size: var(--fs-xs); flex-wrap: wrap; }
.pm-prod b { color: #0f2747; }
.pm-prod .lbl { color: #5b6b82; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; }
.pm-f { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; color: #5b6b82; }
.pm-f[hidden] { display: none; }
.pm-f input, .pm-f select, .pm-f textarea { width: 100%; min-width: 0; height: 28px; box-sizing: border-box; border: 1px solid #d3dcea; border-radius: 7px; font: inherit; font-size: var(--fs-xs); padding: 0 7px; text-transform: none; font-weight: 600; color: #1d2b40; background: #fff; }
.pm-f textarea { height: 44px; padding: 5px 7px; resize: none; }
.pm-f input[readonly] { background: #f4f7fb; color: #3b4d66; }
.pm-f input.num, .pm-t input.num { text-align: right; }
.pm-f .req::after { content: ' *'; color: #c62f2f; }
.pm-hours { border: 1px solid #d3dcea; border-radius: 9px; padding: 6px 8px; background: #fbfcfe; }
.pm-hours .top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; font-size: var(--fs-xs); font-weight: 600; color: #5b6b82; text-transform: none; }
.pm-hours .top .sp { flex: 1; }
.pm-hours .top b { color: #0f2747; text-transform: none; }
.pm-foot { display: flex; align-items: center; gap: 8px; padding: 7px 11px; border-top: 1px solid #dfe7f1; background: #fbfcfe; flex-shrink: 0; }
.pm-foot small { color: #5b6b82; font-size: var(--fs-xs); line-height: 1.35; }
.pm-ward { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.pm-ward div { border: 1px solid #dfe7f1; border-radius: 8px; padding: 5px 8px; font-size: var(--fs-2xs); font-weight: 600; color: #5b6b82; text-transform: none; }
.pm-ward div b { display: block; font-size: var(--fs-md); color: #0f2747; text-transform: none; }
.pm-ward div b small { font-size: var(--fs-2xs); color: #5b6b82; }
.pm-ward div.hi { border-color: #9ec0f0; background: #f5f9ff; }
.pm-ward div.hi b { color: #1565d8; }
.pm-cart { border: 1px solid #bfe3cd; border-radius: 9px; background: #f3fbf6; }
.pm-cart header { display: flex; align-items: center; gap: 8px; padding: 6px 9px; border-bottom: 1px solid #d6efdf; font-size: var(--fs-xs); font-weight: 600; color: #0d6a39; flex-wrap: wrap; }
.pm-cart header select { height: 26px; border: 1px solid #c9d5e6; border-radius: 6px; font: inherit; font-size: var(--fs-xs); }
.pm-cart .pm-t th { position: static; }
.pm-cart-foot { display: flex; align-items: center; gap: 8px; padding: 6px 9px; }
.pm-cart-foot .pc-in { flex: 1; max-width: 360px; }
.pm-t input, .pm-t select { height: 26px; box-sizing: border-box; border: 1px solid #d3dcea; border-radius: 6px; font: inherit; font-size: var(--fs-xs); padding: 0 6px; max-width: 100%; }
.pm-t tr.is-rej td { background: #fff7f6; }
.pm-b-ret { background: #111827; color: #fff; }
.pm-radios { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pm-radios label { position: relative; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border: 1px solid #c9d5e6; border-radius: 999px; background: #fff; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; cursor: pointer; }
.pm-radios input { position: absolute; opacity: 0; pointer-events: none; }
.pm-radios label:has(input:checked) { background: #0f2747; border-color: #0f2747; color: #fff; }
.pm-radios label:has(input:focus-visible) { outline: 2px solid #f59e0b; }
.pm-radios label b { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #e6edf6; color: #2b3b52; font-size: var(--fs-2xs); }
.pm-radios label:has(input:checked) b { background: #fff; color: #0f2747; }
.pm-radios .sep { width: 1px; height: 22px; margin: 0 4px; background: #d3dcea; }
.pm-hint { font-size: var(--fs-xs); color: #5b6b82; background: #f7f9fc; border-radius: 8px; padding: 6px 9px; line-height: 1.45; }
.pm-hint b { color: #2b3b52; }
.pm-t td:first-child { white-space: nowrap; }
.pm-t .pc-msg { min-width: 160px; }
/* Medicines v2 — no scroll at 1366×768 (owner 04-10-2026): compact rows, hours 2 × 12, reason in the footer. */
.pm-body, .pm-pane { padding: 6px 10px; gap: 5px; }
.pm-hours { padding: 4px 7px; }
.pm-hours .top { margin-bottom: 3px; }
.pm-foot { padding: 5px 10px; min-height: 38px; box-sizing: border-box; }
.pm-ward { gap: 5px; }
.pm-ward div { padding: 3px 7px; }
.pm-ward div b { font-size: var(--fs-sm); }
.pm-list td, .pm-t td { padding: 4px 6px; }
.pm-t td:nth-child(2) { white-space: nowrap; }
.pm-cart-foot { padding: 4px 9px; }
/* Pages instead of scrolling (owner 04-10-2026). */
.pm-pane[data-pm-pane="list"] { overflow: hidden; }
/* MAR record and history open over the screen (no scroll). */
.pm-pane .mar-pan:not([hidden]) { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); width: min(980px, 92vw); z-index: 70; background: #fff; border: 1px solid #9ec0f0; border-radius: 12px; padding: 10px 12px; box-shadow: 0 18px 50px rgba(15, 39, 71, .3); }
/* Indent / return by Indent ID (owner decisions 13–20, 04-10-2026). */
.pm-ixhead { display: flex; align-items: center; gap: 10px; font-size: var(--fs-sm); color: #0f2747; flex-wrap: wrap; }
.pm-ixhead small { color: #5b6b82; font-size: var(--fs-xs); }
.pm-ixhead .sp { flex: 1; }
.pm-ixhead label, .pm-ixreason { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; color: #5b6b82; }
.pm-ixhead select, .pm-ixreason select { height: 26px; border: 1px solid #c9d5e6; border-radius: 6px; font: inherit; font-size: var(--fs-xs); text-transform: none; font-weight: 600; color: #1d2b40; }
.pm-ixhead em, .pm-ixt em { color: #c62f2f; font-style: normal; }
.pm-ixind { min-width: 320px; border: 2px solid #1565d8 !important; }
.pm-ixt td { vertical-align: middle; }
.pm-ixt input[data-isearch], .pm-ixt input[data-rsearch] { width: 100%; height: 26px; box-sizing: border-box; border: 1px solid #9ec0f0; border-radius: 6px; font: inherit; font-size: var(--fs-xs); padding: 0 7px; }
.pm-ixt input[readonly] { border-color: transparent; background: transparent; font-weight: 600; color: #0f2747; padding-left: 0; }
.pm-q { width: 66px; height: 26px; box-sizing: border-box; border: 1px solid #d3dcea; border-radius: 6px; text-align: right; font: inherit; font-size: var(--fs-xs); padding: 0 6px; }
.pm-ixreason { margin-left: auto; }
.pm-pane > .pm-foot { margin: auto -10px -6px; }
/* Bell counts were cut at the top of the Pharmacy Sale screen (owner 04-10-2026): room above the header. */
/* ---- Purchase Return, supplier-first (owner spec 04-10-2026; preview pharmacy-purchase-return-v3.html) ---- */
.prx { --prx-line: #dfe7f1; --prx-mute: #5b6b82; --prx-ink: #0f2747; --prx-blue: #1565d8; --prx-red: #c62f2f; --prx-green: #138a4b;
    display: flex; flex-direction: column; gap: 5px; height: calc(100vh - 110px); min-height: 520px; }
.prx-top { display: flex; align-items: center; gap: 8px; padding-top: 2px; flex-shrink: 0; }
.prx-top h2 { margin: 0; font: 600 var(--fs-lg)/1.1 var(--hospital-display); color: var(--prx-ink); white-space: nowrap; }
.prx-top .sp, .prx-actions .sp, .prx-strip .sp, .prx-box header .sp { flex: 1; }
.prx-btn { height: 28px; padding: 0 11px; border: 1px solid #c9d5e6; border-radius: 7px; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #2b3b52; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.prx-btn--sm { height: 22px; padding: 0 8px; font-size: var(--fs-xs); }
.prx-btn--pri { background: var(--prx-blue); border-color: var(--prx-blue); color: #fff; }
.prx-btn--ok { background: var(--prx-green); border-color: var(--prx-green); color: #fff; }
.prx-btn--red { color: #b3391d; border-color: #f0c4bb; }
.prx-btn:disabled { opacity: .5; cursor: wait; }
.prx-btn kbd { font: inherit; font-size: var(--fs-2xs); padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, .12); }
.prx-f { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; color: var(--prx-mute); min-width: 0; position: relative; }
.prx-f .req::after { content: ' *'; color: var(--prx-red); }
.prx-in { height: 28px; box-sizing: border-box; border: 1px solid #d3dcea; border-radius: 7px; font: inherit; font-size: var(--fs-xs); padding: 0 7px; background: #fff; color: #1d2b40; width: 100%; min-width: 0; text-transform: none; font-weight: 600; }
.prx-in[readonly] { background: #f4f7fb; color: #3b4d66; }
.prx-in--key { border: 2px solid var(--prx-blue); font-weight: 600; }
.prx-strip { display: flex; align-items: center; gap: 14px; padding: 5px 10px; border: 1px solid #cfe0f7; border-radius: 9px; background: #f5f9ff; font-size: var(--fs-xs); flex-shrink: 0; flex-wrap: wrap; min-height: 26px; }
.prx-strip .nm { color: var(--prx-ink); font-size: var(--fs-sm); }
.prx-strip b { color: var(--prx-ink); }
.prx-strip .lbl { color: var(--prx-mute); font-size: var(--fs-2xs); font-weight: 600; text-transform: none; margin-right: 3px; }
.prx-strip .out { color: #b3391d; font-weight: 600; }
.prx-strip .cn { color: var(--prx-green); font-weight: 600; }
.prx-mute { color: var(--prx-mute); }
.prx-grid { flex: 1; min-height: 0; border: 1px solid var(--prx-line); border-radius: 10px; background: #fff; overflow: visible; position: relative; }
.prx-t { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.prx-t th { position: sticky; top: 0; z-index: 1; background: #eef3fa; color: #3b4d66; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; padding: 5px 4px; text-align: left; white-space: nowrap; }
.prx-t td { padding: 4px; border-bottom: 1px solid #edf1f6; vertical-align: middle; white-space: nowrap; }
.prx-t .num { text-align: right; }
.prx-t td.med { white-space: normal; min-width: 150px; }
.prx-t .med b { color: var(--prx-ink); display: block; }
.prx-t .med small { color: var(--prx-mute); font-size: var(--fs-2xs); }
.prx-t td.ref { font-size: var(--fs-xs); color: #0d4aa6; font-weight: 600; }
.prx-t td.ref small { display: block; color: var(--prx-mute); font-weight: 600; font-size: var(--fs-2xs); }
.prx-t input.q { width: 52px; height: 24px; box-sizing: border-box; border: 1px solid #9ec0f0; border-radius: 5px; text-align: right; font: inherit; font-size: var(--fs-xs); font-weight: 600; padding: 0 4px; background: #fffef4; }
.prx-t tr.is-err input.q { border-color: var(--prx-red); background: #fdecea; }
.prx-t tr.tot td { font-weight: 600; }
.prx-ret { font-weight: 600; color: #0d4aa6; }
.prx-ok { color: var(--prx-green) !important; }
.prx-ip { color: #6a3fd1 !important; }
.prx-t td.act { text-align: right; }
.prx-empty td { padding: 20px 10px !important; text-align: center; color: var(--prx-mute); font-size: var(--fs-sm); white-space: normal !important; }
.prx-drop { position: absolute; z-index: 40; left: 0; top: 100%; margin-top: 2px; width: 420px; max-height: 320px; overflow: auto; border: 1px solid #c9d5e6; border-radius: 9px; background: #fff; box-shadow: 0 12px 30px rgba(15, 39, 71, .2); font-size: var(--fs-xs); text-transform: none; font-weight: 500; color: #1d2b40; }
.prx-drop .row { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 5px 9px; border-bottom: 1px solid #edf1f6; align-items: center; cursor: pointer; }
.prx-drop .row.hi, .prx-drop .row:hover { background: #eef5ff; }
.prx-drop .row.hd { background: #f1f5fb; font-size: var(--fs-2xs); font-weight: 600; text-transform: none; color: #3b4d66; cursor: default; }
.prx-drop .row b { color: var(--prx-ink); }
.prx-drop .row small { color: var(--prx-mute); font-size: var(--fs-2xs); }
.prx-drop footer { padding: 5px 9px; background: #f7f9fc; color: var(--prx-mute); font-size: var(--fs-2xs); }
.prx-drop--wide { width: 700px; }
.prx-drop--wide .row { grid-template-columns: 1.4fr 1fr .7fr 1.6fr .9fr .8fr; }
.prx-drop--left { left: auto; right: -200px; }
.prx-drop--items { width: 760px; }
.prx-drop--items .row { grid-template-columns: 1.6fr .8fr 1.9fr .5fr .6fr .8fr .6fr .6fr; }
.prx-drop[hidden] { display: none; }
.prx-settle { display: flex; gap: 6px; flex-wrap: wrap; }
.prx-settle label { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border: 1px solid #c9d5e6; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; text-transform: none; color: #2b3b52; }
.prx-settle label input { position: absolute; opacity: 0; pointer-events: none; }
.prx-settle label.on { background: var(--prx-ink); border-color: var(--prx-ink); color: #fff; }
.prx-sum { border: 1px solid var(--prx-line); border-radius: 10px; background: #fff; padding: 5px 10px; font-size: var(--fs-xs); }
.prx-sum div { display: flex; justify-content: space-between; padding: 1px 0; color: #3b4d66; }
.prx-sum div b { color: var(--prx-ink); }
.prx-sum .net { margin-top: 3px; padding-top: 4px; border-top: 1px dashed #c9d5e6; font-size: var(--fs-md); }
.prx-sum .net b { color: var(--prx-green); font-size: var(--fs-lg); }
.prx-sum .imp { color: #6a3fd1; font-weight: 600; }
.prx-modal { position: fixed; inset: 0; z-index: 90; display: none; background: rgba(15, 39, 71, .42); }
.prx-modal.on { display: grid; place-items: center; }
.prx-box { width: min(860px, 94vw); max-height: 90vh; overflow: auto; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.prx-box header { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-bottom: 1px solid var(--prx-line); color: var(--prx-ink); position: sticky; top: 0; background: #fff; z-index: 2; }
.prx-box header small { color: var(--prx-mute); font-size: var(--fs-xs); }
.prx-box .bd { padding: 9px 13px; display: flex; flex-direction: column; gap: 8px; font-size: var(--fs-xs); }
/* The popups sit outside .prx: the same colour tokens there too. */
.prx-modal { --prx-line: #dfe7f1; --prx-mute: #5b6b82; --prx-ink: #0f2747; --prx-blue: #1565d8; --prx-red: #c62f2f; --prx-green: #138a4b; }
/* ---- Sale Return, 1 · Sale Bill No. or 2 · All visits (owner spec 04-10-2026; preview pharmacy-sale-return-v3.html). Uses .prx-* ---- */
.srx-allv { display: flex; align-items: center; gap: 5px; cursor: pointer; color: var(--prx-mute); }
.srx-allv input { width: 14px; height: 14px; margin: 0; accent-color: #5b2fc0; }
.srx-allv span { color: var(--prx-ink); }
.srx-allv.on span { color: #5b2fc0; }
.srx .prx-in:disabled { background: #f4f7fb; color: #9aa8bb; }
.srx-drop-bill { width: 760px; }
.srx-drop-bill .row { grid-template-columns: 1.3fr .7fr 1.4fr 1.2fr .9fr .7fr 1.1fr .7fr; }
.srx-drop-person { width: 640px; }
.srx-drop-person .row { grid-template-columns: 1.6fr .9fr 1.3fr 1fr .6fr; }
.srx-drop-items { width: 780px; }
.srx-drop-items .row { grid-template-columns: 1.9fr .7fr .5fr 1.1fr .5fr .6fr .7fr .7fr .4fr; }
.prx-drop .row.off { color: #a3aec0; cursor: not-allowed; background: #fafbfc; }
.prx-drop .row.off b { color: #a3aec0; }
.srx .prx-t select.c { height: 24px; border: 1px solid #c9d5e6; border-radius: 5px; font: inherit; font-size: var(--fs-xs); font-weight: 600; padding: 0 2px; max-width: 96px; }
.srx .prx-t select.c.bad { border-color: #f0c4bb; background: #fff6f5; color: #a31f12; }
.srx-set { border: 1px solid #d9ccfb; border-radius: 10px; background: #fff; padding: 5px 9px; font-size: var(--fs-xs); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.srx-set h4 { margin: 0; font-size: var(--fs-2xs); text-transform: none; letter-spacing: normal; color: #5b2fc0; }
.srx-set h4 span { color: var(--prx-mute); font-weight: 600; text-transform: none; letter-spacing: 0; }
.srx-set table { width: 100%; border-collapse: collapse; }
.srx-set th { font-size: var(--fs-2xs); text-transform: none; color: #3b4d66; text-align: left; padding: 2px 3px; background: #f4f1fc; }
.srx-set td { padding: 2px 3px; border-bottom: 1px solid #f0edf8; white-space: nowrap; }
.srx-set .num { text-align: right; }
.srx-set .ipv { color: #5b2fc0; font-weight: 600; }
.srx-set .cv { color: var(--prx-green); font-weight: 600; }
.srx-set input.m { width: 66px; height: 20px; box-sizing: border-box; border: 1px solid #c9b8f5; border-radius: 4px; text-align: right; font: inherit; font-size: var(--fs-xs); font-weight: 600; padding: 0 3px; }
/* Return after the IP final bill (owner 20-11-2026, return-after-final-bill.html R1): credit note box. */
.srx-final { border: 1px solid #f59e0b; background: #fffbeb; color: #78350f; border-radius: 7px; padding: 4px 8px; font-size: var(--fs-2xs); line-height: 1.4; }
.srx-final b { color: #7c2d12; }
.srx-final-r { display: flex; gap: 6px; align-items: center; margin-top: 3px; font-weight: 700; }
.srx-final-r input { flex: 1; min-width: 0; height: 22px; border: 1px solid #f59e0b; border-radius: 5px; padding: 0 6px; font: inherit; font-weight: 500; text-transform: uppercase; }
.srx-ref { display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.srx-ref select, .srx-ref input { height: 22px; border: 1px solid #c9d5e6; border-radius: 5px; font: inherit; font-size: var(--fs-xs); padding: 0 4px; box-sizing: border-box; min-width: 0; }
.srx-ref .amt { width: 70px; text-align: right; font-weight: 600; }
.srx-ref .ref { flex: 1; }
.srx-sum { padding: 4px 10px; font-size: var(--fs-xs); }
.srx-sum div { padding: 0; line-height: 1.45; }
.srx-sum .net { font-size: var(--fs-sm); margin-top: 2px; padding-top: 3px; }
.srx-sum .net b { font-size: var(--fs-md); }
.srx-sum .cr b { color: var(--prx-green); }
/* Indent Return Request (owner spec 05-10-2026): one row per DC line, reason, review popup, ward cancel. */
.pm-rchips { display: flex; flex-wrap: wrap; gap: 3px; }
.pm-rchips button { padding: 3px 8px; border-radius: 999px; border: 1px solid #c9d5e6; background: #fff; font: inherit; font-size: var(--fs-2xs); font-weight: 600; color: #2b3b52; cursor: pointer; text-transform: none; }
.pm-rchips button[data-code="discharged"] { border-color: #f3d39b; background: #fff8e8; }
.pm-rchips button.is-on { background: #0f2747; border-color: #0f2747; color: #fff; }
.pm-rt th { position: sticky; top: 0; z-index: 1; }
.pm-rt tr.pm-rg td { background: #f7f9fc; color: #0f2747; font-size: var(--fs-xs); }
.pm-rt tr.pm-rg small { color: #5b6b82; font-weight: 600; }
.pm-rt tr[data-off] { display: none; }
.pm-rt tr.pm-rbill td { background: #fbfdfb; }
.pm-rt .pm-q { width: 64px; }
.pm-rt .pm-q.pm-bad { border-color: #c62f2f; background: #fdecea; }
.pm-rt .pm-rm { width: 100%; }
.pm-review-box { width: min(860px, 94vw); max-height: 88vh; overflow: auto; border-radius: 12px; background: #fff; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); padding: 0 0 4px; }
.pm-review-box header { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border-bottom: 1px solid #dfe7f1; font-weight: 600; color: #0f2747; }
.pm-review-box header small { color: #5b6b82; font-weight: 600; font-size: var(--fs-xs); }
.pm-review-box header .sp { flex: 1; }
.pm-review-box .pm-t { margin: 0 13px; width: calc(100% - 26px); }
/* DC Return + Pending Indent Returns + header Return bell (owner spec 05-10-2026). */
.dcr-seg { display: inline-flex; border: 1px solid #c9d5e6; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.dcr-seg button { border: 0; background: #fff; padding: 5px 11px; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #2b3b52; cursor: pointer; white-space: nowrap; }
.dcr-seg button.on { background: var(--prx-ink); color: #fff; }
.dcr-drop-dc .row, .dcr-drop-pat .row { grid-template-columns: 1.3fr .9fr .7fr 1.8fr .8fr .1fr; }
.dcr-drop-items { width: 900px; }
.dcr-drop-items .row { grid-template-columns: 1.8fr 1fr 1.6fr .5fr .6fr .5fr .7fr .5fr; }
.prx-drop .row.off { color: #a3aec0; cursor: not-allowed; background: #fafbfc; }
.dcr-sub { display: flex; align-items: center; gap: 10px; padding: 4px 10px; border: 1px solid #d9ccfb; border-radius: 9px; background: #f8f5ff; font-size: var(--fs-xs); flex-shrink: 0; }
.dcr-sub .sp { flex: 1; }
.dcr-claim { color: #8a4b00; font-weight: 600; }
.dcr-claim[hidden] { display: none; }
.dcr-grid { overflow: auto; }
.dcr-grid .prx-t tr.dcr-ok td { background: #f3fbf6; }
.dcr-grid .prx-t tr.dcr-bill td { background: #fafbfc; color: #6b7a90; }
.dcr-grid .prx-t td.dcr-wrap { white-space: normal; font-size: var(--fs-xs); }
.dcr-pen { font-weight: 600; color: #8a4b00; }
.dcr-c { height: 24px; border: 1px solid #c9d5e6; border-radius: 5px; font: inherit; font-size: var(--fs-xs); font-weight: 600; padding: 0 2px; max-width: 104px; }
.dcr-c.need { border: 2px solid var(--prx-red); background: #fff6f5; }
.dcr-c.bad { border-color: #f0c4bb; background: #fff6f5; color: #a31f12; }
.dcr-sum .net { font-size: var(--fs-xs); }
.dcq-tabs { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.dcq-tabs a { padding: 4px 10px; border-radius: 8px 8px 0 0; border: 1px solid var(--prx-line); border-bottom: 0; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; text-decoration: none; background: #f6f8fb; }
.dcq-tabs a.on { background: #fff; color: var(--prx-ink); box-shadow: inset 0 3px 0 var(--prx-blue); }
.dcq-tabs a i { font-style: normal; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: #e3eaf4; font-size: var(--fs-2xs); }
.dcq-tabs a.on i { background: var(--prx-blue); color: #fff; }
.dcq-tabs .sp { flex: 1; }
.dcq-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--prx-mute); font-weight: 600; }
.dcq-live b { width: 8px; height: 8px; border-radius: 50%; background: #1fc84d; box-shadow: 0 0 0 3px rgba(31, 200, 77, .2); }
.dcq-live.off { color: #a31f12; }
.dcq-live.off b { background: #c62f2f; box-shadow: 0 0 0 3px rgba(198, 47, 47, .18); }
.dcq-grid { overflow: auto; }
.dcq-grid .prx-t tr.dcq-new td { background: #fff9e6; }
.dcq-grid .nw { white-space: nowrap; }
.dcq-st { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 600; background: #e9edf3; color: #5b6b82; }
.dcq-st--pend { background: #fff4e0; color: #8a4b00; }
.dcq-st--part { background: #f1ebff; color: #5b2fc0; }
.dcq-st--ok { background: #e6f6ed; color: #0d6a39; }
.dcq-st--rej { background: #fdecea; color: #a31f12; }
.dcq-st--grey { background: #e9edf3; color: #5b6b82; }
.dcb .dcb-trigger { position: relative; gap: 1px; }
.dcb-ret { font-size: var(--fs-sm); font-weight: 600; color: #1565d8; line-height: 1; }
.dcb-off { position: absolute; left: 2px; bottom: 2px; width: 7px; height: 7px; border-radius: 50%; background: #c62f2f; }
.dcb-off[hidden] { display: none; }
.dcb-panel { width: 370px; }
.dcb-panel .hospital-bell-title small { color: #5b6b82; font-weight: 600; }
.dcb-item { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 7px 10px; border-bottom: 1px solid #edf1f6; font-size: var(--fs-xs); line-height: 1.35; align-items: center; }
.dcb-item.is-new { background: #f5f9ff; box-shadow: inset 3px 0 0 #1565d8; }
.dcb-item b { display: block; color: #0f2747; font-size: var(--fs-xs); }
.dcb-item span { display: block; color: #5b6b82; }
.dcb-view { padding: 3px 10px; border-radius: 6px; background: #1565d8; color: #fff; font-weight: 600; text-decoration: none; font-size: var(--fs-xs); }
.dcb-item .dcb-tag, .dcb-tag { display: inline-block; padding: 0 5px; border-radius: 999px; background: #ffe9a8; color: #6b4a00; font-size: var(--fs-2xs); font-weight: 600; }
.dcb-tag--red { background: #fdecea; color: #a31f12; }
.dcb-part { color: #5b2fc0 !important; display: inline !important; font-size: var(--fs-2xs) !important; }
.dcb-foot { display: flex; align-items: center; justify-content: space-between; padding: 7px 10px; background: #f7f9fc; font-size: var(--fs-xs); }
.dcb-foot a { color: #1565d8; font-weight: 600; text-decoration: none; }
.dcb-foot label { display: inline-flex; gap: 4px; align-items: center; color: #5b6b82; }
.dcb-toast { position: fixed; right: 18px; top: 64px; z-index: 120; width: 330px; border-radius: 11px; background: #0f2747; color: #fff; padding: 10px 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .3); font-size: var(--fs-xs); line-height: 1.45; }
.dcb-toast[hidden] { display: none; }
.dcb-toast b { display: block; font-size: var(--fs-sm); }
.dcb-toast span { display: block; color: #c8d6ea; }
.dcb-toast .row { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.dcb-toast .row a, .dcb-toast .row button { padding: 3px 10px; border-radius: 6px; background: #fff; color: #0f2747; font: inherit; font-weight: 600; text-decoration: none; font-size: var(--fs-xs); border: 0; cursor: pointer; }
.dcb-toast .row button { background: transparent; color: #c8d6ea; border: 1px solid #4d6180; }
/* Print popup after submit / reprint (owner 05-10-2026): the document in a frame, printer dialog at once, no wait after. */
.vx-pp { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(15, 39, 71, .45); }
.vx-pp[hidden] { display: none; }
.vx-pp-box { width: min(980px, 95vw); height: min(92vh, 860px); display: flex; flex-direction: column; border-radius: 14px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); overflow: hidden; }
.vx-pp-box header { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: #ecf8f1; border-bottom: 1px solid #bfe6cd; color: #14532d; font-size: var(--fs-sm); }
.vx-pp-box header small { color: #3d6b4f; font-weight: 600; font-size: var(--fs-xs); }
.vx-pp-box header .sp, .vx-pp-box footer .sp { flex: 1; }
.vx-pp-tabs { display: inline-flex; gap: 4px; }
.vx-pp-tabs button { height: 26px; padding: 0 10px; border: 1px solid #bfe6cd; border-radius: 7px; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #14532d; cursor: pointer; }
.vx-pp-tabs button.on { background: #138a4b; border-color: #138a4b; color: #fff; }
.vx-pp-frame { flex: 1; min-height: 0; background: #e9eef5; padding: 10px; }
.vx-pp-frame iframe { width: 100%; height: 100%; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .12); }
.vx-pp-box footer { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-top: 1px solid #dfe7f1; background: #fbfcfe; font-size: var(--fs-xs); color: #0f2747; font-weight: 600; }
.vx-pp-btn { height: 32px; padding: 0 14px; border: 1px solid #c9d5e6; border-radius: 8px; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; color: #2b3b52; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.vx-pp-btn[hidden] { display: none; }
.vx-pp-btn--pri { background: #138a4b; border-color: #138a4b; color: #fff; }
.vx-pp-btn kbd { font: inherit; font-size: var(--fs-2xs); padding: 0 4px; border-radius: 4px; background: rgba(0, 0, 0, .14); }
body.vx-pp-open { overflow: hidden; }
@media print {
    .vx-pp { display: none !important; }
}
/* ==========================================================================
   Typography system (owner decisions 05-10-2026): Inter everywhere, self-hosted (no internet needed on the LAN),
   one compact type scale for a 1366 × 768 hospital desktop screen, weights 400 / 500 / 600 only, headings and table
   heads in normal case (patient data keeps its CAPITALS), tabular digits for amounts.
   Use the tokens below for every new screen — never a raw size or a weight above 600.
   ========================================================================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter/inter-latin-ext.woff2?v=1') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/inter/inter-latin.woff2?v=1') 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;
}
:root {
    --fs-2xs: 11px;   /* keyboard hints, tiny counters */
    --fs-xs: 12px;    /* labels, helper text, badges / chips */
    --fs-sm: 13px;    /* normal text, inputs, table header + data, buttons */
    --fs-md: 14px;    /* card / section headings, key values */
    --fs-lg: 16px;    /* screen sub-headings, big values */
    --fs-xl: 18px;    /* page title */
    --fs-2xl: 22px;   /* dashboard / summary big figures */
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
}
body {
    font-family: var(--hospital-font);
    -webkit-font-smoothing: antialiased;
}
b, strong, th, dt, h1, h2, h3, h4, h5, h6, legend { font-weight: var(--fw-semibold); }
/* Tables: header + data 13 px, header in normal case. */
.hospital-app-content table th,
.hospital-app-content table td { font-size: var(--fs-sm); }
.hospital-app-content table th { text-transform: none; letter-spacing: normal; }
/* Data-entry grids (Sale, GRN, returns, OP / partial bill, payments): narrow columns — header 12 px, data stays 13 px. */
.hospital-app-content :is(.ps-grid, .pw-grid, .prx-t, .ob-grid, .pb-grid, .ob-pay, .ps-pay, .srx-set) th { font-size: var(--fs-xs); }
/* Secondary line under a row title (ID · age, token · department): 12 px, medium. */
.hospital-row-meta { font-weight: var(--fw-medium); }
.hospital-app-content .hospital-row-meta { font-size: var(--fs-xs); }
/* Sidebar submenus: 12 px so long names stay on one line. */
.hospital-sidebar .hospital-sidebar-sublink { font-size: var(--fs-xs); }
/* ---- 1366 × 768 density (Inter is a little taller / wider): spacing tightened, never fields removed. ---- */
.ps-sl { padding: 0; line-height: 1.3; }
.hospital-app-content .hospital-table th, .hospital-app-content .hospital-table td { padding: 5px 6px; }
.ps-chip { padding: 1px 7px; letter-spacing: normal; }
.hospital-sidebar .hospital-sidebar-sublink { font-weight: var(--fw-medium); }
.hospital-sidebar .hospital-sidebar-sublink.hospital-sidebar-link--active { font-weight: var(--fw-semibold); }
/* Amounts / quantities / rates: tabular digits, right aligned (₹ columns line up). IDs and dates keep normal digits (narrower). */
.num, td.num, th.num, input.num, .amount, [class*="-amount"], [class*="money"], .hospital-money { font-variant-numeric: tabular-nums; }
td.num, th.num, input.num { text-align: right; }
/* Sidebar menu names (owner 05-10-2026): full name kept; a long one wraps cleanly to a 2nd line (never cut, no
   ellipsis, no mid-word split — App\Support\MenuLabel keeps "Walk-in" together), compact line height, no extra gap. */
.hospital-sidebar-link,
.hospital-sidebar-summary { overflow-wrap: break-word; word-break: normal; line-height: 1.25; }
.hospital-sidebar .vx-nowrap { white-space: nowrap; }
/* IP Patient Care (no-scroll Medicines panes, 04-10-2026): split-pane tables use the entry-grid header and tighter rows. */
.hospital-app-content :is(.pm-list, .pm-t) th { font-size: var(--fs-xs); }
.pm-pane { padding-left: 8px; padding-right: 8px; }
/* ==========================================================================
   OP Patient List (owner decisions 05-10-2026, preview op-list-payment.html): thin filter row, owner-screenshot
   columns, payment colours (due red, not billed amber, paid green, cancelled grey) only with "OP fee / due view",
   one-line rows, 15 per page, total + pages in one bottom bar, the list fills the screen.
   ========================================================================== */
.opl-input { height: 26px; min-height: 0; padding: 0 7px; border: 1px solid #c9d6e8; border-radius: 7px; background: #fff; font: inherit; font-size: var(--fs-sm); color: var(--hospital-ink); }
.opl-input:focus { outline: 2px solid rgba(21, 101, 216, .25); border-color: #1565d8; }
.opl-input:disabled { background: #f2f5f9; color: #7a8aa1; }
.opl-input--doctor { width: 150px; }
.opl-input--status { width: 160px; }
.opl-search { height: 26px; padding: 0 12px; border: 0; border-radius: 7px; background: linear-gradient(135deg, var(--hospital-orange-500), var(--hospital-orange-600)); color: #fff; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; }
.opl-clear { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--hospital-blue-700); text-decoration: none; padding: 0 4px; }
.opl-pay { display: inline-flex; flex: none; border: 1px solid #c9d6e8; border-radius: 9px; overflow: hidden; background: #fff; }
.opl-pay label { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-left: 1px solid #e1e8f2; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: #3b4d66; cursor: pointer; white-space: nowrap; }
.opl-pay label:first-child { border-left: 0; }
.opl-pay input { width: 14px; height: 14px; min-height: 0; margin: 0; accent-color: #1565d8; }
.opl-pay b { min-width: 20px; padding: 0 5px; border-radius: 999px; background: #e9eef6; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: center; }
.opl-pay label.is-on { background: #eef4ff; color: #0d3f9f; font-weight: var(--fw-semibold); }
.opl-pay .opl-pay--pending b { background: #f9d6cf; color: #a8321a; }
.opl-pay .opl-pay--pending.is-on { background: #fdecea; color: #a8321a; }
.opl-pay .opl-pay--completed b { background: #c9ecd6; color: #0d6a39; }
.opl-pay .opl-pay--completed.is-on { background: #e6f6ed; color: #0d6a39; }
.opl-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.opl-table th { position: sticky; top: 0; z-index: 2; padding: 5px 4px; background: #eef3fa; border-bottom: 1px solid #d8e2ef; color: #3b4d66; font-weight: var(--fw-semibold); text-align: left; white-space: nowrap; cursor: pointer; user-select: none; }
.opl-table th::after { content: '⇅'; margin-left: 2px; color: #a7b4c6; font-size: 10px; }
.opl-table th.is-asc::after { content: '↑'; color: #1565d8; }
.opl-table th.is-desc::after { content: '↓'; color: #1565d8; }
.opl-table th.opl-nosort { cursor: default; }
.opl-table th.opl-nosort::after { content: ''; }
.opl-table th.num, .opl-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.opl-table td { padding: 3px 4px; border-bottom: 1px solid #edf1f6; line-height: 1.3; white-space: nowrap; }
.opl-table .opl-name { max-width: 230px; overflow: hidden; text-overflow: ellipsis; }
.opl-card--no-money .opl-name { max-width: 330px; }
.opl-table .opl-name b { font-weight: var(--fw-semibold); color: var(--hospital-ink); }
.opl-table .opl-name span { color: #1553b0; font-weight: var(--fw-semibold); }
.opl-table .opl-doctor { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.opl-table .opl-ref { max-width: 95px; overflow: hidden; text-overflow: ellipsis; color: #3b4d66; font-size: var(--fs-xs); }
.opl-table .opd-status { padding: 1px 7px; font-size: var(--fs-xs); }
.opl-act { display: flex; align-items: center; gap: 4px; }
.opl-act .row-action-button { padding: 2px 8px; min-height: 0; font-size: var(--fs-xs); }
.opl-visits { display: inline-block; width: 26px; height: 21px; border-radius: 6px; background: #3f7fd1; color: #fff; font-size: var(--fs-sm); line-height: 21px; text-align: center; text-decoration: none; }
.opl-visits:hover, .opl-visits.is-on { background: #0d3f9f; }
/* Row colours (money users only; cancelled for everyone). */
.opl-row--due td { background: #fff6f4; }
.opl-row--due td:first-child { box-shadow: inset 3px 0 0 #d9452b; }
.opl-row--due .opl-due { color: #c0321b; font-weight: var(--fw-semibold); }
.opl-row--nob td { background: #fffaf0; }
.opl-row--nob td:first-child { box-shadow: inset 3px 0 0 #e09b17; }
.opl-row--nob .opl-due { color: #a86500; font-weight: var(--fw-semibold); }
.opl-row--paid td { background: #f3fbf6; }
.opl-row--paid td:first-child { box-shadow: inset 3px 0 0 #1f9d55; }
.opl-row--paid .opl-due { color: #138a4b; font-weight: var(--fw-semibold); }
.opl-pages { display: inline-flex; gap: 4px; }
.opl-pages button { min-width: 26px; height: 24px; border: 1px solid #c9d6e8; border-radius: 6px; background: #fff; font: inherit; cursor: pointer; }
.opl-pages button.is-on { background: #1565d8; border-color: #1565d8; color: #fff; font-weight: var(--fw-semibold); }
/* ==========================================================================
   Purchase Correction / Amendment (owner spec 05-10-2026, preview pharmacy-purchase-amend.html): GRN search, header
   strip with real lock reasons, item grid (old value above the changed one), one-line footer, popups. 1366 × 768.
   ========================================================================== */
.pam { display: flex; flex-direction: column; gap: 6px; height: calc(100dvh - 128px); min-height: 520px; }
.pam-head { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.pam-head h2 { margin: 0; font-size: var(--fs-xl); font-weight: var(--fw-semibold); color: var(--hospital-ink); white-space: nowrap; }
.pam-find { position: relative; display: flex; }
.pam-find input { width: 300px; height: 30px; padding: 0 10px; border: 1.5px solid #1565d8; border-radius: 8px 0 0 8px; font: inherit; font-size: var(--fs-sm); }
.pam-find button { height: 30px; padding: 0 14px; border: 0; border-radius: 0 8px 8px 0; background: #1565d8; color: #fff; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); cursor: pointer; }
.pam-drop { position: absolute; top: 34px; left: 0; z-index: 30; width: 560px; background: #fff; border: 1px solid #c9d6e8; border-radius: 10px; box-shadow: 0 12px 30px #10264a26; overflow: hidden; }
.pam-drop a { display: grid; grid-template-columns: 150px 1fr 110px 90px; gap: 8px; padding: 6px 10px; font-size: var(--fs-sm); color: var(--hospital-ink); text-decoration: none; border-bottom: 1px solid #f0f3f8; }
.pam-drop a:hover, .pam-drop a.on { background: #eef4ff; }
.pam-drop b { font-weight: var(--fw-semibold); }
.pam-drop span { color: var(--hospital-slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pam-drop .r { text-align: right; }
.pam-drop .hint { display: block; padding: 5px 10px; font-size: var(--fs-xs); color: var(--hospital-slate); background: #f7f9fc; }
.pam-chip { padding: 2px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.pam-chip--doc { background: #eef4ff; color: #0d3f9f; }
.pam-chip--posted { background: #e6f6ed; color: #0d6a39; }
.pam-chip--ver { background: #f1ecff; color: #5b3cc4; }
.pam-sp { flex: 1; }
.pam-btn { height: 28px; padding: 0 11px; border: 1px solid #c9d6e8; border-radius: 7px; background: #fff; color: #2b3b52; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-medium); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.pam-btn--pri { background: #1565d8; border-color: #1565d8; color: #fff; font-weight: var(--fw-semibold); }
.pam-btn--ok { background: #15803d; border-color: #15803d; color: #fff; font-weight: var(--fw-semibold); }
.pam-btn--ghost { border-color: transparent; color: var(--hospital-slate); background: transparent; }
.pam-btn:disabled { opacity: .5; cursor: not-allowed; }
.pam-btn kbd { font: 600 10px/1 ui-monospace, Consolas, monospace; padding: 2px 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); }
.pam-btn:not(.pam-btn--pri):not(.pam-btn--ok) kbd { background: #eef2f8; color: #3b4d66; }
.pam-card { border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; }
.pam-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--hospital-slate); text-align: center; font-size: var(--fs-sm); }
.pam-empty h3 { margin: 0 0 6px; font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--hospital-ink); }
.pam-empty p { margin: 0; }
.pam-warn-text { color: #a86500; }
.pam-hdr { display: grid; grid-template-columns: 2.1fr 1.1fr 1fr 1fr 1fr 1.6fr; gap: 8px; padding: 7px 10px; flex-shrink: 0; }
.pam-f { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); color: var(--hospital-slate); min-width: 0; }
.pam-f > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pam-f > span i { font-style: normal; color: #8a96a8; }
.pam-f input, .pam-f select { height: 28px; padding: 0 8px; border: 1px solid #c9d6e8; border-radius: 7px; font: inherit; font-size: var(--fs-sm); color: var(--hospital-ink); background: #fff; min-width: 0; }
.pam-f .chg { border-color: #1565d8; background: #f2f7ff; font-weight: var(--fw-semibold); }
.pam-f.is-lock input, .pam-f.is-lock select { background: #f4f6f9; color: #6b7a90; border-color: #e1e6ee; cursor: not-allowed; }
.pam-ok { color: #138a4b !important; }
.pam-bad { color: #c0321b !important; }
.pam-muted { color: var(--hospital-slate); font-size: var(--fs-xs); }
.pam-grid { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.pam-scroll { flex: 1; min-height: 0; overflow: auto; }
.pam-t { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.pam-t th { position: sticky; top: 0; z-index: 1; background: #f4f7fb; color: #3b4d66; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-align: left; padding: 6px 5px; white-space: nowrap; border-bottom: 1px solid #e1e8f2; }
.pam-t td { padding: 4px 5px; border-bottom: 1px solid #f0f3f8; white-space: nowrap; vertical-align: middle; }
.pam-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.pam-t td.med b { font-weight: var(--fw-semibold); }
.pam-t td.med small { display: block; font-size: 11px; color: var(--hospital-slate); }
.pam-in { width: 74px; height: 26px; padding: 0 6px; border: 1px solid #d3dcea; border-radius: 6px; font: inherit; font-size: var(--fs-sm); text-align: right; background: #fff; }
.pam-in.w { width: 88px; text-align: left; }
.pam-in.s { width: 56px; }
.pam-in.e { width: 70px; text-align: left; }
.pam-in.chg { border-color: #1565d8; background: #f2f7ff; font-weight: var(--fw-semibold); }
.pam-in[disabled] { background: #f4f6f9; color: #8090a5; border-color: transparent; cursor: not-allowed; }
.pam-cell { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.pam-cell.l { align-items: flex-start; }
.pam-old { font-size: 10.5px; color: #8a96a8; text-decoration: line-through; }
.pam-used { font-weight: var(--fw-semibold); text-decoration: none; }
.pam-used.z { color: #a7b2c2; font-weight: var(--fw-regular); }
.pam-used.n { color: #c0321b; }
.pam-st { padding: 2px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.pam-st--e { background: #e6f6ed; color: #0d6a39; }
.pam-st--p { background: #fff1d6; color: #8a5200; }
.pam-st--l { background: #fdecea; color: #a8321a; }
.pam-st--a { background: #eaf2ff; color: #1553b0; }
.pam-st--r { background: #f1f1f1; color: #6b6b6b; }
.pam-t tr.is-removed td { color: #9aa5b4; }
.pam-t tr.is-removed td.med b { text-decoration: line-through; }
.pam-t tr.is-new td { background: #f7fbff; }
.pam-ic { width: 26px; height: 24px; border-radius: 6px; font-size: 13px; color: #0d3f9f; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.pam-ic:hover { background: #eef4ff; }
.pam-ic.x { color: #c0321b; }
.pam-ic.x:hover { background: #fdecea; }
.pam-addbar { display: flex; align-items: center; gap: 10px; padding: 5px 10px; border-top: 1px solid #edf1f6; font-size: var(--fs-xs); color: var(--hospital-slate); }
.pam-addbar b { font-weight: var(--fw-semibold); }
.pam-foot { display: flex; align-items: center; gap: 10px; padding: 7px 10px; flex-shrink: 0; }
.pam-reason { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.pam-reason label { font-size: var(--fs-xs); color: var(--hospital-slate); white-space: nowrap; }
.pam-reason label b { color: #c0321b; }
.pam-reason input { flex: 1; min-width: 0; height: 30px; padding: 0 9px; border: 1px solid #c9d6e8; border-radius: 7px; font: inherit; font-size: var(--fs-sm); }
.pam-reason select { width: 108px; height: 30px; border: 1px solid #c9d6e8; border-radius: 7px; font: inherit; font-size: var(--fs-xs); color: #3b4d66; }
.pam-net { display: flex; align-items: center; gap: 6px; padding: 0 10px; border-left: 1px solid #e6edf6; border-right: 1px solid #e6edf6; font-size: var(--fs-xs); color: var(--hospital-slate); white-space: nowrap; }
.pam-net b { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--hospital-ink); font-variant-numeric: tabular-nums; }
.pam-net .old { text-decoration: line-through; color: #8a96a8; font-size: var(--fs-sm); }
.pam-dlg { width: min(760px, 94vw); max-height: 88vh; padding: 0; border: 0; border-radius: 12px; box-shadow: 0 20px 60px #10264a40; }
.pam-dlg--wide { width: min(880px, 94vw); }
.pam-dlg::backdrop { background: rgba(16, 38, 74, .38); }
.pam-dlg header { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid #dfe7f1; position: sticky; top: 0; background: #fff; z-index: 1; }
.pam-dlg header b { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.pam-dlg header button { border: 0; background: none; font-size: 16px; color: var(--hospital-slate); cursor: pointer; }
.pam-dlg footer { display: flex; gap: 6px; justify-content: flex-end; padding: 8px 14px; border-top: 1px solid #dfe7f1; background: #fafbfd; position: sticky; bottom: 0; }
.pam-in { padding: 10px 14px; font-size: var(--fs-sm); }
.pam-kv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.pam-kv div { border: 1px solid #dfe7f1; border-radius: 8px; padding: 4px 8px; font-size: var(--fs-xs); color: var(--hospital-slate); }
.pam-kv b { display: block; font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--hospital-ink); }
.pam-lt, .pam-chg, .pam-fin { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); margin: 4px 0; }
.pam-lt th { text-align: left; background: #f4f7fb; padding: 4px 6px; font-weight: var(--fw-semibold); font-size: var(--fs-xs); color: #3b4d66; }
.pam-lt td, .pam-chg td { padding: 3px 6px; border-bottom: 1px solid #edf1f6; }
.pam-lt .num { text-align: right; font-variant-numeric: tabular-nums; }
.pam-chg td.g { background: #f7f9fc; font-weight: var(--fw-semibold); color: #0d3f9f; }
.pam-chg .o { color: #8a96a8; text-decoration: line-through; }
.pam-chg .n { font-weight: var(--fw-semibold); }
.pam-msg { padding: 6px 9px; border-radius: 8px; font-size: var(--fs-sm); margin: 6px 0; flex-shrink: 0; }
.pam-msg ul { margin: 4px 0 0; padding-left: 18px; }
.pam-msg--bad { background: #fdecea; color: #8f2a16; }
.pam-msg--ok { background: #e6f6ed; color: #0d5a31; }
.pam-msg--warn { background: #fff4e0; color: #7a4a00; }
.pam-plist { margin-top: 6px; max-height: 50vh; overflow: auto; }
.pam-plist a { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #f0f3f8; color: var(--hospital-ink); text-decoration: none; font-size: var(--fs-sm); }
.pam-plist a:hover { background: #eef4ff; }
.pam-plist span { color: var(--hospital-slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* New OPD Registration — 3 sections in work order, one screen without scroll (owner 05-10-2026, preview opd-reg-simple.html):
   Patient details (left, blue) · Doctor & visit (right, green) · Time & billing (full line, orange). */
.opd-form-main { align-items: stretch; }
.opd-form-main > .opd-sec--billing { grid-column: 1 / -1; }
.opd-sec { --sec: #1565d8; --sec-soft: #eaf2ff; overflow: hidden; border-top: 3px solid var(--sec); }
.opd-registration-form .opd-sec { gap: 6px; padding: 0 0 10px; }
.opd-sec--visit { --sec: #15803d; --sec-soft: #e9f8ef; }
.opd-sec--billing { --sec: #c2410c; --sec-soft: #fff1e6; }
.opd-sec-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--sec-soft); border-bottom: 1px solid rgba(96, 112, 137, .12); }
.opd-sec-head h3 { margin: 0; color: var(--sec); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.opd-sec-ico { font-size: 15px; line-height: 1; }
.opd-sec-note { margin-left: auto; color: var(--hospital-slate); font-size: var(--fs-xs); text-align: right; }
.opd-sec-grid { gap: 7px 12px; padding: 0 12px; }
.opd-sec-grid label { white-space: nowrap; }
.opd-sec-grid--patient { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opd-sec-grid--visit { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opd-sec-grid--billing { grid-template-columns: 1fr 1fr .9fr 1.3fr 1.2fr 1.15fr auto; align-items: start; }
.opd-sec-grid > .opd-sec-full { grid-column: 1 / -1; }
.opd-sec-grid > .opd-sec-span2 { grid-column: span 2; }
.opd-sec-grid > .opd-sec-switch { grid-column: auto; align-self: start; flex-wrap: nowrap; padding-top: 19px; }
.opd-registration-form .opd-sec-grid--visit .hospital-textarea { min-height: 66px; height: 66px; }
@media (max-width: 1100px) {
    .opd-form-main > .opd-sec { grid-column: 1 / -1; }
    .opd-sec-grid--billing { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .opd-sec-grid > .opd-sec-switch { grid-column: 1 / -1; padding-top: 0; }
}
@media (max-width: 640px) {
    .opd-sec-grid--patient, .opd-sec-grid--visit, .opd-sec-grid--billing { grid-template-columns: 1fr; }
    .opd-sec-grid > * { grid-column: 1 / -1 !important; }
    .opd-sec-note { display: none; }
}
/* IP Admission — coloured sections like New OPD Registration, one screen without scroll (owner 05-10-2026, preview ip-adm-sec.html).
   Uses the .opd-sec head; extra colours for Admission & bed (green), Attendant (purple), Deposit now (teal). */
.opd-sec--admit { --sec: #15803d; --sec-soft: #e9f8ef; }
.opd-sec--attendant { --sec: #7c3aed; --sec-soft: #f3edff; }
.opd-sec--deposit { --sec: #0f766e; --sec-soft: #e6f7f5; }
.ip-admit-layout { gap: 10px; }
.ip-admit-layout .ip-form-stack,
.ip-admit-layout .apt-side { gap: 8px; max-height: none; overflow: visible; }
.ip-admit-layout .ip-form-stack .ips,
.ip-admit-layout .apt-side .ips { gap: 6px; padding: 0 0 10px; }
.ips-body { display: grid; gap: 6px; padding: 0 12px; min-width: 0; }
.ips .dd-grid { gap: 7px 12px; }
.ips .hospital-field label { margin-bottom: 4px; white-space: nowrap; }
.ips .hospital-input { min-height: 32px; padding: 5px 9px; }
.ips .dd-grid > .ips-span2 { grid-column: span 2; }
.ips .dd-grid > .ips-switch { align-self: end; padding-bottom: 3px; }
.ips .ip-bed-info:empty { display: none; }
.ips-req { padding: 1px 7px; border-radius: 999px; background: #fde8e8; color: #b42318; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.ip-admit-layout .ip-admit-actions { padding-top: 0; }
@media (max-width: 760px) {
    .ips .dd-grid--4 { grid-template-columns: 1fr; }
    .ips .dd-grid > .ips-span2 { grid-column: auto; }
    .ips .opd-sec-note { display: none; }
}
/* Pharmacy Sale Amendment (owner spec 06-10-2026; preview pharmacy-sale-amend.html): reuses the Purchase Amendment .pam-*
   look; adds the identity strip, the grid + impact panel, the settlement table and the patient dialog. 1366 × 768 first. */
.sam .pam-find input { width: 230px; }
.sam-drop a { grid-template-columns: 150px 1fr 150px 90px; }
.sam-chip--bad { background: #fdecea; color: #a8321a; }
.sam-warn { display: flex; gap: 8px; align-items: center; padding: 4px 10px; border-radius: 8px; background: #fff6e5; border: 1px solid #f3d29a; color: #7a4a00; font-size: var(--fs-xs); flex-shrink: 0; }
.sam-warn b { font-weight: var(--fw-semibold); }
.sam-id { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr 1.1fr 1.15fr .95fr; flex-shrink: 0; overflow: hidden; }
.sam-id > div, .sam-id > label { padding: 4px 8px; border-right: 1px solid #edf1f6; font-size: var(--fs-xs); color: var(--hospital-slate); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; gap: 1px; }
.sam-id > :last-child { border-right: 0; }
.sam-id b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--hospital-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sam-id .pt { background: #f2f7ff; }
.sam-id .pt b { color: #0d3f9f; }
.sam-id input, .sam-id select { width: 100%; height: 24px; padding: 0 6px; border: 1px solid #c9d6e8; border-radius: 6px; font: inherit; font-size: var(--fs-sm); color: var(--hospital-ink); background: #fff; }
.sam-id .is-lock select { background: #f4f6f9; color: #6b7a90; border-color: #e1e6ee; }
.sam-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 6px; }
.sam .pam-t td { padding: 3px 5px; }
.sam .pam-in.s { width: 52px; }
.sam .pam-in.m { width: 80px; }
.sam .pam-in.sam-why { width: 190px; height: 22px; margin-top: 2px; text-align: left; display: block; }
.sam-batch { height: 24px; padding: 0 7px; border: 1px solid #d3dcea; border-radius: 6px; background: #fff; font: inherit; font-size: var(--fs-sm); color: var(--hospital-ink); cursor: pointer; }
.sam-batch.chg { border-color: #1565d8; background: #f2f7ff; font-weight: var(--fw-semibold); }
.sam-batch:disabled { background: #f4f6f9; color: #8090a5; border-color: transparent; cursor: not-allowed; }
.sam .z { color: #a7b2c2; }
.sam-d { font-style: normal; font-size: 10.5px; font-weight: var(--fw-semibold); }
.sam-d.dn, .sam .dn { color: #c0321b; }
.sam-d.up, .sam .up { color: #138a4b; }
.sam-set { border-top: 1px solid #e1e8f2; padding: 4px 10px 6px; flex-shrink: 0; }
.sam-set h4, .sam-imp h4 { margin: 0 0 3px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: #0d3f9f; display: flex; align-items: center; gap: 8px; }
.sam-seg { display: inline-flex; border: 1px solid #c9d6e8; border-radius: 7px; overflow: hidden; }
.sam-seg button { padding: 2px 9px; border: 0; border-right: 1px solid #c9d6e8; background: #fff; font: inherit; font-size: 11px; font-weight: var(--fw-semibold); color: #3b4d66; cursor: pointer; }
.sam-seg button:last-child { border-right: 0; }
.sam-seg button.on { background: #5b3cc4; color: #fff; }
.sam-stable { overflow-x: auto; }
.sam-s { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.sam-s th { text-align: right; font-size: 11px; font-weight: var(--fw-semibold); color: var(--hospital-slate); padding: 1px 5px; white-space: nowrap; }
.sam-s td { padding: 1px 5px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sam-s th:first-child, .sam-s td:first-child { text-align: left; font-size: var(--fs-xs); color: var(--hospital-slate); font-weight: var(--fw-semibold); }
.sam-s .pam-in { height: 22px; }
.sam-s .ipc { background: #f5f2ff; }
.sam-s th.ipc { color: #5b3cc4; }
.sam-s tr.tot td { border-top: 1px dashed #b9c8dc; font-weight: var(--fw-semibold); }
/* Payment mode in Sale / Sale Return Amendment (owner 21-10-2026, pharmacy-amend-payment-mode.html): lines like Pharmacy Sale. */
.sam-paid { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--hospital-slate); margin-bottom: 2px; }
.sam-paid b { color: #0f172a; font-weight: var(--fw-semibold); }
.sam-paid .ipc { color: #5b3cc4; }
.sam-paid .pam-in { height: 22px; }
.sam-pl { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.sam-pl th { text-align: left; font-size: 11px; font-weight: var(--fw-semibold); color: var(--hospital-slate); padding: 1px 4px; white-space: nowrap; }
.sam-pl th.num { text-align: right; }
.sam-pl td { padding: 1px 4px; }
.sam-pl .pam-in { width: 100%; height: 24px; padding: 0 6px; text-align: left; }
.sam-pl select.pam-in { padding: 0 22px 0 6px; }
.sam-pl .pam-in.m { text-align: right; }
.sam-pl .pam-in:disabled { background: #f1f5f9; color: #94a3b8; }
.sam-modeonly { border-color: #c4b5fd; color: #5b3cc4; }
.sam-modeonly.on { background: #5b3cc4; border-color: #5b3cc4; color: #fff; }
/* Purchase Order Amendment (owner 21-10-2026, po-amendment.html): header like Sale Amendment, locked rows grey. */
.poa-hdr { display: grid; grid-template-columns: 1.5fr 1fr .8fr 1fr 1.1fr 1.6fr; flex-shrink: 0; overflow: hidden; }
.poa-hdr > div, .poa-hdr > label { padding: 4px 8px; border-right: 1px solid #edf1f6; font-size: var(--fs-xs); color: var(--hospital-slate); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; flex-direction: column; gap: 1px; }
.poa-hdr > :last-child { border-right: 0; }
.poa-hdr b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--hospital-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poa-hdr input, .poa-hdr select { width: 100%; height: 24px; padding: 0 6px; border: 1px solid #c9d6e8; border-radius: 6px; font: inherit; font-size: var(--fs-sm); color: var(--hospital-ink); background: #fff; }
.poa-hdr input.chg, .poa-hdr select.chg { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.poa-hdr .is-lock select, .poa-hdr input:disabled { background: #f4f6f9; color: #6b7a90; border-color: #e1e6ee; }
.poa-t tr.is-lock td { color: #94a3b8; }
.poa-t .pam-in.m { width: 84px; }
.poa .pam-plist a.is-dim { opacity: .55; }
.sam-imp { display: flex; flex-direction: column; gap: 5px; min-height: 0; overflow: auto; padding: 7px 9px; }
.sam-box { border: 1px solid #e6edf6; border-radius: 8px; padding: 5px 8px; font-size: var(--fs-xs); color: var(--hospital-slate); }
.sam-box .row { display: flex; justify-content: space-between; gap: 6px; }
.sam-box .row b { color: var(--hospital-ink); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sam-box .big { font-size: var(--fs-lg); }
.sam-box.ip { border-color: #d9cdfb; background: #faf8ff; }
.sam-box .res { margin-top: 3px; padding: 3px 6px; border-radius: 6px; background: #e6f6ed; color: #0d5a31; font-weight: var(--fw-semibold); }
.sam-box .res.bad { background: #fdecea; color: #8f2a16; }
.sam .pam-reason select { width: 160px; font-size: var(--fs-sm); }
.sam .pam-plist a.on, .sam-blist a.on { background: #eef4ff; }
@media (max-width: 1100px) {
    .sam-mid { grid-template-columns: 1fr; }
}
/* Sale Amendment v2 (owner 06-10-2026): every edit on the line itself — name box, batch drop-down, Delete, Add product row. */
.sam-name { display: flex; gap: 4px; align-items: center; }
.sam-name input { flex: 1; min-width: 0; height: 24px; padding: 0 6px; border: 1.5px solid #9ec0f0; border-radius: 6px; font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: #0d3f9f; background: #fff; }
.sam-name input.chg { border-color: #1565d8; background: #f2f7ff; }
.sam-bsel { height: 26px; max-width: 150px; padding: 0 4px; border: 1px solid #d3dcea; border-radius: 6px; font: inherit; font-size: var(--fs-sm); background: #fff; color: var(--hospital-ink); }
.sam-bsel.chg { border-color: #1565d8; background: #f2f7ff; font-weight: var(--fw-semibold); }
.sam-del { height: 24px; padding: 0 8px; border: 1px solid #f3c2b9; border-radius: 6px; background: #fff; color: #c0321b; font-size: 11px; font-weight: var(--fw-semibold); white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.sam-del:hover { background: #fdecea; }
.sam-del.undo { border-color: #c9d6e8; color: #1553b0; }
/* Appointment v2 (owner 06-10-2026, preview appointment-v2.html): sections like New OPD Registration, one screen without
   scroll at 1366 × 768 — slots / day list on the left, the booking form OR the opened appointment on the right. */
.ap2 { display: flex; flex-direction: column; gap: 8px; height: calc(100dvh - 128px); min-height: 520px; }
.ap2-head { display: flex; align-items: center; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }
.ap2-head .hospital-dashboard-title { font-size: var(--fs-xl); }
.ap2-head .hospital-dashboard-title { margin: 0; }
.ap2-chips { display: flex; gap: 4px; }
.ap2-chip { padding: 2px 7px; border-radius: 999px; background: #eef4ff; color: #1553b0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); white-space: nowrap; }
.ap2-chip b { font-size: var(--fs-sm); }
.ap2-chip--free { background: #e6f6ed; color: #0d6a39; }
.ap2-chip--booked { background: #fff1d6; color: #8a5200; }
.ap2-chip--reg { background: #e9f8ef; color: #15803d; }
.ap2-chip--can { background: #fdecea; color: #a8321a; }
.ap2-sp { flex: 1; }
.ap2-filter { display: flex; align-items: center; gap: 6px; }
.ap2-filter .hospital-input { height: 32px; }
.ap2-filter .hospital-input.apt-doctor-search { width: 200px; flex: 0 0 200px; min-width: 0; }
.ap2-filter .hospital-input[type="date"] { width: 136px; flex: 0 0 136px; padding: 0 6px; }
.ap2-nav, .ap2-today { height: 32px; min-width: 32px; padding: 0 9px; border: 1px solid #c9d6e8; border-radius: 8px; background: #fff; color: #1553b0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.ap2-today.is-on { background: #eef4ff; border-color: #9ec0f0; }
.ap2-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; }
.ap2-sec { padding: 0 !important; display: flex; flex-direction: column; min-height: 0; gap: 0 !important; }
.ap2-slots-sec { min-height: 0; }
.ap2-tabs { display: inline-flex; border: 1px solid #c9d6e8; border-radius: 7px; overflow: hidden; margin-left: 6px; }
.ap2-tabs button { padding: 3px 10px; border: 0; border-right: 1px solid #c9d6e8; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: #3b4d66; cursor: pointer; }
.ap2-tabs button:last-child { border-right: 0; }
.ap2-tabs button.is-on { background: var(--sec); color: #fff; }
.ap2-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ap2-pane[hidden] { display: none; }
.ap2-empty { margin: 12px; color: var(--hospital-slate); }
.ap2-grid { flex: 1; min-height: 0; overflow: auto; padding: 8px 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; align-content: start; }
.ap2-slot { border: 1px solid #dfe7f1; border-radius: 8px; padding: 6px 9px; display: flex; flex-direction: column; gap: 1px; min-height: 52px; min-width: 0; }
.ap2-slot b { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.ap2-slot a { font-size: var(--fs-sm); font-weight: var(--fw-semibold); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap2-name { color: #1553b0; }
.ap2-name.is-reg { color: #15803d; }
.ap2-book { color: #15803d; }
.ap2-slot--free { background: #f2fbf5; border-color: #c7ebd4; }
.ap2-slot--part { background: #fff8ec; border-color: #f5d9a8; }
.ap2-slot--booked { background: #f3f6fb; }
.ap2-slot--past { opacity: .55; }
.ap2-slot--open { outline: 2px solid #c2410c; }
.ap2-slot--pick { outline: 2px solid #15803d; background: #dff5e7; }
.ap2-legend { display: flex; gap: 10px; padding: 0 12px 8px; font-size: var(--fs-xs); color: var(--hospital-slate); flex-shrink: 0; }
.ap2-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.ap2-legend i.free { background: #c7ebd4; }
.ap2-legend i.booked { background: #dbe3ee; }
.ap2-legend i.open { background: #fff; outline: 2px solid #c2410c; }
.ap2-legend i.pick { background: #dff5e7; outline: 2px solid #15803d; }
.ap2-table { margin: 4px 12px 10px; width: calc(100% - 24px); }
.ap2-pane[data-ap2-pane="list"] { overflow: auto; }
.ap2-side { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ap2-form { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.ap2-body { padding: 8px 12px 10px; display: grid; gap: 7px 12px; }
.ap2-grid3 { grid-template-columns: 1.2fr 1fr .9fr; }
.ap2-span2 { grid-column: span 2; }
.ap2-span3 { grid-column: 1 / -1; }
.ap2-f { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-xs); color: var(--hospital-slate); min-width: 0; }
.ap2-f > span b { color: #c0321b; }
.ap2-f > span i { font-style: normal; color: #8a96a8; margin-left: 4px; }
.ap2-f input[readonly] { background: #f4f6f9; color: #3b4d66; }
.ap2-save { width: 100%; justify-content: center; }
.ap2-open { flex: 1; }
.ap2-new { margin-left: auto; color: #1553b0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none; }
.ap2-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap2-who b { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.ap2-hint { margin: 0; color: var(--hospital-slate); font-size: var(--fs-xs); }
.ap2-kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ap2-kv div { border: 1px solid #e6edf6; border-radius: 8px; padding: 4px 8px; font-size: var(--fs-xs); color: var(--hospital-slate); min-width: 0; }
.ap2-kv b { display: block; font-size: var(--fs-sm); color: var(--hospital-ink); font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ap2-register { width: 100%; justify-content: center; }
.ap2-act { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; align-items: end; margin: 0; }
.ap2-act--cancel { grid-template-columns: 1fr auto; border-top: 1px dashed #e3e9f2; padding-top: 8px; }
.ap2-cancel { background: #fdecea !important; color: #a8321a !important; border-color: #f3c2b9 !important; }
@media (max-width: 1100px) {
    .ap2 { height: auto; }
    .ap2-main { grid-template-columns: 1fr; }
    .ap2-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
/* New OPD Registration (owner 06-10-2026): Chief complaint beside Notes (shown to the doctor) + old due badge / list. */
.opd-cc-hint { color: #15803d !important; font-weight: var(--fw-semibold); }
.opd-cc-input { border-color: #9fd8b3; }
.opd-old-due { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; padding: 3px 10px; border: 1px solid #f3b8ac; border-radius: 8px; background: #fdecea; color: #a8321a; font: inherit; font-size: var(--fs-xs); font-weight: var(--fw-semibold); cursor: pointer; }
.opd-old-due:hover { background: #fbd9d3; }
.opd-old-due b { font-size: var(--fs-sm); }
.opd-old-due[hidden] { display: none; }
.opd-due-dlg { width: min(1010px, 96vw); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 20px 60px #10264a40; }
.opd-due-dlg::backdrop { background: rgba(16, 38, 74, .38); }
.opd-due-dlg header { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-bottom: 1px solid #dfe7f1; }
.opd-due-dlg header b { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.opd-due-dlg header button { margin-left: auto; border: 0; background: none; font-size: 16px; color: var(--hospital-slate); cursor: pointer; }
.opd-due-in { padding: 8px 14px 12px; }
.opd-due-t td { white-space: nowrap; }
.opd-due-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.opd-due-tot td { font-weight: var(--fw-semibold); border-top: 1px dashed #b9c8dc; }
.opd-due-chip { padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: var(--fw-semibold); }
.opd-due-chip--op { background: #eef4ff; color: #1553b0; }
.opd-due-chip--ip { background: #f1ecff; color: #5b3cc4; }
.opd-due-collect { padding: 3px 9px; border-radius: 6px; background: #15803d; color: #fff; font-size: var(--fs-xs); font-weight: var(--fw-semibold); text-decoration: none; }
/* ---- Radiology (Phase 5, 06-10-2026) ---------------------------------------------------------------------- */
.rad-red { color: #b3391d !important; }
.rad-mods { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rad-mod { padding: 5px 10px; border: 1px solid #d6e0ee; border-radius: 10px; background: #fff; color: var(--hospital-slate); font-size: var(--fs-xs); text-decoration: none; }
.rad-mod b { display: block; color: var(--hospital-ink); font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.rad-mod.is-active { border-color: #1565d8; background: #eef4ff; box-shadow: inset 0 -2px 0 #1565d8; }
.rad-pill { display: inline-block; padding: 1px 8px; border-radius: 99px; background: #eef2f6; color: var(--hospital-slate); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.rad-pill--ordered { background: #e3eeff; color: #1a4fa8; }
.rad-pill--scheduled { background: #f1ecff; color: #4b2aa8; }
.rad-pill--arrived { background: #fff1d6; color: #8a5a00; }
.rad-pill--in_progress { background: #dff4ff; color: #075985; }
.rad-pill--performed, .rad-pill--reported { background: #fff1d6; color: #8a5a00; }
.rad-pill--signed, .rad-pill--released, .rad-pill--delivered { background: rgba(31, 200, 77, .16); color: #136c31; }
.rad-pill--cancelled { background: #fde8e4; color: #b3391d; }
.rad-actions { white-space: nowrap; }
.rad-actions > * { margin-right: 4px; }
.rad-btn-danger { background: #b3391d !important; border-color: #b3391d !important; color: #fff !important; }
.rad-accept { width: min(860px, 96vw); }
.rad-accept-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; }
.rad-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 5px; max-height: 230px; overflow: auto; margin: 6px 0; }
.rad-slot { position: relative; display: grid; padding: 4px 6px; border: 1px solid #d6e0ee; border-radius: 8px; text-align: center; font-size: var(--fs-xs); color: var(--hospital-slate); cursor: pointer; }
.rad-slot input { position: absolute; opacity: 0; pointer-events: none; }
.rad-slot b { color: var(--hospital-ink); font-size: var(--fs-sm); }
.rad-slot--free { background: #f3fbf5; border-color: #b8e5c4; }
.rad-slot--booked { background: #fde8e4; border-color: #f3a894; cursor: not-allowed; opacity: .75; }
.rad-slot--past { background: #f3f5f8; cursor: not-allowed; opacity: .55; }
.rad-slot:has(input:checked) { background: #1565d8; border-color: #1565d8; color: #fff; }
.rad-slot:has(input:checked) b { color: #fff; }
.rad-prep { margin: 4px 0 8px; padding-left: 18px; font-size: var(--fs-sm); }
.rad-ok { padding: 6px 9px; border-radius: 9px; background: #f3fbf5; color: #136c31; font-size: var(--fs-sm); }
.rad-card { padding: 10px 12px; min-width: 0; }
.rad-card .hospital-card-title { margin: 0 0 6px; }
.rad-perform { display: grid; grid-template-columns: minmax(0, 2.3fr) minmax(300px, 1fr); gap: 10px; margin-top: 8px; align-items: start; }
.rad-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.rad-row { display: flex; gap: 8px; align-items: stretch; }
.rad-grow { flex: 1.4; }
.rad-side { flex: 1; }
.rad-setting { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #e3e9f2; }
.rad-setting b { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.rad-setting span { color: var(--hospital-slate); font-size: var(--fs-xs); }
.rad-seg { display: inline-flex; border: 1px solid #d6e0ee; border-radius: 8px; overflow: hidden; }
.rad-seg label { position: relative; cursor: pointer; }
.rad-seg input { position: absolute; opacity: 0; pointer-events: none; }
.rad-seg span { display: block; padding: 3px 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--hospital-slate) !important; }
.rad-seg label + label span { border-left: 1px solid #d6e0ee; }
.rad-seg input:checked + span { background: #1565d8; color: #fff !important; }
.rad-seg input[value="critical"]:checked + span { background: #b3391d; }
.rad-check { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-sm); }
.rad-checks { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 8px; }
.rad-in-sm { max-width: 230px; padding: 4px 8px !important; font-size: var(--fs-xs) !important; }
.rad-dl { display: grid; grid-template-columns: 82px 1fr; gap: 3px 8px; margin: 0 0 8px; font-size: var(--fs-sm); }
.rad-dl dt { color: var(--hospital-slate); }
.rad-dl dd { margin: 0; }
.rad-mat td { vertical-align: middle; }
.rad-num { width: 74px; padding: 3px 6px !important; text-align: right; }
.rad-add-cell { position: relative; }
.rad-add-cell .hospital-input { width: 100%; }
.rad-suggest { position: absolute; left: 6px; right: 6px; top: 100%; z-index: 30; margin: 0; padding: 4px; list-style: none; border: 1px solid #d6e0ee; border-radius: 9px; background: #fff; box-shadow: 0 10px 24px rgba(22, 62, 92, .18); max-height: 220px; overflow: auto; }
.rad-suggest button { display: block; width: 100%; padding: 5px 8px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: var(--fs-sm); cursor: pointer; }
.rad-suggest button:hover { background: #eef4ff; }
.rad-suggest-empty { padding: 5px 8px; color: var(--hospital-slate); font-size: var(--fs-xs); }
.rad-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.rad-img { display: grid; place-items: center; width: 92px; height: 64px; padding: 4px; border: 1px solid #d6e0ee; border-radius: 9px; background: #f6f9ff; color: var(--hospital-blue-900); font-size: var(--fs-2xs); text-align: center; text-decoration: none; overflow: hidden; }
.rad-img--add { border-style: dashed; cursor: pointer; }
.rad-img--add label { cursor: pointer; font-size: var(--fs-xs); font-weight: 600; }
.rad-push { margin-top: auto; flex-wrap: wrap; }
.rad-report { display: grid; grid-template-columns: 250px minmax(0, 2.2fr) minmax(250px, 1fr); gap: 10px; align-items: stretch; height: calc(100vh - 150px); min-height: 520px; }
.rad-report > * { min-height: 0; overflow: auto; }
.rad-queue { display: flex; flex-direction: column; gap: 6px; }
.rad-tabs-sm { gap: 4px; }
.rad-tabs-sm .access-tab { padding: 4px 8px; font-size: var(--fs-xs); }
.rad-q { display: flex; flex-direction: column; gap: 5px; overflow: auto; }
.rad-qi { display: block; padding: 6px 8px; border: 1px solid #e3e9f2; border-radius: 9px; color: var(--hospital-ink); font-size: var(--fs-xs); text-decoration: none; }
.rad-qi b { display: block; font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.rad-qi span { color: var(--hospital-slate); }
.rad-qi.is-active { border-color: #1565d8; background: #eef4ff; }
.rad-qi--urgent { box-shadow: inset 3px 0 0 #d94722; }
.rad-qi--late span { color: #b3391d; font-weight: 600; }
.rad-editor { display: flex; flex-direction: column; gap: 6px; }
.rad-tpl-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rad-tpl-bar select { max-width: 320px; }
.rad-sec { display: flex; flex-direction: column; gap: 2px; }
.rad-sec label { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: var(--hospital-ink); }
.rad-sec small { color: var(--hospital-slate); font-weight: 400; }
.rad-sec textarea { resize: vertical; font-size: var(--fs-sm); line-height: 1.45; }
.rad-sec--grow { flex: 1; }
.rad-sec--grow textarea { flex: 1; min-height: 120px; }
.rad-sec--imp textarea { font-weight: 600; background: #fffdf3; }
.rad-qt { position: relative; margin-left: auto; }
.rad-qt-btn { padding: 1px 7px; border: 1px solid #d6e0ee; border-radius: 6px; background: #fff; font-size: var(--fs-2xs); cursor: pointer; }
.rad-qt-menu { position: absolute; right: 0; top: 100%; z-index: 30; width: 340px; max-height: 240px; overflow: auto; padding: 4px; border: 1px solid #d6e0ee; border-radius: 9px; background: #fff; box-shadow: 0 10px 24px rgba(22, 62, 92, .18); }
.rad-qt-menu button { display: block; width: 100%; padding: 4px 7px; border: 0; border-radius: 6px; background: none; text-align: left; font-size: var(--fs-xs); font-weight: 400; cursor: pointer; }
.rad-qt-menu button:hover { background: #eef4ff; }
.rad-qt-save { color: var(--hospital-blue-700) !important; font-weight: 600 !important; border-top: 1px solid #e3e9f2 !important; }
.rad-sidebar { display: flex; flex-direction: column; gap: 6px; }
.rad-prev { padding: 6px 8px; border: 1px solid #e3e9f2; border-radius: 9px; font-size: var(--fs-xs); }
.rad-crit { display: grid; gap: 5px; padding: 8px; border: 1px solid #f3a894; border-radius: 10px; background: #fff6f3; color: #7a2412; font-size: var(--fs-xs); }
.rad-master { display: grid; grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr); gap: 10px; align-items: start; margin-top: 8px; }
.rad-filter { padding: 8px; }
.rad-unset td { background: #fffaf0; }
.rad-flags { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.rad-flags span { padding: 0 6px; border-radius: 5px; background: #fde8e4; color: #b3391d; font-size: var(--fs-2xs); font-weight: 600; }
.rad-view-imp { font-weight: 600; color: var(--hospital-ink); }
@media (max-width: 1100px) {
    .rad-perform, .rad-master { grid-template-columns: 1fr; }
    .rad-report { grid-template-columns: 1fr; height: auto; }
    .rad-row { flex-direction: column; }
}
.rad-summary { padding: 8px 12px; }
.rad-sum-line { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 4px; font-size: var(--fs-xs); }
.rad-sum-line--muted { color: var(--hospital-slate); display: block; }
.rad-sum-chip { padding: 1px 8px; border-radius: 99px; background: #f3fbf5; color: #136c31; }
.rad-sum-chip--red { background: #fde8e4; color: #b3391d; }
.rad-tabs-sm { flex-wrap: wrap; }
.rad-report { height: calc(100vh - 170px); }
.rad-card .hospital-form-grid { gap: 6px 10px; }
.rad-report { height: calc(100vh - 186px); }
.rad-sec--grow textarea { min-height: 80px; }
/* ==========================================================================
   Purchase Return Amendment (owner spec 07-10-2026, preview pharmacy-purchase-return-amend.html): shares the .pam-*
   amendment look; adds the warning line, the grid + impact panel middle and the Purchase Return List filters. 1366 × 768.
   ========================================================================== */
.pra .pam-head h2 .pra-sub { display: block; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--hospital-slate); }
.pra .pam-find input { width: 240px; }
.pra .pam-drop a { grid-template-columns: 150px 1fr 110px 90px; }
.pra-hdr { grid-template-columns: 2fr 1fr 1fr 1fr 1.25fr 1.45fr 1.3fr; }
.pra-val { height: 28px; display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--hospital-ink); font-weight: var(--fw-semibold); white-space: nowrap; }
.pra-val .old { text-decoration: line-through; color: #8a96a8; font-weight: var(--fw-regular); }
.pra-val--plain { font-weight: var(--fw-medium); }
.pra-mid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 206px; gap: 6px; }
.pra-mid .pam-grid { min-height: 0; }
.pra-t { font-size: 12.5px; }
.pra-t th { font-size: 11px; padding: 5px 4px; }
.pra-t th.pra-rev { background: #e8f1ff; color: #0d3f9f; }
.pra-t td { padding: 3px 3px; }
.pra-t td small { font-size: 10.5px; color: var(--hospital-slate); }
.pra-in { width: 52px; }
.pra-in.s { width: 44px; }
.pam-diff { font-size: 11px; font-weight: var(--fw-semibold); }
.pam-diff.up { color: #138a4b; }
.pam-diff.dn { color: #c0321b; }
.pam-st--v { background: #f1ecff; color: #5b3cc4; }
.pra-ib { padding: 4px 9px; border-bottom: 1px solid #edf1f6; font-size: var(--fs-xs); color: var(--hospital-slate); }
.pra-ib:last-child { border-bottom: 0; }
.pra-ib .t { font-weight: var(--fw-semibold); color: var(--hospital-ink); margin-bottom: 2px; }
.pra-big { font-size: var(--fs-md); font-weight: var(--fw-semibold); font-variant-numeric: tabular-nums; color: var(--hospital-ink); }
.pra-big.up { color: #138a4b; }
.pra-big.dn { color: #c0321b; }
.pra-big.wn { color: #b86a00; }
.pra .pam-reason select { width: 180px; }
.pra-plist a { grid-template-columns: 1.3fr 1.3fr .9fr; }
.pra-menu { position: relative; display: inline-block; }
.pra-menu summary { list-style: none; cursor: pointer; }
.pra-menu summary::-webkit-details-marker { display: none; }
.pra-menu ul { position: absolute; right: 0; top: 30px; z-index: 5; margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #c9d6e8; border-radius: 8px; box-shadow: 0 8px 24px #10264a26; min-width: 210px; }
.pra-menu li a { display: block; padding: 5px 12px; font-size: var(--fs-sm); color: var(--hospital-ink); text-decoration: none; white-space: nowrap; }
.pra-menu li a:hover { background: #eef4ff; }
.pra-menu li a.pri { color: #0d3f9f; font-weight: var(--fw-semibold); }
.pra-menu li.sep { border-top: 1px solid #edf1f6; margin: 3px 0; }
.pra .pam-t tr.is-new td { background: #f7fbff; }
/* Amendment dialogs (Purchase / Purchase Return / Sale Amendment): the body div shares the .pam-in name with the grid
   input, so it must get its own size back; dialogs sit centred (07-10-2026). */
.pam-dlg { margin: auto; }
.pam-dlg .pam-in { display: block; width: auto; height: auto; padding: 10px 14px; border: 0; border-radius: 0; text-align: left; background: #fff; font-size: var(--fs-sm); }
/* Sale Return Amendment (owner spec 07-10-2026, preview pharmacy-sale-return-amend.html): shares the .pam / .pra
   workspace; its own header grid, the condition select under the medicine name, the money block in the impact panel. */
.sra .pam-hdr.sra-hdr { grid-template-columns: 2fr 1.25fr 1.2fr 0.9fr 1fr 1.6fr 1.2fr 1fr; }
.sra .pam-find input { width: 230px; }
.sra .pra-val small { font-weight: var(--fw-medium); }
.sra .sra-cond { height: 20px; padding: 0 4px; border: 1px solid #e1e6ee; border-radius: 5px; font: inherit; font-size: 10.5px; color: var(--hospital-slate); background: #fff; max-width: 150px; }
.sra .sra-cond.chg { border-color: #1565d8; background: #f2f7ff; color: var(--hospital-ink); font-weight: var(--fw-semibold); }
.sra .pra-big.ip { color: #0b4f8a; }
.sra .sra-tick { display: flex; gap: 6px; align-items: center; margin: 3px 0; font-size: var(--fs-xs); color: var(--hospital-ink); cursor: pointer; }
.sra .sra-money { display: grid; gap: 3px; margin: 3px 0; }
.sra .sra-money > div { display: grid; grid-template-columns: 1fr 58px 1fr; gap: 3px; }
.sra .sra-money select, .sra .sra-money input { height: 24px; min-width: 0; padding: 0 5px; border: 1px solid #c9d6e8; border-radius: 5px; font: inherit; font-size: 11px; }
.sra .sra-plist .pam-lt td { white-space: nowrap; }
.sra .pam-reason select { width: 180px; }
/* Sale Return List extras: refund status chips, Action ▾ with Amend, Pay refund / Collect recovery dialog. */
.sr-list .pam-st { font-size: 10.5px; }
.sr-list details.pra-menu { position: relative; display: inline-block; }
.sr-list details.pra-menu summary { list-style: none; cursor: pointer; }
.sr-list details.pra-menu summary::-webkit-details-marker { display: none; }
.sr-list details.pra-menu ul { position: absolute; right: 0; top: 30px; z-index: 5; margin: 0; padding: 4px 0; list-style: none; background: #fff; border: 1px solid #c9d6e8; border-radius: 8px; box-shadow: 0 8px 24px #10264a26; min-width: 230px; }
.sr-list details.pra-menu li a, .sr-list details.pra-menu li span { display: block; padding: 5px 12px; font-size: var(--fs-sm); color: var(--hospital-ink); text-decoration: none; white-space: nowrap; }
.sr-list details.pra-menu li span { color: var(--hospital-slate); }
.sr-list details.pra-menu li a:hover { background: #eef4ff; }
.sr-list details.pra-menu li a.pri { color: #0d3f9f; font-weight: var(--fw-semibold); }
.sr-list details.pra-menu li a.due { color: #b86a00; font-weight: var(--fw-semibold); }
.sr-list details.pra-menu li.sep { border-top: 1px solid #edf1f6; margin: 3px 0; }
/* Sign-in page (owner 07-10-2026, preview ui-preview/login-centered.html): the logo, the welcome heading and the
   lead line sit in the exact middle of the blue panel (horizontally and vertically, centre-aligned text). */
.auth-login-brand { align-items: center; text-align: center; }
.auth-login-brand h1 { margin-top: 10px; }
.auth-login-lead { margin: 0 auto; }
/* Owner 09-10-2026 (preview ui-preview/login-hims.html): the name is "Hospital Management Information System";
   the heading stays on 2 lines (Welcome to VitalOS / the name), so its size is the largest that fits the panel. */
.auth-login-brand h1.auth-login-title { font-size: 1.5rem; }
@media (max-width: 900px) {
    .auth-login-brand h1.auth-login-title { font-size: var(--fs-xl); }
}
/* Address · City · State · Pin code line of the registration screens + City Master (owner 08-10-2026, preview
   reg-address-city.html): one nested row (Address 2 parts · City · State · Pin), fixed-positioned typeahead list,
   inline "Add as a new city" panel, green "auto" chip on State / Pin filled from the picked city. */
.city-address { display: grid; grid-template-columns: 1.6fr 1.4fr 1.15fr 1fr .7fr; gap: 7px 12px; align-items: start; min-width: 0; }
.city-address > .hospital-field { min-width: 0; }
.city-address .hospital-error { grid-column: 1 / -1; margin: 0; }
.city-address-city { position: relative; }
.city-auto { padding: 0 6px; border-radius: 999px; background: #e8f7ee; color: #15803d; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); }
.city-picker-item { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 6px 10px; cursor: pointer; font-size: var(--fs-sm); color: var(--hospital-ink); }
.city-picker-item:hover, .city-picker-item.is-active { background: #e3eefc; }
.city-picker-item b { font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.city-picker-item b mark { background: #fff1b8; color: inherit; padding: 0; }
.city-picker-state { color: var(--hospital-slate); white-space: nowrap; }
.city-picker-item.is-mine .city-picker-state::after { content: " · added here"; color: #7c3aed; font-weight: var(--fw-semibold); }
.city-picker-pin { font-variant-numeric: tabular-nums; color: #35496b; }
.city-picker-add { grid-template-columns: 1fr; background: #fff8eb; color: #8a5200; font-weight: var(--fw-semibold); border-top: 1px solid #f5c77a; }
.city-picker-add:hover, .city-picker-add.is-active { background: #ffefcc; }
.city-picker-foot { padding: 4px 10px; background: #f4f7fb; border-top: 1px solid #e6edf5; color: #7b8aa3; font-size: var(--fs-2xs); }
.city-add { grid-column: 1 / -1; background: #fff8eb; border: 1px solid #f5c77a; border-radius: 8px; padding: 8px 10px; }
.city-add-grid { display: grid; grid-template-columns: 1.3fr 1.2fr .8fr auto auto; gap: 8px; align-items: end; }
.city-add-grid .hospital-field { min-width: 0; margin: 0; }
.city-add-note { margin: 6px 0 0; color: #15803d; font-size: var(--fs-xs); font-weight: var(--fw-semibold); }
.city-add-note--error { color: #b42318; }
.opd-sec-grid > .city-address { padding: 8px 0 0; border-top: 1px dashed #b9c6d8; }
.ips .dd-grid > .city-address { grid-column: 1 / -1; padding-top: 6px; border-top: 1px dashed #b9c6d8; }
.patient-edit-grid .city-address { grid-column: 1 / -1; }
.ip-request-address { margin-top: 8px; }
@media (max-width: 1100px) {
    .city-address { grid-template-columns: 1fr 1fr; }
    .city-address > .hospital-field:first-child { grid-column: 1 / -1; }
    .city-add-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .city-address, .city-add-grid { grid-template-columns: 1fr; }
}
/* City Master screen */
.cm-filters .hospital-field { min-width: 150px; }
.cm-import-form { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.cm-import-form .hospital-input { max-width: 420px; }
.cm-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 12px; border-top: 1px solid #e6edf5; font-size: var(--fs-xs); color: var(--hospital-slate); }
.cm-pager-links { display: flex; gap: 14px; }
/* Address line in narrow places (Admission Request side panel): two columns, no hints; the IP Admission row sits tight. */
.ip-request-address { grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.ip-request-address > .hospital-field:first-child { grid-column: 1 / -1; }
.ip-request-address .hospital-field > label .hospital-field-hint { display: none; }
.ip-request-address .city-add-grid { grid-template-columns: 1fr 1fr; }
.ips .dd-grid > .city-address { padding-top: 4px; }
.cm-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.cm-filters .hospital-field { flex: 0 0 auto; width: 170px; margin: 0; }
.cm-filters .hospital-field:first-child { width: 260px; }
.cm-filters .hospital-button { flex: 0 0 auto; width: auto; }
/* IP Admission with the address line (08-10-2026): a little denser so the whole form still fits 1366 × 768 without scroll. */
.ip-admit-layout { gap: 8px; }
.ip-admit-layout .ip-form-stack, .ip-admit-layout .apt-side { gap: 6px; }
.ip-admit-layout .ip-form-stack .ips, .ip-admit-layout .apt-side .ips { gap: 4px; padding: 0 0 8px; }
.ip-admit-layout .ips .opd-sec-head { padding: 4px 12px; }
.ip-admit-layout .ips .dd-grid { gap: 5px 12px; }
.ip-admit-layout .ips .hospital-field label { margin-bottom: 2px; }
.ip-admit-layout .ips .hospital-input { min-height: 30px; padding: 4px 9px; }
.ip-admit-layout .ips .dd-grid > .city-address { padding-top: 3px; gap: 5px 12px; }
/* Appointment → Register (owner 08-10-2026 v2): the Day list "Register" button opens the filled New OPD Registration. */
.ap2-done { margin: 0; font-size: var(--fs-sm); }
/* Owner 08-10-2026 (home-trim preview v11): VitalOS logo block in the header (as wide as the sidebar, click = Home,
   soft pulse), light-blue header, hospital name centred bold black, sidebar search first, sidebar menu text black. */
:root { --vx-sidebar-w: 190px; }
@media (max-height: 820px) and (min-width: 1024px) {
    :root { --vx-sidebar-w: 178px; }
}
.hospital-app-shell .hospital-app-layout { grid-template-columns: var(--vx-sidebar-w) minmax(0, 1fr); }
/* Header sea green (owner 29-10-2026, header-light-green.html shade 7); the logo box below keeps its own light background. */
.hospital-app-header--brand { display: grid; grid-template-columns: var(--vx-sidebar-w) minmax(0, 1fr) auto; align-items: stretch; gap: 0; padding: 0;
    background: #dcf3ee; border-bottom: 1px solid #b3e0d6; }
.hospital-header-logo { display: flex; align-items: center; justify-content: center; padding: 6px 8px; border-right: 1px solid rgba(96, 112, 137, 0.14);
    background: linear-gradient(180deg, #f8fbff, #f3f9ff); text-decoration: none; }
.hospital-header-logo img { display: block; height: 34px; width: auto; animation: vx-logo-pulse 2.6s ease-in-out infinite; }
.hospital-header-logo:hover img, .hospital-header-logo:focus-visible img { animation-play-state: paused; opacity: 1; }
@keyframes vx-logo-pulse {
    0%, 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 0 rgba(21, 101, 216, 0)); }
    50% { opacity: .72; transform: scale(1.05); filter: drop-shadow(0 0 6px rgba(21, 101, 216, .45)); }
}
@media (prefers-reduced-motion: reduce) {
    .hospital-header-logo img { animation: none; }
}
/* Owner 26-11-2026 (header-left-brand.html H2): hospital logo + name on the left, right after ☰ (was centred). */
.hospital-app-header--brand .hospital-app-hospital { display: flex; align-items: center; justify-content: flex-start; text-align: left; padding: 6px 12px 6px 8px; }
/* Hospital logo beside the hospital name (owner 19-11-2026, hospital-logo-size.html G5). */
.hospital-app-header--brand .hospital-app-hospital { gap: 10px; min-width: 0; }
.hospital-app-hospital-logo { height: 34px; width: auto; max-width: 120px; object-fit: contain; flex: none; }
/* Owner 26-11-2026: the logo's white square gets slightly rounded corners. */
.hospital-app-header--brand .hospital-app-hospital-logo { border-radius: 6px; }
@media (max-width: 720px) { .hospital-app-hospital-logo { height: 26px; max-width: 80px; } }
.hospital-app-header--brand .hospital-app-hospital-name { font-weight: 700; color: #000; }
.hospital-app-header--brand .hospital-header-tools { padding: 6px 16px 6px 0; }
.hospital-sidebar--plain .hospital-sidebar-search { padding-top: 4px; }
.hospital-sidebar--plain .hospital-sidebar-link, .hospital-sidebar--plain .hospital-sidebar-sublink, .hospital-sidebar--plain .hospital-sidebar-summary { color: #000; }
.hospital-sidebar--plain .hospital-sidebar-summary::after { color: #000; }
.hospital-sidebar--plain .hospital-sidebar-link--active { color: #000; font-weight: var(--fw-semibold, 600); }
@media (max-width: 1023px) {
    .hospital-app-header--brand { grid-template-columns: auto minmax(0, 1fr) auto; }
    .hospital-header-logo { border-right: 0; padding: 6px 12px; }
}
/* ---- Operation Theatre (Phase 6, 08-10-2026) --------------------------------------------------------------- */
.ot-page .b-ok { background: #e6f6ed; color: #0d6a39; }
.ot-page .b-due { background: #fff4e0; color: #8a4b00; }
.ot-page .b-bad { background: #fde8e4; color: #b3391d; }
.ot-page .b-info { background: #e6f0ff; color: #0d4aa6; }
.ot-page .b-grey { background: #eef2f7; color: #3b4d66; }
.ot-page .b-warn { background: #fff1d6; color: #8a5a00; }
.ot-page .pc-b { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; }
.ot-head { align-items: flex-start !important; }
.ot-daybar, .ot-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.ot-filters .hospital-input { width: auto; min-width: 120px; }
.ot-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; margin-bottom: 6px; }
.ot-bar .access-tabs { margin: 0; }
.ot-kpis { display: flex; flex-wrap: wrap; gap: 6px; }
.ot-kpis a { display: grid; padding: 4px 10px; border: 1px solid #dbe3ee; border-radius: 10px; background: #fff; text-decoration: none; color: var(--hospital-slate); font-size: var(--fs-xs); min-width: 96px; }
.ot-kpis a b { color: var(--hospital-blue-900); font-size: var(--fs-lg); }
.ot-btn-danger { background: #b3391d !important; border-color: #b3391d !important; color: #fff !important; }
.ot-text-danger { color: #b3391d !important; }
.ot-warn { color: #b3391d; font-weight: 600; }
.ot-card { padding: 10px 12px; margin: 0 0 8px; min-width: 0; }
.ot-card .opd-sec-head { margin-bottom: 6px; }
.ot-form { display: grid; gap: 6px; }
.ot-f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.ot-f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.ot-span2 { grid-column: span 2; }
.ot-f2 .hospital-field, .ot-f3 .hospital-field, .ot-form .hospital-field { margin: 0; }
.ot-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.ot-inline { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.ot-inline .hospital-input { flex: 1; min-width: 120px; }
.ot-chips { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); }
.ot-chips label { padding: 3px 9px; border: 1px solid #dbe3ee; border-radius: 999px; background: #fff; cursor: pointer; }
.ot-chips label small { color: var(--hospital-slate); }
.ot-cb { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); white-space: nowrap; }
.ot-cb-row { display: flex; gap: 6px; align-items: center; }
.ot-list-row { display: block; width: 100%; padding: 6px 9px; border: 0; border-bottom: 1px solid #eef2f7; background: #fff; text-align: left; font: inherit; cursor: pointer; }
.ot-list-row:hover { background: #eef4ff; }
.ot-list-row b { display: block; font-size: var(--fs-sm); color: var(--hospital-ink); }
.ot-list-row span { font-size: var(--fs-xs); color: var(--hospital-slate); }
.ot-h4 { margin: 8px 0 4px; font-size: var(--fs-xs); font-weight: 700; letter-spacing: .04em; color: var(--hospital-blue-900); text-transform: uppercase; }
/* schedule grid */
.ot-sched { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 8px; align-items: start; }
.ot-ev { position: absolute; left: 3px; right: 3px; display: grid; gap: 1px; padding: 3px 6px; border: 1px solid; border-radius: 7px; font-size: var(--fs-2xs); line-height: 1.25; overflow: hidden; text-decoration: none; color: #1e293b; box-sizing: border-box; }
.ot-ev b { font-size: var(--fs-xs); color: var(--hospital-ink); }
.ot-ev span { color: #334155; }
.ot-ev--turn { background: repeating-linear-gradient(45deg, #f8fafc 0 6px, #eef2f7 6px 12px); border-color: #e2e8f0; color: #94a3b8; text-align: center; padding: 2px; }
.ot-ev.is-selected { outline: 2px solid var(--hospital-blue-700); }
.ot-req { display: grid; padding: 5px 8px; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; font-size: var(--fs-xs); color: var(--hospital-slate); text-decoration: none; }
.ot-req b { color: var(--hospital-blue-900); font-size: var(--fs-sm); }
.ot-req.is-selected { border-color: var(--hospital-blue-700); background: #f3f7ff; }
.ot-card--emerg { border-color: #f3a9a0 !important; }
/* cases table, theatre desk */
.ot-table td.nw, .ot-table th.nw { white-space: nowrap; }
.ot-table td.num, .ot-table th.num { text-align: right; }
.ot-row--emerg td { background: #fff6f5; }
.ot-row--warn td { background: #fffaf0; }
.ot-table tr.is-selected td { background: #eef4ff; }
.ot-pstrip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 7px 12px; margin-bottom: 6px; border: 1px solid #b8e5c4; border-radius: 10px; background: #f3fbf5; font-size: var(--fs-sm); }
.ot-pstrip b { font-size: var(--fs-md); }
.ot-pstrip .sp { flex: 1; }
.ot-tabs { margin-bottom: 8px !important; }
.ot-tabs .access-tab { cursor: pointer; font: inherit; }
.ot-tabs .access-tab.is-on { background: var(--hospital-blue-700); color: #fff; }
.ot-tabs .access-tab b { margin-left: 4px; }
.ot-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.ot-two--charges { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.ot-col { display: grid; gap: 8px; min-width: 0; }
.ot-note { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 8px; align-items: start; }
.ot-checks { display: grid; gap: 3px; }
.ot-check { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 7px; background: #f8fafc; font-size: var(--fs-sm); cursor: pointer; }
.ot-check.is-done { background: #e8f8ee; }
.ot-check em { color: #b3391d; font-style: normal; }
.ot-check small { color: var(--hospital-slate); font-size: var(--fs-2xs); white-space: nowrap; }
.ot-time { display: grid; gap: 3px; padding: 6px 8px; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; text-align: center; }
.ot-time small { color: var(--hospital-slate); font-size: var(--fs-2xs); }
.ot-time b { font-size: var(--fs-lg); color: var(--hospital-blue-900); }
.ot-time.is-done { background: #e8f8ee; border-color: #a9e2bf; }
.ot-time form { display: grid; gap: 3px; }
.ot-time .hospital-button { width: 100%; }
.ot-time-edit .hospital-input { padding: 2px 4px; font-size: var(--fs-2xs); }
.ot-grid-table td { padding: 2px 4px; }
.ot-grid-table .hospital-input { padding: 3px 5px; font-size: var(--fs-xs); min-width: 56px; }
.ot-master { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr); gap: 8px; align-items: start; }
.ot-master--lists { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ot-line { display: flex; gap: 6px; align-items: center; }
.ot-line .hospital-input { flex: 1; }
.ot-setting { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px dashed #e3e9f1; font-size: var(--fs-sm); }
.ot-setting > div b { display: block; font-weight: 600; }
.ot-setting > div span { color: var(--hospital-slate); font-size: var(--fs-xs); }
.ot-setting .hospital-input { width: auto; }
.ot-pick { margin-bottom: 8px; }
.ot-pick .hospital-card-title { margin: 0 0 6px; }
/* Patient Care OT tab */
.ot-checks--care .ot-check { margin: 0; }
@media (max-width: 1100px) {
    .ot-sched, .ot-two, .ot-note, .ot-master { grid-template-columns: 1fr; }
}
.ot-daybar .hospital-input { width: auto; }
/* "VitalOS" word in the footers (owner 09-10-2026): "Vital" in the logo's blue, "OS" in the logo's orange (colours taken from vitalos-logo-cropped.png). */
.vx-brandname { font-weight: 700; letter-spacing: .01em; }
.hospital-footer strong.vx-brandname .vx-brand-vital, .vx-brand-vital { color: #0548a4; }
.hospital-footer strong.vx-brandname .vx-brand-os, .vx-brand-os { color: #f75f32; }
/* ---- Insurance, TPA & Corporate (Phase 7, 09-10-2026) ------------------------------------------------------ */
/* The screens reuse the OT layout classes (ot-two, ot-card, ot-f3 …) with these additions. */
.ins-page [hidden] { display: none !important; }
.ins-page .ot-span3 { grid-column: 1 / -1; }
.ins-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.ins-two--split { grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr); }
.ins-scroll { max-height: calc(100vh - 250px); overflow: auto; }
.ins-scroll--short { max-height: 230px; }
.ins-scroll--report { max-height: calc(100vh - 330px); }
.ins-pad { padding: 6px 10px; margin: 0; }
.ins-x { border: 0; background: none; color: #b3391d; cursor: pointer; font-size: var(--fs-md); }
.ins-num { text-align: right; }
.ins-gauge { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: var(--fs-sm); margin: 0 0 6px; }
.ins-bar { height: 12px; border-radius: 6px; background: #e2e8f0; overflow: hidden; }
.ins-bar i { display: block; height: 100%; background: #1f9d55; }
.ins-bar i.is-warn { background: linear-gradient(90deg, #1f9d55 0 75%, #e29a00 75% 100%); }
.ins-tl { display: grid; gap: 3px; font-size: var(--fs-xs); max-height: 300px; overflow: auto; }
.ins-tl > div { display: grid; grid-template-columns: 82px 1fr; gap: 6px; padding: 3px 6px; border-left: 3px solid #cbd8ea; background: #f8fafc; }
.ins-tl > div.ok { border-color: #1f9d55; }
.ins-tl > div.q { border-color: #e29a00; }
.ins-tl > div.bad { border-color: #b3391d; }
.ins-docs { margin: 0 0 6px; padding: 0; list-style: none; display: grid; gap: 3px; font-size: var(--fs-sm); }
.ins-docs li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 3px 6px; border-radius: 6px; background: #f8fafc; }
.ins-docs li.is-ok { color: #136c31; }
.ins-docs li.is-miss { color: #b3391d; background: #fff6f5; }
.ins-inline-form { display: inline; margin: 0; }
.ins-actions { justify-content: flex-end; margin-top: 8px; }
.ins-dialog { width: min(640px, 96vw); border: 1px solid #c9d6e6; border-radius: 12px; padding: 14px 16px; box-shadow: 0 18px 48px rgba(16, 38, 74, .25); }
.ins-dialog--wide { width: min(920px, 96vw); }
.ins-dialog h3 { margin: 0 0 8px; font-size: var(--fs-lg); color: var(--hospital-blue-900); }
.ins-dialog::backdrop { background: rgba(15, 23, 42, .35); }
.ins-bulk { max-height: 50vh; overflow: auto; margin: 6px 0; }
.ins-left { font-size: var(--fs-sm); color: #136c31; font-weight: 600; }
.ins-left.ins-bad, .ins-bad { color: #b3391d; }
.ins-sum { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 6px; }
.ins-sum div { padding: 4px 8px; border-radius: 8px; background: #f3f7ff; font-size: var(--fs-xs); color: var(--hospital-slate); }
.ins-sum div b { display: block; font-size: var(--fs-md); color: var(--hospital-blue-900); }
.ins-sum div.is-due { background: #fff4e0; }
.ins-sum div.is-due b { color: #8a4b00; }
.ins-split { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.ins-lines { max-height: 340px; overflow: auto; }
.ins-calc { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; font-size: var(--fs-sm); padding: 6px 8px; border: 1px solid #dbe3ee; border-radius: 10px; background: #fbfcfe; }
.ins-calc span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.ins-calc .pt { color: #8a3b00; }
.ins-calc .sp { color: #0b4a8f; }
.ins-calc .t { font-weight: 800; border-top: 1px solid #dbe4f0; padding-top: 3px; }
.ins-check { color: #136c31 !important; }
.ins-ov summary { font-size: var(--fs-xs); }
.ins-ov .users-action-form { display: grid; gap: 4px; min-width: 220px; }
.ins-decide .hospital-input { min-width: 0; }
.ins-corp { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 8px; align-items: start; }
.ins-co { display: grid; margin: 0 8px 6px; padding: 6px 9px; border: 1px solid #dbe3ee; border-radius: 8px; background: #fff; font-size: var(--fs-xs); color: var(--hospital-slate); text-decoration: none; }
.ins-co b { font-size: var(--fs-sm); color: var(--hospital-blue-900); }
.ins-co.is-selected { border-color: var(--hospital-blue-700); background: #f3f7ff; }
.ins-co.is-over { border-color: #f3a9a0; }
.ins-head-filter { margin-left: auto; }
.ins-head-filter .hospital-input { min-width: 0; width: auto; }
.ins-kpis { margin-bottom: 8px; }
.ins-kpis a.is-bad b { color: #b3391d; }
.ins-report-tabs { flex-wrap: wrap; }
/* IP Admission / Edit details payer block + Final Bill / IP Billing strips */
.ins-payer-box { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.ins-payer-box .hospital-field { margin: 0; }
.ins-payer-info { grid-column: 1 / -1; margin: 0; font-size: var(--fs-xs); color: var(--hospital-slate); }
.ins-policy-dialog .ot-f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; }
.ins-strip { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 6px 12px; margin: 0 0 8px; border: 1px solid #c7dbf7; border-radius: 10px; background: #f3f8ff; font-size: var(--fs-sm); }
.ins-strip b { color: var(--hospital-blue-900); }
.ins-strip .is-warn { color: #8a4b00; font-weight: 700; }
.ins-strip a { margin-left: auto; }
@media (max-width: 1100px) {
    .ins-two, .ins-two--split, .ins-split, .ins-corp { grid-template-columns: 1fr; }
    .ins-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
[data-ins-visit-payer][hidden] { display: none !important; }
/* Insurance screens fit 1366 × 768: the detail column scrolls inside, the page does not. */
.ins-two { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.ins-two > .ot-col, .ins-two > section.ot-card, .ins-corp > .ot-col { max-height: calc(100vh - 215px); overflow: auto; }
.ins-two > .ot-col > section.ot-card { margin-bottom: 0; }
.ins-two.ins-two--split { grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr); }
/* Accounts, Cashier & MIS (Phase 8, owner decisions 09-10-2026) — fits 1366 × 768 like the insurance screens. */
.acc-inline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.acc-inline .hospital-input { width: auto; min-width: 90px; }
.acc-w90 { width: 96px !important; min-width: 0 !important; }
.acc-card { display: grid; gap: 6px; align-content: start; }
.acc-narrow { max-width: 760px; }
.acc-span2 { grid-column: span 2; }
.acc-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.acc-sum > div { display: grid; padding: 5px 8px; border-radius: 8px; background: #f3f7ff; font-size: var(--fs-2xs); color: var(--hospital-slate); }
.acc-sum > div b { font-size: var(--fs-lg); color: var(--hospital-blue-900); }
.acc-sum .g { background: #e9f8ef; }
.acc-sum .g b { color: #136c31; }
.acc-sum .o { background: #fff6ec; }
.acc-sum .o b { color: #a14a00; }
.acc-var { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; font-size: var(--fs-sm); margin: 0 0 6px; }
.acc-var > span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.acc-var .t { font-weight: 700; color: var(--hospital-blue-900); border-top: 1px solid #dbe4f0; padding-top: 2px; }
.acc-find { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 0 0 6px; }
.acc-find .patient-search { min-width: 360px; }
.acc-credit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid #e2e8f0; color: #136c31; }
/* Clinical Note Addendum (owner 09-10-2026): voshms' addendum to a locked Patient Care entry; the original stays. */
/* Payment due message (owner 10-10-2026): blocks the screen until its seconds pass; voshms gets a strip. */
.pay-msg-overlay { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(16, 38, 74, .55); backdrop-filter: blur(3px); }
.pay-msg-box { width: min(540px, 100%); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.pay-msg-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #ffd2bb; background: linear-gradient(90deg, #fff1e6, #ffe3d3); }
.pay-msg-head b { color: #9a3412; font-size: var(--fs-lg); }
.pay-msg-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fb923c; color: #fff; font-weight: 700; }
.pay-msg-text { max-height: 50vh; overflow: auto; padding: 16px 20px; color: var(--hospital-ink); font-size: var(--fs-md); line-height: 1.6; white-space: pre-line; }
.pay-msg-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid #eef2f7; background: #fafcff; }
.pay-msg-count { color: var(--hospital-slate); font-size: var(--fs-sm); white-space: nowrap; }
.pay-msg-count b { color: #b3391d; }
.pay-msg-bar { flex: 1; height: 6px; overflow: hidden; border-radius: 3px; background: #eef2f7; }
.pay-msg-bar i { display: block; width: 100%; height: 100%; background: #fb923c; transition: width 1s linear; }
.pay-msg-close { padding: 8px 18px; border: 0; border-radius: 9px; background: var(--hospital-blue-700); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.pay-msg-close:disabled { background: #cbd5e1; cursor: not-allowed; }
body.pay-msg-open { overflow: hidden; }
.pay-msg-strip { position: fixed; z-index: 60; left: 50%; bottom: 8px; transform: translateX(-50%); padding: 4px 14px; border-radius: 999px; background: #fff1d6; color: #8a5a00; font-size: var(--fs-xs); font-weight: 600; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
.pay-msg-chip { display: inline-block; padding: 1px 9px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; }
.pay-msg-chip--on { background: #ffe9df; color: #b3391d; }
.pay-msg-chip--off { background: #eef2f7; color: #607089; }
.pay-msg-history { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; font-size: var(--fs-sm); color: var(--hospital-slate); }
/* Hospital Details field lengths and formats (owner 10-10-2026). */
.hospital-input.hd-ok { border-color: #34c26b; }
.hospital-input.hd-bad { border-color: #e0573a; background: #fff6f3; }
.hd-msg--ok { color: #136c31; }
.access-note-strip { position: fixed; z-index: 61; left: 50%; top: 6px; transform: translateX(-50%); max-width: min(760px, 92vw); padding: 5px 14px; border-radius: 999px; background: #ffe9df; color: #b3391d; font-size: var(--fs-xs); font-weight: 600; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .08); }
/* Referral doctor picker on OP Registration / Edit details (owner 10-10-2026): search + round green ＋ quick add */
.rd-pick { position: relative; display: flex; align-items: center; gap: 6px; }
.rd-pick .hospital-input { flex: 1 1 auto; min-width: 0; }
.rd-item { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; cursor: pointer; font-size: var(--fs-sm); color: var(--hospital-ink); }
.rd-item b { font-weight: var(--fw-semibold); }
.rd-item em { font-style: normal; color: var(--hospital-slate); font-size: var(--fs-xs); }
.rd-item:hover, .rd-item.is-active { background: #e3eefc; }
.rd-item--add { background: #ecfdf3; color: #166534; font-weight: var(--fw-semibold); border-top: 1px solid #bbf7d0; }
.rd-item--add:hover, .rd-item--add.is-active { background: #d1fadf; }
.rd-chosen { display: block; margin-top: 3px; color: #166534; font-size: var(--fs-xs); font-weight: var(--fw-semibold); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 14px 16px 6px; }
.rd-grid label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: #334155; }
.rd-grid input { height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-weight: 400; text-transform: uppercase; }
.rd-grid input:focus { outline: 2px solid #93c5fd; border-color: #3b82f6; }
.rd-w2 { grid-column: 1 / -1; }
.rd-msg { margin: 6px 16px 0; padding: 7px 10px; border-radius: 7px; font-size: var(--fs-xs); }
.rd-msg--bad { background: #fef2f2; color: #b91c1c; }
.rd-msg--warn { background: #fff7ed; color: #9a3412; }
.rd-use { margin-left: 6px; border: 1px solid #fb923c; background: #fff; color: #9a3412; border-radius: 6px; padding: 2px 8px; cursor: pointer; font-weight: 600; }
@media (max-width: 560px) {
    .rd-grid { grid-template-columns: 1fr; }
}
.rd-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; max-width: none; }
.rd-filters .hospital-field { flex: 0 0 auto; width: 150px; margin: 0; }
.rd-filters .hospital-field:first-child { width: 340px; }
.rd-filters .hospital-button { flex: 0 0 auto; width: auto; }
.rd-filters .rd-add-link { margin-left: auto; background: #16a34a; }
.rd-grid label { align-items: stretch; text-align: left; margin: 0; }
.rd-grid input { width: 100%; box-sizing: border-box; }
/* Referral doctor v2 (owner 10-10-2026, referral-v2.html): title / name parts / qualification / email / status */
.rd-v2 .rd-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 12px 16px 0; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: #334155; }
.rd-v2 .rd-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; padding: 12px 16px 4px; }
.rd-v2 .rd-grid3 > label, .rd-v2 .rd-grid3 > .rd-stat { display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0; text-align: left; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: #334155; }
.rd-v2 .rd-grid3 input:not([type=radio]) { width: 100%; box-sizing: border-box; height: 34px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 7px; font: inherit; font-weight: 400; text-transform: uppercase; background: #fff; }
.rd-v2 .rd-grid3 input[type=email] { text-transform: none; }
.rd-v2 .rd-grid3 input:not([type=radio]):focus { outline: 2px solid #93c5fd; border-color: #3b82f6; }
.rd-v2 .rd-grid3 input.hospital-input--invalid { border-color: #dc2626; }
.rd-req { color: #dc2626; }
.rd-radios { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rd-radio { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid #cbd5e1; border-radius: 999px; cursor: pointer; font-weight: 600; background: #fff; font-size: var(--fs-xs); color: #334155; }
.rd-radio input { margin: 0; width: 15px; height: 15px; flex: 0 0 15px; accent-color: #16a34a; }
.rd-radio:has(input:checked) { border-color: #16a34a; background: #ecfdf3; color: #166534; }
.rd-hint-off { color: #b91c1c; font-weight: 600; }
.hospital-form-card .rd-v2 { margin: -6px -16px 12px; }
/* Price Preview / Quotation (owner 10-10-2026, quotation.html) */
.qt-heading { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.qt-heading .hospital-meta-note { margin: 0; }
.qt-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin: 4px 0 10px; }
.qt-bar > label { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: #334155; margin: 0; }
.qt-bar .hospital-input { height: 36px; min-width: 150px; }
.qt-bar .qt-grow { flex: 1 1 300px; }
.qt-bar .qt-grow .hospital-input { width: 100%; }
.qt-bar .hospital-button { width: auto; flex: 0 0 auto; }
.qt-new-link { margin-left: auto; background: #16a34a; }
.qt-t { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.qt-t th { position: sticky; top: 0; z-index: 1; text-align: left; padding: 7px 10px; background: #f8fafc; color: #64748b; font-size: var(--fs-2xs); font-weight: 600; border-bottom: 1px solid #e2e8f0; }
.qt-t td { padding: 6px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.qt-t .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.qt-code { display: block; color: #64748b; font-size: var(--fs-2xs); }
.qt-code:empty { display: none; }
.qt-grp { display: inline-block; font-size: var(--fs-2xs); color: #475569; background: #f1f5f9; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.qt-lines td { padding-top: 4px; padding-bottom: 4px; }
.qt-lines input { height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; font-size: var(--fs-sm); width: 100%; box-sizing: border-box; background: #fff; }
.qt-lines input[readonly] { border-color: transparent; background: transparent; padding-left: 0; font-weight: 600; cursor: default; }
.qt-lines .qt-num { text-align: right; font-variant-numeric: tabular-nums; }
.qt-c-qty { width: 76px; }
.qt-c-def { width: 120px; }
.qt-c-rate { width: 150px; }
.qt-c-amt { width: 120px; }
.qt-lines tr.is-changed td { background: #fff7ed; }
.qt-lines tr.is-changed .qt-rate { border-color: #f97316; font-weight: 700; color: #c2410c; }
.qt-badge { display: inline-block; font-size: var(--fs-2xs); font-weight: 700; border-radius: 4px; padding: 1px 6px; margin: 2px 4px 0 0; white-space: nowrap; }
.qt-badge--chg { background: #ffedd5; color: #c2410c; }
.qt-badge--man { background: #e0e7ff; color: #3730a3; }
.qt-opt { padding: 6px 10px; font-size: var(--fs-sm); display: flex; justify-content: space-between; gap: 8px; cursor: pointer; }
.qt-opt.is-active, .qt-opt:hover { background: #e3eefc; }
.qt-opt-code { color: #64748b; font-size: var(--fs-2xs); }
.qt-opt--add { background: #eef2ff; color: #3730a3; font-weight: 600; border-top: 1px solid #c7d2fe; }
.qt-changed-note { color: #c2410c; }
/* Backup Utility → Generate Backup (owner 11-10-2026, backup-utility-plan.html). */
.bk-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
.bk-head .hospital-dashboard-title { margin: 0; }
.bk-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.bk-t th { text-align: left; padding: 8px 12px; background: #f8fafc; color: #64748b; font-size: 11.5px; font-weight: 600; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.bk-t td { padding: 8px 12px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; white-space: nowrap; }
.bk-t tr:last-child td { border-bottom: 0; }
.bk-t tbody tr:hover td { background: #f8fbff; }
.bk-t .n { text-align: right; font-variant-numeric: tabular-nums; }
/* Overlay: in progress / success / failed */
.bk-overlay { position: fixed; inset: 0; z-index: 5000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, .55); backdrop-filter: blur(3px); }
.bk-overlay.is-open { display: flex; animation: bk-fade .18s ease; }
@keyframes bk-fade { from { opacity: 0; } to { opacity: 1; } }
.bk-modal { width: min(500px, 100%); background: #fff; border-radius: 20px; padding: 28px 28px 22px; text-align: center; box-shadow: 0 30px 70px rgba(15, 23, 42, .35); animation: bk-pop .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes bk-pop { from { transform: translateY(8px) scale(.97); } to { transform: none; } }
.bk-modal h3 { margin: 14px 0 6px; font-size: 19px; font-weight: 700; color: #0f172a; }
.bk-modal p { margin: 0 auto; max-width: 400px; font-size: 13.5px; line-height: 1.55; color: #475569; }
.bk-ring { position: relative; width: 84px; height: 84px; margin: 0 auto; }
.bk-ring svg { width: 84px; height: 84px; transform: rotate(-90deg); }
.bk-ring circle { fill: none; stroke-width: 7; }
.bk-ring .bg { stroke: #e8f1ff; }
.bk-steps { list-style: none; margin: 18px auto 4px; padding: 0; max-width: 330px; display: grid; gap: 8px; text-align: left; }
.bk-steps li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #94a3b8; }
.bk-steps li i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #cbd5e1; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; }
.bk-steps li.now { color: #0f172a; font-weight: 600; }
.bk-steps li.now i { border-color: #1565d8; border-top-color: transparent; animation: bk-spin .8s linear infinite; }
.bk-steps li.done { color: #15803d; }
.bk-steps li.done i { border-color: #16a34a; background: #16a34a; color: #fff; }
@keyframes bk-spin { to { transform: rotate(360deg); } }
@keyframes bk-flash { 0%, 40% { background: #ecfdf5; } 100% { background: transparent; } }
/* Rate Card Master v2 (owner 11-10-2026, rate-card-master-v2-plan.html): tabs, filter bar, table, popups. */
.rc-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.rc-head h2 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.rc-tabs { display: flex; gap: 4px; border-bottom: 2px solid #e2e8f0; margin-bottom: 10px; }
.rc-tabs a { border: 0; background: none; padding: 8px 16px; font: 600 13.5px Inter, sans-serif; color: #475569; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.rc-tabs a.on { color: #1565d8; border-bottom-color: #1565d8; }
.rc-search { height: 30px; width: 220px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: 13px Inter, sans-serif; }
.rc-radio { display: inline-flex; align-items: center; gap: 2px; padding: 2px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.rc-radio label { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 6px; font-size: 12.5px; cursor: pointer; color: #334155; }
.rc-radio input { margin: 0; accent-color: #1565d8; }
.rc-radio label:has(input:checked) { background: #e8f1ff; color: #1565d8; font-weight: 600; }
.rc-sp { flex: 1; }
.rc-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; color: #0f172a; font: 600 12.5px Inter, sans-serif; cursor: pointer; }
.rc-btn:hover { background: #f1f5f9; }
.rc-btn--add { border-color: transparent; background: linear-gradient(135deg, #22b455, #15803d); color: #fff; }
.rc-btn--add:hover { filter: brightness(1.05); background: linear-gradient(135deg, #22b455, #15803d); }
.rc-btn--add:disabled { background: #cbd5e1; cursor: not-allowed; filter: none; }
.rc-btn--primary { border-color: transparent; background: #1565d8; color: #fff; }
.rc-btn--primary:hover { background: #0d4aa6; }
.rc-t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rc-t th { text-align: left; padding: 7px 10px; background: #f8fafc; color: #64748b; font-size: 11.5px; font-weight: 600; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.rc-t td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
.rc-t tbody tr:hover td { background: #f8fbff; }
.rc-t .act a { color: #1565d8; font-weight: 600; text-decoration: none; cursor: pointer; }
.rc-yes { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #15803d; background: #dcfce7; }
.rc-no { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; color: #b91c1c; background: #fee2e2; }
.rc-foot { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; font-size: 12px; color: #64748b; }
.rc-pages { display: flex; gap: 4px; }
.rc-pages a { min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; border: 1px solid #e2e8f0; }
.rc-pages a.on { background: #1565d8; color: #fff; border-color: #1565d8; }
/* modal */
.rc-ov { position: fixed; inset: 0; z-index: 4000; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,42,.45); }
.rc-ov.open { display: flex; }
.rc-modal { width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: #fff; border-radius: 14px; box-shadow: 0 24px 60px rgba(15,23,42,.3); }
.rc-modal--sm { width: min(420px, 100%); }
.rc-modal header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid #eef2f7; }
.rc-modal header h3 { margin: 0; font-size: 15px; font-weight: 700; }
.rc-modal header button { border: 0; background: none; font-size: 18px; cursor: pointer; color: #64748b; }
.rc-body { padding: 12px 16px; overflow: auto; display: grid; gap: 10px; }
.rc-f { display: flex; flex-direction: column; gap: 4px; }
.rc-f > span { font-size: 12px; font-weight: 600; color: #334155; }
.rc-f .req { color: #dc2626; }
.rc-f input[type=text], .rc-f input[type=number], .rc-f select, .rc-f input[list] { height: 32px; padding: 0 10px; border: 1px solid #cbd5e1; border-radius: 8px; font: 13px Inter, sans-serif; }
.rc-f .rc-radio { align-self: flex-start; }
.rc-f small { color: #64748b; font-size: 11.5px; }
.rc-err { color: #dc2626 !important; font-weight: 600; }
.rc-modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px; border-top: 1px solid #eef2f7; }
.rc-note { padding: 8px 10px; border-radius: 8px; background: #f5f9ff; border: 1px solid #dbeafe; font-size: 12px; color: #1e3a8a; }
.rc-warn { padding: 8px 10px; border-radius: 8px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 12px; color: #9a3412; }
.rc-toast { position: fixed; top: 64px; right: 16px; z-index: 5000; display: none; padding: 10px 14px; border-radius: 10px; background: #15803d; color: #fff; font: 600 13px Inter, sans-serif; box-shadow: 0 10px 24px rgba(21,128,61,.35); }
.rc-toast.show { display: block; }
.rc-head .hospital-dashboard-title { margin: 0; }
.rc-req { color: #dc2626; }
.rc-link { border: 0; background: none; padding: 0; color: #1565d8; font: 600 12.5px Inter, sans-serif; cursor: pointer; }
.rc-link:hover { text-decoration: underline; }
.rc-pages a { text-decoration: none; color: #0f172a; font-size: 12px; }
.rc-invalid { border-color: #dc2626 !important; box-shadow: 0 0 0 2px rgba(220, 38, 38, .12); }
.rc-btn--sm { height: 26px; margin-left: 8px; padding: 0 10px; font-size: 12px; }
.rc-btn { text-decoration: none; }
.rc-f select { height: 32px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 8px; font: 13px Inter, sans-serif; background: #fff; }
.rc-ov form.rc-modal { margin: 0; }
@media (max-width: 700px) {
    .rc-search { width: 100%; }
}
/* Common master list (owner 11-10-2026, master-common-plan.html): one-line toolbar, compact search, pager with gaps. */
.mst-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 8px; }
.mst-bar .rc-search { width: 180px; }
.mst-bar .rc-btn { padding: 0 9px; }
.mst-bar .rc-radio label { padding: 3px 7px; }
.mst-pages a, .mst-pages span { min-width: 28px; height: 26px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid #e2e8f0; font-size: 12px; text-decoration: none; color: #0f172a; }
.mst-pages a.on { background: #1565d8; color: #fff; border-color: #1565d8; }
.mst-pages .is-off { opacity: .4; }
.mst-pages .is-gap { border: 0; min-width: 14px; }
.mst-foot { border-top: 1px solid #eef2f7; }
.mst-head { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.mst-head .hospital-dashboard-title { margin: 0; }
.hospital-field label .rc-req { margin-left: 2px; }
.mst-select { height: 30px; width: auto; min-width: 110px; max-width: 160px; padding: 0 6px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font: 12.5px Inter, sans-serif; color: #0f172a; }
/* IP Bill Order (owner 11-10-2026): Source-wise / Group-wise switch on IP Billing, subtotal and unmapped rows. */
.ip-bo-switch { display: inline-flex; padding: 2px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.ip-bo-switch a { padding: 3px 10px; border-radius: 6px; font: 600 12px Inter, sans-serif; color: #334155; text-decoration: none; }
.ip-bo-switch a.is-on { background: #1565d8; color: #fff; }
.ip-bo-off { opacity: .45; cursor: not-allowed; }
/* Print bar (owner 11-10-2026, print-no-popup.html): hospital screens after saving; pharmacy after closing the popup. */
.vx-pb { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: #f0fdf4; border: 1px solid #86efac; color: #14532d; font-weight: 600; font-size: 13px; }
.vx-pb .sp { flex: 1; }
.vx-pb-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #c9d5e6; background: #fff; font: 600 12.5px Inter, sans-serif; color: #0f172a; cursor: pointer; text-decoration: none; }
.vx-pb-btn--pri { border-color: #138a4b; background: #138a4b; color: #fff; }
.vx-pb-x { border: 0; background: none; color: #15803d; font-size: 16px; cursor: pointer; padding: 0 4px; }
@media print {
    .vx-pb { display: none !important; }
}
/* Room category wise IP charge (owner 12-10-2026, preview room-category-rates.html). */
.service-category-field { margin-top: 8px; }
.service-category-tick { border-style: dashed; border-color: #c4b5fd; background: #faf5ff; }
.service-category-tick.is-on { border-style: solid; border-color: #8b5cf6; background: #f5f3ff; }
.service-category-tick input { accent-color: #7c3aed; }
.service-category-box { margin-top: 6px; border: 1px solid #ddd6fe; border-radius: 10px; overflow: hidden; }
.service-category-box > .hospital-field-hint { margin: 4px 10px 6px; }
.service-category-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 10px; font-size: var(--fs-xs); }
.service-category-head b { color: #15803d; }
.service-category-head b.is-incomplete { color: #c2410c; }
.service-category-head input { width: 86px; height: 26px; padding: 0 6px; text-align: right; }
.service-category-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.service-category-table th { padding: 4px 10px; background: #f5f3ff; color: #5b21b6; font-size: var(--fs-xs); font-weight: 600; text-align: left; }
.service-category-table th.num, .service-category-table td.num { text-align: right; }
.service-category-table td { padding: 3px 10px; border-top: 1px solid #f1f5f9; }
.service-category-table input { width: 110px; height: 28px; padding: 0 8px; text-align: right; }
.service-category-table input.is-invalid { border-color: #dc2626; background: #fef2f2; }
.service-category-state { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.service-category-state.is-set { color: #15803d; background: #dcfce7; }
.service-category-state.is-unset { color: #c2410c; background: #ffedd5; }
.service-category-state.is-free { color: #1565d8; background: #e8f1ff; }
.service-category-state.is-bad { color: #b91c1c; background: #fee2e2; }
.service-category-confirm { max-width: 420px; border: 0; border-radius: 14px; padding: 16px 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, .3); font-size: var(--fs-sm); }
.service-category-confirm::backdrop { background: rgba(15, 23, 42, .45); }
.service-category-confirm p { margin: 0 0 8px; }
.service-category-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.service-category-chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; color: #6d28d9; background: #ede9fe; white-space: nowrap; }
.service-category-chip.is-incomplete { color: #c2410c; background: #ffedd5; }
.service-category-missing { color: #c2410c; }
.ip-bill-as { margin-top: 6px; padding: 6px 10px; border: 1px solid #ddd6fe; border-radius: 10px; background: #faf5ff; font-size: var(--fs-sm); }
.ip-bill-as label { display: inline-flex; align-items: center; gap: 4px; margin-right: 12px; cursor: pointer; }
.ip-bill-as small { display: block; color: #5b6b82; font-size: var(--fs-xs); }
/* Bed Master v2 (owner 12-10-2026, bed-master-v2.html): room category filter beside the bed list; shared beds. */
.ip-bed-category { border: 2px solid #f97316 !important; font-weight: 600; }
/* IP Admission layout fix (owner 12-10-2026, ip-admission-bed-layout.html): bed line / compact "Bill as" in one cell. */
.ip-bed-side .ip-bed-info { margin: 0; padding-top: 6px; font-size: var(--fs-xs); color: var(--hospital-slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ip-bed-side .ip-bill-as:not([hidden]) + .ip-bed-info { display: none; }
.ip-bill-as--compact { display: flex; align-items: center; gap: 10px; min-height: 34px; margin: 0; padding: 0 8px; white-space: nowrap; overflow: hidden; }
.ip-bill-as--compact label { margin: 0; font-weight: 600; }
.ip-bill-as--compact input:checked + span { color: #6d28d9; font-weight: 800; }
/* Date of birth → Age (owner 12-10-2026, patient-dob-age.html): one age box with "yrs", greyed when it comes from the DOB. */
.opd-dob-age { display: contents; }
/* Age (Y / M / D) boxes (Design Page 2, owner 26-10-2026): patient-search/_age_ymd */
.vx-ymd { display: flex; gap: 4px; }
.vx-ymd label { display: flex; flex-direction: column; align-items: center; gap: 1px; margin: 0; font-weight: 400; }
.vx-ymd .hospital-input { width: 40px; padding: 0; text-align: center; }
.vx-ymd .hospital-input.vx-ymd-s { width: 36px; }
.vx-ymd .hospital-input[readonly] { background: #f1f5f9; color: #334155; }
.vx-ymd small { font-size: 9.5px; line-height: 1.1; color: var(--hospital-slate); }
.hospital-field.vx-ymd-f > label i { margin-left: 2px; color: #d94722; font-style: normal; }
.hospital-field.vx-ymd-f .vx-ymd label { margin: 0; font-size: inherit; font-weight: 400; }
.hospital-field.vx-ymd-f .vx-ymd .hospital-input { width: 44px; }
.vx-ymd-f .opd3-err[hidden] { display: none; }
.vx-dob-pair { display: grid; grid-template-columns: minmax(0, 1fr) 86px; gap: 6px; }
.ips .dd-grid--4.ips-new-patient { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr) minmax(0, 1.35fr) minmax(0, 1fr); }
@media (max-width: 1100px) {
    .ips .dd-grid--4.ips-new-patient { grid-template-columns: 1fr; }
}
/* Department "Case duration" (owner 12-10-2026): number + Day / Month / Year side by side. */
.department-case-duration { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px; }
/* Doctor Master v2 (owner 12-10-2026, doctor-master-sections.html): coloured sections, title radios, signature. */
.dm-col > .opd-sec { margin-bottom: 10px; }
.dm-full { grid-column: 1 / -1; }
.dm-titles { display: flex; gap: 2px; flex-wrap: nowrap; }
.dm-titles label { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 4px; white-space: nowrap; border: 1px solid #c9d4e3; border-radius: 8px; font-weight: 600; font-size: var(--fs-sm); cursor: pointer; background: #fff; }
.dm-titles label.is-on { border-color: #1565d8; background: #eaf2ff; color: #1565d8; }
.opd-sec--other { --sec: #475569; --sec-soft: #f1f5f9; }
.dm-signature-pick { cursor: pointer; }
.doctor-signature-thumb { max-height: 28px; max-width: 110px; border: 1px dashed #c7d7ee; border-radius: 6px; background: #fff; padding: 1px 4px; }
.doctor-master-form .opd-sec { gap: 0; padding: 0 0 4px; }
.doctor-master-form .opd-sec-note { margin-left: auto; color: var(--hospital-slate); font-size: var(--fs-xs); }
.dm-span2 { grid-column: span 2; }
/* Users v2 (owner 12-10-2026, users-v2.html): default password box + searchable multi-select with chips. */
.users-default-password {
    display: flex;
    gap: 6px;
    align-items: center;
}
.users-default-password .users-default-password-value {
    flex: 1 1 auto;
    min-width: 0;
    background: #f1f5f9;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    color: #0f172a;
}
.vx-multipick {
    position: relative;
}
.vx-multipick-box {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    min-height: 36px;
    height: auto;
    padding: 3px 6px;
    cursor: text;
}
.vx-multipick-chip {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 4px 1px 8px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
}
.vx-multipick-remove {
    border: 0;
    background: transparent;
    color: #1e40af;
    font-size: 14px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    border-radius: 999px;
}
.vx-multipick-remove:hover,
.vx-multipick-remove:focus-visible {
    background: #bfdbfe;
    color: #b91c1c;
}
.vx-multipick-input {
    flex: 1 1 120px;
    min-width: 100px;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    padding: 4px 2px;
}
.vx-multipick-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 3px);
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
    padding: 4px;
}
.vx-multipick-option,
.vx-multipick-none {
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
}
.vx-multipick-option {
    cursor: pointer;
}
.vx-multipick-option:hover,
.vx-multipick-option.is-active {
    background: #eff6ff;
    color: #1d4ed8;
}
.vx-multipick-none {
    color: #64748b;
}
.hospital-users-table .hospital-table-action-heading {
    text-align: right;
}
/* New OPD Registration v3 (owner 13-10-2026, opd-registration-v3.html): five-box search, existing-patient chips, one
   continuous form with six light-coloured sections (12-column rows), sticky Register footer, small popups. */
.opd3 { display: flex; flex-direction: column; gap: 0; }
.opd3 .opd3-search { margin-bottom: 4px; padding: 5px 10px; }
.opd3 .ph5 .ph5-field .hospital-input { height: 28px; }
.ph5-dd--basic .ph5-head, .ph5-dd--basic .ph5-row { grid-template-columns: 130px minmax(0, 1fr) 90px 140px; }
.opd3-picked { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 4px; font-size: var(--fs-xs); }
.opd3-picked[hidden] { display: none; }
.opd3-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font: inherit; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.opd3-chip--ex { background: #e0f2fe; color: #075985; }
.opd3-chip--ex button { padding: 0 0 0 2px; border: 0; background: none; color: #075985; font-weight: 800; cursor: pointer; }
.opd3-chip--due { border: 1px solid #fecaca; background: #fee2e2; color: #b91c1c; cursor: pointer; }
.opd3-chip--due:hover { background: #fecaca; }
.opd3-chip--due[hidden] { display: none; }
.opd3-form { display: grid; gap: 3px; padding: 4px; border: 1px solid var(--hospital-line, #e2e8f0); border-radius: 10px; background: #fff; }
.opd3-sec { --tint: #f3f8ff; --ink2: #1d4ed8; --dot: #bfdbfe; padding: 3px 10px 7px; border-left: 3px solid var(--dot); border-radius: 7px; background: var(--tint); }
.opd3-sec--2 { --tint: #f1fbf4; --ink2: #15803d; --dot: #bbf7d0; }
.opd3-sec--3 { --tint: #f8f5ff; --ink2: #6d28d9; --dot: #ddd6fe; }
.opd3-sec--4 { --tint: #effbfb; --ink2: #0f766e; --dot: #99f6e4; }
.opd3-sec--5 { --tint: #fffaf0; --ink2: #b45309; --dot: #fde68a; }
.opd3-sec--6 { --tint: #fff5f6; --ink2: #be123c; --dot: #fecdd3; }
.opd3-sec-h { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; color: var(--ink2); font-size: var(--fs-xs); font-weight: 800; }
.opd3-n { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--dot); color: var(--ink2); font-size: 10px; }
.opd3-line { flex: 1; height: 1px; background: var(--dot); }
.opd3-g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px 10px; align-items: end; }
.opd3-sub { margin-top: 5px; }
.opd3-sub[hidden] { display: none; }
.opd3-c2 { grid-column: span 2; }
.opd3-c3 { grid-column: span 3; }
.opd3-c4 { grid-column: span 4; }
.opd3-c5 { grid-column: span 5; }
.opd3-c10 { grid-column: span 10; }
.opd3-f { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; margin: 0; }
.opd3-f > span:first-child, .opd3 .city-address label, .opd3 .rd-field > label { display: flex; gap: 4px; margin: 0; overflow: hidden; color: #334155; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; text-overflow: ellipsis; }
.opd3-f > span i, .opd3 .hospital-required-star { margin-left: 1px; color: #dc2626; font-style: normal; }
.opd3 .hospital-input { height: 30px; padding: 0 8px; border-radius: 6px; font-size: var(--fs-sm); box-shadow: none; transform: none; }
.opd3 .hospital-input[readonly] { background: #f1f5f9; color: #475569; }
.opd3 .hospital-field-hint, .opd3 .city-auto, .opd3 .rd-chosen { display: none !important; }
.opd3-err { position: absolute; top: 100%; left: 0; z-index: 2; color: #b91c1c; font-size: 10.5px; font-style: normal; white-space: nowrap; }
.opd3-err[hidden] { display: none; }
.opd3-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.opd3-row > .hospital-input { flex: 1; min-width: 0; }
.opd3-row .hospital-button--compact { height: 28px; padding: 0 9px; white-space: nowrap; }
.opd3-yn { display: inline-flex; align-self: flex-start; height: 30px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; }
.opd3-yn label { display: inline-flex; align-items: center; margin: 0; padding: 0 12px; border-right: 1px solid #cbd5e1; color: #475569; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; user-select: none; }
.opd3-yn label:last-child { border-right: 0; }
.opd3-yn input { position: absolute; opacity: 0; pointer-events: none; }
.opd3-yn label:has(input:checked) { background: #1565d8; color: #fff; }
.opd3-yn label:has(input:focus-visible) { outline: 2px solid #1565d8; outline-offset: -2px; }
.opd3-yn--red label:has(input[value="1"]:checked), .opd3-yn--red label:has(input[value="yes"]:checked) { background: #dc2626; }
.opd3-yn--bad { border-color: #dc2626; }
.opd3-yn.is-off { opacity: .45; }
.opd3-thumb { flex: 0 0 auto; display: grid; place-items: center; width: 30px; height: 30px; border: 1px dashed #94a3b8; border-radius: 6px; background: #f8fafc center / cover no-repeat; color: #94a3b8; font-size: 14px; text-decoration: none; }
.opd3-thumb.has-photo { border-style: solid; border-color: #60a5fa; }
.opd3 .opd3-address { display: grid; grid-template-columns: 3fr 3fr 2fr 1.15fr 1fr; gap: 4px 10px; align-items: end; padding: 0; border: 0; }
.opd3 .opd3-address > .hospital-field { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.opd3-pick-wrap { position: relative; }
.opd3-pick { position: absolute; z-index: 30; top: 100%; left: 0; right: 0; max-height: 220px; margin-top: 2px; overflow-y: auto; border: 1px solid #c9d4e3; border-radius: 8px; background: #fff; box-shadow: 0 12px 26px rgba(16, 38, 74, .16); }
.opd3-pick[hidden] { display: none; }
.opd3-pick > div { padding: 5px 10px; border-bottom: 1px solid #f1f5f9; font-size: var(--fs-sm); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.opd3-pick > div:hover, .opd3-pick > div.is-active { background: #e8f1ff; }
.opd3-pick-empty { margin: 0; padding: 6px 10px; color: var(--hospital-slate); font-size: var(--fs-xs); }
.opd3-rd .rd-field { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.opd3-rd .rd-pick { display: flex; align-items: center; gap: 6px; }
.opd3-note-btn { position: relative; height: 24px !important; padding: 0 9px !important; font-size: var(--fs-xs) !important; }
.opd3-note-btn b { position: absolute; top: -6px; right: -7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #f59e0b; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.opd3-note-btn b[hidden] { display: none; }
/* Time "hh:mm AM" + ▲▼ (Design Page 2, owner 26-10-2026): patient-search/_time12 */
.vx-tstep { display: flex; align-items: stretch; padding: 0 0 0 8px; overflow: hidden; }
.vx-tstep-text { flex: 1 1 auto; min-width: 0; height: auto; padding: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; }
.vx-tstep-btns { display: flex; flex: 0 0 24px; flex-direction: column; border-left: 1px solid #e2e8f0; }
.vx-tstep-btns button { display: flex; flex: 1 1 0; align-items: center; justify-content: center; padding: 0; border: 0; background: transparent; color: #334155; cursor: pointer; }
.vx-tstep-btns button + button { border-top: 1px solid #e2e8f0; }
.vx-tstep-btns button:hover { background: #eff6ff; color: #1d4ed8; }
.opd3-ampm { display: inline-flex; flex: 0 0 auto; height: 30px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 6px; }
.opd3-ampm button { padding: 0 8px; border: 0; background: #fff; color: #475569; font: inherit; font-size: var(--fs-xs); font-weight: 700; cursor: pointer; }
.opd3-ampm button.is-on { background: #1565d8; color: #fff; }
.opd3 [data-category-wrap].is-hidden { visibility: hidden; }
.opd3-fee { max-width: 110px; }
.opd3-fee-note { overflow: hidden; color: var(--hospital-slate); font-size: 10.5px; white-space: nowrap; text-overflow: ellipsis; }
.opd3-fee-note.is-red { color: #b91c1c; font-weight: 600; }
.opd3-cfg { grid-column: 1 / -1; margin: 2px 0 0; color: #b91c1c; font-size: var(--fs-xs); font-weight: 600; }
.opd3-cfg[hidden] { display: none; }
.opd3-foot { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 7px 12px; border: 1px solid var(--hospital-line, #e2e8f0); border-radius: 10px; background: #fff; box-shadow: 0 -4px 12px rgba(15, 23, 42, .06); }
.opd3-sum { flex: 1; min-width: 0; overflow: hidden; color: var(--hospital-slate); font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; }
.opd3-sum b { color: var(--hospital-ink); }
.opd3-submit { background: #16a34a !important; border-color: #16a34a !important; }
.opd3-dlg { width: min(460px, 94vw); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 20px 60px #10264a40; }
.opd3-dlg--due { width: min(760px, 96vw); }
.opd3-dlg::backdrop { background: rgba(16, 38, 74, .38); }
.opd3-dlg header, .opd3-dlg footer { display: flex; align-items: center; gap: 8px; padding: 9px 14px; }
.opd3-dlg header { border-bottom: 1px solid #dfe7f1; }
.opd3-dlg header button { margin-left: auto; border: 0; background: none; color: var(--hospital-slate); font-size: 16px; cursor: pointer; }
.opd3-dlg footer { justify-content: flex-end; border-top: 1px solid #dfe7f1; background: #f8fafc; }
.opd3-dlg-in { padding: 10px 14px; }
.opd3-dlg textarea { width: 100%; min-height: 72px; }
@media (max-width: 1100px) {
    .opd3-g { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .opd3-c4, .opd3-c5, .opd3-c10 { grid-column: span 6; }
    .opd3-c3 { grid-column: span 3; }
    .opd3 .opd3-address { grid-template-columns: 1fr 1fr; }
}
/* OPD v3 fit at 1366 × 768 (checked in the browser 13-10-2026): 28 px boxes, one-line labels of one height, auto-width
   footer buttons (the base .hospital-button is full width). */
.opd3 .hospital-input { height: 28px; }
.opd3-yn, .opd3-ampm { height: 28px; }
.opd3-sec { padding: 2px 10px 5px; }
.opd3-sec-h { height: 18px; margin: 0; }
.opd3-g { gap: 2px 10px; }
.opd3-f > span:first-child, .opd3 .city-address label, .opd3 .rd-field > label { height: 15px; line-height: 15px; }
.opd3 .city-address > .hospital-field, .opd3 .rd-field { gap: 2px; }
.opd3-note-btn { height: 18px !important; border-radius: 6px !important; }
.opd3 .opd3-search { padding: 4px 10px; }
.opd3 .ph5 .ph5-field .hospital-input { height: 26px; }
.opd3 .hospital-button { width: auto; }
.opd3-foot { padding: 5px 12px; }
.opd3-foot .hospital-button { flex: 0 0 auto; width: auto; padding: 7px 18px; border-radius: 8px; }
.pe-identity-value { display: flex; align-items: center; letter-spacing: .04em; background: #f1f5f9; }
/* OPD Registration card layout (owner 13-10-2026, opd-registration-v4.html; also IP Admission v5): every section its own
   card — coloured header strip, white body, left colour line — 1 full width, then two columns, then the last full width. */
.opd3 [hidden] { display: none !important; }
.opd3-form { gap: 8px; padding: 0; border: 0; background: transparent; }
.opd3-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: stretch; }
.opd3-col { display: grid; gap: 8px; align-content: start; }
.opd3-col > .opd3-sec:last-child { height: 100%; }
.opd3-sec { padding: 0 0 7px; border: 1px solid var(--dot); border-left: 4px solid var(--ink2); border-radius: 8px; background: #fff; }
.opd3-sec-h { height: 26px; margin: 0 0 4px; padding: 0 10px; border-bottom: 1px solid var(--dot); border-radius: 0 7px 0 0; background: var(--tint); font-size: var(--fs-xs); }
.opd3-sec > .opd3-g { padding: 0 10px; row-gap: 4px; }
.opd3-c6 { grid-column: span 6; }
.opd3-c7 { grid-column: span 7; }
/* Address 1 / 2 · City · State · PIN become cells of the Contact card's grid: A1 5 · A2 4 / City 5 · State 4 · PIN 3. */
.opd3 .opd3-address { display: contents; }
.opd3 .opd3-address > .city-address-line1, .opd3 .opd3-address > .city-address-city { grid-column: span 5; }
.opd3 .opd3-address > .city-address-line2 { grid-column: span 4; }
.opd3 .opd3-address > .hospital-field:nth-child(4) { grid-column: span 4; }
.opd3 .opd3-address > .hospital-field:nth-child(5) { grid-column: span 3; }
.opd3 .opd3-address > .city-add, .opd3 .opd3-address > .hospital-error { grid-column: 1 / -1; }
.opd3 .opd3-address > .hospital-field { display: flex; flex-direction: column; gap: 2px; margin: 0; }
@media (max-width: 1100px) {
    .opd3-cols { grid-template-columns: 1fr; }
}
.ph5-row--blocked { background: #fff5f5; color: #94a3b8; cursor: not-allowed; }
.ph5-row--blocked:hover, .ph5-row--blocked.is-active { background: #fee2e2; }
.ph5-row--blocked .ph5-adm { background: #fee2e2; color: #b91c1c; }
/* Shared identity cells (patient-search/_identity) sit in the parent grid. */
/* IP Admission v5 (owner 13-10-2026, ip-admission-v5.html): the OPD v3 cards + IP parts. */
.ipa .opd3-sec--att { --tint: #f5f7ff; --ink2: #4338ca; --dot: #c7d2fe; }
.dd-heading .ph-sp { flex: 1; }
.ipa .opd3-yn label.ipa-red:has(input:checked) { background: #dc2626; }
.ipa-mini { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; color: #6d28d9; font-size: var(--fs-xs); font-weight: 700; }
.ipa-mini[hidden] { display: none; }
.ipa-mini .opd3-yn { height: 20px; }
.ipa-mini .opd3-yn label { padding: 0 8px; font-size: 10.5px; }
.ipa .ip-bed-side { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.ipa .ip-bed-side > span[data-bill-as-label] { height: 15px; line-height: 15px; color: #334155; font-size: var(--fs-xs); font-weight: 600; }
.ipa-bedline { overflow: hidden; color: var(--hospital-slate); font-size: 11px; line-height: 28px; white-space: nowrap; text-overflow: ellipsis; }
.ipa .ip-bill-as--compact:not([hidden]) + .ipa-bedline { line-height: 14px; }
.ipa-policy-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; }
.ipa-policy-grid label { display: flex; flex-direction: column; gap: 2px; font-size: var(--fs-xs); font-weight: 600; color: #334155; }
.ipa-policy-grid .hospital-input { height: 30px; }
.ipa [data-paid-by-wrap].is-hidden { visibility: hidden; }
/* Roles & Menu Access v2 (owner 13-10-2026, roles-access-v2.html): roles / user · menu tree · live sidebar, sticky Save. */
.mt-role { display: grid; grid-template-columns: 1fr auto; gap: 2px 6px; padding: 7px 9px; border: 1px solid var(--hospital-line, #e2e8f0); border-radius: 8px; color: var(--hospital-ink); text-decoration: none; }
.mt-role:hover { background: #f8fafc; }
.mt-role.is-on { border-color: #93c5fd; background: #eff6ff; }
.mt-new-role { display: flex; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--hospital-line, #e2e8f0); }
.mt-new-role .hospital-button { width: auto; white-space: nowrap; }
.mt-switch { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 9px; border: 1px solid #cbd5e1; border-radius: 7px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; cursor: pointer; }
.mt-switch.is-on { border-color: #c4b5fd; background: #f5f3ff; color: #5b21b6; }
.mt-box { display: inline-grid; place-items: center; width: 12px; height: 12px; border: 1.5px solid #94a3b8; border-radius: 3px; background: #fff; }
.mt-box.is-on { border-color: #1565d8; background: #1565d8; }
.mt-box.is-part { border-color: #1565d8; background: #dbeafe; }
.mt-box.is-part::after { content: ''; width: 6px; height: 2px; background: #1565d8; }
.mt-grp { margin-bottom: 7px; overflow: hidden; border: 1px solid var(--hospital-line, #e2e8f0); border-radius: 8px; }
.mt-grp-h { display: flex; align-items: center; gap: 7px; padding: 5px 9px; background: #f8fafc; }
.mt-grp--special { border-color: #fde68a; }
.mt-grp--special .mt-grp-h { background: #fffbeb; }
.mt-caret { width: 16px; padding: 0; border: 0; background: none; color: var(--hospital-slate); font-size: 11px; cursor: pointer; transition: transform .15s; }
.mt-grp.is-closed .mt-caret { transform: rotate(-90deg); }
.mt-grp.is-closed .mt-grp-b { display: none; }
.mt-grp-b { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 14px; padding: 4px 9px 7px 32px; }
.mt-node { display: flex; align-items: center; gap: 7px; min-width: 0; min-height: 24px; margin: 0; font-size: var(--fs-sm); cursor: pointer; }
.mt-node input { width: 15px; height: 15px; margin: 0; accent-color: #1565d8; flex: 0 0 auto; cursor: pointer; }
.mt-node--l1 { font-weight: 700; }
.mt-node--l1 .mt-label { white-space: nowrap; }
.mt-node--l3 { padding-left: 22px; }
.mt-grp-b > .mt-node:has(+ .mt-node--l3) { grid-column: 1 / -1; font-weight: 600; }
.mt-node.is-hit .mt-label { border-radius: 3px; background: #fef08a; }
.mt-node.is-removed .mt-label { color: #94a3b8; text-decoration: line-through; }
.mt-src--role { background: #f1f5f9; color: #475569; }
.mt-src--extra { background: #dcfce7; color: #15803d; }
.mt-src--removed { background: #fee2e2; color: #b91c1c; }
.mt-pv-main { padding: 4px 8px; border-radius: 6px; color: #111; font-weight: 700; }
.mt-pv-main.is-heading { padding-top: 8px; color: var(--hospital-slate); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; }
.mt-pv-main.is-heading::after { content: ' · heading'; font-size: 10px; font-weight: 500; text-transform: none; }
.mt-pv-sub { padding: 3px 8px 3px 20px; color: #334155; }
.mt-pv-sub.is-heading { color: var(--hospital-slate); font-style: italic; }
.mt-pv-sub--3 { padding-left: 32px; }
.mt-pv-empty { margin: 0; padding: 10px 8px; color: var(--hospital-slate); }
.mt-user-list { position: absolute; z-index: 30; top: calc(100% + 2px); left: 0; right: 0; max-height: 240px; overflow-y: auto; border: 1px solid #c9d4e3; border-radius: 8px; background: #fff; box-shadow: 0 12px 26px rgba(16, 38, 74, .16); }
.mt-user-list a { display: block; padding: 6px 9px; border-bottom: 1px solid #f1f5f9; color: var(--hospital-ink); font-size: var(--fs-sm); text-decoration: none; }
.mt-user-list a:hover, .mt-user-list a.is-active { background: #e8f1ff; }
/* .is-active = keyboard highlight (owner 14-10-2026) */
.mt-hint { color: var(--hospital-slate); font-size: var(--fs-xs); }
.mt-savebar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border: 1px solid var(--hospital-line, #e2e8f0); border-radius: 10px; background: #fff; box-shadow: 0 -4px 12px rgba(15, 23, 42, .05); }
.mt-savebar .hospital-button { width: auto; padding: 7px 16px; border-radius: 8px; }
.mt-save { background: #16a34a !important; border-color: #16a34a !important; }
.mt-save:disabled { opacity: .5; cursor: default; }
/* IP Date Rectification (owner 14-10-2026, ip-date-rectification.html): two big options, IP ID → current value → new
   date / time + reason, history on the right, Preview & Submit popup. Sections reuse the OPD v3 cards (.opd3-sec). */
.idr { min-height: 0; }
.idr-mode { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border: 2px solid var(--hospital-line, #e2e8f0); border-radius: 10px; background: #fff; color: var(--hospital-ink); text-decoration: none; }
.idr-mode:hover { border-color: #93c5fd; }
.idr-mode b { display: block; font-size: var(--fs-md); }
.idr-mode small { color: var(--hospital-slate); font-size: var(--fs-xs); }
.idr-mode-ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #f1f5f9; font-size: 17px; font-weight: 800; }
.idr-mode.is-on { border-color: #1565d8; background: #eff6ff; }
.idr-mode.is-on .idr-mode-ic { background: #1565d8; color: #fff; }
.idr-mode--discharge.is-on { border-color: #ea580c; background: #fff7ed; }
.idr-mode--discharge.is-on .idr-mode-ic { background: #ea580c; }
.idr-chip { display: inline-flex; padding: 1px 8px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.opd3-sec-h .idr-chip { margin-left: 4px; }
.opd3-sec-h small { margin-left: auto; color: var(--hospital-slate); font-weight: 600; }
.idr-confirm { background: #16a34a !important; border-color: #16a34a !important; }
.idr .opd3-foot .hospital-button { width: auto; }
.idr .opd3-submit:disabled { opacity: .5; cursor: default; }
/* Keyboard highlight (owner 14-10-2026): the line ↑ / ↓ is on in the page search lists. */
.ph-picker-option.is-active, .ot-list-row.is-active, .rad-suggest button.is-active, .pam-drop a.is-kbd, .pam-plist a.is-kbd, .pc-request-item.is-kbd { background: #e6f0ff; box-shadow: inset 3px 0 0 #1565d8; }
/* Touch screen / touchpad (owner 14-10-2026): a tap is a click at once — no double-tap zoom wait on buttons, links,
   menus, list rows and form boxes. */
a, button, summary, label, input, select, textarea, [role="option"], [role="button"], [data-index], [data-i], [data-pick],
.hospital-combo-item, .vx-search-list li, .ph5-row, .patient-search-result, .city-picker-item, .rd-item, .qt-opt { touch-action: manipulation; }
/* Auto line (owner 14-10-2026, auto-line.html): the one empty row at the bottom of OP Bill, IP Billing → Add services,
   Purchase Order, Opening Stock, Stock Transfer and Stock Adjustment — nothing to remove or tick on it. */
tr.is-auto-blank > td, .ip-add-row.is-auto-blank { background: #fbfdff; }
.is-auto-blank [data-remove-row], .is-auto-blank [data-ip-remove-row], .is-auto-blank [data-ob-select] { visibility: hidden; }
.ob-auto-line-error, .ph-auto-line-error { display: block; margin-top: 2px; color: #b91c1c; font-size: var(--fs-xs); font-style: normal; font-weight: 600; }
/* Keyboard Rule B (owner 15-10-2026, keyboard-rule-b.html): Enter from the last box puts the cursor on the main button
   (green glow, not pressed); the Ctrl+S / Ctrl+Enter hint on [data-hotkey] buttons. */
.vx-enter-ready { outline: 0; box-shadow: 0 0 0 4px rgba(22, 163, 74, .38) !important; }
.vx-hotkey-hint { margin-left: 4px; font: 700 .6rem/1 ui-monospace, Consolas, monospace; padding: 2px 4px; border-radius: 4px; background: rgba(255, 255, 255, .22); border: 1px solid rgba(255, 255, 255, .35); color: inherit; opacity: .85; }
.hospital-button--secondary .vx-hotkey-hint { background: #eef2f8; border-color: #d3dcea; color: #3b4d66; }
.ps-modal:focus, .prx-modal:focus, .pg-modal:focus, .pw-modal:focus, .rc-modal:focus, .bk-modal:focus, .hd-modal:focus, [role="dialog"]:focus { outline: none; }
/* OP/IP Reports main menu (owner 17-10-2026): a thin line between the last OP report and the first IP report. */
.hospital-sidebar-sublink[data-menu-key^="op-report-"] + .hospital-sidebar-sublink[data-menu-key^="ip-report-"] { position: relative; margin-top: 5px; }
.hospital-sidebar-sublink[data-menu-key^="op-report-"] + .hospital-sidebar-sublink[data-menu-key^="ip-report-"]::before { content: ""; position: absolute; left: 8px; right: 8px; top: -5px; border-top: 1px solid #dbe3ee; }
/* OP/IP Receipt Report (26-10-2026): first item of OP/IP Reports, a thin line before the OP list. */
.hospital-sidebar-sublink[data-menu-key="opip-report-receipts"] + .hospital-sidebar-sublink[data-menu-key^="op-report-"] { position: relative; margin-top: 5px; }
.hospital-sidebar-sublink[data-menu-key="opip-report-receipts"] + .hospital-sidebar-sublink[data-menu-key^="op-report-"]::before { content: ""; position: absolute; left: 8px; right: 8px; top: -5px; border-top: 1px solid #dbe3ee; }
/* Price Preview suggestions (owner 17-10-2026): services of the chosen rate card with OP / IP price, over the page. */
.pp-list { max-height: 330px; overflow-y: auto; }
.pp-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 100px 130px; gap: 8px; align-items: center; padding: 6px 12px; }
.pp-head { background: #eff6ff; color: #1e3a8a; font-size: var(--fs-2xs); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.pp-opt { border-top: 1px solid #f1f5f9; cursor: pointer; font-size: var(--fs-sm); color: #0f172a; }
.pp-opt:hover, .pp-opt.is-active { background: #e3eefc; }
.pp-opt mark { background: #fde68a; color: inherit; padding: 0; border-radius: 2px; }
.pp-opt i { color: #64748b; font-size: var(--fs-2xs); }
.pp-opt small { display: block; color: #64748b; font-size: var(--fs-2xs); }
.pp-n { text-align: right; font-variant-numeric: tabular-nums; }
.pp-foot { padding: 6px 12px; font-size: var(--fs-2xs); color: #64748b; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.pp-none { padding: 12px; font-size: var(--fs-sm); color: #64748b; }
/* OP Appointment List / Missed (owner 17-10-2026, op-appointment-report.html). */
.apr-f { display: flex; flex-direction: column; gap: 3px; font-size: var(--fs-xs); font-weight: 600; color: #334155; }
.apr-f > label, .apr-f > span:first-child { margin: 0; }
.apr-in { height: 32px; padding: 0 9px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #0f172a; font: inherit; font-size: var(--fs-sm); font-weight: 400; }
.apr-in:focus { outline: 0; border-color: #1565d8; box-shadow: 0 0 0 3px rgba(21, 101, 216, .14); }
/* Time filter = the ▲▼ box of the registration screens (owner 26-10-2026). */
.apr-btn { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #0f172a; font: inherit; font-size: var(--fs-sm); font-weight: 700; text-decoration: none; cursor: pointer; }
.apr-btn--primary { background: #1565d8; border-color: #1565d8; color: #fff; }
/* OP Registration Report (owner 17-10-2026, op-registration-report.html): the filter bar uses the .apr-* styles above. */
.rgr-doctor { width: 230px; }
.rgr-doctor .hospital-combo-input { height: 32px; min-height: 32px; padding: 0 9px; border-radius: 7px; background: #fff; font-size: var(--fs-sm); }
.rgr-in--user { width: 150px; }
.rgr-in--category { width: 170px; }
.rgr-in--small { width: 120px; }
.rgr-out { display: flex; flex-direction: column; gap: 10px; overflow: auto; min-height: 120px; }
.rgr-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.rgr-sum .rgr-wide { grid-column: 1 / -1; }
.rgr-sumh { display: flex; align-items: center; gap: 8px; margin: 2px 0 -2px; font-size: var(--fs-sm); font-weight: 800; color: #0f172a; flex: 0 0 auto; }
.rgr-sumh::after { content: ""; flex: 1; height: 1px; background: #cbd5e1; }
.rgr-wait { padding: 34px 20px; text-align: center; color: #64748b; background: #fff; border: 2px dashed #cbd5e1; border-radius: 10px; flex: 0 0 auto; }
.rgr-wait b { color: #0f172a; }
.rgr-dirty { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; background: #fef3c7; color: #b45309; font-size: var(--fs-2xs); font-weight: 700; vertical-align: 3px; }
.rgr-dirty[hidden] { display: none; }
.apr-btn.is-disabled { opacity: .45; cursor: not-allowed; }
.rgr-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow: hidden; flex: 0 0 auto; }
.rgr-box h3 { display: flex; gap: 8px; margin: 0; padding: 7px 12px; background: #eff6ff; color: #1e3a8a; border-bottom: 1px solid #e2e8f0; font-size: var(--fs-sm); font-weight: 800; }
.rgr-box h3 span { margin-left: auto; color: #64748b; font-weight: 500; }
.rgr-empty { padding: 24px; text-align: center; color: #64748b; }
.rgr-t { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.rgr-t th { position: sticky; top: 0; background: #f8fafc; color: #334155; font-size: var(--fs-2xs); font-weight: 700; text-align: left; padding: 6px 8px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.rgr-t td { padding: 5px 8px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; }
.rgr-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.rgr-t tfoot td { font-weight: 800; background: #f8fafc; border-top: 2px solid #e2e8f0; }
.rgr-tag { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: var(--fs-2xs); font-weight: 700; }
.rgr-tag--new { background: #dbeafe; color: #1e40af; }
.rgr-tag--old { background: #f1f5f9; color: #334155; }
.rgr-tag--mlc { background: #fee2e2; color: #b91c1c; }
/* OP Registration Report v3 (owner 17-10-2026): time / ABHA address under the cell, empty = dash, wide table scrolls sideways. */
.rgr-sub { display: block; color: #64748b; font-size: var(--fs-2xs); }
.rgr-na { color: #94a3b8; }
/* OP Bill Report (owner 17-10-2026, op-bill-report-v2.html): shares the .apr-* bar and .rgr-* boxes of the OP Registration Report. */
.obr-search { width: 200px; }
.obr-search .hospital-combo-input { height: 32px; min-height: 32px; padding: 0 9px; border-radius: 7px; background: #fff; font-size: var(--fs-sm); }
.obr-in--user { width: 130px; }
.obr-in--category { width: 150px; }
.obr-in--mode { width: 130px; }
.obr-in--yes { width: 84px; }
.obr-due { color: #b91c1c; font-weight: 700; }
.rgr-tag.obr-tag--paid { background: #dcfce7; color: #15803d; }
.rgr-tag.obr-tag--due { background: #fef3c7; color: #b45309; }
.rgr-t tr.obr-line td { background: #f8fafc; color: #475569; font-size: var(--fs-2xs); border-bottom-style: dashed; }
.rgr-t tr.obr-line td:first-child { padding-left: 22px; }
.obr-chip { display: inline-block; margin-right: 5px; padding: 0 6px; border-radius: 4px; font-size: 10px; font-weight: 700; }
.obr-chip--receipt { background: #e0e7ff; color: #3730a3; }
.obr-chip--refund { background: #fee2e2; color: #991b1b; }
/* Sidebar ☰ (owner 17-10-2026, refresh-reset-sidebar.html): a small 3-line button right of the logo hides / shows the
   sidebar; hidden = the screen uses the full width. */
.hospital-app-header--brand { grid-template-columns: var(--vx-sidebar-w) auto minmax(0, 1fr) auto; }
.hospital-sidebar-toggle { align-self: center; display: inline-grid; place-items: center; width: 32px; height: 32px; margin-left: 10px; padding: 0;
    border: 1px solid transparent; border-radius: 8px; background: transparent; cursor: pointer; }
/* Owner 26-11-2026 (header-left-brand.html H1): ☰ transparent — no white box, no border; light tint on mouse-over. */
.hospital-sidebar-toggle:hover { background: rgba(30, 58, 138, 0.08); }
.hospital-sidebar-toggle:focus-visible { outline: 2px solid #1565d8; outline-offset: 2px; }
.hospital-sidebar-toggle span { display: block; width: 16px; height: 2px; border-radius: 2px; background: #1e3a8a; box-shadow: 0 -5px 0 #1e3a8a, 0 5px 0 #1e3a8a; }
.vx-sidebar-hidden .hospital-app-shell .hospital-app-layout { grid-template-columns: minmax(0, 1fr); }
.vx-sidebar-hidden .hospital-app-shell .hospital-sidebar { display: none; }
@media (max-width: 1023px) {
    .hospital-app-header--brand { grid-template-columns: auto auto minmax(0, 1fr) auto; }
}
/* OP / IP Bill Payment Collection (owner 21-10-2026, bill-payment-collection.html): red = patient pays, green = hospital
   refunds, amber = IP running (colours as the OP list); Collect / Refund / 🖨 Bill on every row. */
.bpc { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
/* One slim strip in place of tall tiles (owner 31-10-2026, op-bill-collection-select.html): same figures, same filters. */
.bpc-tile { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 34px; background: #fff; border: 1px solid #e2e8f0; border-left: 4px solid #cbd5e1; border-radius: 8px; padding: 0 12px; color: var(--hospital-ink); text-decoration: none; box-sizing: border-box; }
.bpc-tile small { color: var(--hospital-slate); font-size: 11.5px; font-weight: var(--fw-semibold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bpc-tile b { font-size: 15px; white-space: nowrap; }
.bpc-tile.on { box-shadow: 0 0 0 2px #1565d8; }
.bpc-seg { display: inline-flex; border: 1px solid #c9d6e8; border-radius: 8px; overflow: hidden; }
.bpc-seg label { padding: 5px 11px; border-right: 1px solid #c9d6e8; font-size: 12px; font-weight: var(--fw-semibold); color: #3b4d66; cursor: pointer; }
.bpc-seg label:last-child { border-right: 0; }
.bpc-seg label.on { background: #10264a; color: #fff; }
.bpc-t { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.bpc-t > thead th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 11px; color: #334155; background: #f8fafc; padding: 6px 6px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.bpc-t > tbody > tr > td { padding: 5px 6px; border-bottom: 1px solid #f1f5f9; white-space: nowrap; vertical-align: middle; }
.bpc-t td small { display: block; color: var(--hospital-slate); font-size: 11px; line-height: 1.25; }
.bpc-t .num { text-align: right; font-variant-numeric: tabular-nums; }
.bpc-t td.w { white-space: normal; max-width: 160px; }
.bpc-var { font-size: 11px; font-weight: var(--fw-semibold); }
.bpc-var.up { color: #c0321b; }
.bpc-var.dn { color: #138a4b; }
.bpc-btn { height: 26px; padding: 0 8px; margin-right: 2px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font: inherit; font-size: 12px; font-weight: var(--fw-semibold); color: var(--hospital-ink); cursor: pointer; }
.bpc-btn--r { background: #c0321b; border-color: #c0321b; color: #fff; }
.bpc-btn--g { background: #138a4b; border-color: #138a4b; color: #fff; }
.bpc-btn--p { background: #1565d8; border-color: #1565d8; color: #fff; }
.bpc-btn--xs { height: 22px; padding: 0 6px; }
.bpc-btn--big { height: 32px; padding: 0 14px; }
.bpc-btn.is-off, .bpc-btn:disabled { background: #f1f5f9; border-color: #e2e8f0; color: #a0aec0; cursor: not-allowed; }
.bpc-dt { width: 100%; border-collapse: collapse; font-size: 12px; background: #fff; border: 1px solid #e2e8f0; }
.bpc-dt th { text-align: left; font-size: 11px; color: #334155; background: #f8fafc; padding: 4px 6px; border-bottom: 1px solid #e2e8f0; }
.bpc-dt td { padding: 4px 6px; border-bottom: 1px solid #f1f5f9; }
.bpc-dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.bpc-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.bpc-foot .mst-foot { margin: 0; }
/* OP / IP Bill Amendment + Cancellation (owner 21-10-2026, preview bill-amend-cancel.html) */
.bam-t td.num { white-space: nowrap; }
.bcn-list { flex: 1; }
.bcn-list .pam-addbar span { white-space: normal; }
.bam-t .pam-in[data-f="rate"] { width: 88px; }
/* Bill Amendment ＋ line (auto line like the OP Bill, owner 21-10-2026, bill-amend-auto-line.html) */
.bam-blank td { background: #fbfdff; }
.bam-blank td.sr { color: #1565d8; font-size: 16px; font-weight: 700; text-align: center; }
.bam-svc { width: 420px; max-width: 100%; height: 28px; padding: 0 8px; border: 1px dashed #93b4e8; border-radius: 6px; font: inherit; font-size: var(--fs-sm); background: #fff; }
.bam-svc:focus { outline: 2px solid #bfdbfe; border-style: solid; }
.bam-svc.bad { border: 1px solid #c0321b; background: #fff6f4; }
.bam-svcdrop { position: fixed; z-index: 60; max-height: 260px; overflow: auto; }
.bam-svcdrop a.is-dim { color: #94a3b8; cursor: not-allowed; }
/* Date & Bill Type Change (owner 21-10-2026, preview bill-date-type-change.html) */
.bdc-hdr { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bdc-two { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; }
.bdc-card { padding: 10px 12px; overflow: auto; }
.bdc-card h4 { margin: 0 0 8px; font-size: var(--fs-sm); }
.bdc-dt { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 8px 10px; align-items: center; font-size: var(--fs-sm); margin-bottom: 8px; }
.bdc-dt input { height: 30px; padding: 0 8px; border: 1px solid #cbd5e1; border-radius: 6px; font: inherit; }
.bdc-dt input.chg { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; font-weight: 700; }
.bdc-reason { margin-top: 10px; flex-wrap: wrap; }
.bdc-reason input { flex: 1; min-width: 220px; }
.bdc-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.bbt-tog { display: inline-flex; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; margin-bottom: 8px; }
.bbt-tog button { border: 0; border-right: 1px solid #e2e8f0; padding: 7px 14px; background: #fff; font: inherit; font-weight: 700; font-size: var(--fs-sm); cursor: pointer; }
.bbt-tog button:last-child { border-right: 0; }
.bbt-tog button.on { background: #1565d8; color: #fff; }
/* Amendment Report (owner 21-10-2026, preview amendment-report.html) */
.amr-grp { display: grid; grid-template-columns: 1fr 1fr; gap: 1px 10px; }
.amr-grp label { display: flex; align-items: center; gap: 7px; padding: 3px 6px; border-radius: 6px; cursor: pointer; font-size: var(--fs-sm); }
.amr-grp label:hover { background: #f1f5f9; }
.amr-grp label.on { background: #eff6ff; color: #1565d8; font-weight: 700; }
.amr-grp label input { accent-color: #1565d8; width: 15px; height: 15px; margin: 0; }
.amr-grp label.is-off { color: #94a3b8; cursor: not-allowed; }
.amr-quick { display: inline-flex; gap: 4px; }
.amr-quick button { height: 26px; padding: 0 9px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; }
.amr-quick button.on { background: #0f172a; color: #fff; border-color: #0f172a; }
.amr-t { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); }
.amr-t th { position: sticky; top: 0; text-align: left; font-size: 11px; color: var(--hospital-slate); background: #f8fafc; padding: 6px; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.amr-t td { padding: 5px 6px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.amr-t .n { text-align: right; white-space: nowrap; }
.amr-t td.up { color: #c0321b; font-weight: 700; }
.amr-t td.dn { color: #138a4b; font-weight: 700; }

/* Sidebar sections (owner 29-10-2026, sidebar-order-colours.html): one very light background per section on the main menu
   and all its sub-menus (App\Support\MenuSections), and every menu name dark black bold. The open screen keeps its highlight.
   Same colours 45% lighter (owner 29-10-2026, sidebar-lighter.html, "light kar do"). */
.hospital-sidebar .vx-sec { border-radius: 12px; }
.hospital-sidebar .vx-sec--op { background: #f0f6ff; }
.hospital-sidebar .vx-sec--ip { background: #f6f2ff; }
.hospital-sidebar .vx-sec--opip { background: #f5f7fb; }
.hospital-sidebar .vx-sec--pharmacy { background: #f2fbf5; }
.hospital-sidebar .vx-sec--lab { background: #fdf3f8; }
.hospital-sidebar .vx-sec--rad { background: #f0faf8; }
.hospital-sidebar .vx-sec--bb { background: #fff1f2; }
.hospital-sidebar .vx-sec--er { background: #fff4ee; }
.hospital-sidebar .vx-sec--hic { background: #eefafb; }
.hospital-sidebar .vx-sec--master { background: #fffaed; }
.hospital-sidebar .vx-sec--store { background: #fff6ef; }
.hospital-sidebar .vx-sec--finance { background: #fef5f3; }
.hospital-sidebar .vx-sec--hr { background: #f7fbee; }
.hospital-sidebar .vx-sec--integration { background: #f0f8fd; }
.hospital-sidebar .vx-sec--admin { background: #f6f7fa; }
.hospital-sidebar .vx-sec--quality { background: #fefaf2; }
.hospital-sidebar .hospital-sidebar-link,
.hospital-sidebar .hospital-sidebar-summary,
.hospital-sidebar .hospital-sidebar-sublink,
.hospital-sidebar .hospital-sidebar-sublink.hospital-sidebar-link--active,
.hospital-sidebar .hospital-sidebar-link--active { color: #0f172a; font-weight: 700; }

/* Header bell read / unread (owner 29-10-2026, bell-read-unread.html): group heads, read items lighter, unread over 24 h tagged. */
.hospital-bell-group { margin: 6px 4px 2px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #64748b; }
.hospital-bell-item--read { opacity: .62; }
.hospital-bell-item--read b { font-weight: 600; }
.hospital-bell-tag { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 4px; background: #fef3c7; color: #92400e; font-size: 9.5px; font-style: normal; font-weight: 800; vertical-align: 1px; }

/* Hospital Masters → Vitals Master (owner 02-11-2026, vitals-master.html). */
.vm-tabs { display: flex; gap: 4px; margin: 0 0 8px; border-bottom: 1px solid #dfe7f1; }
.vm-tabs a { padding: 6px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 7px 7px 0 0; color: #475569; font-weight: 600; font-size: var(--fs-sm); text-decoration: none; }
.vm-tabs a.is-on { background: #fff; border-color: #cbd5e1; color: #0d3f9f; position: relative; top: 1px; }
.vm-filter { width: auto; min-width: 140px; }
.vm-pill { display: inline-block; margin-left: 4px; padding: 0 7px; border-radius: 999px; background: #eef2f7; color: #334155; font-size: var(--fs-2xs); font-weight: 700; white-space: nowrap; }
.vm-pill--sys { background: #e0e7ff; color: #3730a3; }
.vm-pill--child { background: #fce7f3; color: #9d174d; margin-left: 0; }
/* Use in OP / IP (owner 23-11-2026, vitals-master-ip.html). */
.vm-pill--op { background: #dbeafe; color: #1d4ed8; margin-left: 0; }
.vm-pill--ip { background: #dcfce7; color: #15803d; margin-left: 2px; }
.vm-err { display: block; color: #b91c1c; font-size: var(--fs-2xs); }
/* IP sub ticks (owner 23-11-2026, vm-ip-sub.html): under IP Nursing Desk, grey while IP is off. */
.vm-ipsub { margin: 2px 0 0 220px; padding: 2px 10px; border-left: 2px solid #93c5fd; }
.vm-ipsub.is-off { opacity: .5; }
@media (max-width: 767px) { .vm-ipsub { margin-left: 18px; } }
.vm-sub { display: block; color: #0f6b74; font-size: var(--fs-2xs); font-family: ui-monospace, Consolas, monospace; }
.vm-table td.nw { white-space: nowrap; }
.vm-grid-bar { display: flex; align-items: center; gap: 10px; padding: 6px 10px; color: #475569; font-size: var(--fs-xs); }
.vm-grid-bar span { flex: 1; }
.vm-grid th.c, .vm-grid td.c { text-align: center; min-width: 74px; }
.vm-grid td small { display: block; color: #64748b; font-size: var(--fs-2xs); }
.vm-grid tr.is-off td { opacity: .55; }
.vm-grid input[type="checkbox"] { width: 16px; height: 16px; }
.vm-form .vm-g4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 12px; }
.vm-form label > span, .vm-form .vm-f > span { display: block; margin-bottom: 2px; font-size: var(--fs-2xs); font-weight: 600; color: #3b4d66; }
.vm-form label > span i, .vm-form .vm-f > span i { color: #b91c1c; font-style: normal; }
.vm-form label input, .vm-form label select { width: 100%; }
.vm-form label small, .vm-help { display: block; margin-top: 2px; font-size: var(--fs-2xs); color: #64748b; }
.vm-form .s2 { grid-column: span 2; } .vm-form .s4 { grid-column: 1 / -1; }
.vm-form [hidden] { display: none !important; }
.vm-sec { margin: 14px 0 6px; padding: 5px 10px; border-radius: 8px; background: #eaf3ff; border: 1px solid #d3e3f8; color: #1553a8; font-weight: 600; font-size: var(--fs-sm); }
.vm-radio { display: flex; gap: 6px; flex-wrap: wrap; }
.vm-radio label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 1px solid #cfdbea; border-radius: 6px; font-size: var(--fs-xs); font-weight: 600; color: #334155; cursor: pointer; }
.vm-radio label:has(input:checked) { background: #e0ecff; border-color: #1565d8; color: #0d3f9f; }
.vm-check { display: inline-flex !important; align-items: center; gap: 6px; margin-right: 14px; font-size: var(--fs-sm); font-weight: 500; color: #1e293b; }
.vm-check input { width: auto !important; }
.vm-depts { display: flex; flex-wrap: wrap; gap: 4px 4px; margin-top: 6px; padding: 6px 8px; border: 1px solid #cfdbea; border-radius: 6px; max-height: 150px; overflow: auto; }
.vm-flags { display: flex; flex-wrap: wrap; align-items: center; }
.vm-formula input { font-family: ui-monospace, Consolas, monospace; }
.vm-keys { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.vm-key { padding: 2px 8px; border: 1px solid #b9e8e0; border-radius: 999px; background: #f0fdfa; color: #0f6b74; font: 600 var(--fs-2xs) ui-monospace, Consolas, monospace; cursor: pointer; }
.vm-key:hover { background: #ccfbf1; }
.vm-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
@media (max-width: 900px) { .vm-form .vm-g4 { grid-template-columns: 1fr 1fr; } }
.vm-form input:not([type="checkbox"]):not([type="radio"]), .vm-form select { height: 32px; padding: 0 9px; border: 1px solid #cfdbea; border-radius: 7px; background: #fff; font: inherit; font-size: var(--fs-sm); color: #0d1b2e; }
.vm-form input:disabled { background: #f1f5f9; color: #64748b; }
.vm-form input:focus, .vm-form select:focus { outline: 2px solid #bfd6f6; border-color: #1565d8; }
.vm-key small { font-family: Inter, sans-serif; font-weight: 500; color: #475569; }

/* Owner 02-11-2026: "You have been signed out" popup (sign-in on another device), public/js/session-check.js. */
.vx-signed-out { width: min(430px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 12px; box-shadow: 0 20px 40px rgba(15, 23, 42, .3); color: #0f172a; }
.vx-signed-out::backdrop { background: rgba(15, 23, 42, .5); }
.vx-signed-out-head { padding: 11px 14px; background: #fef2f2; color: #b91c1c; font-size: 14px; font-weight: 700; border-bottom: 1px solid #fecaca; }
.vx-signed-out-body { padding: 12px 14px; font-size: 13px; line-height: 1.5; }
.vx-signed-out-foot { display: flex; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid #e2e8f0; background: #f8fafc; }
.ua-own-strip { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; padding: 6px 12px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 12.5px; font-weight: 600; }

/* Hospital Masters → OP Care Layout (owner 02-11-2026, op-care-layout.html). */
.ocl-head { flex-wrap: wrap; }
.ocl-head .rc-sp { flex: 1; }
.ocl-dep { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600; color: #3b4d66; }
.ocl-muted { color: #64748b; }
.ocl-row--default td { background: #f5f8fc; }
.ocl { display: grid; grid-template-columns: minmax(440px, 520px) minmax(0, 1fr); gap: 12px; align-items: start; }
.ocl-card { margin-bottom: 8px; border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; overflow: hidden; }
.ocl-card h3 { margin: 0; padding: 6px 10px; background: #eaf3ff; color: #1553a8; font-size: var(--fs-sm); font-weight: 600; }
.ocl-card h3 small { font-weight: 500; color: #3d6aa8; }
.ocl-rows { list-style: none; margin: 0; padding: 4px; }
.ocl-row { display: grid; grid-template-columns: 16px 48px 22px minmax(0, 1fr); gap: 6px; align-items: center; padding: 3px 4px; border-radius: 7px; font-size: var(--fs-sm); }
.ocl-row--note { grid-template-columns: 16px 48px 22px minmax(0, 1fr) 96px 72px; }
.ocl-row:hover { background: #f5f8fc; }
.ocl-row.is-drag { opacity: .4; }
.ocl-row.is-over { box-shadow: inset 0 2px 0 #1565d8; }
.ocl-hd { cursor: grab; color: #94a3b8; text-align: center; user-select: none; }
.ocl-mv { display: flex; gap: 2px; }
.ocl-mv button { width: 22px; height: 22px; padding: 0; border: 1px solid #cfdbea; border-radius: 5px; background: #fff; color: #0d3f9f; font-size: 10px; cursor: pointer; }
.ocl-mv button:disabled { opacity: .35; cursor: default; }
.ocl-row input[type=checkbox] { width: 15px; height: 15px; margin: 0; }
.ocl-lock { font-size: var(--fs-xs); color: #92400e; text-align: center; }
.ocl-nm { font-weight: 600; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocl-nm small { margin-left: 4px; font-weight: 500; color: #64748b; }
.ocl-row.is-off .ocl-nm { color: #94a3b8; text-decoration: line-through; }
.ocl-row select { height: 26px; padding: 0 4px; border: 1px solid #cfdbea; border-radius: 6px; font: inherit; font-size: var(--fs-xs); background: #fff; width: 100%; }
.ocl-na { font-size: var(--fs-xs); color: #94a3b8; text-align: center; }
.ocl-hint, .ocl-foot { margin: 0; padding: 0 10px 7px; font-size: var(--fs-xs); color: #64748b; }
.ocl-foot { padding: 2px 2px 8px; }
.ocl-cols { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 7px 10px; font-size: var(--fs-sm); }
.ocl-cols label { display: inline-flex; gap: 5px; align-items: center; }
.ocl-fix { color: #64748b; }
.ocl-live { position: sticky; top: 8px; border: 1px solid #dfe7f1; border-radius: 10px; background: #fff; padding: 8px 10px; font-size: var(--fs-xs); }
.ocl-live-h { margin-bottom: 6px; font-weight: 700; color: #0f2747; }
.ocl-live-h small { font-weight: 500; color: #64748b; }
.ocl-m-nav { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px; border-radius: 8px; background: #f1f5f9; margin-bottom: 4px; }
.ocl-m-nav span { padding: 3px 7px; border-radius: 6px; font-weight: 600; color: #334155; white-space: nowrap; }
.ocl-m-nav span.on { background: #fff; color: #0d3f9f; }
.ocl-m-nav i { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-right: 3px; border-radius: 50%; background: #cbd5e1; color: #0f172a; font-size: 9px; font-style: normal; }
.ocl-m-nav span.on i { background: #1553a8; color: #fff; }
.ocl-m-st { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; padding: 3px 8px; border: 1px solid #d3e3f8; border-radius: 7px; background: #eaf3ff; color: #1553a8; font-weight: 600; }
.ocl-m-st b { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #1553a8; color: #fff; font-size: 9px; }
.ocl-m-tb { margin-left: auto; font-weight: 500; font-size: var(--fs-2xs); color: #0d3f9f; }
.ocl-m-vit { margin-bottom: 4px; padding: 6px 8px; border: 1px solid #e3ebf5; border-radius: 7px; background: #f5f8fc; color: #3b4d66; font-weight: 600; }
.ocl-m-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px 8px; margin-bottom: 4px; }
.ocl-m-f small { display: block; font-weight: 600; color: #3b4d66; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ocl-m-f span { display: block; border: 1px solid #cfdbea; border-radius: 5px; background: #fff; }
.ocl-m-rx { display: flex; gap: 2px; }
.ocl-m-rx span { flex: 1; padding: 3px 4px; background: #e8eef6; color: #334155; font-weight: 600; }
.ocl-m-rx span:first-child { flex: 2; }
.ocl-m-line { margin-bottom: 3px; padding: 4px 8px; border: 1px solid #cfdbea; border-radius: 6px; color: #3b4d66; }
.ocl-m-line--search { color: #94a3b8; }
.ocl-m-foot { margin-top: 8px; padding: 5px 8px; border: 1px solid #94a3b8; border-radius: 8px; background: #f8fafc; color: #475569; text-align: right; }
@media (max-width: 1100px) { .ocl { grid-template-columns: 1fr; } .ocl-live { position: static; } }

/* OP Patient Care with an OP Care Layout: hidden by the layout; a hidden box / section that has data shows in amber. */
.cx-page [data-layout-off][hidden] { display: none !important; }
.cx-page .cx-f.is-layout-kept textarea { border-style: dashed; border-color: #f59e0b; background: #fffbeb; }
.cx-page .cx-f.is-layout-kept > label::after { content: "hidden for this department — has data"; margin-left: 4px; color: #b45309; font-size: var(--fs-2xs); font-weight: 500; }
.cx-page .cx-sec.is-layout-kept > .cx-sec-t::after, .cx-page .cx-layout-kept-note { color: #b45309; font-size: var(--fs-2xs); font-weight: 500; }
.cx-page .cx-sec.is-layout-kept > .cx-sec-t::after { content: "hidden for this department — has orders"; margin-left: 6px; }
.cx-notes > .cx-f--w2 { grid-column: span 2; }
.cx-notes > .cx-f--w3 { grid-column: 1 / -1; }
@media (max-width: 1100px) { .cx-notes > .cx-f--w2, .cx-notes > .cx-f--w3 { grid-column: auto; } }
.cx-rxg--hide-dose .cx-rxg-dose, .cx-rxg--hide-frequency .cx-rxg-freq, .cx-rxg--hide-duration .cx-rxg-dur,
.cx-rxg--hide-quantity .cx-rxg-qty, .cx-rxg--hide-food .cx-rxg-food, .cx-rxg--hide-instructions .cx-rxg-ins { display: none; }
.ocl-head .rc-search { width: auto; min-width: 0; max-width: 190px; }
.ocl-head .rc-sp { display: none; }
.ocl-head .ocl-dep { margin-left: auto; }

/* OP care drawer tabs (owner 02-11-2026 screenshot): labels on one line, never under the blue line; more tabs scroll sideways, ✕ stays. */
.cx-drawer { width: 560px; }
.cx-dr-head { position: relative; flex-wrap: wrap; gap: 0 2px; padding-right: 46px; }
.cx-dr-head .tab { flex: none; height: 32px; padding: 0 10px; white-space: nowrap; line-height: 1; }
.cx-dr-head .x { position: absolute; top: 7px; right: 10px; margin: 0; }

/* Popups in the middle (owner 06-11-2026, preview popup-centre.html): the base reset above sets margin 0 on everything, which
   pushed every <dialog> without its own "margin: auto" to the top-left corner. :where() keeps this at zero weight, so a popup
   that sets its own margin still wins; it covers every future popup too. */
:where(dialog:modal) { margin: auto; }

/* Add / Edit in a popup (owner 06-11-2026, edit-popup.html; public/js/vx-popup.js). List side: the popup in the middle. */
.vx-pop { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid #cbd5e1; border-radius: 12px; background: #f4f7fb; box-shadow: 0 24px 60px rgba(15, 23, 42, .3); overflow: hidden; }
.vx-pop[open] { display: flex; flex-direction: column; }
.vx-pop::backdrop { background: rgba(15, 23, 42, .45); }
.vx-pop--small { width: min(600px, calc(100vw - 32px)); }
.vx-pop--wide { width: min(1240px, calc(100vw - 32px)); }
.vx-pop-head { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-bottom: 1px solid #e2e8f0; background: #fff; }
.vx-pop-title { margin: 0; color: #0f172a; font-size: 14px; font-weight: 700; }
.vx-pop-x { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #475569; font-size: 16px; cursor: pointer; }
.vx-pop-x:hover { background: #e2e8f0; }
.vx-pop-x:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.vx-pop-body { position: relative; flex: 1; min-height: 120px; }
.vx-pop-frame { display: block; width: 100%; height: 160px; border: 0; background: #f4f7fb; }
.vx-pop-load { position: absolute; inset: 0; display: grid; place-items: center; color: #1d4ed8; font-weight: 600; background: #f4f7fb; }
.vx-pop-load[hidden] { display: none; }
.vx-row-flash > td { animation: vx-row-flash 2.4s ease; }
@keyframes vx-row-flash { 0%, 45% { background: #dcfce7; } 100% { background: transparent; } }
/* Popup side: the same screen, no header / menu / footer; title is on the popup bar; the buttons stay in sight. */
html[data-vx-popup] body { min-height: 0; background: #f4f7fb; color: #0f172a; }
.vx-popup-page > .hospital-page-heading:first-of-type > .hospital-dashboard-title { display: none; }
.vx-popup-page .hospital-page-heading { position: sticky; z-index: 5; background: #f4f7fb; }
.vx-popup-page .hospital-form-actions { position: sticky; z-index: 5; background: #f4f7fb; }
html[data-vx-popup] body.hospital-dashboard-body { background: #f4f7fb; }
/* The page inside a popup can always scroll (owner 16-11-2026, ip-pkg-popups.html D1): ≥1024 px the app body is overflow:hidden,
   which also stopped every WIDE popup (1238 px) from scrolling. */
html[data-vx-popup] body.hospital-dashboard-body { overflow-x: hidden; overflow-y: auto; }
/* Simple master with 'compact_popup' (Instruction Master, owner 16-11-2026, medicine-timing.html): no repeated heading,
   two columns (on Add the first box full width), Cancel + Save on the right, text in the middle. */
html[data-vx-popup] .sm-compact > .hospital-page-heading { display: none; }
html[data-vx-popup] .sm-compact .hospital-form-card { padding: 10px 12px; }
html[data-vx-popup] .sm-compact .hospital-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-vx-popup] .sm-compact .hospital-form-grid > .hospital-field:first-child:nth-last-child(3) { grid-column: 1 / -1; }
html[data-vx-popup] .sm-compact .hospital-form-actions { display: flex; flex-direction: row; justify-content: flex-end; gap: 8px; }
html[data-vx-popup] .sm-compact .hospital-form-actions .hospital-button { display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 100px; }
html[data-vx-popup] body.hospital-dashboard-body::before, html[data-vx-popup] body.hospital-dashboard-body::after { display: none; }

/* Compact popups (owner 06-11-2026, popup-compact.html): smaller boxes, buttons and gaps INSIDE every Add / Edit popup only (full screens keep
   their size), so the whole form shows. Nothing is removed or hidden; only sizes change. */
html[data-vx-popup] body { font-size: 12.5px; }
html[data-vx-popup] .vx-popup-page { padding: 6px 10px 8px; }
html[data-vx-popup] .vx-popup-page .hospital-page-heading { top: -6px; margin: -6px 0 6px; padding: 6px 0 4px; min-height: 0; gap: 8px; }
html[data-vx-popup] .vx-popup-page .hospital-form-actions { bottom: -8px; margin: 6px 0 -8px; padding: 6px 0 8px; gap: 8px; }

/* Boxes */
html[data-vx-popup] .vx-popup-page input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),
html[data-vx-popup] .vx-popup-page select { height: 28px; min-height: 28px; padding-top: 0; padding-bottom: 0; font-size: 12.5px; line-height: 26px; }
html[data-vx-popup] .vx-popup-page textarea { min-height: 40px; padding-top: 4px; padding-bottom: 4px; font-size: 12.5px; }
html[data-vx-popup] .vx-popup-page input[type="checkbox"], html[data-vx-popup] .vx-popup-page input[type="radio"] { width: 15px; height: 15px; }
html[data-vx-popup] .vx-popup-page label, html[data-vx-popup] .vx-popup-page .hospital-field-label { font-size: 11.5px; }
html[data-vx-popup] .vx-popup-page small { font-size: 11px; }

/* Buttons (Save stays green, Cancel stays light — only smaller) */
html[data-vx-popup] .vx-popup-page .hospital-button,
html[data-vx-popup] .vx-popup-page button.hospital-button,
html[data-vx-popup] .vx-popup-page a.hospital-button { height: 30px; min-height: 30px; padding: 0 14px; font-size: 12.5px; line-height: 1; border-radius: 8px; box-shadow: none; }
html[data-vx-popup] .vx-popup-page .service-edit-switch span,
html[data-vx-popup] .vx-popup-page .hospital-segment span { height: 28px; font-size: 12px; }

/* Cards, titles, gaps */
html[data-vx-popup] .vx-popup-page .service-edit-card,
html[data-vx-popup] .vx-popup-page .hospital-card,
html[data-vx-popup] .vx-popup-page .hospital-form-section { padding: 8px 10px; border-radius: 10px; }
html[data-vx-popup] .vx-popup-page .service-edit-title,
html[data-vx-popup] .vx-popup-page .hospital-section-title { margin-bottom: 6px; font-size: 12.5px; }
html[data-vx-popup] .vx-popup-page .service-edit-main, html[data-vx-popup] .vx-popup-page .service-edit-side { gap: 8px; }
html[data-vx-popup] .vx-popup-page .hospital-form-grid { gap: 6px 10px; }
html[data-vx-popup] .vx-popup-page .hospital-alert { margin-bottom: 6px; padding: 6px 10px; font-size: 12.5px; }

/* Service Master: "Fill blank with ₹ [ ] Fill" on one line; room category rows tighter. */
html[data-vx-popup] .vx-popup-page .service-category-head { padding: 4px 8px; }
html[data-vx-popup] .vx-popup-page .service-category-head > span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
html[data-vx-popup] .vx-popup-page .service-category-head input { flex: 0 0 90px; width: 90px; height: 26px; min-height: 26px; }
html[data-vx-popup] .vx-popup-page .service-category-head .hospital-button { height: 26px; min-height: 26px; padding: 0 12px; }
html[data-vx-popup] .vx-popup-page .service-category-table td { padding: 2px 8px; }
html[data-vx-popup] .vx-popup-page .service-category-table input { height: 26px; min-height: 26px; }
html[data-vx-popup] .vx-popup-page .hospital-field-hint { margin-top: 2px; font-size: 11px; }
html[data-vx-popup] .vx-popup-page .service-doctors-tick { padding: 5px 8px; gap: 8px; }
html[data-vx-popup] .vx-popup-page .service-doctors-tick b { font-size: 12.5px; }
html[data-vx-popup] .vx-popup-page .service-auto-row { padding: 5px 8px; }
html[data-vx-popup] .vx-popup-page .service-edit-rates .hospital-input { height: 28px; }
html[data-vx-popup] .vx-popup-page .service-category-head .hospital-button { flex: 0 0 auto; width: auto; }
html[data-vx-popup] .vx-popup-page { display: block; }
/* Popup checks 06-11-2026: grid cards may shrink (a wide device / sign-in table scrolls inside its card), Revenue Sharing buttons. */
html[data-vx-popup] .vx-popup-page .hospital-form-card { min-width: 0; }
html[data-vx-popup] .vx-popup-page .hospital-users-security-card { overflow-x: auto; }
html[data-vx-popup] .vx-popup-page .rsx-btn { height: 30px; min-height: 30px; padding: 0 12px; font-size: 12.5px; }
html[data-vx-popup] .vx-popup-page .rsx-ibtn { width: 28px; height: 28px; min-height: 28px; }
html[data-vx-popup] .vx-popup-page .vm-actions, html[data-vx-popup] .vx-popup-page .pmx-actions { position: sticky; bottom: -8px; z-index: 5; margin-bottom: -8px; padding: 6px 0 8px; background: #f4f7fb; }
/* Processing cover in Add / Edit popups (owner 06-11-2026, popup-saving.html): from Save until the list shows the change. */
.vx-pop-busy { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(244, 247, 251, .82); backdrop-filter: blur(1.5px); }
.vx-pop-busy[hidden] { display: none; }
.vx-pop-busy .hospital-page-loading-card { min-width: 230px; }
.vx-pop-busy .hospital-ecg-pulse { stroke: url(#vx-pop-ecg); animation: hospital-ecg 1.3s linear infinite; }
.vx-pop-busy small.is-slow { color: #b45309; font-weight: 600; }
.vx-pop.is-busy .vx-pop-x { opacity: .35; pointer-events: none; }
/* Inside the popup the popup's cover does this job: no second heartbeat under it. */
html[data-vx-popup] .hospital-page-loading, html[data-vx-popup] .hospital-page-progress { display: none; }
/* Green message after a popup save goes after 3 s (owner 06-11-2026): short fade. */
.hospital-alert.vx-msg-out { opacity: 0; transition: opacity .4s ease; }
/* Every green message goes after 3 s (owner 19-11-2026, green-message-3s.html N1): thin time line, then the fade above. */
.vx-flash { position: relative; overflow: hidden; }
.vx-flash.vx-msg-out { opacity: 0; transition: opacity .4s ease; }
.vx-flash-bar { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; background: #4ade80; animation: vx-flash-bar 3s linear forwards; pointer-events: none; }
@keyframes vx-flash-bar { to { width: 0; } }
@media (prefers-reduced-motion: reduce) { .vx-flash-bar { animation: none; } }
/* Popups proper (owner 17-11-2026, popup-proper.html D1–D7): only inside Add / Edit popups (html[data-vx-popup]); full screens stay
   as they are. vx-popup.js marks .vx-pop-headless (heading with only the title) and .vx-pop-actions (the Save bar, + Cancel). */
/* P1 — no empty strip / no repeated big heading at the top: the popup bar already shows the title. vx-popup.js marks the
   first page heading .vx-pop-headless when only the title and a "… list" link are in it. */
html[data-vx-popup] .vx-popup-page .hospital-page-heading.vx-pop-headless { display: none; }

/* P2 — the form uses the whole popup (Doctor 944 / 1238 px, Vitals 930 / 1238 px). */
html[data-vx-popup] .vx-popup-page :is(.doctor-master-form-card, .hospital-form-card, .vm-card, .hospital-card) { max-width: none; }
html[data-vx-popup] .vx-popup-page :is(.doctor-master-form-card, .hospital-form-card) { padding: 10px 12px 0; border-radius: 10px; }
html[data-vx-popup] .vx-popup-page .vm-form, html[data-vx-popup] .vx-popup-page form.hospital-form { max-width: none; }

/* P3 — buttons at the bottom right, always in sight: [Cancel] [Save] (like IP Package). vx-popup.js marks the bar. */
html[data-vx-popup] .vx-popup-page .vx-pop-actions {
    position: sticky; bottom: -8px; z-index: 6; display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
    margin: 8px 0 -8px; padding: 7px 0 8px; border-top: 1px solid #e2e8f0; background: #f4f7fb; grid-template-columns: none;
}
html[data-vx-popup] .vx-popup-page .vx-pop-actions > :is(.hospital-button, button, a.hospital-button) {
    display: inline-flex; align-items: center; justify-content: center; width: auto; min-width: 100px; margin: 0;
}
html[data-vx-popup] .vx-popup-page .vx-pop-actions .vx-pop-cancel {
    border: 1px solid #cbd5e1; background: #fff; color: #334155;
}
html[data-vx-popup] .vx-popup-page .vx-pop-actions .vx-pop-cancel:hover { background: #f1f5f9; }

/* P4 — small popups (600 px): two boxes in a row; long boxes (notes, description, lists) take the full row. */
@media (max-width: 700px) {
    html[data-vx-popup] .vx-popup-page .hospital-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    html[data-vx-popup] .vx-popup-page .hospital-form-grid > .hospital-field:has(textarea, table, .hospital-day-grid, .hospital-check-grid),
    html[data-vx-popup] .vx-popup-page .hospital-form-grid > .hospital-field--full { grid-column: 1 / -1; }
}

/* P5 — Doctor: Title as one small button group (Dr. | Mr. | Mrs.), never over First name. */
html[data-vx-popup] .vx-popup-page .dm-titles { gap: 0; }
html[data-vx-popup] .vx-popup-page .dm-titles label { position: relative; height: 28px; padding: 0 8px; border-radius: 0; margin-left: -1px; font-size: 12px; }
html[data-vx-popup] .vx-popup-page .dm-titles label:first-child { margin-left: 0; border-radius: 8px 0 0 8px; }
html[data-vx-popup] .vx-popup-page .dm-titles label:last-child { border-radius: 0 8px 8px 0; }
html[data-vx-popup] .vx-popup-page .dm-titles label.is-on { z-index: 1; background: #1565d8; border-color: #1565d8; color: #fff; }
html[data-vx-popup] .vx-popup-page .dm-titles input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
html[data-vx-popup] .vx-popup-page .dm-titles label:has(input:focus-visible) { outline: 2px solid #2563eb; outline-offset: 1px; }
html[data-vx-popup] .vx-popup-page .dm-cols { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }

/* P6 — Vitals: Number / Text / Formula in one line. */
html[data-vx-popup] .vx-popup-page .vm-radio { flex-wrap: nowrap; }
html[data-vx-popup] .vx-popup-page .vm-radio label { padding: 4px 8px; }

/* P7 — Lab Parameter ranges: Gender box shows "Any / Male / Female" in full. */
html[data-vx-popup] .vx-popup-page td select { min-width: 78px; }

/* P8 — Confirm password (Users) in the middle of the popup. */
html[data-vx-popup] .vx-popup-page .hospital-form-card[style*="max-width"] { margin: 16px auto; }
html[data-vx-popup] .vx-popup-page .doctor-master-form .hospital-day-option { justify-content: flex-start; gap: 8px; }
html[data-vx-popup] .vx-popup-page .doctor-master-form .hospital-input { padding-left: 8px; padding-right: 8px; }
/* Cash limit strip: earlier stays linked by "re-admission within X days = same event" (owner 21-11-2026). */
.cash-limit-linked { color: #6d28d9; }
.cash-limit-linked b { color: #5b21b6; }

/* 27-11-2026 (owner): no ↑↓ spinner on any number box, whole software. Box size, borders and fields stay the same;
   the box still takes numbers only (min / max / step checks unchanged). */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
