/* Shared visual system. Loaded after the legacy component styles. */
:root {
  --premium-ink: #183d47;
  --premium-muted: #647b84;
  --premium-teal: #087d83;
  --premium-shadow: 0 2px 3px rgba(16,51,63,.035), 0 10px 22px rgba(16,51,63,.055), 0 26px 48px -22px rgba(16,51,63,.23), inset 0 1px 0 #fff;
}
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
body.hospital-layout { background: radial-gradient(ellipse at 90% 0, #e0eeed 0, transparent 45%), #f3f6f8 !important; padding-bottom: 0 !important; color: var(--premium-ink); }
.clinical-main { padding-top: 10px !important; }
.clinical-main > .container-fluid { max-width: 1680px; margin-inline: auto; }
.top-clinical { box-shadow: 0 4px 24px rgba(16,51,63,.06); }
.clinical-header { min-height: 78px; }
.brand-mark { background: linear-gradient(145deg,#158c91,#064753); box-shadow: inset 0 1px 1px #ffffff60, 0 3px 0 #043d49, 0 8px 16px #07546626; }
.brand-copy strong { font-weight: 750; letter-spacing: -.035em; }
.brand-copy small { font-weight: 500; }
.clinical-search { background: #f3f6f8; border-color: #e4ebee; }
.clinical-search:focus-within { border-color: #087d83; box-shadow: 0 0 0 3px #087d8317; }
.clinical-menu .nav-link { font-weight: 600 !important; }
.clinical-dropdown .dropdown-item { font-weight: 600 !important; }
.clinical-dropdown { box-shadow: 0 18px 45px #153c4726 !important; }
.page-title { font-weight: 750; letter-spacing: -.035em; }
.fw-black { font-weight: 750; }
.card-premium, .patient-hero, .metric-card, .kpi-card {
  background: linear-gradient(155deg,#fff 35%,#f8fbfc) !important;
  border: 1px solid #fff !important;
  border-bottom-color: #dae5e9 !important;
  border-radius: 20px !important;
  box-shadow: var(--premium-shadow) !important;
}
.card-premium { position: relative; }
.card-premium h5 { letter-spacing: -.025em; }
.card-premium h5 > i { color: var(--premium-teal); margin-right: .35rem; }
.kpi-card { padding: 24px 20px; position: relative; transition: transform .22s ease, box-shadow .22s ease; }
.kpi-card strong { font-size: clamp(1.35rem,1.7vw,1.95rem); font-weight: 750; letter-spacing: -.04em; margin: 7px 0 5px; overflow-wrap: anywhere; }
.kpi-card span { font-size: .68rem; font-weight: 700; color: #58717c; }
.kpi-card small { font-size: .76rem; color: #657b85; font-weight: 400; }
.kpi-icon { border: 1px solid #fff; background: linear-gradient(145deg,#edfaf8,#c6e8e5); box-shadow: inset 0 2px 2px #fff, 0 3px 0 #badbd9, 0 8px 12px #087d8314; border-radius: 14px; margin-bottom: 20px; }
.dashboard-pro .row > :nth-child(3n + 2) .kpi-icon { background: linear-gradient(145deg,#eff4ff,#dae4fc); color: #4b64a1; box-shadow: inset 0 2px 2px #fff,0 3px 0 #c8d5ef,0 8px 12px #4b64a114; }
.dashboard-pro .row > :nth-child(3n) .kpi-icon { background: linear-gradient(145deg,#fff8eb,#f3e5c9); color: #916c34; box-shadow: inset 0 2px 2px #fff,0 3px 0 #e5d5b7,0 8px 12px #916c3414; }
.premium-hero { padding: 36px 40px; border-radius: 24px; background: radial-gradient(ellipse at 75% 0,#25868b66,transparent 55%),linear-gradient(115deg,#102f3b,#075d68); box-shadow: inset 0 1px 0 #ffffff26,0 4px 0 #0a3d48,0 20px 35px -14px #073c4866; margin-bottom: 30px !important; }
.premium-hero::after { pointer-events: none; border: 1px solid #ffffff12; background: transparent; width: 420px; height: 420px; box-shadow: 0 0 0 50px #ffffff03,0 0 0 100px #ffffff03; }
.premium-hero > div { position: relative; z-index: 1; }
.premium-hero h1 { font-size: clamp(1.7rem,2.6vw,2.7rem); font-weight: 700; letter-spacing: -.045em; margin: 12px 0; }
.premium-hero p { font-size: .94rem; max-width: 620px; line-height: 1.7; color: #c2dade; }
.eyebrow { font-size: .65rem; letter-spacing: .16em; color: #a9dfd9; font-weight: 600; }
.hero-actions { flex-shrink: 0; flex-direction: column; }
.hero-actions .btn { font-size: .83rem; padding: 12px 20px; border-radius: 10px; font-weight: 600; }
.hero-actions .btn-light { color: #075466; background: #f4fcfa; border-color: #f4fcfa; box-shadow: 0 4px 12px #00222f33; }
.hero-actions .btn-outline-light { border-color: #ffffff40; }
.btn { font-weight: 600; transition: background-color .18s, box-shadow .18s, transform .18s; }
.btn-petrol { background: linear-gradient(135deg,#0d8287,#075466) !important; box-shadow: inset 0 1px 0 #ffffff30,0 3px 0 #06444e,0 8px 16px #07546626; font-weight: 600; }
.btn-outline-primary { --bs-btn-color: #086f79; --bs-btn-border-color: #bfd5da; --bs-btn-hover-bg: #086f79; --bs-btn-hover-border-color: #086f79; --bs-btn-active-bg: #075466; border-radius: 9px; }
.form-label, label { font-weight: 600 !important; font-size: .86rem; }
.form-control, .form-select { background-color: #fbfcfd; border-color: #dce5e9; border-radius: 10px; min-height: 46px; }
.form-control:focus, .form-select:focus { background-color: #fff; }
.table { font-size: .87rem; }
.table thead th { background: #f0f5f7 !important; color: #526d79; font-weight: 650; padding: 14px 12px; font-size: .72rem; }
.table tbody td { padding: 15px 12px; }
.status-pill { background: #e5f3ef; color: #276958; font-size: .67rem; font-weight: 650; border: 1px solid #d4e9df; }
.quick-grid a { background: #f6f9fa; border-color: #e3ecef; border-radius: 12px; font-size: .85rem; font-weight: 600; }
.quick-grid a i { width: 34px; height: 34px; display: grid; place-items: center; background: #e5f0f1; border-radius: 9px; }
.quick-grid a:hover i { background: #ffffff20; }
.mini-stat { background: #f3f7f8; border-color: #e3edef; border-radius: 12px; }
.mini-stat span { font-weight: 500; color: #526c77; }
.mini-bar { height: 9px; }
.mini-bar span { background: linear-gradient(90deg,#10727a,#59b5ac); }
.finance-row span { font-weight: 700; white-space: nowrap; }
.patient-line strong, .finance-row strong { font-size: .88rem; font-weight: 600; }
.hospital-footer { margin-top: 32px; box-shadow: none !important; background: #f8fafb !important; }
.hospital-footer .small { font-size: .75rem; }
.footer-info { font-weight: 400; font-size: .8rem; padding-right: 60px; }
.whatsapp-float { bottom: 22px !important; width: 52px !important; height: 52px !important; font-size: 1.65rem !important; z-index: 1030 !important; }
.whatsapp-float[style*="display:none"] { display: none !important; }
:where(a,button,input,select,textarea):focus-visible { outline: 3px solid #2a969b; outline-offset: 4px; }

/* Login: editorial introduction and a dedicated access panel. */
.login-layout { margin: 0; background: #f4f7f8; color: var(--premium-ink); }
.login-shell { display: grid; grid-template-columns: minmax(0,1.08fr) minmax(0,1fr); min-height: 100vh; min-height: 100dvh; padding: 18px; gap: 18px; }
.login-story { display: flex; flex-direction: column; position: relative; overflow: hidden; padding: 42px 9%; color: #fff; border-radius: 26px; background: radial-gradient(ellipse at 90% 90%,#158b8366,transparent 60%),linear-gradient(145deg,#102e3b,#064d59); box-shadow: inset 0 1px 0 #ffffff20,0 16px 35px #123e491a; }
.login-story::before, .login-story::after { content: ''; position: absolute; width: 600px; height: 600px; border: 1px solid #ffffff09; border-radius: 50%; right: -310px; bottom: -220px; pointer-events: none; }
.login-story::after { width: 760px; height: 760px; right: -390px; bottom: -300px; }
.login-brand { display: flex; align-items: center; gap: 13px; color: #fff; text-decoration: none; font-size: 1.4rem; font-weight: 650; letter-spacing: -.035em; z-index: 1; }
.login-brand small { display: block; font-size: .55rem; letter-spacing: .19em; margin-top: 4px; color: #acc9cc; font-weight: 500; }
.login-brand .brand-mark { width: 45px; height: 45px; background: #ffffff12; box-shadow: inset 0 1px 0 #ffffff36,0 6px 12px #001f2933; }
.login-story-content { position: relative; z-index: 1; margin: auto 0; padding: 60px 0 40px; }
.login-eyebrow { display: flex; align-items: center; gap: 9px; color: #b9dcd9; font-size: .73rem; letter-spacing: .035em; }
.login-eyebrow > span { width: 6px; height: 6px; background: #82c9b8; border-radius: 50%; box-shadow: 0 0 0 4px #82c9b812; }
.login-story h1 { font-size: clamp(2.3rem,3.8vw,4rem); line-height: 1.14; font-weight: 550; letter-spacing: -.055em; margin: 23px 0; }
.login-story h1 em { font-style: normal; color: #99d2c7; }
.login-story p { font-size: .98rem; line-height: 1.85; color: #b9cfd3; }
.login-preview { max-width: 440px; margin: 38px 0 30px; padding: 22px; border-radius: 17px; border: 1px solid #ffffff35; border-bottom: 3px solid #ffffff15; background: linear-gradient(125deg,#ffffff17,#ffffff08); box-shadow: inset 0 1px 0 #ffffff20,8px 18px 0 -8px #002b3b44,0 28px 35px -18px #001e35aa; transform: perspective(1000px) rotateY(-7deg) rotateX(3deg); }
.preview-top { display: flex; justify-content: space-between; font-size: .68rem; color: #c4dedf; padding-bottom: 18px; border-bottom: 1px solid #ffffff14; }
.preview-top i { margin-right: 7px; }
.preview-dots { letter-spacing: 3px; }
.preview-main { display: flex; align-items: center; gap: 13px; padding: 23px 0; }
.preview-icon { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(135deg,#d1f0e7,#8ec4bb); color: #16555c; font-size: 1.35rem; box-shadow: 0 3px 0 #4a8c86,0 8px 16px #001e3433; }
.preview-main strong { display: block; font-size: .85rem; font-weight: 600; }
.preview-main small { display: block; font-size: .68rem; margin-top: 5px; color: #abcacc; }
.preview-main > i { color: #9dd8c6; margin-left: auto; }
.preview-modules { display: flex; gap: 7px; }
.preview-modules span { flex: 1; padding: 9px 5px; text-align: center; border-radius: 7px; background: #ffffff07; border: 1px solid #ffffff0d; font-size: .61rem; color: #c3dada; }
.preview-modules i { margin-right: 4px; }
.login-feature { display: flex; gap: 12px; align-items: center; font-size: .73rem; line-height: 1.7; color: #a9c9cd; }
.login-feature > i { font-size: 1.3rem; color: #99cdbf; }
.login-feature strong { color: #d8e8e9; font-weight: 500; }
.login-story-footer { position: relative; z-index: 1; font-size: .65rem; color: #9cbec3; }
.login-access { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 55px 8% 24px; }
.login-form-card { width: 100%; max-width: 420px; margin: auto 0; padding: 32px 0; }
.login-access-icon { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 30px; border-radius: 16px; background: linear-gradient(145deg,#fff,#e3eeef); color: #107078; font-size: 1.45rem; border: 1px solid #fff; box-shadow: 0 3px 0 #d4e1e3,0 10px 22px #173b4510; }
.access-eyebrow { color: #637e87; font-size: .63rem; font-weight: 600; letter-spacing: .17em; }
.login-form-card h2 { font-size: clamp(1.8rem,2.5vw,2.4rem); letter-spacing: -.05em; font-weight: 650; margin: 12px 0; }
.login-description { color: #647b84; font-size: .88rem; line-height: 1.65; margin-bottom: 32px; }
.login-input { position: relative; }
.login-input > i { position: absolute; top: 50%; left: 17px; transform: translateY(-50%); color: #82979f; pointer-events: none; }
.login-input .form-control { height: 54px; padding-left: 46px; padding-right: 50px; background: #fff; border: 1px solid #d8e2e6; box-shadow: 0 2px 3px #163e4703; font-size: .87rem; }
.login-input .form-control::placeholder { color: #80929b; }
.password-toggle { position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; background: transparent; border: 0; border-radius: 8px; color: #637e87; }
.password-toggle:hover { background: #edf5f5; color: #075466; }
.login-help { font-size: .73rem; color: #647b84; line-height: 1.7; margin: 18px 0 25px; }
.login-submit { min-height: 53px; display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; font-size: .86rem; }
.login-private { display: flex; justify-content: center; align-items: center; gap: 8px; border-top: 1px solid #dfe7ea; padding-top: 24px; margin-top: 32px; font-size: .7rem; color: #647b84; }
.login-copyright { width: 100%; max-width: 420px; display: flex; justify-content: space-between; gap: 12px; font-size: .65rem; color: #6b818a; margin-top: 30px; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .kpi-card:hover { transform: perspective(1000px) translateY(-6px) rotateX(2deg); box-shadow: 0 3px 4px #10333f08,0 18px 30px #10333f14,0 32px 45px -20px #10333f40,inset 0 1px 0 #fff !important; }
}
@media (max-width:1199.98px) { .clinical-header { min-height: 74px; } .hero-actions { flex-shrink: 1; } .login-story { padding: 35px 8%; } .login-access { padding-inline: 7%; } }
@media (max-width:991.98px) { .premium-hero { padding: 28px; } .hero-actions { flex-direction: row; } .hero-actions .btn { width: auto; } .login-shell { grid-template-columns: .95fr 1fr; padding: 12px; gap: 0; } .login-preview { padding: 16px; transform: none; } .preview-main > i { display: none; } .preview-modules { flex-wrap: wrap; } .preview-modules span { flex-basis: 40%; } }
@media (max-width:767.98px) {
  .login-shell { display: flex; flex-direction: column; padding: 0; }
  .login-story { padding: 25px; border-radius: 0 0 24px 24px; }
  .login-story-content { padding: 28px 0 8px; }
  .login-story h1 { font-size: 2.4rem; margin: 15px 0; }
  .login-story p { font-size: .86rem; margin-bottom: 8px; }
  .login-preview, .login-feature, .login-story-footer { display: none; }
  .login-access { padding: 22px 25px; flex: 1; }
  .login-form-card { padding: 12px 0; }
  .login-access-icon { display: none; }
  .login-description { margin-bottom: 24px; }
  .login-copyright { margin-top: 24px; }
  .clinical-main > .container-fluid { padding: 18px 16px !important; }
  .hospital-footer { padding-bottom: 0; }
  .footer-info { padding-right: 0; }
  .hospital-footer .container-fluid { padding-bottom: 80px !important; }
  .premium-hero { padding: 25px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .kpi-card { padding: 20px; }
  .kpi-card strong { font-size: 1.8rem; }
}
/* Adapt to available height without clipping fields, errors or keyboard focus. */
@media (min-width:768px) and (max-height:850px) {
  .login-shell { padding: 12px; gap: 12px; }
  .login-story { padding-block: 24px; }
  .login-story-content { padding: 24px 0; }
  .login-story h1 { font-size: clamp(2rem,4.8vh,3.2rem); margin: 16px 0; }
  .login-preview { margin: 22px 0; padding: 16px; }
  .preview-top { padding-bottom: 12px; }
  .preview-main { padding: 16px 0; }
  .login-access { padding-block: 20px; }
  .login-form-card { padding: 12px 0; }
  .login-access-icon { width: 44px; height: 44px; margin-bottom: 18px; }
  .login-description { margin-bottom: 22px; }
  .login-private { margin-top: 22px; padding-top: 18px; }
  .login-copyright { margin-top: 16px; }
}
@media (min-width:768px) and (max-height:700px) {
  .login-story-content { padding: 16px 0; }
  .login-preview { margin: 16px 0; }
  .login-feature { display: none; }
  .login-access { padding-block: 12px; }
  .login-access-icon { display: none; }
  .login-form-card h2 { font-size: 1.8rem; margin: 8px 0; }
  .login-description { margin-bottom: 16px; }
  .login-form .mb-4, .login-form .mb-3 { margin-bottom: 12px !important; }
  .login-help { margin: 12px 0 16px; }
  .login-private { margin-top: 18px; padding-top: 14px; }
  .login-copyright { margin-top: 8px; }
}
@media (min-width:768px) and (max-height:550px) {
  .login-preview, .login-story-footer { display: none; }
  .login-private { margin-top: 12px; padding-top: 10px; }
  .login-form-card { padding: 0; }
}
@media (max-width:767.98px) {
  .login-story { flex-shrink: 0; padding: 18px 25px; }
  .login-story-content { padding: 14px 0 0; }
  .login-story h1 { font-size: 1.65rem; margin: 8px 0 0; }
  .login-story h1 br { display: none; }
  .login-story p, .login-eyebrow { display: none; }
  .login-access { padding-block: 16px; }
  .login-form-card { padding: 0; }
  .login-description { margin-bottom: 18px; }
  .login-form .mb-4, .login-form .mb-3 { margin-bottom: 14px !important; }
  .login-help { margin: 12px 0 18px; }
  .login-private { margin-top: 20px; padding-top: 16px; }
  .login-copyright { margin-top: 16px; flex-wrap: wrap; }
}
@media (max-width:767.98px) and (max-height:740px) {
  .login-story-content { display: none; }
  .login-story { padding-block: 14px; }
  .login-form-card h2 { font-size: 1.7rem; margin: 8px 0; }
  .login-private { margin-top: 14px; padding-top: 12px; }
}
@media (prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { body.hospital-layout { padding: 0 !important; background: #fff !important; } .top-clinical, .hospital-footer, .whatsapp-float, .hero-actions { display: none !important; } .card-premium, .kpi-card, .metric-card { box-shadow: none !important; border: 1px solid #ddd !important; } }
