/* BVDKPY — local artwork and shared theme tokens. */
[data-login-theme="hospital-night"]{--art:url("login-hospital-night.svg");--base:#071c32;--surface:#0a223b;--card:#102c49;--ink:#f2faff;--muted:#b9d5e7;--line:#386080;--field:#0a2541;--link:#65e7ff;--btn1:#52e6f9;--btn2:#05bedb;--btntext:#09283b;--halo:#03658c}
[data-login-theme="medical-green"]{--art:url("login-medical-green.svg");--base:#e7f6ee;--surface:#f7fdf9;--card:#fff;--ink:#13342e;--muted:#3c645a;--line:#b1cfc2;--field:#f7fcf8;--link:#08614b;--btn1:#08795d;--btn2:#064d3c;--btntext:#fff;--halo:#adddcb}
[data-login-theme="digital-purple"]{--art:url("login-digital-purple.svg");--base:#140f35;--surface:#241953;--card:#302369;--ink:#fbf8ff;--muted:#dfd4ff;--line:#7463ab;--field:#281e5a;--link:#e2caff;--btn1:#6543d8;--btn2:#8a32ba;--btntext:#fff;--halo:#5c35ba}
[data-login-theme="it-red"]{--art:url("login-it-red.svg");--base:#16191f;--surface:#1e222a;--card:#252832;--ink:#faf6f6;--muted:#e0c9cd;--line:#65545d;--field:#20232b;--link:#ffa3a4;--btn1:#c92f3a;--btn2:#952432;--btntext:#fff;--halo:#612735}
[data-login-theme="office-blue"]{--art:url("login-office-blue.svg");--base:#e8f3ff;--surface:#f7fbff;--card:#fff;--ink:#14324d;--muted:#436481;--line:#b3c8df;--field:#f8fbff;--link:#1258ad;--btn1:#176bda;--btn2:#174fae;--btntext:#fff;--halo:#b5d8ff}
[data-login-theme="cloud-indigo"]{--art:url("login-cloud-indigo.svg");--base:#141d5d;--surface:#202b75;--card:#2d398b;--ink:#f5f8ff;--muted:#d3dfff;--line:#7281c9;--field:#27347f;--link:#e0eaff;--btn1:#f4f7ff;--btn2:#d3deff;--btntext:#142969;--halo:#603ac9}

body.bvd-auth-portal{color:var(--ink);background:radial-gradient(ellipse at 12% 18%,var(--halo),transparent 62%),var(--base);font-family:system-ui,"Segoe UI",sans-serif}
.bvd-auth-portal .portal{background:var(--surface);border:1px solid var(--line);box-shadow:0 25px 70px #0a132b45;min-height:600px}
.bvd-auth-portal .brand{background-image:linear-gradient(180deg,transparent 32%,#081a2ae8 100%),var(--art);background-position:center;background-size:cover;min-height:100%;color:#fff}
.bvd-auth-portal .brand:after{background:linear-gradient(90deg,transparent,var(--link),transparent)}
.bvd-auth-portal .brand .mark svg{stroke:#165c79}
.bvd-auth-portal .brand h1{font-weight:820;max-width:360px}
.bvd-auth-portal .body{padding:clamp(20px,3vw,42px)}
.bvd-auth-portal h2{color:var(--ink);font-size:clamp(24px,3vw,33px);line-height:1.14}
.bvd-auth-portal p.hint,.bvd-auth-portal .muted,.bvd-auth-portal .assist{color:var(--muted)}
.bvd-auth-portal .switch{background:var(--field);border-color:var(--line)}
.bvd-auth-portal .switch a{color:var(--muted)}
.bvd-auth-portal .switch a[aria-current="page"]{background:var(--card);color:var(--link);outline:1px solid var(--line);outline-offset:-1px}
.bvd-auth-portal select,.bvd-auth-portal #portal-login-content input:not([type=hidden]){background:var(--field);color:var(--ink);border-color:var(--line)}
.bvd-auth-portal select{color-scheme:dark}
.bvd-auth-portal[data-login-theme="medical-green"] select,.bvd-auth-portal[data-login-theme="office-blue"] select{color-scheme:light}
.bvd-auth-portal input::placeholder{color:var(--muted);opacity:.82}
.bvd-auth-portal input:focus,.bvd-auth-portal a:focus-visible,.bvd-auth-portal button:focus-visible,.bvd-auth-portal select:focus-visible{outline:2px solid var(--link)!important;outline-offset:2px}
.bvd-auth-portal a,.bvd-auth-portal .assist a{color:var(--link)}
.bvd-auth-portal .assist{border-color:var(--line)}
.bvd-auth-portal .code,.bvd-auth-portal .msg{color:var(--ink);background:var(--card);border:1px solid var(--line)}
.bvd-auth-portal .msg.error,.bvd-auth-portal .error:not(:empty){background:#fff2ef;color:#791f24;border-radius:8px;padding:8px 10px}
.bvd-auth-portal .actions button,.bvd-auth-portal .continue,.bvd-auth-portal .choose-button{background:linear-gradient(130deg,var(--btn1),var(--btn2));color:var(--btntext);font-weight:750}
.bvd-auth-portal .actions button{box-shadow:0 6px 17px #0003}
.bvd-auth-portal[data-login-theme="medical-green"] .brand{order:2}
.bvd-auth-portal[data-login-theme="medical-green"] .body{order:1}
.bvd-auth-portal[data-login-theme="digital-purple"] .body{background:linear-gradient(145deg,#51408b80,#2c205f);border:1px solid var(--line);border-radius:24px;margin:18px}
.bvd-auth-portal .bvd-pwd{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:7px}
.bvd-auth-portal .bvd-pwd-toggle{display:none}
.js .bvd-auth-portal .bvd-pwd-toggle{display:inline-grid;place-items:center;width:46px;height:48px;background:var(--field);border:1px solid var(--line);color:var(--ink)}
.bvd-pwd-toggle svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
.bvd-auth-portal .bvd-form-meta{display:flex;justify-content:space-between;align-items:center;gap:.6rem;flex-wrap:wrap;font-size:.85rem}
.bvd-auth-portal #portal-login-content .bvd-remember{display:none}
.js .bvd-auth-portal #portal-login-content .bvd-remember{display:flex;align-items:center;gap:.36rem;font-weight:500}
.bvd-auth-portal #portal-login-content .bvd-remember input[type=checkbox]{width:16px;min-height:16px;height:16px;margin:0;accent-color:var(--btn1)}
@media(max-width:760px){
 .bvd-auth-portal .portal{min-height:0;grid-template-columns:minmax(0,1fr)}
 .bvd-auth-portal .brand,.bvd-auth-portal[data-login-theme="medical-green"] .brand{min-height:155px;order:0;background-position:center 48%}
 .bvd-auth-portal[data-login-theme="medical-green"] .body{order:1}
 .bvd-auth-portal .brand h1{font-size:clamp(21px,6vw,28px)}
 .bvd-auth-portal[data-login-theme="digital-purple"] .body{margin:10px}
}

/* The same skins on direct sign-in (camera and standalone routes). */
body.hospital-login-page.bvd-auth-direct{background:var(--base)!important;color:var(--ink)!important}
.bvd-auth-direct .hospital-login-hero{background:linear-gradient(180deg,transparent 23%,#081a2aeb 100%),var(--art) center/cover;border:0;justify-content:flex-end}
.bvd-auth-direct .hospital-login-hero:before,.bvd-auth-direct .hospital-login-hero:after{display:none}
.bvd-auth-direct .hospital-login-brand h1,.bvd-auth-direct .hospital-login-brand .hospital-name,.bvd-auth-direct .hospital-login-brand .hospital-motto{color:#fff}
.bvd-auth-direct .hospital-login-panel{background:radial-gradient(at 10% 5%,var(--halo),transparent 65%),var(--base)}
body.hospital-login-page.bvd-auth-direct .login-card,body.hospital-login-page.bvd-auth-direct .login-header,body.hospital-login-page.bvd-auth-direct .login-footer-app{background:var(--surface)!important;border-color:var(--line)!important;color:var(--ink)!important}
body.hospital-login-page.bvd-auth-direct .login-header h1,body.hospital-login-page.bvd-auth-direct .form-label,body.hospital-login-page.bvd-auth-direct .form-check-label{color:var(--ink)!important}
body.hospital-login-page.bvd-auth-direct .login-header p,.bvd-auth-direct .login-version{color:var(--muted)!important}
body.hospital-login-page.bvd-auth-direct .form-control,body.hospital-login-page.bvd-auth-direct .form-select,body.hospital-login-page.bvd-auth-direct .input-group .btn{background:var(--field)!important;color:var(--ink)!important;border-color:var(--line)!important}
body.hospital-login-page.bvd-auth-direct .form-control::placeholder{color:var(--muted)!important}
body.hospital-login-page.bvd-auth-direct .btn-login{background:linear-gradient(130deg,var(--btn1),var(--btn2))!important;color:var(--btntext)!important}
body.hospital-login-page.bvd-auth-direct .login-help-link,body.hospital-login-page.bvd-auth-direct .login-card>p a{color:var(--link)!important}
.bvd-auth-direct[data-login-theme="medical-green"] .hospital-login-hero{order:2}
.bvd-auth-direct[data-login-theme="medical-green"] .hospital-login-panel{order:1}

/* Live colour/layout swatches in admin settings. */
.bvd-theme-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px}
.bvd-theme-choice{cursor:pointer;position:relative}
.bvd-theme-choice>input{position:absolute;z-index:2;top:12px;right:12px;width:18px;height:18px;accent-color:#096ce0}
.bvd-theme-card{display:block;height:100%;border:2px solid #dbe4ee;border-radius:15px;overflow:hidden;background:#fff;color:#17324a}
.bvd-theme-choice>input:checked+.bvd-theme-card,.bvd-theme-choice>input:focus-visible+.bvd-theme-card{border-color:#096ce0;box-shadow:0 0 0 2px #cce4ff}
.bvd-theme-thumb{display:grid;grid-template-columns:48% 52%;min-height:140px;background:var(--surface);color:var(--ink)}
.bvd-theme-picture{background:var(--art) center/cover}
.bvd-theme-card[data-login-theme="medical-green"] .bvd-theme-picture{order:2}
.bvd-theme-demo{display:flex;flex-direction:column;justify-content:center;gap:7px;padding:15px 24px 12px 10px}
.bvd-theme-demo b{font-size:.65rem;line-height:1.3}
.bvd-theme-demo i{height:12px;border:1px solid var(--line);background:var(--field);border-radius:4px}
.bvd-theme-demo strong{font-size:.65rem;padding:4px 2px;text-align:center;border-radius:4px;color:var(--btntext);background:linear-gradient(130deg,var(--btn1),var(--btn2))}
.bvd-theme-label{display:grid;gap:3px;padding:10px 12px}
.bvd-theme-label small{color:#435f75}

/* Five photo themes. Only the current sign-in image is painted; the settings grid uses small thumbnails. */
[data-login-theme="medical-ai"]{--art:url("login-medical-ai.webp");--thumb:url("login-medical-ai-thumb.webp");--base:#031a2a;--surface:#092a3e;--card:#103851;--ink:#f2fcff;--muted:#beddeb;--line:#48788e;--field:#092438;--link:#80f4ff;--btn1:#75f6ff;--btn2:#11cfda;--btntext:#05242d;--halo:#085b7a;--art-pos:48% 45%}
[data-login-theme="electronic-record"]{--art:url("login-electronic-record.webp");--thumb:url("login-electronic-record-thumb.webp");--base:#e0f3eb;--surface:#f9fefb;--card:#fff;--ink:#15372f;--muted:#3a6559;--line:#94b8a9;--field:#f5fcf8;--link:#086448;--btn1:#087954;--btn2:#075e47;--btntext:#fff;--halo:#b6e7d6;--art-pos:57% 44%}
[data-login-theme="hospital-cloud"]{--art:url("login-hospital-cloud.webp");--thumb:url("login-hospital-cloud-thumb.webp");--base:#091d66;--surface:#f5faff;--card:#fff;--ink:#102b56;--muted:#3a587c;--line:#a0b7d3;--field:#f4f9ff;--link:#0b51b4;--btn1:#086cce;--btn2:#103ea8;--btntext:#fff;--halo:#1257b7;--art-pos:52% 41%}
[data-login-theme="radiology"]{--art:url("login-radiology.webp");--thumb:url("login-radiology-thumb.webp");--base:#101526;--surface:#242e48;--card:#303d5c;--ink:#f6f7ff;--muted:#d0d8f1;--line:#697ca2;--field:#1b2640;--link:#d0c5ff;--btn1:#6e44df;--btn2:#4a3ac6;--btntext:#fff;--halo:#47367a;--art-pos:51% 36%}
[data-login-theme="cyber-health"]{--art:url("login-cyber-health.webp");--thumb:url("login-cyber-health-thumb.webp");--base:#091d19;--surface:#102925;--card:#173731;--ink:#f1fff8;--muted:#b9dfd2;--line:#48776d;--field:#0d231f;--link:#85f6bd;--btn1:#66eba1;--btn2:#2fc87c;--btntext:#09271a;--halo:#165844;--art-pos:43% 47%}

.bvd-theme-picture{background-image:var(--thumb,var(--art));background-position:var(--art-pos,center)}
.bvd-theme-colors{display:flex;gap:4px;margin-top:4px}
.bvd-theme-colors i{width:23px;height:9px;border-radius:3px;background:var(--bvd-chrome)}
.bvd-theme-colors i:nth-child(2){background:var(--bvd-accent)}
.bvd-theme-colors i:nth-child(3){background:var(--bvd-soft);border:1px solid var(--bvd-line)}

.bvd-auth-portal .brand{background-color:var(--base)}
.bvd-auth-portal[data-login-theme] .brand{background-position:center,var(--art-pos,center)}
.bvd-auth-direct[data-login-theme] .hospital-login-hero{background-color:var(--base);background-position:center,var(--art-pos,center)}
.bvd-auth-portal:is([data-login-theme="electronic-record"],[data-login-theme="hospital-cloud"]) select{color-scheme:light}
.bvd-theme-card:is([data-login-theme="electronic-record"],[data-login-theme="hospital-cloud"]) .bvd-theme-picture{order:2}
.bvd-auth-portal:is([data-login-theme="medical-ai"],[data-login-theme="electronic-record"],[data-login-theme="hospital-cloud"],[data-login-theme="radiology"],[data-login-theme="cyber-health"]) .portal{width:min(1180px,100%);grid-template-columns:minmax(0,1.18fr) minmax(350px,1fr)}
@media(min-width:761px){
  .bvd-auth-portal:is([data-login-theme="electronic-record"],[data-login-theme="hospital-cloud"]) .portal{grid-template-columns:minmax(350px,1fr) minmax(0,1.18fr)}
  .bvd-auth-portal:is([data-login-theme="electronic-record"],[data-login-theme="hospital-cloud"]) .brand{order:2}
  .bvd-auth-direct:is([data-login-theme="electronic-record"],[data-login-theme="hospital-cloud"]) .hospital-login-hero{order:2}
}
@media(max-width:760px){
  .bvd-auth-portal:is([data-login-theme="medical-ai"],[data-login-theme="electronic-record"],[data-login-theme="hospital-cloud"],[data-login-theme="radiology"],[data-login-theme="cyber-health"]) .portal{grid-template-columns:minmax(0,1fr)}
}

.bvd-auth-compact main{max-width:500px;margin:18px auto;padding:16px}

/* Unit identity: local serif typography, Vietnamese accents, no remote fonts. */
.bvd-auth-portal .brand h1.bvd-unit-title,.bvd-auth-direct .hospital-login-brand h1.bvd-unit-title{
 font-family:Georgia,"Times New Roman",serif;font-style:italic;font-weight:600;
 font-size:clamp(26px,3vw,38px);line-height:1.27;letter-spacing:.005em;
 max-width:100%;text-wrap:balance;overflow-wrap:break-word;text-shadow:0 2px 12px #061b2c80;
}
.bvd-auth-portal .brand .bvd-brand-slogan{display:block;font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:clamp(15px,1.3vw,18px);line-height:1.6;color:#e4f4f7;max-width:36ch;padding-top:12px;border-top:1px solid #ffffff50}
.bvd-auth-direct .hospital-login-brand .hospital-motto{font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:clamp(16px,1.5vw,22px);line-height:1.6}
.bvd-auth-portal .bvd-brand-mark{width:58px;height:58px;overflow:hidden;background:#fff;border-radius:16px;padding:5px}
.bvd-brand-mark img{width:100%;height:100%;object-fit:contain}
.bvd-brand-mark [hidden],.bvd-auth-portal .brand .bvd-brand-contact[hidden]{display:none!important}
.bvd-auth-portal .brand .bvd-brand-contact{display:grid;gap:4px;font-size:12px;line-height:1.5;color:#e4f4f7;overflow-wrap:anywhere;max-width:100%}
@media(max-width:760px){
 .bvd-auth-portal .brand h1.bvd-unit-title{font-size:clamp(24px,6vw,30px);line-height:1.25}
 .bvd-auth-portal .brand .bvd-brand-slogan{font-size:15px;padding-top:8px;margin-top:4px;line-height:1.45}
 .bvd-auth-portal .bvd-brand-mark{width:42px;height:42px;border-radius:12px}
}

.bvd-auth-compact .bvd-compact-identity{padding:8px 0 18px}
.bvd-auth-compact .bvd-compact-identity h1{font:italic 600 27px/1.3 Georgia,"Times New Roman",serif;overflow-wrap:anywhere}
.bvd-auth-compact .bvd-compact-identity p{font:italic 16px/1.5 Georgia,"Times New Roman",serif;color:var(--muted)}

/* Hospital Glass palette (also used by the theme selector in Settings). */
[data-login-theme="hospital-glass"]{
 --art:url("login-hospital-glass.webp");--thumb:url("login-hospital-glass-thumb.webp");
 --base:#122c45;--surface:#f0f6fc;--card:#ffffff;--ink:#12345b;--muted:#465d76;
 --line:#b2c9dd;--field:#f9fcff;--link:#0d508e;--btn1:#155e9f;--btn2:#14447f;--btntext:#fff;--halo:#b6dcf3;
 --bvd-chrome:#143854;--bvd-accent:#14659e;--bvd-soft:#eff6fc;--bvd-line:#c4d7e7
}
.bvd-theme-card[data-login-theme="hospital-glass"] .bvd-theme-thumb{
 grid-template-columns:1fr;place-items:center;padding:10px;background:var(--thumb) center/cover;
}
.bvd-theme-card[data-login-theme="hospital-glass"] .bvd-theme-picture{display:none}
.bvd-theme-card[data-login-theme="hospital-glass"] .bvd-theme-demo{
 width:min(80%,155px);border:1px solid #fff;border-radius:10px;padding:9px;background:#f0f6fce8;
}

/* Light healthcare photo; also supplies the small preview in Settings. */
[data-login-theme="hospital-air"]{
 --art:url("login-hospital-air.webp");--thumb:url("login-hospital-air-thumb.webp");
 --base:#dceffd;--surface:#f0f8ff;--card:#ffffff;--ink:#133553;--muted:#375772;
 --line:#b0cbdf;--field:#f9fcff;--link:#084b87;--btn1:#0754ab;--btn2:#047ba9;--btntext:#fff;--halo:#e9f6fe;
 --bvd-chrome:#143c60;--bvd-accent:#116da8;--bvd-soft:#eef8ff;--bvd-line:#c7def0
}
.bvd-theme-card[data-login-theme="hospital-air"] .bvd-theme-thumb{
 grid-template-columns:1fr;place-items:center;padding:10px;background:var(--thumb) center/cover;
}
.bvd-theme-card[data-login-theme="hospital-air"] .bvd-theme-picture{display:none}
.bvd-theme-card[data-login-theme="hospital-air"] .bvd-theme-demo{width:min(80%,155px);padding:8px;color:var(--ink)}

/* The legend cuts the field border; its label remains associated with the input. */
.bvd-auth-portal,.bvd-auth-direct{
 --login-outline:var(--line);--login-field:var(--field);--login-focus:var(--link);
 --login-label:var(--ink);--login-field-glow:#20476914;
}
.bvd-auth-portal[data-login-theme="hospital-air"],
.bvd-auth-direct[data-login-theme="hospital-air"]{
 --login-outline:#9bbbd3;--login-field:#ffffffed;--login-focus:#075a9a;
 --login-label:#164b77;--login-field-glow:#163c6510;
}
.bvd-auth-compact{--air-control:44px}
.bvd-auth-portal .bvd-outlined-field,
.bvd-auth-direct .bvd-outlined-field{
 min-width:0;margin:0;padding:0;
 border:1px solid var(--login-outline);border-radius:9px;background:var(--login-field);
 box-shadow:0 2px 5px var(--login-field-glow);
}
.bvd-auth-portal .bvd-outlined-field>legend,
.bvd-auth-direct .bvd-outlined-field>legend{
 float:none;width:auto;max-width:100%;margin:0 0 0 10px;padding:0 5px;font:inherit;color:inherit;
}
.bvd-auth-portal .bvd-outlined-field>legend label,
body.hospital-login-page.bvd-auth-direct .bvd-outlined-field>legend label{
 display:block;margin:0;color:var(--login-label)!important;font-size:12px!important;
 font-weight:700!important;line-height:1.25;cursor:text;
}
.bvd-auth-portal .bvd-outlined-field:focus-within,
.bvd-auth-direct .bvd-outlined-field:focus-within{
 border-color:var(--login-focus);box-shadow:0 0 0 2px #1168a42b;
}
.bvd-auth-portal #portal-login-content .bvd-outlined-field input,
body.hospital-login-page.bvd-auth-direct .bvd-outlined-field .form-control{
 background:transparent!important;border:0!important;box-shadow:none!important;outline:0!important;
 min-height:var(--air-control,46px)!important;margin-top:0!important;padding-top:5px!important;padding-bottom:7px!important;
}
.bvd-auth-portal[data-login-layout="centered"] .bvd-outlined-field .bvd-field-entry>svg{top:50%}
body.hospital-login-page.bvd-auth-direct .bvd-outlined-field .input-group>.btn{
 border:0!important;background:transparent!important;z-index:6;
}
.bvd-auth-portal .bvd-outlined-field:focus-within>legend label,
body.hospital-login-page.bvd-auth-direct .bvd-outlined-field:focus-within>legend label{
 color:var(--login-focus)!important;
}
@media (forced-colors:active){
 .bvd-auth-portal .bvd-outlined-field:focus-within,
 .bvd-auth-direct .bvd-outlined-field:focus-within{outline:2px solid Highlight}
}

/* Keep the native hospital list (keyboard, popup, and change events). */
.bvd-auth-portal #portal-unit .bvd-unit-field{margin-bottom:8px}
.bvd-auth-portal[data-login-theme="hospital-air"] #portal-unit .bvd-unit-field{margin-bottom:3px}
.bvd-auth-portal #portal-unit .bvd-unit-field #hospital,
body.hospital-login-page.bvd-auth-direct .bvd-unit-field #login-hospital{
 display:block;width:100%;min-height:var(--air-control,46px);margin:0;
 background:transparent!important;border:0!important;box-shadow:none!important;outline:0!important;
 padding-top:5px;padding-bottom:7px;
}
body.hospital-login-page.bvd-auth-direct .bvd-unit-field #login-hospital{
 appearance:auto;padding-right:12px;
}
.bvd-auth-portal[data-login-layout="centered"] .bvd-unit-field .bvd-hospital-select>svg{top:50%}
