:root{
  color-scheme:dark;
  --bg:#050b12;
  --bg2:#08131e;
  --surface:#0d1a27;
  --surface2:#101f2e;
  --surface3:#142638;
  --line:rgba(255,255,255,.085);
  --line-gold:rgba(225,181,82,.34);
  --gold:#e2b85c;
  --gold2:#f5d98b;
  --gold3:#a97a2c;
  --text:#f5f7f9;
  --muted:#91a1ad;
  --muted2:#697b8a;
  --green:#69d6a1;
  --red:#ff8b9d;
  --blue:#82b9ff;
  --shadow:0 18px 60px rgba(0,0,0,.28);
  --radius:22px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{background:var(--bg);min-height:100%;font-family:"Cairo","Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif}
body{margin:0;min-height:100%;background:var(--bg);color:var(--text);overscroll-behavior:none}
button,input,textarea{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.55;cursor:not-allowed}
a{color:inherit}
#mobile-root{min-height:100dvh}
.ambient{position:fixed;pointer-events:none;border-radius:50%;filter:blur(10px);opacity:.18;z-index:0}
.ambient-a{width:330px;height:330px;right:-150px;top:-130px;background:radial-gradient(circle,#f0c766 0,#6c4a15 38%,transparent 72%)}
.ambient-b{width:360px;height:360px;left:-210px;bottom:4%;background:radial-gradient(circle,#1b5c87 0,#0a273d 42%,transparent 72%)}

/* Splash */
.splash{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;position:relative;overflow:hidden;background:radial-gradient(circle at 50% 36%,#112438 0,#07121d 40%,#040a10 72%)}
.splash img{width:112px;height:112px;position:relative;z-index:2;filter:drop-shadow(0 12px 30px rgba(225,181,82,.24));animation:splashIn .75s ease both}
.splash b{font-size:1.8rem;letter-spacing:.03em;margin-top:10px;z-index:2}.splash span{color:var(--gold);font-size:.78rem;letter-spacing:.3em;text-transform:uppercase;z-index:2}
.splash i{width:46px;height:2px;border-radius:999px;background:linear-gradient(90deg,transparent,var(--gold),transparent);margin-top:20px;animation:pulse 1.6s ease-in-out infinite;z-index:2}
.splash-orbit{position:absolute;width:260px;height:260px;border:1px solid rgba(226,184,92,.14);border-radius:50%;box-shadow:0 0 0 42px rgba(226,184,92,.025),0 0 0 84px rgba(226,184,92,.015)}
@keyframes splashIn{from{opacity:0;transform:translateY(10px) scale(.92)}to{opacity:1;transform:none}}@keyframes pulse{50%{opacity:.25;transform:scaleX(.6)}}

/* Auth */
.auth-page{min-height:100dvh;position:relative;overflow:hidden;padding:max(30px,env(safe-area-inset-top)) 20px max(28px,env(safe-area-inset-bottom));background:linear-gradient(180deg,#07111b 0,#050b12 55%,#050a10 100%)}
.auth-brand,.auth-card,.install-card,.auth-footer{position:relative;z-index:1;max-width:520px;margin-left:auto;margin-right:auto}
.auth-brand{text-align:center;padding:7px 10px 28px}
.logo-crown{width:100px;height:100px;margin:0 auto 15px;position:relative}.logo-crown img{width:100%;height:100%;filter:drop-shadow(0 16px 28px rgba(226,184,92,.18))}.logo-crown>span{position:absolute;top:-5px;left:-4px;color:var(--gold2);width:28px;height:28px;display:grid;place-items:center}
.eyebrow{margin:0 0 9px;color:var(--gold);font-size:.67rem;font-weight:800;letter-spacing:.24em}
.auth-brand h1{margin:0;font-size:clamp(2.05rem,9vw,3.1rem);line-height:1.13;letter-spacing:-.04em}.auth-brand h1 em{font-style:normal;background:linear-gradient(90deg,var(--gold3),var(--gold2),var(--gold));-webkit-background-clip:text;color:transparent}
.auth-brand>p:last-of-type{margin:14px auto 0;color:#a6b5bf;font-size:.9rem;line-height:1.85;max-width:390px}
.trust-row{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:17px}.trust-row span{display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid rgba(255,255,255,.07);border-radius:999px;background:#0b1824;color:#aab8c2;font-size:.68rem}.trust-row svg{width:15px;height:15px;color:var(--gold)}
.auth-card{padding:20px;border-radius:28px;border:1px solid rgba(226,184,92,.18);background:linear-gradient(145deg,#0e1c2a,#09141f 70%);box-shadow:0 26px 70px rgba(0,0,0,.35),inset 0 1px 0 rgba(255,255,255,.04);position:relative}
.auth-card:before{content:"";position:absolute;inset:0;border-radius:inherit;padding:1px;background:linear-gradient(135deg,rgba(248,215,137,.3),transparent 30%,transparent 70%,rgba(58,126,167,.14));-webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);-webkit-mask-composite:xor;mask-composite:exclude;pointer-events:none}
.auth-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:17px}.auth-card-head span:first-child{font-size:.7rem;color:var(--gold)}.auth-card-head h2{margin:4px 0 0;font-size:1.16rem}.read-only-badge{padding:6px 8px;border-radius:999px;border:1px solid rgba(105,214,161,.25);background:rgba(105,214,161,.07);color:#8de2b6!important;font-size:.58rem!important;font-weight:800;letter-spacing:.08em;white-space:nowrap}
.auth-card form{display:flex;flex-direction:column;gap:13px}.auth-card label,.lock-card label{display:flex;flex-direction:column;gap:7px;color:#b7c3cc;font-size:.75rem}.auth-card label small{color:var(--muted2);font-weight:400;margin-inline-start:6px}.auth-card input,.auth-card textarea,.lock-card input,.search-card input{width:100%;border:1px solid rgba(255,255,255,.095);background:#07131e;color:var(--text);border-radius:15px;padding:13px 14px;outline:none;transition:.2s;border-color:.2s}.auth-card input:focus,.auth-card textarea:focus,.lock-card input:focus,.search-card input:focus{border-color:rgba(226,184,92,.48);box-shadow:0 0 0 3px rgba(226,184,92,.06)}.auth-card textarea{resize:vertical;min-height:58px;direction:ltr;text-align:left;font-size:.72rem;line-height:1.45}
.primary-btn{border:0;border-radius:16px;padding:13px 17px;background:linear-gradient(135deg,#a9792a 0,#edc96c 48%,#b98630 100%);color:#101722;font-weight:900;box-shadow:0 12px 28px rgba(188,139,47,.18),inset 0 1px 0 rgba(255,255,255,.45);display:flex;align-items:center;justify-content:center;gap:8px;min-height:49px}.primary-btn svg{width:19px;height:19px}.primary-btn.compact{width:auto;display:inline-flex;padding-inline:22px}.auth-submit{margin-top:3px}
.text-btn{display:block;margin:13px auto 0;background:none;border:0;color:#91a3b1;font-size:.73rem}.danger-text{color:#d9919d}.security-copy{margin:16px 2px 0!important;padding-top:14px;border-top:1px solid rgba(255,255,255,.065);color:#728796!important;font-size:.68rem!important;line-height:1.7!important;text-align:center}
.alert{padding:10px 12px;border-radius:13px;margin-bottom:13px;font-size:.73rem;line-height:1.6}.alert.error{background:rgba(162,51,69,.16);border:1px solid rgba(245,102,126,.24);color:#ffc0ca}.alert.success{background:rgba(47,139,96,.12);border:1px solid rgba(105,214,161,.2);color:#a5e6c3}.pair-ready{display:block;margin:-4px 0 13px;padding:8px 10px;border-radius:12px;background:rgba(226,184,92,.08);border:1px solid rgba(226,184,92,.14);color:#e8c977;font-size:.68rem;text-align:center}
.install-card{margin-top:13px;padding:12px 15px;border-radius:18px;background:#0b1722;border:1px solid var(--line)}.install-card>div{display:flex;align-items:center;gap:10px}.install-card svg{color:var(--gold)}.install-card div div{display:flex;flex-direction:column;gap:2px}.install-card b{font-size:.76rem}.install-card span{font-size:.66rem;color:#8294a1}.auth-footer{text-align:center;color:#526574;font-size:.6rem;letter-spacing:.08em;margin-top:22px}

/* Lock/privacy */
.lock-page{display:flex;align-items:center}.lock-card{position:relative;z-index:1;width:min(100%,470px);margin:auto;text-align:center;padding:28px 21px;border-radius:28px;background:linear-gradient(145deg,#0f1d2b,#08131e);border:1px solid rgba(226,184,92,.17);box-shadow:var(--shadow)}.lock-glyph{width:64px;height:64px;border-radius:20px;margin:0 auto 16px;display:grid;place-items:center;color:var(--gold);background:#172334;border:1px solid rgba(226,184,92,.18)}.lock-glyph svg{width:28px;height:28px}.lock-card h1{margin:0;font-size:1.55rem}.lock-card>p:not(.eyebrow){color:#91a1ad;font-size:.82rem;line-height:1.8;margin:10px 0 19px}.lock-card form{text-align:right;display:flex;flex-direction:column;gap:13px}
.privacy-screen{min-height:100dvh;background:#04090f;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:30px}.privacy-screen img{width:72px;height:72px;opacity:.72}.privacy-screen h1{font-size:1.2rem;margin:12px 0 4px}.privacy-screen p{color:#748592;font-size:.78rem}.privacy-screen>svg{margin-top:18px;color:var(--gold);opacity:.8}

/* App shell */
.app-shell{min-height:100dvh;position:relative;background:linear-gradient(180deg,#07111b 0,#050b12 52%,#07101a 100%);padding-bottom:calc(92px + env(safe-area-inset-bottom));overflow:hidden}
.app-topbar{height:70px;padding:max(12px,env(safe-area-inset-top)) 16px 8px;display:flex;align-items:center;justify-content:space-between;position:relative;z-index:4}.brand-mini{display:flex;align-items:center;gap:9px}.brand-mini img{width:40px;height:40px}.brand-mini>div{display:flex;flex-direction:column;line-height:1.05}.brand-mini b{font-size:1rem}.brand-mini span{font-size:.57rem;color:var(--gold);text-transform:uppercase;letter-spacing:.18em;margin-top:4px}.topbar-side{display:flex;align-items:center;gap:9px}.connection-dot{width:9px;height:9px;border-radius:50%;box-shadow:0 0 0 4px rgba(255,255,255,.03)}.connection-dot.online{background:var(--green);box-shadow:0 0 14px rgba(105,214,161,.65)}.connection-dot.offline{background:var(--red)}
.icon-btn{width:39px;height:39px;border-radius:13px;border:1px solid rgba(255,255,255,.08);background:#0c1824;color:#aab8c2;display:grid;place-items:center}.icon-btn svg{width:18px;height:18px}.refresh-btn{flex:none}
.identity-strip{margin:0 16px;position:relative;z-index:2;padding:11px 13px;border-radius:17px;border:1px solid rgba(226,184,92,.12);background:linear-gradient(90deg,rgba(226,184,92,.055),rgba(15,29,43,.9));display:flex;align-items:center;justify-content:space-between;gap:10px}.identity-strip>div{min-width:0;display:flex;flex-direction:column}.identity-strip>div span{font-size:.77rem;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.identity-strip small{color:#748896;font-size:.6rem;margin-top:3px}.secure-pill{display:flex;align-items:center;gap:5px;color:#a6d9bd;font-size:.59rem;white-space:nowrap}.secure-pill svg{width:14px;height:14px}
.content-wrap{position:relative;z-index:2;padding:18px 16px 14px;max-width:760px;margin:auto}.view-stack{display:flex;flex-direction:column;gap:13px}
.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:0 2px 3px}.section-head>div>span{color:var(--gold);font-size:.62rem;font-weight:800;letter-spacing:.08em}.section-head h2{font-size:1.48rem;margin:4px 0 0;letter-spacing:-.02em}.section-head p{margin:5px 0 0;color:#778a98;font-size:.7rem}

/* Dashboard */
.hero-overview{min-height:190px;border-radius:27px;border:1px solid rgba(226,184,92,.18);background:radial-gradient(circle at 12% 10%,rgba(226,184,92,.1),transparent 34%),linear-gradient(145deg,#102134 0,#0a1724 75%);position:relative;overflow:hidden;padding:22px;display:flex;align-items:center;justify-content:space-between;box-shadow:0 20px 50px rgba(0,0,0,.24)}
.hero-overview:after{content:"";position:absolute;inset:auto -15% -70% auto;width:240px;height:240px;border:1px solid rgba(226,184,92,.09);border-radius:50%;box-shadow:0 0 0 28px rgba(226,184,92,.025),0 0 0 58px rgba(226,184,92,.018)}
.hero-copy{position:relative;z-index:2;max-width:68%}.hero-tag{font-size:.56rem;font-weight:800;letter-spacing:.18em;color:#8fa2b0}.hero-copy h3{margin:9px 0 8px;font-size:1.45rem;line-height:1.32}.hero-copy h3 em{font-style:normal;color:var(--gold2)}.hero-copy p{margin:0;color:#8296a4;font-size:.69rem;line-height:1.75}
.hero-orbit{width:82px;height:82px;border-radius:50%;border:1px solid rgba(226,184,92,.22);display:grid;place-items:center;position:relative;color:var(--gold);background:radial-gradient(circle,rgba(226,184,92,.08),transparent 65%);z-index:2}.hero-orbit span{width:48px;height:48px;border-radius:17px;display:grid;place-items:center;background:#142538;border:1px solid rgba(226,184,92,.14)}.hero-orbit span svg{width:26px;height:26px}.hero-orbit i,.hero-orbit b{position:absolute;border:1px solid rgba(226,184,92,.12);border-radius:50%}.hero-orbit i{inset:-10px}.hero-orbit b{inset:-21px;opacity:.55}
.metric-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.metric-card{min-height:139px;border-radius:21px;padding:15px;border:1px solid var(--line);background:linear-gradient(145deg,#0e1c29,#0a1722);display:flex;flex-direction:column;position:relative;overflow:hidden}.metric-card.gold{border-color:rgba(226,184,92,.18);background:linear-gradient(145deg,#182538,#0c1824)}.metric-card>span{display:flex;align-items:center;gap:7px;color:#8598a6;font-size:.67rem}.metric-card>span svg{width:16px;height:16px;color:var(--gold)}.metric-card>strong{font-size:1.55rem;margin:12px 0 7px;line-height:1.15;overflow-wrap:anywhere}.metric-card>button{margin-top:auto;border:0;background:none;color:#d6b55f;padding:0;display:flex;align-items:center;gap:4px;font-size:.65rem;text-align:right}.metric-card>button svg{width:14px;height:14px}.metric-card>small{margin-top:auto;color:#657a88;font-size:.58rem}.metric-card.finance>strong{font-size:1.06rem;color:#e7edf1}
.security-panel{display:flex;align-items:center;gap:12px;padding:13px 14px;border:1px solid rgba(105,214,161,.12);background:linear-gradient(90deg,rgba(105,214,161,.055),rgba(10,24,34,.8));border-radius:18px}.security-panel>div{width:39px;height:39px;border-radius:13px;display:grid;place-items:center;color:#82d8aa;background:rgba(105,214,161,.08)}.security-panel>div svg{width:20px}.security-panel>span{display:flex;flex-direction:column;gap:3px}.security-panel b{font-size:.72rem}.security-panel small{font-size:.61rem;color:#748996;line-height:1.6}

/* Common states */
.state-card,.empty-card{border:1px solid var(--line);background:linear-gradient(145deg,#0f1e2c,#091520);border-radius:24px;padding:26px 18px;text-align:center;box-shadow:var(--shadow)}.state-card{margin-top:10vh}.state-card>svg,.empty-card>svg{color:var(--gold);width:36px;height:36px}.state-card h2,.empty-card h3{font-size:1.05rem;margin:13px 0 7px}.state-card p,.empty-card p{margin:0;color:#8193a0;font-size:.75rem;line-height:1.75}.state-card .primary-btn{margin:18px auto 0}.state-icon{width:44px;height:44px;display:grid;place-items:center;margin:auto;border-radius:50%;border:1px solid rgba(255,139,157,.24);color:var(--red);font-size:1.3rem}.offline-card svg{width:42px;height:42px}.loading-state .spinner{margin:auto}
.spinner{width:18px;height:18px;border:2px solid rgba(10,18,25,.25);border-top-color:#101722;border-radius:50%;animation:spin .8s linear infinite}.spinner.large{display:block;width:32px;height:32px;border-color:rgba(226,184,92,.12);border-top-color:var(--gold)}@keyframes spin{to{transform:rotate(360deg)}}

/* Appointments */
.segmented{display:grid;grid-template-columns:1fr 1fr;padding:4px;background:#081521;border:1px solid var(--line);border-radius:16px}.segmented button{border:0;border-radius:12px;padding:9px;background:transparent;color:#7e919f;font-weight:700;font-size:.72rem}.segmented button.active{background:#142538;color:#f1d27a;box-shadow:inset 0 0 0 1px rgba(226,184,92,.14)}
.appointments-list{display:flex;flex-direction:column;gap:9px}.appointment-card{border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,#0f1d2b,#091621);padding:13px;display:grid;grid-template-columns:63px minmax(0,1fr);gap:12px}.time-block{border-left:1px solid rgba(255,255,255,.07);padding-left:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.time-block b{font-size:.87rem;color:var(--gold2)}.time-block span{font-size:.6rem;color:#667b89}.appointment-main{min-width:0}.appointment-title{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}.appointment-title h3{font-size:.9rem;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.status-chip{flex:none;font-style:normal;padding:4px 7px;border-radius:999px;background:rgba(130,185,255,.08);border:1px solid rgba(130,185,255,.16);color:#9bc8ff;font-size:.58rem}.status-chip[data-status="completed"],.status-chip[data-status="done"]{color:#8adcb0;border-color:rgba(105,214,161,.18);background:rgba(105,214,161,.07)}.status-chip[data-status="cancelled"],.status-chip[data-status="canceled"]{color:#ff9cac;border-color:rgba(255,139,157,.18);background:rgba(255,139,157,.07)}.appointment-main>p{font-size:.66rem;color:#7c909e;margin:5px 0}.appointment-meta{display:flex;flex-wrap:wrap;gap:5px}.appointment-meta span{font-size:.56rem;padding:4px 6px;background:#08131e;border-radius:7px;color:#788c99}.appointment-meta .medical-alert{color:#ff9dad;background:rgba(159,51,69,.12)}.open-patient{border:0;background:none;color:#dfbf67;padding:8px 0 0;display:flex;align-items:center;gap:5px;font-size:.62rem}.open-patient svg{width:14px;height:14px}

/* Patients */
.search-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;border:1px solid var(--line);background:#0b1824;border-radius:18px;padding:8px}.search-card>div{display:flex;align-items:center;gap:7px}.search-card svg{width:18px;color:#617786}.search-card input{border:0!important;box-shadow:none!important;background:transparent!important;padding:8px 5px!important}.search-card button{border:0;border-radius:12px;background:linear-gradient(135deg,#9e742e,#dfbc63);color:#111924;font-weight:800;padding:0 16px;font-size:.7rem}.patient-list{display:flex;flex-direction:column;gap:8px}.patient-card{width:100%;border:1px solid var(--line);border-radius:19px;background:linear-gradient(145deg,#0f1e2c,#091520);padding:11px 12px;color:var(--text);display:grid;grid-template-columns:43px minmax(0,1fr) auto;gap:10px;align-items:center;text-align:right}.avatar{width:43px;height:43px;border-radius:14px;background:linear-gradient(145deg,#1a2d40,#122335);border:1px solid rgba(226,184,92,.14);display:grid;place-items:center;color:var(--gold2);font-weight:900}.patient-main{min-width:0;display:flex;flex-direction:column;gap:3px}.patient-main b{font-size:.82rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.patient-main small{color:#718593;font-size:.61rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.patient-side{display:flex;align-items:center;gap:6px}.patient-side em{font-style:normal;color:#ff9cac;background:rgba(160,49,68,.12);border-radius:999px;padding:4px 7px;font-size:.54rem;white-space:nowrap}.patient-side em.muted{color:#738794;background:#08131e}.patient-side svg{width:14px;color:#a18346}.pager{display:grid;grid-template-columns:1fr auto 1fr;gap:9px;align-items:center}.pager button{border:1px solid var(--line);background:#0d1a27;color:#c0cad0;border-radius:12px;padding:9px}.pager span{text-align:center;font-size:.63rem;color:#718592}

/* Patient record */
.back-btn{align-self:flex-start;border:0;background:none;color:#c9a955;padding:4px 0;display:flex;align-items:center;gap:6px;font-size:.68rem}.back-btn svg{width:16px;height:16px}.quick-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}.quick-actions button{border:1px solid rgba(226,184,92,.13);border-radius:18px;background:linear-gradient(145deg,#132437,#0b1825);color:var(--text);padding:13px;display:grid;grid-template-columns:34px minmax(0,1fr) 16px;gap:8px;align-items:center;text-align:right}.quick-actions>button>svg:first-child{width:23px;color:var(--gold)}.quick-actions>button>svg:last-child{width:14px;color:#8d733d}.quick-actions span{display:flex;flex-direction:column;gap:2px}.quick-actions b{font-size:.75rem}.quick-actions small{color:#718694;font-size:.55rem}
.record-card{border:1px solid var(--line);border-radius:21px;background:linear-gradient(145deg,#0e1c29,#091520);padding:15px}.record-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-bottom:11px;border-bottom:1px solid rgba(255,255,255,.06)}.record-head h3{margin:0;font-size:.85rem}.record-head span{color:#718795;font-size:.57rem}.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:13px 0 0}.detail-grid>div{padding:10px;border-radius:13px;background:#07131e}.detail-grid .wide{grid-column:1/-1}.detail-grid dt{font-size:.55rem;color:#617683}.detail-grid dd{margin:4px 0 0;font-size:.7rem;overflow-wrap:anywhere}.alert-record{border-color:rgba(255,139,157,.16)}.alert-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.alert-chips span{padding:6px 8px;border-radius:999px;color:#ffc0ca;background:rgba(166,51,70,.13);border:1px solid rgba(255,139,157,.12);font-size:.58rem}.medical-note{margin-top:11px;padding:10px 11px;border-radius:13px;background:#07131e}.medical-note b{font-size:.62rem;color:#d4b45f}.medical-note p{margin:5px 0 0;color:#a3b1ba;font-size:.67rem;line-height:1.7;white-space:pre-wrap}.empty-copy{color:#718592;font-size:.67rem;margin:12px 0 0}.timeline{display:flex;flex-direction:column;margin-top:12px}.timeline article{display:grid;grid-template-columns:8px minmax(0,1fr) auto;gap:9px;padding:10px 0;border-bottom:1px solid rgba(255,255,255,.05)}.timeline article:last-child{border-bottom:0}.timeline i{width:7px;height:7px;border-radius:50%;background:var(--gold);margin-top:5px;box-shadow:0 0 0 4px rgba(226,184,92,.06)}.timeline article>div{display:flex;flex-direction:column;gap:3px}.timeline b{font-size:.7rem}.timeline span{font-size:.56rem;color:#708592}.timeline p{font-size:.63rem;color:#99a9b3;margin:3px 0 0;line-height:1.6}.timeline em{font-style:normal;color:#87b7ee;font-size:.54rem}.radiology-block{display:flex;gap:11px;align-items:center;border-radius:18px;padding:13px;background:rgba(83,104,120,.07);border:1px dashed rgba(255,255,255,.08);color:#718592}.radiology-block>svg{width:23px;flex:none}.radiology-block span{display:flex;flex-direction:column;gap:3px}.radiology-block b{font-size:.68rem}.radiology-block small{font-size:.56rem;line-height:1.5}

/* Treatment / finance */
.mini-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.mini-stats article,.finance-grid article{border:1px solid var(--line);background:linear-gradient(145deg,#0f1d2b,#091520);border-radius:17px;padding:12px;display:flex;flex-direction:column;gap:5px}.mini-stats span,.finance-grid span{font-size:.56rem;color:#718592}.mini-stats b{font-size:1.12rem;color:var(--gold2)}.treatment-list{display:flex;flex-direction:column;gap:9px}.treatment-card{border:1px solid var(--line);border-radius:20px;background:linear-gradient(145deg,#0f1d2b,#091520);padding:14px}.treatment-title{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.treatment-title>span{display:flex;flex-direction:column;gap:3px}.treatment-title b{font-size:.8rem}.treatment-title small{font-size:.55rem;color:#718592}.treatment-title em{font-style:normal;color:#8dbef3;background:rgba(84,138,201,.08);border-radius:999px;padding:4px 7px;font-size:.54rem}.treatment-card>p{font-size:.67rem;color:#9aaab4;line-height:1.65}.execution-note{padding:9px 10px;border-right:2px solid rgba(226,184,92,.28);background:#07131e;border-radius:10px}.execution-note small{color:#b6974f;font-size:.54rem}.execution-note p{margin:4px 0 0;font-size:.63rem;color:#9aaab4}.tag-row,.price-row{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}.tag-row span,.price-row span{padding:5px 7px;border-radius:8px;background:#07131e;color:#788d9a;font-size:.54rem}.price-row b{color:#d9c276}.finance-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.finance-grid b{font-size:.82rem;color:#e6edf1;overflow-wrap:anywhere}.finance-timeline{display:flex;flex-direction:column;gap:8px;margin-top:12px}.finance-row{padding:11px;border-radius:14px;background:#07131e;border-right:3px solid rgba(85,137,196,.35)}.finance-row.payment{border-right-color:rgba(105,214,161,.45)}.finance-row>div{display:flex;justify-content:space-between;gap:8px}.finance-row b{font-size:.68rem}.finance-row span{font-size:.54rem;color:#718592}.finance-row p{font-size:.61rem;color:#9aaab4;line-height:1.55;margin:6px 0 0}.finance-row small{color:#718592;font-size:.55rem}

/* Update and bottom nav */
.update-banner{border:1px solid rgba(226,184,92,.18);background:linear-gradient(90deg,#162335,#0c1925);border-radius:18px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.update-banner>div{display:flex;align-items:center;gap:9px}.update-banner>div>svg{color:var(--gold)}.update-banner span{display:flex;flex-direction:column;gap:2px}.update-banner b{font-size:.68rem}.update-banner small{font-size:.54rem;color:#738795}.update-banner a{background:linear-gradient(135deg,#a97d31,#e5c266);color:#111925;text-decoration:none;border-radius:10px;padding:7px 10px;font-weight:800;font-size:.6rem}.update-banner.critical{border-color:rgba(255,139,157,.2)}
.bottom-nav{position:fixed;z-index:10;left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));height:68px;border:1px solid rgba(255,255,255,.09);background:#08131ef2;border-radius:22px;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;padding:5px;box-shadow:0 18px 50px rgba(0,0,0,.45)}.bottom-nav button{border:0;border-radius:17px;background:transparent;color:#667b89;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}.bottom-nav button svg{width:20px;height:20px}.bottom-nav button span{font-size:.56rem}.bottom-nav button.active{color:#f2d17a;background:linear-gradient(145deg,rgba(226,184,92,.1),rgba(226,184,92,.035));box-shadow:inset 0 0 0 1px rgba(226,184,92,.1)}

@media(min-width:620px){.auth-page{padding-inline:28px}.content-wrap{padding-inline:22px}.metric-grid{grid-template-columns:repeat(4,1fr)}.identity-strip{max-width:716px;margin-left:auto;margin-right:auto}.app-topbar{max-width:748px;margin:auto;width:100%}.bottom-nav{width:520px;left:50%;right:auto;transform:translateX(-50%)}.hero-copy{max-width:75%}.hero-overview{min-height:210px}}
@media(max-width:380px){.auth-page{padding-inline:14px}.auth-brand h1{font-size:1.92rem}.auth-card{padding:17px}.trust-row span{font-size:.6rem}.metric-card{padding:12px}.metric-card>strong{font-size:1.35rem}.appointment-card{grid-template-columns:56px minmax(0,1fr)}.quick-actions{grid-template-columns:1fr}.detail-grid{grid-template-columns:1fr}.detail-grid .wide{grid-column:1}.identity-strip{margin-inline:12px}.secure-pill{font-size:.52rem}.content-wrap{padding-inline:12px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important}}


/* MaxDent Mobile v1.9 — local QR pairing scanner + recovery */
.pairing-zone{display:grid;gap:11px;padding:14px;border:1px solid rgba(94,229,208,.14);border-radius:19px;background:linear-gradient(145deg,rgba(25,69,78,.22),rgba(7,19,30,.86));margin-bottom:2px}
.pairing-zone-head{display:flex;align-items:center;gap:10px}.pairing-zone-head>span{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;color:#65e1ce;background:rgba(71,215,194,.08);border:1px solid rgba(94,229,208,.16)}.pairing-zone-head svg{width:20px;height:20px}.pairing-zone-head div{display:flex;flex-direction:column;gap:2px}.pairing-zone-head b{font-size:.82rem}.pairing-zone-head small{font-size:.65rem;color:#8196a4;line-height:1.55}
.scan-qr-btn{border:1px solid rgba(105,225,205,.32);border-radius:15px;min-height:50px;background:linear-gradient(135deg,#4fd7c1,#34b8b2);color:#06151b;font-weight:950;display:flex;align-items:center;justify-content:center;gap:9px;box-shadow:0 12px 28px rgba(50,190,175,.13),inset 0 1px rgba(255,255,255,.35)}.scan-qr-btn svg{width:21px;height:21px}.scan-qr-btn:active{transform:translateY(1px)}
.compact-link{margin:0 auto!important;display:inline-flex!important;align-items:center;gap:6px}.compact-link svg{width:16px;height:16px}.manual-pair-label{margin-top:1px}.manual-pair-label small{display:block;margin:0!important;line-height:1.55}.manual-pair-label textarea{margin-top:2px}
.pair-ready-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:11px 12px;border-radius:15px;border:1px solid rgba(105,214,161,.2);background:rgba(47,139,96,.1)}.pair-ready-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:rgba(105,214,161,.09);color:#82e3b0}.pair-ready-icon svg{width:20px;height:20px}.pair-ready-card div{display:flex;flex-direction:column;gap:2px}.pair-ready-card b{font-size:.76rem;color:#b7efd0}.pair-ready-card small{font-size:.62rem;color:#7fa28e}.pair-ready-card button{border:0;background:none;color:#e2c678;font-size:.64rem;font-weight:800;padding:8px}
.qr-scanner-sheet{position:fixed;z-index:50;inset:0;background:radial-gradient(circle at 50% 25%,#112536 0,#06101a 54%,#03080d 100%);padding:max(20px,env(safe-area-inset-top)) 18px max(20px,env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;justify-content:center;gap:17px}.qr-scanner-head{width:min(100%,520px);display:flex;align-items:center;justify-content:space-between;gap:15px}.qr-scanner-head>div{display:flex;flex-direction:column;gap:3px}.qr-scanner-head b{font-size:1rem}.qr-scanner-head span{color:#8297a5;font-size:.68rem}.qr-scanner-head button{width:42px;height:42px;border-radius:14px;border:1px solid rgba(255,255,255,.1);background:#0b1823;color:#cfdae0;display:grid;place-items:center}.qr-scanner-head button svg{width:20px;height:20px}
.qr-camera-wrap{position:relative;width:min(100%,520px);aspect-ratio:3/4;max-height:68dvh;border-radius:28px;overflow:hidden;background:#020609;border:1px solid rgba(93,223,204,.2);box-shadow:0 30px 80px rgba(0,0,0,.5)}.qr-camera-wrap video{width:100%;height:100%;object-fit:cover;background:#020609}.qr-camera-wrap:after{content:"";position:absolute;inset:0;box-shadow:inset 0 0 0 999px rgba(2,8,13,.34);pointer-events:none}.qr-target{position:absolute;z-index:2;width:min(68%,285px);aspect-ratio:1;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 0 999px rgba(2,8,13,.28)}.qr-target i{position:absolute;width:45px;height:45px;border-color:#62e1ce;border-style:solid}.qr-target i:nth-child(1){top:0;left:0;border-width:3px 0 0 3px;border-radius:12px 0 0 0}.qr-target i:nth-child(2){top:0;right:0;border-width:3px 3px 0 0;border-radius:0 12px 0 0}.qr-target i:nth-child(3){bottom:0;left:0;border-width:0 0 3px 3px;border-radius:0 0 0 12px}.qr-target i:nth-child(4){bottom:0;right:0;border-width:0 3px 3px 0;border-radius:0 0 12px 0}.qr-scan-line{position:absolute;z-index:3;left:18%;right:18%;top:29%;height:2px;background:linear-gradient(90deg,transparent,#78ead8,transparent);box-shadow:0 0 16px rgba(103,234,214,.9);animation:qrScan 2.2s ease-in-out infinite}.qr-scanner-sheet>p{margin:0;color:#9fb0ba;font-size:.74rem;text-align:center;line-height:1.65;min-height:1.2em}.scanner-manual{margin:0!important;display:flex!important;align-items:center;gap:7px;color:#c5d1d8}.scanner-manual svg{width:17px;height:17px}@keyframes qrScan{0%,100%{top:29%;opacity:.65}50%{top:70%;opacity:1}}
@media(max-width:390px){.qr-camera-wrap{aspect-ratio:4/5}.pairing-zone{padding:12px}.pair-ready-card{grid-template-columns:auto 1fr}.pair-ready-card button{grid-column:2;justify-self:start;padding:2px 0}}

/* v1.9 pairing recovery */
.repair-link{margin-top:10px;width:100%;justify-content:center}
.repair-zone{border-color:rgba(255,190,72,.28);background:linear-gradient(180deg,rgba(255,190,72,.06),rgba(7,17,31,.18))}
.external-camera-tip{display:block;margin-top:10px;line-height:1.7;color:var(--muted,#8fa4bb);font-size:.78rem}


/* MaxDent Mobile Android v2.1 — Stage 2 local dashboard */
.dashboard-v2{gap:14px}
.dash-hero{min-height:205px;background:
  radial-gradient(circle at 18% 18%,rgba(226,184,92,.13),transparent 32%),
  radial-gradient(circle at 82% 86%,rgba(52,120,163,.11),transparent 38%),
  linear-gradient(145deg,#102235 0,#0a1723 72%);
  box-shadow:0 24px 60px rgba(0,0,0,.27),inset 0 1px 0 rgba(255,255,255,.025)}
.dash-hero .hero-tag{display:inline-flex;align-items:center;gap:6px}
.dash-hero .hero-tag svg{width:14px;height:14px}
.hero-fresh{display:flex;align-items:center;gap:7px;margin-top:15px;color:#8195a2;font-size:.62rem}
.hero-fresh>span{width:7px;height:7px;border-radius:50%}.hero-fresh>span.online{background:var(--green);box-shadow:0 0 12px rgba(105,214,161,.55)}.hero-fresh>span.offline{background:var(--red)}

.dashboard-primary-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dash-primary-card{min-height:142px;border:1px solid var(--line);border-radius:22px;background:linear-gradient(145deg,#102031,#091521);color:var(--text);padding:14px;display:flex;flex-direction:column;align-items:flex-start;text-align:right;position:relative;overflow:hidden}
button.dash-primary-card{cursor:pointer}
.dash-primary-card:after{content:"";position:absolute;width:100px;height:100px;border:1px solid rgba(255,255,255,.035);border-radius:50%;left:-42px;bottom:-55px;box-shadow:0 0 0 18px rgba(255,255,255,.012)}
.dash-primary-card.gold{border-color:rgba(226,184,92,.25);background:radial-gradient(circle at 15% 10%,rgba(226,184,92,.12),transparent 36%),linear-gradient(145deg,#1a2a3c,#0d1926)}
.dash-primary-card.live{border-color:rgba(105,214,161,.17);background:radial-gradient(circle at 15% 10%,rgba(105,214,161,.09),transparent 38%),linear-gradient(145deg,#102431,#0b1822)}
.dash-primary-card.finance{border-color:rgba(126,177,243,.16);background:radial-gradient(circle at 15% 10%,rgba(126,177,243,.08),transparent 38%),linear-gradient(145deg,#112333,#0a1722)}
.dash-primary-card.privacy{opacity:.86}
.dash-card-icon{width:35px;height:35px;border-radius:12px;display:grid;place-items:center;background:rgba(226,184,92,.08);border:1px solid rgba(226,184,92,.12);color:var(--gold);margin-bottom:12px}
.dash-primary-card.live .dash-card-icon{color:#7ae0b0;background:rgba(105,214,161,.07);border-color:rgba(105,214,161,.12)}
.dash-primary-card.finance .dash-card-icon{color:#92bfff;background:rgba(126,177,243,.07);border-color:rgba(126,177,243,.12)}
.dash-card-icon svg{width:18px;height:18px}
.dash-card-copy{display:flex;flex-direction:column;min-width:0;width:100%}
.dash-card-copy small{font-size:.61rem;color:#8295a2}
.dash-card-copy strong{font-size:1.55rem;line-height:1.15;margin:4px 0 7px;letter-spacing:-.02em;overflow-wrap:anywhere}
.dash-card-copy em{display:flex;align-items:center;gap:4px;font-style:normal;color:#758a98;font-size:.56rem;line-height:1.45;margin-top:auto}
.dash-card-copy em svg{width:12px;height:12px;color:var(--gold)}
.dash-primary-card.finance .dash-card-copy strong{font-size:1.02rem;color:#dce8f5}
.dash-primary-card.privacy .dash-card-copy strong{font-size:1rem;color:#9aabb6}

.next-appointment-card{border:1px solid rgba(226,184,92,.17);background:linear-gradient(105deg,#122437,#0b1825);border-radius:20px;padding:12px 13px;color:var(--text);display:grid;grid-template-columns:42px minmax(0,1fr) 20px;align-items:center;gap:10px;text-align:right;box-shadow:0 12px 32px rgba(0,0,0,.14)}
.next-icon{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:rgba(226,184,92,.09);color:var(--gold)}
.next-icon svg{width:20px;height:20px}.next-appointment-card>span:nth-child(2){display:flex;flex-direction:column;gap:2px;min-width:0}.next-appointment-card small{font-size:.56rem;color:#788e9c}.next-appointment-card b{font-size:.79rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.next-appointment-card em{font-style:normal;font-size:.6rem;color:#a1b0b9}.next-arrow{color:#8b7343}.next-arrow svg{width:15px;height:15px}

.dash-chart-card{border:1px solid rgba(255,255,255,.08);background:linear-gradient(145deg,#0e1d2a,#09141f);border-radius:22px;padding:15px}
.dash-chart-card>header{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:14px}
.dash-chart-card>header>div{display:flex;align-items:center;gap:9px}.dash-chart-card>header>div>span{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;background:rgba(226,184,92,.08);color:var(--gold)}
.dash-chart-card>header>div>span svg{width:17px;height:17px}.dash-chart-card>header>div>div{display:flex;flex-direction:column;gap:2px}.dash-chart-card header b{font-size:.76rem}.dash-chart-card header small{font-size:.54rem;color:#728693}.dash-chart-card header em{font-style:normal;font-size:.58rem;color:#d7bc72;background:rgba(226,184,92,.07);border:1px solid rgba(226,184,92,.11);padding:5px 8px;border-radius:999px}
.dash-bars{display:flex;flex-direction:column;gap:12px}.dash-bar-row>div{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:5px}.dash-bar-row span{font-size:.58rem;color:#8598a4}.dash-bar-row b{font-size:.6rem;color:#d7e1e6}.dash-bar-row progress{display:block;width:100%;height:7px;border:0;border-radius:999px;overflow:hidden;background:#07111a;appearance:none;-webkit-appearance:none}.dash-bar-row progress::-webkit-progress-bar{background:#07111a;border-radius:999px}.dash-bar-row progress::-webkit-progress-value{border-radius:999px;background:linear-gradient(90deg,#b68635,#e7c96f)}.dash-bar-row progress.done::-webkit-progress-value{background:linear-gradient(90deg,#3e9e73,#75d7a7)}.dash-bar-row progress.muted::-webkit-progress-value{background:linear-gradient(90deg,#455765,#687d8c)}.dash-bar-row progress::-moz-progress-bar{border-radius:999px;background:linear-gradient(90deg,#b68635,#e7c96f)}.dash-bar-row progress.done::-moz-progress-bar{background:linear-gradient(90deg,#3e9e73,#75d7a7)}.dash-bar-row progress.muted::-moz-progress-bar{background:linear-gradient(90deg,#455765,#687d8c)}
.chart-skeleton{display:flex;flex-direction:column;gap:11px}.chart-skeleton i{height:8px;border-radius:999px;background:linear-gradient(90deg,#0b1722 0,#142536 50%,#0b1722 100%);background-size:200% 100%;animation:stage2Shimmer 1.4s linear infinite}.chart-skeleton i:nth-child(1){width:82%}.chart-skeleton i:nth-child(2){width:58%}.chart-skeleton i:nth-child(3){width:36%}@keyframes stage2Shimmer{to{background-position:-200% 0}}

.dashboard-subhead{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:1px 2px 0}.dashboard-subhead span{font-size:.7rem;font-weight:800;color:#dce4e9}.dashboard-subhead small{font-size:.54rem;color:#6c818f}
.dashboard-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.dashboard-actions button{border:1px solid rgba(255,255,255,.075);border-radius:18px;background:linear-gradient(145deg,#0f1f2e,#091520);color:var(--text);padding:12px;display:grid;grid-template-columns:34px minmax(0,1fr) 15px;align-items:center;gap:8px;text-align:right}
.dashboard-actions>button>svg:first-child{width:21px;color:var(--gold)}.dashboard-actions>button>svg:last-child{width:14px;color:#75653e}.dashboard-actions span{display:flex;flex-direction:column;gap:2px}.dashboard-actions b{font-size:.71rem}.dashboard-actions small{font-size:.53rem;color:#718592}

@media(min-width:620px){
  .dashboard-primary-grid{grid-template-columns:repeat(4,1fr)}
  .dash-primary-card{min-height:155px}
}
@media(max-width:380px){
  .dash-primary-card{min-height:132px;padding:12px}
  .dash-card-copy strong{font-size:1.38rem}
  .dash-card-copy em{font-size:.52rem}
  .dashboard-actions{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.chart-skeleton i{animation:none}}


/* MaxDent Mobile Android v2.2 — Stage 3 appointments + patient record */
.appointments-v3,.patients-v3,.patient-profile-v3{--stage3-line:rgba(255,255,255,.075)}
.appointment-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.appointment-summary article{min-width:0;border:1px solid var(--stage3-line);border-radius:16px;background:linear-gradient(145deg,#0f1e2c,#091520);padding:10px 8px;display:flex;flex-direction:column;gap:4px;text-align:center}.appointment-summary small{font-size:.52rem;color:#718694}.appointment-summary b{font-size:.9rem;color:#dce6eb}.appointment-summary article.warn{border-color:rgba(255,139,157,.16);background:rgba(126,36,52,.08)}.appointment-summary article.warn b{color:#ffb0bd}
.appointment-filters{display:flex;gap:7px;overflow-x:auto;padding:1px 1px 3px;scrollbar-width:none}.appointment-filters::-webkit-scrollbar{display:none}.appointment-filters button{flex:0 0 auto;border:1px solid var(--stage3-line);background:#0a1722;color:#80939f;border-radius:13px;padding:7px 10px;display:flex;align-items:center;gap:7px;font-size:.58rem}.appointment-filters button b{font-size:.56rem;color:#607786;background:#07111a;border-radius:999px;min-width:20px;padding:3px 6px}.appointment-filters button.active{color:#f1d27a;border-color:rgba(226,184,92,.25);background:rgba(226,184,92,.07)}.appointment-filters button.active b{color:#f0cf73;background:rgba(226,184,92,.08)}
.appointment-day-group{display:flex;flex-direction:column;gap:9px}.appointment-day-group>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:4px 2px}.appointment-day-group>header span{font-size:.68rem;font-weight:800;color:#cbd6dc}.appointment-day-group>header em{font-style:normal;font-size:.54rem;color:#748995}.appointment-card.is-finished{opacity:.78}.appointment-card.is-finished .time-block b{color:#91a5b2}.appointment-card.is-finished .appointment-title h3{color:#c0ccd2}.open-patient{width:max-content;border:1px solid rgba(226,184,92,.12);background:rgba(226,184,92,.045);border-radius:10px;padding:6px 8px;margin-top:7px}.open-patient svg{transform:rotate(180deg)}
.data-light-note{display:flex;align-items:center;gap:10px;padding:11px 12px;border-radius:16px;border:1px dashed rgba(255,255,255,.075);background:rgba(8,19,30,.65);color:#6f8390}.data-light-note>svg{width:19px;flex:none;color:#8095a1}.data-light-note span{display:flex;flex-direction:column;gap:2px}.data-light-note b{font-size:.61rem;color:#93a5af}.data-light-note small{font-size:.52rem;line-height:1.45}
.patient-directory-hero{border:1px solid rgba(226,184,92,.15);background:radial-gradient(circle at 90% 20%,rgba(226,184,92,.09),transparent 35%),linear-gradient(145deg,#102235,#0a1723);border-radius:21px;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:12px}.patient-directory-hero>div{display:flex;align-items:center;gap:11px}.patient-directory-hero>div>svg{width:25px;color:var(--gold)}.patient-directory-hero span{display:flex;flex-direction:column;gap:2px}.patient-directory-hero small{font-size:.54rem;color:#738996}.patient-directory-hero b{font-size:1.08rem;color:#f0d17b}.patient-directory-hero em{font-style:normal;font-size:.52rem;letter-spacing:.08em;color:#83cba6;border:1px solid rgba(105,214,161,.15);background:rgba(105,214,161,.06);padding:5px 7px;border-radius:999px}
.search-policy{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-top:-3px;padding-inline:2px}.search-policy span{font-size:.51rem;color:#627682;line-height:1.5}.search-policy button{border:0;background:none;color:#d4b45f;font-size:.55rem;padding:4px 0}.patient-card{transition:transform .12s ease,border-color .12s ease}.patient-card:active{transform:scale(.99);border-color:rgba(226,184,92,.18)}
.patient-profile-hero{display:grid;grid-template-columns:56px minmax(0,1fr) auto;gap:11px;align-items:center;border:1px solid rgba(226,184,92,.17);border-radius:22px;padding:14px;background:radial-gradient(circle at 8% 15%,rgba(226,184,92,.1),transparent 34%),linear-gradient(145deg,#102234,#091622)}.patient-profile-avatar{width:56px;height:56px;border-radius:18px;display:grid;place-items:center;color:#f0d17c;font-size:1.25rem;font-weight:900;background:linear-gradient(145deg,#1a2f43,#112337);border:1px solid rgba(226,184,92,.18)}.patient-profile-hero>div{min-width:0}.patient-profile-hero small{font-size:.53rem;color:#718694}.patient-profile-hero h3{margin:3px 0;font-size:.94rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.patient-profile-hero p{margin:0;font-size:.58rem;color:#8fa0aa;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.patient-profile-hero>em{font-style:normal;font-size:.52rem;color:#84cba7;background:rgba(105,214,161,.06);border:1px solid rgba(105,214,161,.14);padding:5px 7px;border-radius:999px;white-space:nowrap}.patient-profile-hero>em.has-alerts{color:#ffacb9;background:rgba(166,51,70,.1);border-color:rgba(255,139,157,.17)}
.patient-record-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(90px,1fr));gap:7px}.patient-record-stats article{border:1px solid var(--stage3-line);background:#0a1722;border-radius:15px;padding:9px;display:flex;flex-direction:column;gap:4px;text-align:center}.patient-record-stats small{font-size:.5rem;color:#6e8390}.patient-record-stats b{font-size:.86rem;color:#d9c173}
@media(max-width:380px){.appointment-summary{grid-template-columns:1fr 1fr}.patient-profile-hero{grid-template-columns:50px minmax(0,1fr)}.patient-profile-avatar{width:50px;height:50px}.patient-profile-hero>em{grid-column:1/-1;justify-self:start}.patient-record-stats{grid-template-columns:1fr 1fr}.patient-record-stats article:last-child{grid-column:1/-1}}

/* MaxDent Mobile Android v2.3 — Stage 4 treatment + finance */
.treatment-v4,.finance-v4{--stage4-line:rgba(255,255,255,.075)}
.treatment-hero,.finance-hero{border:1px solid rgba(226,184,92,.16);border-radius:22px;background:radial-gradient(circle at 12% 18%,rgba(226,184,92,.10),transparent 34%),linear-gradient(145deg,#102336,#091622);padding:14px;box-shadow:0 16px 38px rgba(0,0,0,.16)}
.treatment-hero{display:grid;grid-template-columns:minmax(0,1fr) 84px;align-items:center;gap:14px}.treatment-hero>div:first-child{display:flex;flex-direction:column;gap:3px}.treatment-hero small,.finance-hero small{font-size:.54rem;color:#748a98}.treatment-hero strong,.finance-hero strong{font-size:1.35rem;color:#f0d17b;line-height:1.1}.treatment-hero span,.finance-hero span{font-size:.58rem;color:#90a1ab}
.treatment-ring{width:76px;height:76px;border-radius:50%;display:grid;place-items:center;background:radial-gradient(circle at center,#0b1925 0 58%,transparent 60%),conic-gradient(#e2b85c 0 28%,#8d733b 28% 32%,#173044 32% 100%);position:relative;justify-self:end}.treatment-ring:after{content:"";position:absolute;inset:7px;border-radius:50%;background:#0b1925;border:1px solid rgba(255,255,255,.05)}.treatment-ring i{position:relative;z-index:1;font-style:normal;font-size:.65rem;font-weight:900;color:#e6cf8d}
.treatment-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.treatment-summary article{border:1px solid var(--stage4-line);border-radius:16px;background:linear-gradient(145deg,#0f1e2c,#091520);padding:10px 8px;text-align:center;display:flex;flex-direction:column;gap:4px}.treatment-summary small{font-size:.5rem;color:#718694}.treatment-summary b{font-size:.9rem;color:#dce6eb}
.stage4-filters{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:1px 1px 3px}.stage4-filters::-webkit-scrollbar{display:none}.stage4-filters button{flex:0 0 auto;border:1px solid var(--stage4-line);background:#0a1722;color:#80939f;border-radius:13px;padding:7px 10px;display:flex;align-items:center;gap:7px;font-size:.57rem}.stage4-filters button b{font-size:.54rem;color:#607786;background:#07111a;border-radius:999px;min-width:20px;padding:3px 6px}.stage4-filters button.active{color:#f1d27a;border-color:rgba(226,184,92,.25);background:rgba(226,184,92,.07)}.stage4-filters button.active b{color:#f0cf73;background:rgba(226,184,92,.08)}
.stage4-treatment-card{border-color:rgba(255,255,255,.075);box-shadow:0 9px 24px rgba(0,0,0,.10)}
.finance-hero{display:flex;flex-direction:column;gap:10px}.finance-hero-copy{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"small strong" "span strong";align-items:center;gap:2px 10px}.finance-hero-copy small{grid-area:small}.finance-hero-copy strong{grid-area:strong}.finance-hero-copy span{grid-area:span}.finance-progress-track,.treatment-progress{width:100%;height:8px;border:0;border-radius:999px;overflow:hidden;background:#07111a;appearance:none}.finance-progress-track::-webkit-progress-bar,.treatment-progress::-webkit-progress-bar{background:#07111a;border-radius:999px}.finance-progress-track::-webkit-progress-value{background:linear-gradient(90deg,#3f9c74,#78d8a9);border-radius:999px}.treatment-progress{margin-top:7px}.treatment-progress::-webkit-progress-value{background:linear-gradient(90deg,#a97a2c,#f5d98b);border-radius:999px}
.stage4-finance-grid article{border-color:var(--stage4-line);background:linear-gradient(145deg,#0f1e2c,#091520)}.stage4-finance-grid article.positive b{color:#81d7ab}.stage4-finance-grid article.warning b{color:#e7c96f}.stage4-finance-grid article.debt b{color:#ffadb9}.stage4-finance-row{border-inline-start:2px solid rgba(255,255,255,.07);padding-inline-start:10px}.stage4-finance-row.payment{border-inline-start-color:rgba(105,214,161,.45)}.stage4-finance-row.service{border-inline-start-color:rgba(226,184,92,.42)}
@media(max-width:380px){.treatment-hero{grid-template-columns:minmax(0,1fr) 70px}.treatment-ring{width:66px;height:66px}.treatment-summary{grid-template-columns:1fr 1fr}.treatment-summary article:first-child{grid-column:1/-1}.finance-hero-copy strong{font-size:1.15rem}}


/* MaxDent Mobile Android v2.5 — Stage 6 commercial polish + resilience */
button,.icon-btn,.text-btn,a,[data-nav],[data-action]{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid rgba(245,217,139,.85);outline-offset:2px}
.connection-state{display:flex;align-items:center;gap:6px;color:#708491}.connection-state small{font-size:.52rem;white-space:nowrap}.connection-state.online small{color:#87caa9}.connection-state.offline small{color:#e59aa6}
.screen-loading{border:1px solid rgba(255,255,255,.075);border-radius:24px;background:linear-gradient(145deg,#0d1b29,#08141f);padding:16px;display:flex;flex-direction:column;gap:14px;box-shadow:0 18px 48px rgba(0,0,0,.16)}
.skeleton-head{display:flex;align-items:center;gap:11px}.skeleton-head>i{width:42px;height:42px;border-radius:14px;background:#142638}.skeleton-head span{display:flex;flex-direction:column;gap:4px}.skeleton-head b{font-size:.84rem}.skeleton-head small{font-size:.58rem;color:#6f8390}
.skeleton-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.skeleton-grid i,.skeleton-list i,.skeleton-head>i{position:relative;overflow:hidden}.skeleton-grid i{height:88px;border-radius:17px;background:#0e1e2c;border:1px solid rgba(255,255,255,.04)}.skeleton-list{display:flex;flex-direction:column;gap:8px}.skeleton-list i{height:54px;border-radius:15px;background:#0b1925;border:1px solid rgba(255,255,255,.035)}
.skeleton-grid i:after,.skeleton-list i:after,.skeleton-head>i:after{content:"";position:absolute;inset:0;transform:translateX(110%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.055),transparent);animation:stage6Shimmer 1.45s ease-in-out infinite}
.screen-loading>p{margin:0;display:flex;align-items:center;gap:7px;color:#617784;font-size:.55rem}.screen-loading>p svg{width:15px;color:#957d45}
.error-hint{display:block;color:#718592;font-size:.58rem;line-height:1.6;margin:-3px 0 13px}
.icon-btn,.bottom-nav button,.appointment-filters button,.stage4-filters button{min-height:44px}
.content-wrap{width:min(100%,760px);margin-inline:auto}
@keyframes stage6Shimmer{50%{transform:translateX(-110%)}}
@media(max-width:340px){.identity-strip{margin-inline:10px}.content-wrap{padding-inline:10px}.app-topbar{padding-inline:10px}.secure-pill{font-size:.49rem}.connection-state small{display:none}.dashboard-primary-grid{grid-template-columns:1fr}.appointment-summary{grid-template-columns:1fr 1fr}}
@media(min-width:760px){.app-topbar,.identity-strip{width:min(calc(100% - 32px),760px);margin-inline:auto}.app-topbar{padding-inline:0}.bottom-nav{width:min(calc(100% - 28px),620px);left:50%;right:auto;transform:translateX(-50%)}}
@media(orientation:landscape) and (max-height:520px){.auth-brand{padding-bottom:14px}.logo-crown{width:72px;height:72px}.auth-brand h1{font-size:1.75rem}.app-topbar{height:58px}.identity-strip{padding-block:8px}.content-wrap{padding-top:10px}.bottom-nav{padding-block:5px}.qr-scanner-sheet{inset:6px 10px auto;max-height:calc(100dvh - 12px);overflow:auto}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important}}


/* MaxDent Mobile v3.0 — Stage 1 visual system, bilingual UI, premium themes */
:root{
  --ui-accent:#e2b85c;
  --ui-accent-soft:rgba(226,184,92,.12);
  --ui-glass:rgba(11,24,36,.82);
  --ui-card:#0c1a27;
  --ui-card-2:#102131;
  --ui-page:#050b12;
  --ui-page-2:#08131e;
  --ui-heading:#f5f7f9;
  --ui-copy:#91a1ad;
  --ui-subtle:#697b8a;
}
html[data-theme="midnight"]{color-scheme:dark}
html[data-theme="midnight"] body{background:#050b12}
html[data-theme="midnight"] .app-shell{
  background:
    radial-gradient(circle at 92% -5%,rgba(226,184,92,.075),transparent 26%),
    radial-gradient(circle at 4% 40%,rgba(41,121,164,.08),transparent 30%),
    linear-gradient(180deg,#07111b 0,#050b12 52%,#07101a 100%);
}
html[data-theme="midnight"] .app-topbar{
  background:linear-gradient(180deg,rgba(5,11,18,.86),rgba(5,11,18,.3),transparent);
  backdrop-filter:blur(12px);
}
html[data-theme="midnight"] .identity-strip{box-shadow:0 12px 32px rgba(0,0,0,.13)}
html[data-theme="midnight"] .bottom-nav{box-shadow:0 -12px 38px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.035)}
html[data-theme="midnight"] .dash-primary-card,
html[data-theme="midnight"] .record-card,
html[data-theme="midnight"] .appointment-card,
html[data-theme="midnight"] .preference-panel{
  box-shadow:0 14px 38px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.02);
}

/* Lightweight pre-auth appearance/language controls */
.preauth-tools{
  position:absolute;
  z-index:4;
  inset-block-start:max(14px,env(safe-area-inset-top));
  inset-inline-end:16px;
  display:flex;
  gap:7px;
}
.preauth-tools button{
  min-width:42px;height:42px;padding:0 10px;border-radius:14px;
  border:1px solid rgba(255,255,255,.09);
  background:rgba(10,23,34,.78);
  backdrop-filter:blur(12px);
  color:#b9c6ce;
  display:flex;align-items:center;justify-content:center;gap:5px;
  box-shadow:0 10px 28px rgba(0,0,0,.15);
}
.preauth-tools button svg{width:17px;height:17px;color:var(--gold)}
.preauth-tools button span{font-size:.62rem;font-weight:900;letter-spacing:.03em}
.splash small{z-index:2;color:#78909f;font-size:.58rem;letter-spacing:.09em;margin-top:7px}

/* Settings */
.settings-v3{padding-bottom:8px}
.settings-hero{
  min-height:124px;border-radius:26px;padding:18px;
  display:grid;grid-template-columns:54px minmax(0,1fr) auto;align-items:center;gap:13px;
  position:relative;overflow:hidden;
  border:1px solid rgba(226,184,92,.17);
  background:
    radial-gradient(circle at 90% 10%,rgba(226,184,92,.15),transparent 30%),
    linear-gradient(145deg,#11263a,#091722 72%);
  box-shadow:0 20px 52px rgba(0,0,0,.19);
}
.settings-hero:after{
  content:"";position:absolute;width:150px;height:150px;border-radius:50%;
  inset-inline-end:-82px;inset-block-end:-105px;
  border:1px solid rgba(226,184,92,.13);
  box-shadow:0 0 0 25px rgba(226,184,92,.025),0 0 0 50px rgba(226,184,92,.015);
}
.settings-hero-icon{
  width:54px;height:54px;border-radius:18px;display:grid;place-items:center;
  color:#f0ce78;background:linear-gradient(145deg,#1a3044,#102235);
  border:1px solid rgba(226,184,92,.19);box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
}
.settings-hero-icon svg{width:24px;height:24px}
.settings-hero>div{min-width:0;position:relative;z-index:1}
.settings-hero small{font-size:.54rem;color:#d4b45f;letter-spacing:.08em}
.settings-hero h2{font-size:1.12rem;margin:3px 0 2px}
.settings-hero p{font-size:.61rem;color:#8497a3;margin:0}
.settings-hero>em{
  font-style:normal;position:relative;z-index:1;border:1px solid rgba(105,214,161,.18);
  color:#83d8ad;background:rgba(105,214,161,.06);padding:6px 8px;border-radius:999px;
  font-size:.48rem;font-weight:900;letter-spacing:.1em
}
.preference-panel{
  border:1px solid rgba(255,255,255,.075);border-radius:23px;padding:15px;
  background:linear-gradient(145deg,#0d1b29,#081520);
  display:flex;flex-direction:column;gap:13px;
}
.preference-panel>header{display:flex;align-items:center;gap:10px}
.preference-panel>header>span{
  width:39px;height:39px;border-radius:13px;display:grid;place-items:center;
  color:#e4be62;background:rgba(226,184,92,.065);border:1px solid rgba(226,184,92,.12)
}
.preference-panel>header>span svg{width:18px;height:18px}
.preference-panel>header>div{display:flex;flex-direction:column;gap:2px}
.preference-panel>header b{font-size:.75rem}
.preference-panel>header small{font-size:.53rem;color:#6f8390}
.language-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.language-options button{
  min-height:62px;border-radius:17px;border:1px solid rgba(255,255,255,.075);
  background:#091722;color:#94a5af;padding:9px 10px;display:grid;
  grid-template-columns:36px minmax(0,1fr) 18px;align-items:center;gap:8px;text-align:start;
  transition:transform .16s ease,border-color .16s ease,background .16s ease;
}
.language-options button>span{
  width:36px;height:36px;border-radius:12px;display:grid;place-items:center;
  background:#102334;color:#c6d2d9;font-size:.62rem;font-weight:900
}
.language-options button>div{display:flex;flex-direction:column;gap:2px}
.language-options button b{font-size:.68rem}.language-options button small{font-size:.49rem;color:#687c89}
.language-options button>svg{width:17px;color:#69d6a1}
.language-options button.active{
  border-color:rgba(226,184,92,.32);background:linear-gradient(145deg,rgba(226,184,92,.10),rgba(226,184,92,.035));
  color:#f0d17b;box-shadow:0 10px 25px rgba(0,0,0,.1)
}
.language-options button:active,.theme-card:active{transform:scale(.985)}
.theme-options{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.theme-card{
  border:1px solid rgba(255,255,255,.075);border-radius:19px;padding:10px;
  background:#091722;color:#98a9b3;display:grid;grid-template-columns:1fr 18px;gap:8px;text-align:start;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease
}
.theme-card>div{grid-column:1/-1;display:flex;flex-direction:column;gap:2px}.theme-card>div b{font-size:.65rem}.theme-card>div small{font-size:.49rem;color:#6d808d}
.theme-card>svg{position:absolute;opacity:0}.theme-card.active{border-color:rgba(226,184,92,.34);box-shadow:0 12px 30px rgba(0,0,0,.11)}
.theme-card.active>svg{position:absolute;opacity:1;width:17px;inset-inline-end:16px;margin-top:7px;color:#72d4a5}
.theme-card{position:relative}
.theme-preview{
  grid-column:1/-1;height:74px;border-radius:14px;position:relative;overflow:hidden;
  display:block;border:1px solid rgba(255,255,255,.06)
}
.midnight-preview .theme-preview{background:linear-gradient(145deg,#07121c,#12283b)}
.pearl-preview .theme-preview{background:linear-gradient(145deg,#f7fafc,#e7eef2);border-color:rgba(25,54,74,.09)}
.theme-preview i,.theme-preview b,.theme-preview em{position:absolute;display:block;border-radius:999px}
.theme-preview i{width:58%;height:8px;inset-inline-start:10px;top:12px;background:#d6b15a}
.theme-preview b{width:30%;height:30px;inset-inline-start:10px;top:29px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.08)}
.theme-preview em{width:48%;height:30px;inset-inline-end:10px;top:29px;background:rgba(61,139,178,.11);border:1px solid rgba(83,165,202,.12)}
.pearl-preview .theme-preview b{background:#fff;border-color:rgba(25,54,74,.08)}
.pearl-preview .theme-preview em{background:#e1eef3;border-color:#c9dce4}
.local-pref-note{
  margin:0;padding-top:10px;border-top:1px solid rgba(255,255,255,.055);
  display:flex;align-items:center;gap:7px;color:#667b88;font-size:.51rem;line-height:1.5
}
.local-pref-note svg{width:15px;flex:none;color:#8b9d70}
.app-status-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.app-status-grid article{
  display:flex;align-items:center;gap:9px;padding:10px;border-radius:16px;
  border:1px solid rgba(255,255,255,.06);background:#091722;min-width:0
}
.app-status-grid article>span{width:32px;height:32px;border-radius:11px;display:grid;place-items:center;background:#102232;color:#a88c49;flex:none}
.app-status-grid article svg{width:15px}
.app-status-grid article>div{display:flex;flex-direction:column;gap:2px;min-width:0}
.app-status-grid article b{font-size:.59rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.app-status-grid article small{font-size:.47rem;color:#667b88;line-height:1.35}
.about-mobile-card{
  border:1px solid rgba(226,184,92,.11);border-radius:20px;padding:13px;
  background:linear-gradient(145deg,rgba(226,184,92,.045),#091722);
  display:flex;align-items:center;justify-content:space-between;gap:10px
}
.about-mobile-card>div{display:flex;align-items:center;gap:9px}.about-mobile-card>div>span{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:rgba(226,184,92,.06);color:#d2ad54}
.about-mobile-card>div svg{width:17px}.about-mobile-card>div>div{display:flex;flex-direction:column;gap:2px}.about-mobile-card b{font-size:.64rem}.about-mobile-card small{font-size:.49rem;color:#697d89}
.about-mobile-card>span{display:flex;flex-direction:column;align-items:end;gap:2px}.about-mobile-card>span b{color:#e0c477}

/* Improve navigation density when Settings is present */
.bottom-nav{max-width:650px}
.bottom-nav button{min-width:0}
.bottom-nav button span{white-space:nowrap}
.preference-shortcut{color:#d7bb69}
html[dir="ltr"] .open-patient svg{transform:none}
html[dir="ltr"] .lock-card form{text-align:left}
html[dir="ltr"] .next-arrow svg{transform:none}
html[dir="ltr"] .back-btn svg{transform:none}

/* Pearl — intentionally light, clinical, and still recognizably MaxDent */
html[data-theme="pearl"]{
  color-scheme:light;
  --bg:#eef3f5;--bg2:#f7fafb;--surface:#ffffff;--surface2:#f4f8fa;--surface3:#e9f0f3;
  --line:rgba(27,57,76,.105);--line-gold:rgba(176,128,35,.25);
  --gold:#b7842c;--gold2:#d3a84d;--gold3:#8d651e;
  --text:#102535;--muted:#617583;--muted2:#81929c;--green:#24815a;--red:#c95067;--blue:#397ca9;
  --shadow:0 18px 48px rgba(26,55,73,.10);
}
html[data-theme="pearl"] body{background:#eef3f5;color:#102535}
html[data-theme="pearl"] .app-shell{
  background:
    radial-gradient(circle at 95% 0,rgba(197,151,58,.09),transparent 24%),
    radial-gradient(circle at 2% 42%,rgba(54,137,175,.08),transparent 28%),
    linear-gradient(180deg,#f8fbfc 0,#edf3f5 55%,#f5f8f9 100%);
}
html[data-theme="pearl"] .auth-page{
  background:
    radial-gradient(circle at 85% 3%,rgba(197,151,58,.10),transparent 24%),
    linear-gradient(180deg,#f8fbfc,#eef3f5 58%,#f8fafb);
}
html[data-theme="pearl"] .splash{background:radial-gradient(circle at 50% 36%,#fff 0,#eef4f6 45%,#e9f0f3 76%)}
html[data-theme="pearl"] .splash b,
html[data-theme="pearl"] .auth-brand h1,
html[data-theme="pearl"] .auth-card h2,
html[data-theme="pearl"] .lock-card h1{color:#102535}
html[data-theme="pearl"] .auth-brand>p:last-of-type,
html[data-theme="pearl"] .lock-card>p:not(.eyebrow){color:#617583}
html[data-theme="pearl"] .preauth-tools button,
html[data-theme="pearl"] .icon-btn{
  background:rgba(255,255,255,.85);border-color:rgba(27,57,76,.11);color:#536b7a;box-shadow:0 8px 22px rgba(31,60,76,.07)
}
html[data-theme="pearl"] .auth-card,
html[data-theme="pearl"] .lock-card,
html[data-theme="pearl"] .identity-strip,
html[data-theme="pearl"] .state-card,
html[data-theme="pearl"] .screen-loading,
html[data-theme="pearl"] .record-card,
html[data-theme="pearl"] .appointment-card,
html[data-theme="pearl"] .patient-card,
html[data-theme="pearl"] .patient-directory-hero,
html[data-theme="pearl"] .patient-profile-hero,
html[data-theme="pearl"] .treatment-hero,
html[data-theme="pearl"] .finance-hero,
html[data-theme="pearl"] .preference-panel,
html[data-theme="pearl"] .about-mobile-card{
  background:linear-gradient(145deg,#fff,#f6f9fa);border-color:rgba(27,57,76,.095);box-shadow:0 14px 38px rgba(30,60,77,.07)
}
html[data-theme="pearl"] .settings-hero{
  background:radial-gradient(circle at 90% 10%,rgba(183,132,44,.11),transparent 30%),linear-gradient(145deg,#fff,#edf4f6);
  border-color:rgba(183,132,44,.18);box-shadow:0 16px 38px rgba(30,60,77,.08)
}
html[data-theme="pearl"] .settings-hero-icon{background:#f4f0e6;border-color:rgba(183,132,44,.16);color:#a67623}
html[data-theme="pearl"] .settings-hero h2,
html[data-theme="pearl"] .preference-panel b,
html[data-theme="pearl"] .about-mobile-card b{color:#173043}
html[data-theme="pearl"] .language-options button,
html[data-theme="pearl"] .theme-card,
html[data-theme="pearl"] .app-status-grid article{
  background:#f8fbfc;border-color:rgba(27,57,76,.09);color:#536b7a
}
html[data-theme="pearl"] .language-options button>span,
html[data-theme="pearl"] .app-status-grid article>span{background:#eaf1f4;color:#35576d}
html[data-theme="pearl"] .language-options button.active{
  background:linear-gradient(145deg,rgba(199,151,54,.11),#fff);border-color:rgba(183,132,44,.26);color:#8d651e
}
html[data-theme="pearl"] .app-topbar{
  background:linear-gradient(180deg,rgba(247,250,251,.94),rgba(247,250,251,.65),transparent);backdrop-filter:blur(12px)
}
html[data-theme="pearl"] .brand-mini b{color:#173043}
html[data-theme="pearl"] .identity-strip{background:linear-gradient(90deg,rgba(183,132,44,.065),rgba(255,255,255,.92))}
html[data-theme="pearl"] .identity-strip>div>span{color:#173043}
html[data-theme="pearl"] .secure-pill{background:rgba(36,129,90,.055);border-color:rgba(36,129,90,.15);color:#247551}
html[data-theme="pearl"] .bottom-nav{
  background:rgba(255,255,255,.94);border-color:rgba(27,57,76,.09);
  box-shadow:0 -10px 35px rgba(30,60,77,.10);backdrop-filter:blur(15px)
}
html[data-theme="pearl"] .bottom-nav button{color:#71838e}
html[data-theme="pearl"] .bottom-nav button.active{color:#9a6e24}
html[data-theme="pearl"] .bottom-nav button.active:before{background:#b7842c}
html[data-theme="pearl"] .content-wrap :is(h1,h2,h3){color:#173043}
html[data-theme="pearl"] .section-head span,
html[data-theme="pearl"] .dashboard-subhead span{color:#9d7227}
html[data-theme="pearl"] .section-head p,
html[data-theme="pearl"] .dashboard-subhead small,
html[data-theme="pearl"] .data-light-note,
html[data-theme="pearl"] .security-panel small{color:#6d818e}
html[data-theme="pearl"] .hero-overview,
html[data-theme="pearl"] .dash-chart-card,
html[data-theme="pearl"] .dashboard-actions button,
html[data-theme="pearl"] .next-appointment-card,
html[data-theme="pearl"] .dash-primary-card{
  background:linear-gradient(145deg,#fff,#f5f9fa);border-color:rgba(27,57,76,.09);box-shadow:0 13px 32px rgba(30,60,77,.065)
}
html[data-theme="pearl"] .hero-overview{background:radial-gradient(circle at 85% 15%,rgba(183,132,44,.10),transparent 34%),linear-gradient(145deg,#fff,#edf4f6)}
html[data-theme="pearl"] .dash-primary-card strong,
html[data-theme="pearl"] .appointment-title h3,
html[data-theme="pearl"] .patient-main b,
html[data-theme="pearl"] .record-head h3{color:#183247}
html[data-theme="pearl"] .auth-card input,
html[data-theme="pearl"] .auth-card textarea,
html[data-theme="pearl"] .lock-card input,
html[data-theme="pearl"] .search-card input{
  background:#f8fbfc;color:#173043;border-color:rgba(27,57,76,.12)
}
html[data-theme="pearl"] .trust-row span,
html[data-theme="pearl"] .install-card{background:#f7fafb;color:#5f7583;border-color:rgba(27,57,76,.09)}
html[data-theme="pearl"] .security-copy,
html[data-theme="pearl"] .auth-footer{color:#718690!important}
html[data-theme="pearl"] .privacy-screen{background:#edf3f5;color:#173043}
html[data-theme="pearl"] .screen-loading .skeleton-grid i,
html[data-theme="pearl"] .screen-loading .skeleton-list i,
html[data-theme="pearl"] .skeleton-head>i{background:#e7eef1;border-color:rgba(27,57,76,.05)}
html[data-theme="pearl"] .treatment-summary article,
html[data-theme="pearl"] .stage4-finance-grid article{background:#f8fbfc;border-color:rgba(27,57,76,.08)}
html[data-theme="pearl"] .stage4-filters button,
html[data-theme="pearl"] .appointment-filters button{background:#f8fbfc;border-color:rgba(27,57,76,.09);color:#5e7482}
html[data-theme="pearl"] .stage4-filters button.active,
html[data-theme="pearl"] .appointment-filters button.active{background:rgba(183,132,44,.08);border-color:rgba(183,132,44,.23);color:#8d651e}
html[data-theme="pearl"] .data-light-note,
html[data-theme="pearl"] .security-panel{background:rgba(255,255,255,.6);border-color:rgba(27,57,76,.08)}
html[data-theme="pearl"] progress{background:#e0e9ed}
html[data-theme="pearl"] .finance-progress-track::-webkit-progress-bar,
html[data-theme="pearl"] .treatment-progress::-webkit-progress-bar{background:#e0e9ed}
html[data-theme="pearl"] .connection-state.online small{color:#247551}
html[data-theme="pearl"] .connection-state.offline small{color:#b74659}

/* LTR/RTL finesse without a second layout bundle */
html[dir="ltr"] .section-head,
html[dir="ltr"] .record-head,
html[dir="ltr"] .appointment-title,
html[dir="ltr"] .finance-hero-copy{text-align:left}
html[dir="rtl"] .section-head,
html[dir="rtl"] .record-head,
html[dir="rtl"] .appointment-title{text-align:right}
html[dir="ltr"] .patient-profile-hero,
html[dir="ltr"] .settings-hero{direction:ltr}
html[dir="rtl"] .patient-profile-hero,
html[dir="rtl"] .settings-hero{direction:rtl}

@media(max-width:380px){
  .theme-options{grid-template-columns:1fr}
  .app-status-grid{grid-template-columns:1fr}
  .settings-hero{grid-template-columns:48px minmax(0,1fr)}
  .settings-hero-icon{width:48px;height:48px}
  .settings-hero>em{grid-column:1/-1;justify-self:start}
}

/* MaxDent Mobile v3.1 — Stage 2 command dashboard */
.dashboard-v31{gap:13px}
.stage2-command-hero{min-height:212px;overflow:hidden}
.stage2-command-hero .hero-copy{position:relative;z-index:2}
.stage2-kpi-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.stage2-kpi{position:relative;overflow:hidden;min-height:128px;border:1px solid rgba(255,255,255,.075);border-radius:20px;padding:13px;text-align:start;color:var(--text);background:linear-gradient(150deg,#102234,#091620);display:flex;flex-direction:column;align-items:flex-start;gap:5px;box-shadow:0 13px 28px rgba(0,0,0,.13)}
.stage2-kpi:before{content:"";position:absolute;width:90px;height:90px;border-radius:50%;inset-inline-end:-35px;top:-35px;background:radial-gradient(circle,rgba(226,184,92,.12),transparent 68%);pointer-events:none}
.stage2-kpi .kpi-icon{width:33px;height:33px;border-radius:11px;display:grid;place-items:center;background:rgba(226,184,92,.07);color:var(--gold);border:1px solid rgba(226,184,92,.10)}
.stage2-kpi .kpi-icon svg{width:17px;height:17px}.stage2-kpi small{font-size:.56rem;color:#8396a2;margin-top:2px}.stage2-kpi strong{font-size:1.62rem;line-height:1.05;letter-spacing:-.04em}.stage2-kpi em{margin-top:auto;display:flex;align-items:center;gap:4px;font-style:normal;font-size:.52rem;color:#728693}.stage2-kpi em svg{width:12px;height:12px}
.stage2-kpi.gold{border-color:rgba(226,184,92,.18);background:radial-gradient(circle at 90% 5%,rgba(226,184,92,.10),transparent 36%),linear-gradient(150deg,#13263a,#0a1724)}
.stage2-kpi.live .kpi-icon{color:#83d5ad;background:rgba(105,214,161,.07);border-color:rgba(105,214,161,.12)}.stage2-kpi.live strong{color:#8bdeb7}
.stage2-kpi.done .kpi-icon{color:#76b9ff;background:rgba(80,151,224,.07);border-color:rgba(80,151,224,.12)}.stage2-kpi.done strong{color:#8cc7ff}
.stage2-kpi.muted .kpi-icon{color:#ec9aa7;background:rgba(214,92,112,.06);border-color:rgba(214,92,112,.12)}.stage2-kpi.muted strong{color:#f0a8b3}
.stage2-kpi.patients{grid-column:1/-1;min-height:104px;display:grid;grid-template-columns:38px minmax(0,1fr);grid-template-rows:auto auto auto;column-gap:10px;align-items:center}.stage2-kpi.patients .kpi-icon{grid-row:1/4;width:38px;height:38px}.stage2-kpi.patients small,.stage2-kpi.patients strong,.stage2-kpi.patients em{margin:0}.stage2-kpi.patients strong{font-size:1.45rem}
.stage2-next{border-color:rgba(105,214,161,.15)}
.dash-finance-shell{border:1px solid rgba(226,184,92,.13);border-radius:23px;padding:14px;background:radial-gradient(circle at 92% 8%,rgba(226,184,92,.08),transparent 34%),linear-gradient(150deg,#0f2131,#08151f);box-shadow:0 14px 34px rgba(0,0,0,.13)}
.dash-finance-shell>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.dash-finance-shell>header>div{display:flex;align-items:center;gap:9px}.dash-finance-shell>header>div>span{width:35px;height:35px;border-radius:11px;display:grid;place-items:center;color:var(--gold);background:rgba(226,184,92,.07);border:1px solid rgba(226,184,92,.11)}.dash-finance-shell>header svg{width:17px;height:17px}.dash-finance-shell>header>div>div{display:flex;flex-direction:column;gap:1px}.dash-finance-shell>header small{font-size:.52rem;color:#718895}.dash-finance-shell>header b{font-size:.74rem}.dash-finance-shell>header em{display:flex;align-items:center;gap:4px;font-style:normal;font-size:.48rem;color:#82c9a6;padding:4px 7px;border:1px solid rgba(105,214,161,.12);border-radius:999px;background:rgba(105,214,161,.05)}.dash-finance-shell>header em svg{width:11px;height:11px}
.dash-finance-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.finance-kpi{border:1px solid rgba(255,255,255,.065);border-radius:17px;padding:11px;display:grid;grid-template-columns:31px minmax(0,1fr);gap:8px;align-items:start;background:rgba(4,13,21,.28)}.finance-kpi.month{grid-column:1/-1;background:linear-gradient(145deg,rgba(226,184,92,.065),rgba(4,13,21,.25));border-color:rgba(226,184,92,.11)}.finance-kpi-icon{width:31px;height:31px;border-radius:10px;display:grid;place-items:center;background:rgba(255,255,255,.035);color:#d9ba6a}.finance-kpi-icon svg{width:15px;height:15px}.finance-kpi>div{display:flex;flex-direction:column;gap:2px;min-width:0}.finance-kpi small{font-size:.51rem;color:#78909d}.finance-kpi strong{font-size:.92rem;color:#edf3f5;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.finance-kpi.month strong{font-size:1.13rem;color:#f2d47f}.finance-kpi em{font-size:.47rem;color:#647a88;font-style:normal}.finance-kpi.today strong{color:#88dab2}.finance-kpi.expense strong{color:#efa0ad}.finance-kpi.profit{border-color:rgba(105,214,161,.13);background:linear-gradient(145deg,rgba(105,214,161,.07),rgba(4,13,21,.25))}.finance-kpi.profit strong{color:#8fe0b7}.finance-kpi.profit.negative{border-color:rgba(255,139,157,.14);background:linear-gradient(145deg,rgba(255,139,157,.06),rgba(4,13,21,.25))}.finance-kpi.profit.negative strong{color:#f3a4b0}.finance-kpi.awaiting-data{opacity:.56}.finance-kpi.awaiting-data strong{color:#70838f}
.dash-finance-shell.is-private{display:flex;flex-direction:column;gap:4px}.dash-finance-shell.is-private>header{margin-bottom:0}.dash-finance-shell.is-private p{margin:0;color:#738895;font-size:.58rem}
.stage2-analytics-grid{display:grid;grid-template-columns:1fr;gap:9px}.dash-completion-card{border:1px solid rgba(105,214,161,.11);border-radius:21px;padding:13px;background:radial-gradient(circle at 90% 10%,rgba(105,214,161,.07),transparent 34%),linear-gradient(150deg,#0e202d,#08151e)}.completion-copy{display:flex;gap:10px;align-items:center}.completion-copy>span{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;color:#82d4aa;background:rgba(105,214,161,.07);border:1px solid rgba(105,214,161,.11)}.completion-copy>span svg{width:18px}.completion-copy>div{display:grid;grid-template-columns:1fr auto;grid-template-areas:"small big" "em big";align-items:center;flex:1;gap:1px 8px}.completion-copy small{grid-area:small;font-size:.52rem;color:#748a97}.completion-copy b{grid-area:big;font-size:1.35rem;color:#8bdab4}.completion-copy em{grid-area:em;font-style:normal;font-size:.5rem;color:#697f8c}.dash-completion-card>progress{width:100%;height:7px;border:0;border-radius:999px;margin-top:11px;overflow:hidden;background:#06111a;appearance:none}.dash-completion-card>progress::-webkit-progress-bar{background:#06111a}.dash-completion-card>progress::-webkit-progress-value{background:linear-gradient(90deg,#3f9b72,#82dab1);border-radius:999px}.dash-completion-card>p{display:flex;align-items:center;gap:5px;margin:7px 0 0;font-size:.47rem;color:#5f7481}.dash-completion-card>p svg{width:11px;height:11px}
.stage2-chart{margin:0}
@media(min-width:600px){.stage2-kpi-grid{grid-template-columns:repeat(4,1fr)}.stage2-kpi.patients{grid-column:auto;display:flex;min-height:128px}.stage2-kpi.patients .kpi-icon{width:33px;height:33px}.dash-finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-kpi.month{grid-column:auto}.stage2-analytics-grid{grid-template-columns:.8fr 1.2fr}}
@media(max-width:350px){.stage2-kpi-grid,.dash-finance-grid{grid-template-columns:1fr}.stage2-kpi.patients,.finance-kpi.month{grid-column:auto}.stage2-kpi{min-height:112px}}
html[data-theme="pearl"] .stage2-kpi,html[data-theme="pearl"] .dash-finance-shell,html[data-theme="pearl"] .dash-completion-card{background:linear-gradient(145deg,#fff,#edf4f6);border-color:rgba(33,72,93,.10);box-shadow:0 10px 26px rgba(21,48,64,.07)}
html[data-theme="pearl"] .stage2-kpi.gold{background:radial-gradient(circle at 90% 5%,rgba(183,132,44,.08),transparent 34%),linear-gradient(145deg,#fff,#f4f5ef)}
html[data-theme="pearl"] .stage2-kpi small,html[data-theme="pearl"] .stage2-kpi em,html[data-theme="pearl"] .dash-finance-shell small,html[data-theme="pearl"] .finance-kpi em,html[data-theme="pearl"] .dash-completion-card em,html[data-theme="pearl"] .dash-completion-card p{color:#647b87}
html[data-theme="pearl"] .finance-kpi{background:#f7fafb;border-color:rgba(33,72,93,.08)}html[data-theme="pearl"] .finance-kpi strong{color:#163347}html[data-theme="pearl"] .finance-kpi.month strong{color:#9b6d1c}
html[data-theme="pearl"] .dash-completion-card>progress{background:#dfeaed}html[data-theme="pearl"] .dash-completion-card>progress::-webkit-progress-bar{background:#dfeaed}


/* MaxDent Mobile v3.2 — Stage 3 internal-screen polish + lazy patient details */
.v32-appointment-card{position:relative;overflow:hidden;box-shadow:0 12px 34px rgba(0,0,0,.12);transition:transform .14s ease,border-color .14s ease,box-shadow .14s ease}
.v32-appointment-card:active{transform:scale(.992)}
.v32-appointment-card .time-block{position:relative}
.v32-appointment-card .time-block i{width:6px;height:6px;border-radius:50%;background:var(--gold);box-shadow:0 0 0 5px rgba(226,184,92,.07);margin-top:5px}
.v32-appointment-card.has-medical-alert{border-color:rgba(255,139,157,.2)}
.v32-appointment-card.has-medical-alert:before{content:"";position:absolute;inset-inline-start:0;top:12px;bottom:12px;width:3px;border-radius:4px;background:linear-gradient(#ff8fa3,#d86178)}
.v32-patient-card{min-height:72px;box-shadow:0 10px 28px rgba(0,0,0,.09)}
.v32-patient-card .patient-main{gap:2px}.patient-contact-row{font-size:.54rem;color:#607784;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.patient-profile-v32{--v32-card:linear-gradient(145deg,#0f1e2c,#091520)}
.v32-profile-hero{box-shadow:0 18px 46px rgba(0,0,0,.14)}
.record-load-strip{display:grid;grid-template-columns:30px minmax(0,1fr) auto;align-items:center;gap:9px;border:1px solid rgba(92,175,216,.12);border-radius:17px;padding:10px 11px;background:linear-gradient(135deg,rgba(41,119,155,.08),rgba(226,184,92,.035))}
.record-load-strip>svg{width:20px;color:#79bad8}.record-load-strip>span{display:flex;flex-direction:column;gap:2px}.record-load-strip b{font-size:.62rem}.record-load-strip small{font-size:.52rem;color:#718894;line-height:1.45}.record-load-strip em{font-style:normal;font-size:.48rem;color:#83cba6;border:1px solid rgba(105,214,161,.14);background:rgba(105,214,161,.055);padding:4px 6px;border-radius:999px;white-space:nowrap}
.v32-quick-actions button{position:relative;overflow:hidden;box-shadow:0 10px 28px rgba(0,0,0,.08)}.v32-quick-actions button:after{content:"";position:absolute;width:70px;height:70px;border-radius:50%;background:rgba(226,184,92,.035);inset-inline-end:-24px;top:-28px}
.v32-record-stats article{position:relative;overflow:hidden}.v32-record-stats article em{font-style:normal;font-size:.46rem;color:#637986;margin-top:1px}.v32-record-stats article b{line-height:1}
.lazy-record-card{border-style:solid;transition:border-color .15s ease,background .15s ease}.lazy-record-card:not(.is-loaded){border-style:dashed;border-color:rgba(111,150,174,.17)}
.lazy-panel-placeholder{display:grid;grid-template-columns:34px minmax(0,1fr);gap:10px;align-items:center;padding:13px 2px 2px}.lazy-panel-placeholder>svg{width:25px;color:#688a9d}.lazy-panel-placeholder>div{display:flex;flex-direction:column;gap:3px}.lazy-panel-placeholder b{font-size:.63rem;color:#a9b8c0;line-height:1.55}.lazy-panel-placeholder small{font-size:.52rem;color:#657985;line-height:1.55}.lazy-panel-placeholder>button{grid-column:1/-1;border:1px solid rgba(226,184,92,.16);background:linear-gradient(135deg,rgba(226,184,92,.11),rgba(226,184,92,.045));color:#e9ca74;border-radius:13px;min-height:44px;font-weight:800;font-size:.62rem}.lazy-panel-placeholder>button:disabled{opacity:.55}
.v32-timeline article{position:relative;padding-block:12px}.v32-timeline article>i{box-shadow:0 0 0 5px rgba(226,184,92,.055)}
.allergy-note{border-inline-start:3px solid rgba(255,139,157,.3)}
.v32-detail-grid>div{border:1px solid rgba(255,255,255,.035)}
@media(max-width:380px){.record-load-strip{grid-template-columns:26px minmax(0,1fr)}.record-load-strip>em{grid-column:2;justify-self:start}.lazy-panel-placeholder{grid-template-columns:28px minmax(0,1fr)}}
html[data-theme="pearl"] .patient-contact-row{color:#71838d}
html[data-theme="pearl"] .v32-appointment-card,html[data-theme="pearl"] .v32-patient-card{box-shadow:0 10px 28px rgba(39,65,81,.07)}
html[data-theme="pearl"] .record-load-strip{background:linear-gradient(135deg,rgba(31,118,159,.055),rgba(178,137,43,.035));border-color:rgba(31,118,159,.12)}
html[data-theme="pearl"] .record-load-strip small,html[data-theme="pearl"] .lazy-panel-placeholder small{color:#72838c}
html[data-theme="pearl"] .lazy-panel-placeholder b{color:#40515b}
html[data-theme="pearl"] .lazy-record-card:not(.is-loaded){border-color:rgba(47,91,117,.15)}
html[data-theme="pearl"] .lazy-panel-placeholder>button{background:linear-gradient(135deg,rgba(177,132,34,.11),rgba(177,132,34,.04));color:#8b681c;border-color:rgba(177,132,34,.18)}
html[data-theme="pearl"] .v32-detail-grid>div{border-color:rgba(27,57,76,.045)}
html[dir="ltr"] .v32-appointment-card.has-medical-alert:before{left:0;right:auto}
html[dir="rtl"] .v32-appointment-card.has-medical-alert:before{right:0;left:auto}


/* MaxDent Mobile v3.3 — Stage 4 local Lab Management */
.stage2-kpi.labs{background:radial-gradient(circle at 88% 8%,rgba(128,112,224,.13),transparent 36%),linear-gradient(145deg,#111d31,#0a1523);border-color:rgba(144,130,229,.14)}
.stage2-kpi.labs .kpi-icon{color:#b9aff4;background:rgba(144,130,229,.08);border-color:rgba(144,130,229,.12)}.stage2-kpi.labs strong{font-size:1.02rem;color:#d2cbff}
.labs-v33{gap:12px}.labs-hero{position:relative;overflow:hidden;min-height:148px;border:1px solid rgba(139,124,226,.13);border-radius:25px;padding:17px;background:radial-gradient(circle at 88% 17%,rgba(134,118,229,.14),transparent 35%),linear-gradient(145deg,#111d31,#091522);display:flex;justify-content:space-between;align-items:center}.labs-hero h3{margin:8px 0 4px;font-size:1.35rem;line-height:1.18}.labs-hero h3 em{font-style:normal;color:#b7aef5}.labs-hero p{max-width:300px;margin:0;color:#78909f;font-size:.56rem;line-height:1.7}.labs-hero-mark{width:72px;height:72px;border-radius:24px;display:grid;place-items:center;color:#c5bcff;background:rgba(144,130,229,.08);border:1px solid rgba(144,130,229,.14);box-shadow:0 0 0 10px rgba(144,130,229,.025)}.labs-hero-mark svg{width:36px;height:36px}.labs-hero .hero-tag{display:inline-flex;width:max-content}
.lab-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}.lab-summary-grid article{min-width:0;border:1px solid rgba(255,255,255,.055);border-radius:16px;padding:10px 8px;background:rgba(7,17,27,.46);display:flex;flex-direction:column;gap:3px}.lab-summary-grid small{font-size:.47rem;color:#718895;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lab-summary-grid b{font-size:1.05rem;color:#e8eef2}.lab-summary-grid .ready b{color:#e7c870}.lab-summary-grid .sent b{color:#86c5e7}.lab-summary-grid .received b{color:#83d5aa}
.lab-finance-strip{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:7px;border:1px solid rgba(226,184,92,.11);border-radius:20px;padding:10px;background:linear-gradient(145deg,rgba(226,184,92,.055),rgba(8,18,27,.42))}.lab-finance-strip>span{min-width:0;display:flex;flex-direction:column;gap:2px;padding:5px 7px}.lab-finance-strip>span:first-child{flex-direction:row;gap:8px;align-items:center}.lab-finance-strip svg{width:18px;color:#e4c46f;flex:none}.lab-finance-strip small{font-size:.47rem;color:#718895}.lab-finance-strip b{font-size:.72rem;color:#e9d183;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.labs-subhead{display:flex;align-items:center;justify-content:space-between;padding:1px 3px}.labs-subhead span{font-size:.58rem;font-weight:850;color:#a9b9c1}.labs-subhead small{font-size:.5rem;color:#758d9a;padding:4px 7px;border:1px solid rgba(255,255,255,.06);border-radius:999px}.lab-vendor-list{display:flex;gap:7px;overflow-x:auto;padding:1px 1px 4px;scrollbar-width:none}.lab-vendor-list::-webkit-scrollbar{display:none}.lab-vendor-card{flex:0 0 min(260px,78vw);border:1px solid rgba(255,255,255,.06);border-radius:17px;padding:10px;background:rgba(7,17,27,.42);display:flex;align-items:center;justify-content:space-between;gap:8px}.lab-vendor-card>div{display:flex;align-items:center;gap:8px;min-width:0}.lab-vendor-card>div>span{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;color:#b7acf5;background:rgba(144,130,229,.075)}.lab-vendor-card svg{width:16px}.lab-vendor-card>div>div{display:flex;flex-direction:column;min-width:0}.lab-vendor-card b{font-size:.62rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lab-vendor-card small{font-size:.47rem;color:#718895}.lab-vendor-card>strong{font-size:.62rem;color:#e5c56f;white-space:nowrap}.lab-vendor-card>em{font-style:normal;font-size:.47rem;color:#83d5aa}
.lab-filter-row{position:sticky;top:62px;z-index:3;padding:6px;background:rgba(7,16,25,.88);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.055);border-radius:15px}.lab-filter-row button{font-size:.51rem}
.lab-jobs-list{display:flex;flex-direction:column;gap:8px}.lab-job-card{position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.065);border-radius:20px;padding:12px;background:linear-gradient(145deg,rgba(15,29,41,.95),rgba(8,18,27,.95));box-shadow:0 10px 28px rgba(0,0,0,.09)}.lab-job-card:before{content:"";position:absolute;inset-inline-start:0;top:12px;bottom:12px;width:3px;border-radius:4px;background:#dfc56e}.lab-job-card.status-sent:before{background:#72b9df}.lab-job-card.status-received:before{background:#70c99c}.lab-job-head{display:flex;justify-content:space-between;align-items:center;gap:8px}.lab-status-pill{font-size:.47rem;font-weight:850;border-radius:999px;padding:4px 7px;color:#e4c873;background:rgba(226,184,92,.07);border:1px solid rgba(226,184,92,.12)}.status-sent .lab-status-pill{color:#8bcbe9;background:rgba(80,164,211,.07);border-color:rgba(80,164,211,.12)}.status-received .lab-status-pill{color:#89d9af;background:rgba(89,196,143,.07);border-color:rgba(89,196,143,.12)}.lab-job-head>small{font-size:.48rem;color:#6f8794}.lab-job-main{display:flex;align-items:center;gap:9px;margin-top:10px}.lab-job-icon{width:37px;height:37px;border-radius:12px;display:grid;place-items:center;color:#d9c16e;background:rgba(226,184,92,.06);border:1px solid rgba(226,184,92,.09)}.lab-job-icon svg{width:19px}.lab-job-main>div{min-width:0;display:flex;flex-direction:column;gap:2px}.lab-job-main b{font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.lab-job-main small{font-size:.52rem;color:#718895;line-height:1.4}.lab-job-meta{display:flex;gap:7px;flex-wrap:wrap;margin-top:9px}.lab-job-meta span{display:flex;align-items:center;gap:4px;font-size:.48rem;color:#8095a1}.lab-job-meta svg{width:12px;height:12px;color:#778e9b}.lab-date-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:9px}.lab-date-grid span{padding:7px 8px;border:1px solid rgba(255,255,255,.04);border-radius:11px;background:rgba(2,10,17,.18);display:flex;flex-direction:column;gap:1px}.lab-date-grid small{font-size:.44rem;color:#637986}.lab-date-grid b{font-size:.54rem}.lab-job-foot{display:flex;align-items:end;justify-content:space-between;gap:8px;margin-top:9px;padding-top:8px;border-top:1px solid rgba(255,255,255,.045)}.lab-job-foot>span{display:flex;flex-direction:column;gap:1px}.lab-job-foot small{font-size:.43rem;color:#617785}.lab-job-foot b{font-size:.58rem;color:#d5c177}.lab-job-foot button{border:0;background:transparent;color:#8ebed8;font-size:.51rem;font-weight:800;display:flex;align-items:center;gap:3px}.lab-job-foot button svg{width:13px;height:13px}.labs-v33 .pager{margin-top:1px}
.security-panel.compact{padding:10px 11px}.security-panel.compact b{font-size:.57rem}.security-panel.compact small{font-size:.48rem}
@media(max-width:380px){.lab-summary-grid{grid-template-columns:1fr 1fr}.lab-finance-strip{grid-template-columns:1fr 1fr}.lab-finance-strip>span:first-child{grid-column:1/-1}.labs-hero-mark{width:56px;height:56px;border-radius:18px}.labs-hero-mark svg{width:28px}.lab-date-grid{grid-template-columns:1fr}}
html[data-theme="pearl"] .stage2-kpi.labs,html[data-theme="pearl"] .labs-hero,html[data-theme="pearl"] .lab-job-card{background:linear-gradient(145deg,#fff,#eef2f7);border-color:rgba(86,72,166,.11);box-shadow:0 10px 28px rgba(39,65,81,.07)}
html[data-theme="pearl"] .labs-hero p,html[data-theme="pearl"] .lab-summary-grid small,html[data-theme="pearl"] .lab-vendor-card small,html[data-theme="pearl"] .lab-job-main small,html[data-theme="pearl"] .lab-job-head>small,html[data-theme="pearl"] .lab-date-grid small{color:#6b7e89}
html[data-theme="pearl"] .lab-summary-grid article,html[data-theme="pearl"] .lab-vendor-card{background:#f8fafb;border-color:rgba(31,65,83,.07)}html[data-theme="pearl"] .lab-summary-grid b,html[data-theme="pearl"] .lab-job-main b,html[data-theme="pearl"] .lab-date-grid b{color:#1d3949}
html[data-theme="pearl"] .lab-finance-strip{background:linear-gradient(145deg,#fffaf0,#f7f9fa);border-color:rgba(172,125,34,.12)}html[data-theme="pearl"] .lab-filter-row{background:rgba(244,248,250,.91);border-color:rgba(31,65,83,.08)}html[data-theme="pearl"] .lab-date-grid span{background:#f5f8f9;border-color:rgba(31,65,83,.05)}


/* MaxDent Mobile v3.5.3 — black-screen boot fix + local UI data saver */
.auth-page-v351{height:100dvh;min-height:100dvh;max-height:100dvh;overflow:hidden;padding:max(10px,env(safe-area-inset-top)) 14px max(8px,env(safe-area-inset-bottom));display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;align-content:stretch}
.auth-compact-head{position:relative;z-index:2;width:min(100%,560px);margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:66px}
.auth-logo-lockup{display:flex;align-items:center;gap:10px;min-width:0}.auth-logo-lockup>img{width:58px;height:58px;object-fit:contain;filter:drop-shadow(0 10px 18px rgba(226,184,92,.18));flex:none}.auth-logo-lockup>div{min-width:0}.auth-logo-lockup p{margin:0;color:var(--gold);font-size:.5rem;letter-spacing:.18em;font-weight:900}.auth-logo-lockup h1{margin:3px 0 0;font-size:clamp(1.14rem,5.2vw,1.48rem);line-height:1.15;white-space:nowrap}.auth-logo-lockup h1 em{font-style:normal;color:var(--gold2)}
.preauth-tools-compact{position:static!important;display:flex;gap:6px;flex:none}.preauth-tools-compact button{min-width:38px!important;height:38px!important;border-radius:12px!important}.preauth-tools-compact svg{width:17px!important;height:17px!important}
.auth-trust-compact{position:relative;z-index:2;width:min(100%,560px);margin:0 auto;display:flex;justify-content:center;gap:5px;min-height:26px}.auth-trust-compact span{display:flex;align-items:center;gap:4px;padding:4px 7px;border:1px solid rgba(255,255,255,.06);border-radius:999px;background:rgba(8,20,30,.72);color:#8096a3;font-size:.47rem;font-weight:750;white-space:nowrap}.auth-trust-compact svg{width:12px;height:12px;color:#c7aa58}
.auth-card-v351{width:min(100%,560px);margin:0 auto;padding:12px 13px;border-radius:23px;align-self:center;min-height:0;max-height:100%;display:flex;flex-direction:column;justify-content:flex-start;overflow:hidden}.auth-card-head-v351{margin-bottom:7px}.auth-card-head-v351 h2{font-size:1rem}.auth-card-head-v351 span:first-child{font-size:.58rem}.auth-card-v351 .read-only-badge{font-size:.48rem;padding:4px 7px}
.login-form-v351{display:flex;flex-direction:column;gap:7px;min-height:0}.auth-fields-v351{display:grid;grid-template-columns:1fr;gap:7px}.auth-fields-v351 label{gap:3px!important;font-size:.57rem!important}.auth-fields-v351 input{min-height:46px!important;height:46px!important;padding:0 12px!important;border-radius:14px!important;font-size:.82rem!important}.auth-submit-v351{min-height:47px!important;height:47px!important;border-radius:15px!important;margin-top:0!important;font-size:.72rem!important}
.pairing-compact{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:6px;align-items:center;padding:7px;border:1px solid rgba(94,229,208,.12);border-radius:15px;background:linear-gradient(145deg,rgba(25,69,78,.16),rgba(7,19,30,.48))}.scan-qr-compact{min-height:42px!important;height:42px!important;border-radius:12px!important;font-size:.65rem!important}.scan-qr-compact svg{width:18px;height:18px}.manual-pair-inline,.repair-inline{min-height:42px;border:1px solid rgba(255,255,255,.075);border-radius:12px;background:rgba(6,16,25,.7);color:#91a6b2;font-size:.56rem;font-weight:850;display:flex;align-items:center;justify-content:center;gap:5px;padding:5px 7px}.manual-pair-inline svg,.repair-inline svg{width:15px;height:15px;color:#d1b45f}.repair-inline{width:100%;height:38px;min-height:38px;margin-bottom:1px}.pair-ready-compact{padding:6px 7px;border-radius:12px}.pair-ready-compact .pair-ready-icon{width:31px;height:31px;border-radius:9px}.pair-ready-compact b{font-size:.61rem}.pair-ready-compact small{font-size:.46rem}.pair-ready-compact button{font-size:.5rem;padding:4px}
.compact-alert{margin:0 0 6px!important;padding:7px 9px!important;max-height:48px;overflow:auto;font-size:.57rem!important;line-height:1.5!important}.auth-card-foot-v351{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:7px;min-height:20px}.auth-card-foot-v351>span,.auth-card-foot-v351>small{color:#607582;font-size:.46rem;display:flex;align-items:center;gap:4px}.auth-card-foot-v351 svg{width:11px;height:11px}.auth-card-foot-v351 .danger-text{margin:0!important;font-size:.49rem!important;padding:2px 0!important}
.auth-footer-v351{position:relative;z-index:2;width:min(100%,560px);margin:0 auto;display:flex;align-items:center;justify-content:center;gap:5px;min-height:20px;color:#536b78;font-size:.44rem}.auth-footer-v351 img{width:18px;height:18px;object-fit:contain;filter:drop-shadow(0 3px 6px rgba(226,184,92,.12))}
.manual-pair-sheet{position:fixed;z-index:60;inset:0;background:rgba(2,7,12,.82);backdrop-filter:blur(10px);display:grid;place-items:center;padding:18px}.manual-pair-card{width:min(100%,520px);border:1px solid rgba(226,184,92,.18);border-radius:24px;padding:16px;background:linear-gradient(145deg,#0f1e2c,#07121c);box-shadow:0 30px 80px rgba(0,0,0,.52)}.manual-pair-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.manual-pair-head>div{display:flex;flex-direction:column;gap:3px}.manual-pair-head small{font-size:.47rem;letter-spacing:.16em;color:#c5a756}.manual-pair-head b{font-size:.92rem}.manual-pair-head button{width:38px;height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:#081520;color:#c9d5dc;display:grid;place-items:center}.manual-pair-card>p{color:#7f94a1;font-size:.58rem;line-height:1.65}.manual-pair-card textarea{width:100%;resize:none;border:1px solid rgba(255,255,255,.1);border-radius:14px;background:#06111a;color:#eaf0f3;padding:11px;font-size:.62rem;line-height:1.55;outline:none}.manual-pair-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:10px}.manual-pair-actions .primary-btn{min-height:46px;border-radius:14px}.manual-pair-actions .text-btn{margin:0;padding-inline:10px}
.runtime-fallback{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;background:#07111b;color:#eef4f6}.runtime-fallback img{width:96px;height:96px;object-fit:contain}.runtime-fallback h1{margin:12px 0 5px}.runtime-fallback p{max-width:320px;color:#8fa2ae;line-height:1.7}
/* Transparent brand image never receives a rectangular backing plate. */
.logo-crown img,.brand-mini img,.privacy-screen img,.splash img{object-fit:contain;background:transparent!important;border:0!important;border-radius:0!important;padding:0!important}
@media(max-height:720px){.auth-page-v351{gap:5px;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(5px,env(safe-area-inset-bottom))}.auth-compact-head{min-height:54px}.auth-logo-lockup>img{width:48px;height:48px}.auth-logo-lockup p{font-size:.42rem}.auth-logo-lockup h1{font-size:1.05rem}.auth-trust-compact{min-height:22px}.auth-trust-compact span{padding:3px 6px;font-size:.42rem}.auth-card-v351{padding:9px 11px}.auth-card-head-v351{margin-bottom:5px}.auth-fields-v351 input{height:42px!important;min-height:42px!important}.scan-qr-compact,.manual-pair-inline{height:38px!important;min-height:38px!important}.auth-submit-v351{height:43px!important;min-height:43px!important}.auth-card-foot-v351{margin-top:4px}.auth-footer-v351{min-height:16px}}
@media(max-height:620px){.auth-trust-compact{display:none}.auth-page-v351{grid-template-rows:auto minmax(0,1fr) auto}.auth-card-foot-v351>small{display:none}.auth-logo-lockup>img{width:43px;height:43px}.auth-logo-lockup h1{font-size:.98rem}.auth-card-v351{justify-content:flex-start}.pairing-compact{padding:5px}.auth-card-head-v351{margin-bottom:4px}.auth-footer-v351 img{display:none}}
@media(max-width:350px){.auth-page-v351{padding-inline:9px}.auth-logo-lockup>img{width:44px;height:44px}.auth-logo-lockup h1{font-size:.96rem}.auth-trust-compact span:nth-child(3){display:none}.pairing-compact{grid-template-columns:1fr}.scan-qr-compact,.manual-pair-inline{height:36px!important;min-height:36px!important}.auth-card-foot-v351>span{display:none}}
html[data-theme="pearl"] .auth-page-v351{background:linear-gradient(180deg,#f4f8fa,#eaf1f4)}html[data-theme="pearl"] .auth-trust-compact span{background:rgba(255,255,255,.72);border-color:rgba(38,74,92,.08);color:#607884}html[data-theme="pearl"] .manual-pair-inline,html[data-theme="pearl"] .repair-inline{background:#f7fafb;color:#5f7681;border-color:rgba(37,76,96,.1)}html[data-theme="pearl"] .manual-pair-card{background:linear-gradient(145deg,#fff,#edf4f6);color:#18313e}html[data-theme="pearl"] .manual-pair-card textarea{background:#f5f9fa;color:#18313e;border-color:rgba(36,75,94,.12)}
