/* DoctorBase — guided authentication experience.
   Scoped to #db-auth-shell so the legacy app, Remotion and other projects remain unchanged. */
#db-auth-shell{--db-navy:#081739;--db-ink:#12243e;--db-blue:#285dd4;--db-line:#dfe7f4;--db-muted:#64728c;color:var(--db-ink);font-family:Archivo,Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
#db-auth-shell *{box-sizing:border-box}
#db-auth-shell .db-veil{background:#eef3fa;display:flex;min-height:100dvh;align-items:center;justify-content:center;position:fixed;inset:0;z-index:2147483647;padding:clamp(12px,3vw,32px);overflow-y:auto;overscroll-behavior:contain}
#db-auth-shell .db-auth-layout{width:min(1160px,100%);min-height:min(740px,calc(100dvh - 64px));display:grid;grid-template-columns:minmax(0,1.03fr) minmax(420px,.97fr);overflow:hidden;border-radius:25px;background:white;border:1px solid #dce5f1;box-shadow:0 25px 85px rgba(7,30,72,.13)}
#db-auth-shell .db-story{position:relative;isolation:isolate;display:flex;flex-direction:column;padding:clamp(27px,4vw,54px);color:white;background:radial-gradient(ellipse 60% 50% at 90% 10%,rgba(67,112,205,.36),transparent 85%),linear-gradient(148deg,#081739 8%,#102b56 70%,#0c1d3c 100%);overflow:hidden}
#db-auth-shell .db-story:after{content:"";position:absolute;width:460px;height:460px;border:1px solid rgba(183,202,255,.11);border-radius:50%;right:-260px;bottom:-220px;box-shadow:0 0 0 76px rgba(183,202,255,.035),0 0 0 150px rgba(183,202,255,.026);z-index:-1}
#db-auth-shell .db-brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;font-size:19px;font-weight:750;letter-spacing:-.035em}
#db-auth-shell .db-brand img{width:42px;height:42px;border-radius:11px;object-fit:cover}
#db-auth-shell .db-brand-label{display:flex;flex-direction:column;line-height:1.12}
#db-auth-shell .db-brand small{font-size:10px;letter-spacing:.18em;font-weight:650;opacity:.67;text-transform:uppercase;margin-top:5px}
#db-auth-shell .db-story-content{margin:auto 0;padding:55px 0 38px}
#db-auth-shell .db-eyebrow{display:inline-flex;align-items:center;gap:9px;padding:8px 12px;border:1px solid rgba(192,211,254,.18);background:rgba(255,255,255,.055);border-radius:100px;font-size:11px;color:#cfddfc;letter-spacing:.08em;text-transform:uppercase;font-weight:750}
#db-auth-shell .db-dot{width:7px;height:7px;background:#95b7ff;border-radius:50%;box-shadow:0 0 0 4px rgba(116,166,250,.11)}
#db-auth-shell .db-story h1{color:white;font-family:Newsreader,Georgia,serif;font-weight:450;letter-spacing:-.044em;font-size:clamp(38px,4.1vw,59px);line-height:1.04;margin:25px 0 18px;max-width:510px}
#db-auth-shell .db-story h1 em{font-style:normal;color:#9ebdff}
#db-auth-shell .db-story p{max-width:465px;color:#c1d1ec;font-size:15px;line-height:1.75;margin:0}
#db-auth-shell .db-story-points{display:grid;gap:15px;margin-top:37px;max-width:450px}
#db-auth-shell .db-story-point{display:flex;gap:13px;align-items:start}
#db-auth-shell .db-story-point .db-point-icon{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;background:rgba(166,196,255,.11);border:1px solid rgba(192,211,254,.15);border-radius:11px;color:#bdd3ff;font-weight:850}
#db-auth-shell .db-story-point strong{display:block;font-size:13px;font-weight:700;color:#f4f7ff}
#db-auth-shell .db-story-point span{display:block;color:#b2c2de;font-size:12px;line-height:1.5;margin-top:3px}
#db-auth-shell .db-story-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px;color:#afc3e6;font-size:11px;border-top:1px solid rgba(211,225,255,.15);padding-top:20px;line-height:1.5}
#db-auth-shell .db-form-side{display:flex;flex-direction:column;justify-content:center;padding:clamp(24px,4.5vw,65px);min-width:0}
#db-auth-shell .db-form-top{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:28px}
#db-auth-shell .db-mobile-brand{display:none}
#db-auth-shell .db-step-marker{font-size:11px;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:#4767a3;padding:8px 12px;background:#eef4ff;border-radius:100px}
#db-auth-shell .db-form-inner{max-width:452px;width:100%;margin:0 auto}
#db-auth-shell .db-panel{width:auto;max-width:initial;box-shadow:none;border-radius:0;background:transparent;padding:0}
#db-auth-shell .db-panel h2{font-family:Newsreader,Georgia,serif;font-weight:500;font-size:clamp(29px,3.2vw,41px);letter-spacing:-.037em;line-height:1.15;color:#0c2345;margin:0 0 10px}
#db-auth-shell .db-panel>p,#db-auth-shell .db-panel .db-intro{font-size:14px;color:#60708c;line-height:1.7;margin:0 0 24px}
#db-auth-shell .db-panel form{display:grid;gap:4px}
#db-auth-shell .db-panel label{display:block;font-size:12px;letter-spacing:.01em;font-weight:750;color:#304360;margin:16px 0 8px}
#db-auth-shell .db-panel input{display:block;width:100%;height:49px;border:1px solid #cfdbee;border-radius:11px;background:#f9fbff;padding:0 13px;color:#142a4a;font:500 14px system-ui;outline:0;transition:border-color .18s,box-shadow .18s,background .18s}
#db-auth-shell .db-panel input:focus-visible{border-color:#3b6bd4;box-shadow:0 0 0 4px rgba(48,107,219,.12);background:white}
#db-auth-shell .db-panel input::placeholder{color:#93a0b5}
#db-auth-shell .db-panel input[aria-invalid="true"]{border-color:#b94050;background:#fffafb}
#db-auth-shell .db-pass-field{position:relative}
#db-auth-shell .db-pass-field input{padding-right:82px}
#db-auth-shell .db-reveal{position:absolute;right:6px;top:6px;height:37px;border-radius:8px;padding:0 10px;border:none;background:transparent;font-size:12px;font-weight:750;color:#3561ae;cursor:pointer}
#db-auth-shell button:focus-visible{outline:3px solid #93b6ff;outline-offset:3px}
#db-auth-shell button:disabled{opacity:.62;cursor:wait}
#db-auth-shell .db-primary{margin-top:23px;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:50px;width:100%;font:750 14px Archivo,system-ui,sans-serif;background:#285dd4;color:white;border:1px solid #285dd4;border-radius:11px;padding:12px 18px;box-shadow:0 7px 17px rgba(34,89,190,.17);transition:transform .16s,background .16s,box-shadow .16s}
#db-auth-shell .db-primary:not(:disabled):hover{background:#164ab8;box-shadow:0 10px 23px rgba(34,89,190,.23);transform:translateY(-1px)}
#db-auth-shell .db-primary:disabled{transform:none;box-shadow:none}
#db-auth-shell .db-spinner{display:inline-block;width:17px;height:17px;flex:0 0 17px;border:2px solid rgba(255,255,255,.36);border-top-color:#fff;border-radius:50%;animation:db-auth-spin .7s linear infinite}
@keyframes db-auth-spin{to{transform:rotate(360deg)}}
#db-auth-shell .db-link{display:inline-flex;justify-content:center;align-items:center;background:transparent;color:#2758be;font-weight:750;font-size:12px;border:0;padding:9px 4px;cursor:pointer}
#db-auth-shell .db-link:hover{color:#0b327f;text-decoration:underline}
#db-auth-shell .db-actions{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:8px;margin-top:15px}
#db-auth-shell .db-separator{margin:23px 0;display:flex;align-items:center;gap:12px;color:#93a1b7;font-size:11px}
#db-auth-shell .db-separator:before,#db-auth-shell .db-separator:after{content:"";height:1px;flex:1;background:#e4e9f2}
#db-auth-shell .db-note{margin:17px 0 0;color:#73819a;font-size:11px;line-height:1.6}
#db-auth-shell .db-error,#db-auth-shell .db-ok{font:600 12px/1.55 system-ui;border-radius:12px;padding:12px 13px;margin:15px 0 5px;white-space:pre-wrap}
#db-auth-shell .db-error{color:#8c2639;background:#fff1f3;border:1px solid #f6cbd2}
#db-auth-shell .db-ok{color:#116240;background:#ecf8f1;border:1px solid #c7e9d3}
#db-auth-shell .db-hint{font-size:11px;line-height:1.6;color:#73819a;margin:8px 0 0}
#db-auth-shell .db-security-note{display:flex;align-items:flex-start;gap:10px;background:#f0f5ff;border:1px solid #dee8fb;border-radius:12px;padding:14px;margin:17px 0 6px;color:#34547f;font-size:12px;line-height:1.55}
#db-auth-shell .db-security-note strong{color:#173c7c}
#db-auth-shell .db-qr{display:block;max-width:min(225px,100%);height:auto;margin:18px auto;border:8px solid white;border-radius:14px;box-shadow:0 0 0 1px #dce5f1}
#db-auth-shell .db-step-progress{display:flex;gap:6px;margin:0 0 22px}
#db-auth-shell .db-step-progress span{height:4px;background:#e2eaf7;flex:1;border-radius:4px}
#db-auth-shell .db-step-progress span.active{background:#3769d2}
#db-auth-shell .db-onboard-grid{display:grid;grid-template-columns:1fr;gap:10px;margin:19px 0 10px}
#db-auth-shell .db-onboard-card{background:#f6f8fd;border:1px solid #e2eafa;border-radius:13px;padding:14px 15px;display:flex;gap:12px;align-items:start}
#db-auth-shell .db-onboard-card .db-card-number{width:29px;height:29px;flex:0 0 29px;border-radius:9px;display:grid;place-items:center;background:#e3edff;color:#2759ba;font-size:12px;font-weight:800}
#db-auth-shell .db-onboard-card strong{display:block;font-size:13px;color:#1c3659}
#db-auth-shell .db-onboard-card p{font-size:12px;line-height:1.55;color:#63738d;margin:3px 0 0}
#db-auth-shell .db-timeline{list-style:none;padding:0;margin:18px 0 8px;display:grid;gap:11px}
#db-auth-shell .db-timeline li{display:flex;gap:11px;align-items:start;color:#354d70;font-size:12px;line-height:1.5}
#db-auth-shell .db-time{min-width:60px;border-radius:8px;background:#eef3fc;color:#2656b6;text-align:center;font-weight:750;padding:4px 7px}
#db-auth-shell .db-mobile-caption{display:none}
/* Menu discreto do avatar, independente do design system existente. */
#db-account-launch:focus-visible{outline:3px solid #6E9BF2;outline-offset:3px}
.db-profile-panel{position:fixed;z-index:900;box-sizing:border-box;width:min(306px,calc(100vw - 24px));max-height:calc(100dvh - 84px);overflow-y:auto;padding:7px;border:1px solid #DDE5F0;border-radius:12px;background:#fff;box-shadow:0 18px 46px rgba(9,18,40,.18);color:#172742;font-family:Archivo,system-ui,sans-serif}
.db-profile-panel *{box-sizing:border-box}
.db-profile-identity{display:flex;flex-direction:column;gap:5px;padding:12px 10px 13px;border-bottom:1px solid #E4EAF3}
.db-profile-identity strong{font-size:13px;font-weight:700}
.db-profile-identity small{font-size:11px;line-height:1.4;color:#63738d;overflow-wrap:anywhere}
.db-profile-caption{padding:12px 10px 5px;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:#8594aa}
.db-profile-status-list{display:grid;gap:2px}
.db-profile-option{display:flex;align-items:center;gap:10px;width:100%;min-height:38px;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:#26364F;font:500 12.5px/1.25 Archivo,system-ui,sans-serif;text-align:left;cursor:pointer}
.db-profile-option:hover{background:#F4F7FE;color:#1D4FD1}
.db-profile-option:focus-visible,.db-profile-photo input:focus-visible,.db-profile-photo button:focus-visible{outline:2px solid #285dd4;outline-offset:2px}
.db-profile-option:disabled{opacity:.6;cursor:wait}
.db-profile-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto}
.db-profile-check{margin-left:auto;color:#1D4FD1;font-weight:700}
.db-profile-rule{margin:6px 5px;height:1px;background:#E4EAF3}
.db-profile-logout{color:#ad3046}
.db-profile-logout:hover{background:#fff1f3;color:#922039}
.db-profile-photo{display:grid;gap:8px;margin:3px 8px 10px;padding:12px;border:1px solid #E4EAF3;border-radius:9px;background:#F7F9FC}
.db-profile-photo[hidden]{display:none}
#db-auth-shell [hidden]{display:none!important}
#db-auth-shell .db-w-form select{font:inherit;width:100%;min-height:48px;border:1px solid #cbd9ef;border-radius:12px;background:#f8faff;color:#101b33;padding:10px 12px;box-sizing:border-box}
.db-profile-photo label{font-size:11px;font-weight:700;color:#26364F}
.db-profile-photo input{width:100%;min-height:36px;border:1px solid #D3DDED;border-radius:7px;padding:8px;background:#fff;color:#172742;font-size:12px}
.db-profile-photo small{color:#728198;font-size:10.5px;line-height:1.5}
.db-profile-photo-save{border:0;border-radius:7px;padding:9px;background:#285dd4;color:#fff;font-size:12px;font-weight:700;cursor:pointer}
.db-profile-photo-save:disabled{opacity:.65}
.db-profile-error{padding:8px 10px;color:#922039;font-size:11px;line-height:1.5;overflow-wrap:anywhere}

@media(max-width:860px){
#db-auth-shell .db-veil{padding:0;align-items:stretch}
#db-auth-shell .db-auth-layout{min-height:100dvh;width:100%;border-radius:0;border:0;box-shadow:none;grid-template-columns:1fr;display:flex;flex-direction:column}
#db-auth-shell .db-story{padding:20px 24px;min-height:112px}
#db-auth-shell .db-story-content,#db-auth-shell .db-story-points,#db-auth-shell .db-story-footer{display:none}
#db-auth-shell .db-form-side{flex:1;padding:29px 24px 40px;justify-content:flex-start}
#db-auth-shell .db-mobile-brand{display:block}
#db-auth-shell .db-form-top{margin-bottom:30px;justify-content:flex-end}
#db-auth-shell .db-form-inner{max-width:520px}
}
@media(max-width:520px){
#db-auth-shell .db-story{padding:14px 19px;min-height:75px}
#db-auth-shell .db-brand img{height:37px;width:37px}
#db-auth-shell .db-brand{font-size:17px}
#db-auth-shell .db-form-side{padding:24px 21px 40px}
#db-auth-shell .db-panel h2{font-size:34px}
#db-auth-shell .db-story h1{font-size:40px}
#db-auth-shell .db-step-marker{font-size:10px}
#db-auth-shell .db-primary{min-height:51px}
}
@media(prefers-reduced-motion:reduce){
#db-auth-shell *,#db-auth-shell *:before,#db-auth-shell *:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

.db-onboard-title{font:400 clamp(25px,3vw,32px)/1.15 Newsreader,Georgia,serif;margin:22px 0 10px;color:#101B33}.db-onboard-review{padding:22px;border:1px solid #E1E8F2;background:#F5F7FB;border-radius:14px}.db-onboard-review h3{font:400 26px Newsreader,Georgia,serif;margin:0 0 12px}.db-step-progress{display:flex;gap:6px;margin:18px 0}.db-step-progress span{flex:1;height:4px;background:#E1E8F2;border-radius:4px}.db-step-progress span.active{background:#1D4FD1}
/* Editorial entry; presentation-only. Existing auth form IDs and contracts stay intact. */
@keyframes dbEntry{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
#db-auth-shell .db-veil{padding:0;background:#081739}
#db-auth-shell .db-auth-layout{width:100%;min-height:100dvh;border:0;border-radius:0;box-shadow:none;grid-template-columns:minmax(0,1.1fr) minmax(390px,.9fr)}
#db-auth-shell .db-story{padding:clamp(28px,4vw,64px);background:radial-gradient(ellipse at 70% 45%,#17386777,transparent 70%),#081739}
#db-auth-shell .db-story:after{display:none}
#db-auth-shell .db-story-content{padding:30px 0;margin:auto 0}
#db-auth-shell .db-story h1{font-size:clamp(32px,3.45vw,53px);max-width:620px;line-height:1.12;letter-spacing:-.035em;margin:20px 0 16px;animation:dbEntry .6s cubic-bezier(.22,.61,.36,1) both}
#db-auth-shell .db-story h1 em{color:#89B2FF}
#db-auth-shell .db-story p{font-size:14px;line-height:1.7;max-width:47ch}
#db-auth-shell .db-eyebrow{border:0;padding:0;background:none;color:#90ACD9;font-size:10px;letter-spacing:.2em}
#db-auth-shell .db-form-side{padding:clamp(28px,4.4vw,72px);background:#FAFBFE}
#db-auth-shell .db-form-inner{max-width:390px}
#db-auth-shell .db-panel h2{font-size:clamp(29px,3vw,38px)}
#db-auth-shell .db-auth-demo{margin-top:30px;background:#F5F7FB;border:1px solid #ABC4EF33;border-radius:14px;overflow:hidden;color:#0B1D45;box-shadow:0 20px 50px #0003;animation:dbEntry .7s cubic-bezier(.22,.61,.36,1) .16s both;max-width:580px}
#db-auth-shell .db-demo-bar{display:flex;align-items:center;gap:9px;padding:12px 16px;border-bottom:1px solid #DDE5F0;background:#fff;font-size:10px}
#db-auth-shell .db-demo-bar>span:last-child{margin-left:auto;font-size:9px;color:#647995}
#db-auth-shell .db-demo-symbol{display:grid;place-items:center;background:#0B1D45;color:#fff;width:23px;height:23px;border-radius:6px;font-weight:700}
#db-auth-shell .db-demo-grid{display:grid;grid-template-columns:69px 1fr}
#db-auth-shell .db-demo-rail{padding:20px 12px;background:#0B1D45;font-size:9px;color:#ADBED9}
#db-auth-shell .db-demo-canvas{padding:19px 20px;min-width:0}
#db-auth-shell .db-demo-canvas>small{font-size:8px;color:#6682AC;letter-spacing:.12em}
#db-auth-shell .db-demo-canvas h3{font:400 23px/1.3 Newsreader;margin:9px 0 16px;color:#0B1D45}
#db-auth-shell .db-demo-task{display:flex;align-items:center;gap:9px;padding:11px 0;border-top:1px solid #DEE6F1;font-size:10px;animation:dbEntry .6s ease-out .3s both}
#db-auth-shell .db-demo-task i{width:8px;height:8px;border:1px solid #9FB5D5;border-radius:3px;flex:none}
#db-auth-shell .db-demo-task b{font:500 8px Archivo;margin-left:auto;background:#E8EFFC;color:#325BA6;padding:4px 6px;border-radius:4px}
#db-auth-shell .db-demo-agenda{padding:12px;background:#fff;border:1px solid #DFE7F4;border-radius:8px;margin-top:8px}
#db-auth-shell .db-demo-agenda span{font-size:8px;color:#7890B0;letter-spacing:.12em}
#db-auth-shell .db-demo-agenda strong{display:block;font:500 10px Archivo;margin:8px 0 12px}
#db-auth-shell .db-demo-agenda div{height:4px;background:#EDF1F8;border-radius:3px;margin-top:6px;width:80%}
#db-auth-shell .db-demo-agenda div:last-child{width:55%}
@media(min-width:900px) and (max-height:820px){#db-auth-shell .db-story{padding:28px 42px}#db-auth-shell .db-story-content{padding:22px 0}#db-auth-shell .db-story h1{font-size:39px}#db-auth-shell .db-auth-demo{margin-top:20px}#db-auth-shell .db-demo-canvas{padding:15px 20px}}
@media(max-width:900px){#db-auth-shell .db-auth-layout{display:block;min-height:100dvh}#db-auth-shell .db-story{padding:20px 24px}#db-auth-shell .db-story-content,#db-auth-shell .db-story-footer{display:none}#db-auth-shell .db-form-side{padding:26px clamp(22px,6vw,65px) 38px;min-height:calc(100dvh - 85px)}#db-auth-shell .db-form-top{margin-bottom:20px}}


/* Authentication/onboarding controls retain readable labels at narrow sizes. */
#db-auth-shell :is(button,label,summary){max-width:100%;min-width:0;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
#db-auth-shell :is(h1,h2,h3,p,strong,small){min-width:0;overflow-wrap:anywhere}
#db-auth-shell :is(.db-auth-demo,.db-onboard-card){min-width:0}
