/* ZimBiz Pro UI */
#dashboardScreen main{padding-bottom:96px}
.pro-top{display:flex;align-items:center;gap:12px}
.burger{width:46px;height:46px;border-radius:14px;background:var(--navy);display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;flex:none}
.burger span{width:22px;height:2.5px;background:#fff;border-radius:2px;transition:.3s}
body.nav-open .burger span:nth-child(1){transform:translateY(7.5px) rotate(45deg)}
body.nav-open .burger span:nth-child(2){opacity:0}
body.nav-open .burger span:nth-child(3){transform:translateY(-7.5px) rotate(-45deg)}
.pro-top .sync{margin-left:auto}
#scrim{position:fixed;inset:0;background:rgba(8,20,40,.5);opacity:0;pointer-events:none;transition:opacity .3s;z-index:70}
body.nav-open #scrim{opacity:1;pointer-events:auto}
#drawer{position:fixed;top:0;bottom:0;left:0;width:80%;max-width:310px;background:#fff;z-index:80;padding:22px 14px;transform:translateX(-105%);transition:transform .35s cubic-bezier(.2,.8,.2,1);box-shadow:8px 0 40px rgba(11,31,58,.25);overflow-y:auto}
body.nav-open #drawer{transform:none}
.drawer-head{padding:6px 10px 18px;border-bottom:1px solid var(--line);margin-bottom:12px}
.nav-item{display:flex;align-items:center;gap:14px;width:100%;padding:15px 14px;margin-bottom:6px;border-radius:15px;background:transparent;color:var(--ink);font-size:17px;font-weight:700;text-align:left;transition:.2s}
.nav-item .icon{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.nav-item.active{background:var(--navy);color:#fff}
.tab{display:none}.tab.active{display:block;animation:tin .3s ease}
@keyframes tin{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
.tt{margin:6px 0 12px;font-size:22px}.sec{margin:12px 0 8px;font-size:15px}
#dashboardScreen .card{padding:13px 14px;margin:0 0 10px}
#dashboardScreen .card h3{margin:0 0 8px;font-size:15px}
#dashboardScreen .hero-row h1{font-size:22px;margin:4px 0}
#dashboardScreen .stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:6px}
#dashboardScreen .stat{padding:10px 12px;border-radius:14px}
#dashboardScreen .stat strong{font-size:19px}#dashboardScreen .stat small{font-size:11.5px}
.qa{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}.qa.two{grid-template-columns:1fr 1fr}
#dashboardScreen .qa button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-height:74px;padding:8px 4px;border-radius:16px;background:var(--navy3);color:var(--navy);font-size:12.5px;font-weight:800;line-height:1.15;text-align:center;transition:transform .15s,background .2s}
#dashboardScreen .qa button:active{transform:scale(.95)}
#dashboardScreen .qa .button-icon{width:23px;height:23px}
#dashboardScreen button,#dashboardScreen input,#dashboardScreen select{min-height:46px}
#dashboardScreen .row{padding:9px 0}
label{display:block;font-size:13px;font-weight:700;margin:8px 0 3px}
.two{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.wide{width:100%;margin-top:8px}.danger-btn{background:#c62828;color:#fff;border-radius:12px;font-weight:800}
.seg{display:flex;gap:4px;padding:4px;background:var(--navy3);border-radius:14px;margin-bottom:10px}
.seg button{flex:1;border-radius:11px;background:transparent;color:var(--navy);font-weight:800}
.seg button.on,.seg button.active{background:var(--navy);color:#fff}
.sw{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;font-size:15px}
.sw input{width:50px;height:28px;min-height:0!important;appearance:none;-webkit-appearance:none;background:#c7d2df;border-radius:20px;position:relative;transition:.25s;flex:none;border:0;padding:0}
.sw input:after{content:"";position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;transition:.25s}
.sw input:checked{background:#1b9a5a}.sw input:checked:after{left:25px}
#fab{position:fixed;right:16px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:60;display:flex;align-items:center;gap:8px;padding:0 20px;height:54px;border-radius:30px;background:linear-gradient(135deg,#0b1f3a,#1d6fb8);color:#fff;font-weight:800;font-size:16px;box-shadow:0 10px 28px rgba(11,31,58,.38);animation:fabin .5s cubic-bezier(.2,1.4,.4,1),pulse 2.8s 1s infinite;transition:transform .2s}
#fab:active{transform:scale(.92)}#fab svg{width:22px;height:22px;stroke:#fff;fill:none;stroke-width:2}
body.nav-open #fab{opacity:0;pointer-events:none}
@keyframes fabin{from{transform:scale(0) rotate(-90deg)}to{transform:none}}
@keyframes pulse{0%,100%{box-shadow:0 10px 28px rgba(11,31,58,.38)}50%{box-shadow:0 10px 28px rgba(11,31,58,.38),0 0 0 9px rgba(29,111,184,.16)}}
.note{padding:9px 11px;margin-bottom:6px;border-radius:12px;background:var(--navy3);font-size:14px;animation:tin .3s}
.alert{padding:10px 12px;border-radius:12px;margin-bottom:6px;font-weight:700;font-size:14px}
.alert.bad{background:#fde8e8;color:#9b1c1c}.alert.warn{background:#fff4d6;color:#7a5200}.alert.ok{background:#e3f6ea;color:#14663a}
.gain{color:#14804a;font-style:normal}.loss{color:#c62828;font-style:normal}
.qty{display:flex;align-items:center;gap:8px}.adj,.paid,.call{padding:0 12px;min-height:38px!important;border-radius:10px;background:var(--navy);color:#fff;font-weight:800;font-size:13px;display:inline-flex;align-items:center}
.paid{background:#1b9a5a}
.health{display:flex;align-items:center;gap:14px}
.ring{--p:0;width:86px;height:86px;border-radius:50%;flex:none;display:grid;place-content:center;text-align:center;background:radial-gradient(circle,#fff 56%,transparent 57%),conic-gradient(#1b9a5a calc(var(--p)*1%),#e3ebf4 0)}
.ring b{font-size:26px;line-height:1;color:var(--navy)}
.bar{display:flex;align-items:center;gap:10px;font-size:13px;margin:7px 0}.bar span{width:46%}.bar i{flex:1;height:9px;border-radius:6px;background:#e3ebf4;overflow:hidden}.bar u{display:block;height:100%;background:linear-gradient(90deg,#1d6fb8,#1b9a5a);border-radius:6px;transition:width .8s}
.scrollx{overflow-x:auto}.mini{width:100%;border-collapse:collapse;font-size:13px}.mini th,.mini td{padding:7px 4px;text-align:right;border-bottom:1px solid var(--line)}.mini th:first-child,.mini td:first-child{text-align:left}
.spark{display:flex;align-items:flex-end;gap:6px;height:70px;margin-bottom:6px}.spark i{flex:1;background:linear-gradient(180deg,#1d6fb8,#0b1f3a);border-radius:5px 5px 2px 2px;transition:height .6s}
.rc{text-align:center;padding:6px}.rc hr{border:0;border-top:1px dashed #aab6c5;margin:10px 0}.rc p{margin:5px 0}.rc .tot{font-size:22px;font-weight:800}
.modal-card{animation:tin .25s}
html[data-large="1"] #dashboardScreen main,html[data-large="1"] #drawer{zoom:1.14}
/* dark theme */
html[data-theme=dark] body{background:#14223d;color:#e8eef7}
html[data-theme=dark] body:before{display:none}
html[data-theme=dark] :is(.card,.stat,.modal-card,#drawer,.topbar,.auth-card,.mini-card,.glass){background:#1c2d4d!important;border-color:#3a4f78!important;color:#e8eef7!important}
html[data-theme=dark] :is(input,select){background:#182846!important;color:#e8eef7!important;border-color:#2a3b55!important}
html[data-theme=dark] :is(h1,h2,h3,.logo,.nav-item,.ring b){color:#fff}
html[data-theme=dark] :is(.muted,small,label){color:#9fb0c6!important}
html[data-theme=dark] :is(.row,.mini th,.mini td,.drawer-head){border-color:#3a4f78!important}
html[data-theme=dark] :is(.qa button,.seg,.note){background:#27395f!important;color:#e8eef7!important}
html[data-theme=dark] .seg button{color:#e8eef7}html[data-theme=dark] .seg button.on,html[data-theme=dark] .seg button.active,html[data-theme=dark] .nav-item.active{background:#2f6fb5!important;color:#fff!important}
html[data-theme=dark] .ring{background:radial-gradient(circle,#1c2d4d 56%,transparent 57%),conic-gradient(#1b9a5a calc(var(--p)*1%),#3a4f78 0)}
html[data-theme=dark] .ring b{color:#fff}
html[data-theme=dark] .rc{color:#e8eef7}

.biz-name{font-size:21px;font-weight:800;color:var(--navy);line-height:1.15;letter-spacing:-.2px;animation:nameIn .7s cubic-bezier(.2,.8,.2,1)}
@keyframes nameIn{from{opacity:0;transform:translateY(-6px) scale(.97)}to{opacity:1;transform:none}}
#otherType{margin-top:8px}
#homePeriod{margin:0;padding:3px}#homePeriod button{min-height:34px!important;padding:0 10px;font-size:13px}
html[data-theme=dark] .biz-name{color:#fff}

/* v9: header, burger, home widgets, transitions */
.pro-top{display:grid!important;grid-template-columns:1fr auto 1fr;align-items:center;gap:6px;padding-top:calc(10px + env(safe-area-inset-top,0px))!important}
.pro-top .burger{justify-self:start}.pro-top .sync{justify-self:end;margin:0}
.pro-top .brandline{min-width:0;text-align:center}
.biz-name{font-size:22px!important;max-width:58vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.burger{background:transparent!important;box-shadow:none!important;width:42px;height:42px;border-radius:12px}
.burger span{background:var(--navy)!important;width:24px;height:3px}
body.nav-open .burger span:nth-child(1){transform:translateY(8px) rotate(45deg)}
body.nav-open .burger span:nth-child(3){transform:translateY(-8px) rotate(-45deg)}
html[data-theme=dark] .burger span{background:#fff!important}
.snap{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:8px}
.tile{padding:9px 10px;border-radius:14px;background:#fff;border:1px solid var(--line);box-shadow:0 6px 18px rgba(11,31,58,.05)}
.tile small{display:block;font-size:11px;color:var(--muted);font-weight:600}.tile b{font-size:16px;color:var(--navy)}
.hbadge,.strip{display:flex!important;align-items:center;gap:12px;width:100%;margin-bottom:10px;padding:10px 14px;border-radius:16px;text-align:left;transition:transform .15s,box-shadow .2s}
.hbadge{background:linear-gradient(135deg,#0b1f3a,#1d6fb8);color:#fff;box-shadow:0 8px 22px rgba(11,31,58,.22)}
.hbadge .ht{flex:1;display:flex;flex-direction:column}.hbadge .ht b{font-size:15px}.hbadge small{opacity:.85}.hbadge i{font-style:normal;font-size:24px}
.mring{--p:0;width:46px;height:46px;border-radius:50%;display:grid;place-items:center;flex:none;background:radial-gradient(circle,#12315a 58%,transparent 59%),conic-gradient(#3ddc84 calc(var(--p)*1%),rgba(255,255,255,.25) 0)}
.mring b{font-size:14px;color:#fff}
.strip{background:#fff4d6;color:#7a5200;font-weight:700;font-size:14px;justify-content:space-between}
.hbadge:active,.strip:active{transform:scale(.98)}
.row.tap{cursor:pointer;transition:background .2s}.row.tap:active{background:var(--navy3)}
.linkbtn{background:none!important;color:var(--navy2);font-weight:700;text-decoration:underline;width:100%;margin-top:6px;min-height:40px}
.legal{text-align:center;font-size:12px;color:var(--muted);margin:10px 0 0}.legal a{color:var(--navy2)}
html[data-theme=dark] .tile{background:#1c2d4d;border-color:#3a4f78}html[data-theme=dark] .tile b{color:#fff}
html[data-theme=dark] .strip{background:#3b3115;color:#ffd978}
/* smooth transitions everywhere */
button,.card,.tile,.row,input,select,.nav-item{transition:transform .18s ease,box-shadow .25s ease,background-color .25s ease,opacity .25s ease,border-color .25s ease}
button:not(:disabled):active{transform:scale(.96)}
.card:hover,.tile:hover{box-shadow:0 14px 34px rgba(11,31,58,.1)}
input:focus,select:focus{box-shadow:0 0 0 3px rgba(29,111,184,.25);outline:0}
.tab.active>*{animation:up .5s cubic-bezier(.2,.8,.2,1) both}
.tab.active>*:nth-child(2){animation-delay:.05s}.tab.active>*:nth-child(3){animation-delay:.1s}.tab.active>*:nth-child(4){animation-delay:.15s}.tab.active>*:nth-child(5){animation-delay:.2s}.tab.active>*:nth-child(6){animation-delay:.25s}.tab.active>*:nth-child(n+7){animation-delay:.3s}
@keyframes up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
.modal:not(.hidden){animation:fadein .25s ease}.modal:not(.hidden) .modal-card{animation:sheet .35s cubic-bezier(.2,.9,.3,1)}
@keyframes fadein{from{opacity:0}to{opacity:1}}@keyframes sheet{from{opacity:0;transform:translateY(30px) scale(.97)}to{opacity:1;transform:none}}
#authScreen,#dashboardScreen:not(.hidden){animation:fadein .5s ease}
@media (prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

#netBar{position:fixed;left:12px;right:12px;bottom:calc(86px + env(safe-area-inset-bottom,0px));z-index:65;padding:12px 14px;border-radius:14px;background:#0b1f3a;color:#fff;font-size:14px;font-weight:600;box-shadow:0 10px 28px rgba(11,31,58,.35);opacity:0;transform:translateY(16px);pointer-events:none;transition:opacity .3s,transform .3s}
#netBar.on{opacity:1;transform:none}

.strip.hidden,.hbadge.hidden{display:none!important}

/* ===== v12 ===== */
:root{--gap:10px}
html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}
#dashboardScreen main{padding:12px 14px 24px}
.tab.active{display:flex;flex-direction:column;gap:var(--gap)}
.tab>*{margin:0!important}
#dashboardScreen .card{margin:0!important}
#proIns,#stockAlerts{display:flex;flex-direction:column;gap:var(--gap)}
#proIns .card{margin:0!important}.alert{margin:0!important}
.tt{padding:2px 2px 0;font-size:22px}
#tab-home.active{min-height:calc(100dvh - 96px - env(safe-area-inset-top,0px))}
.tile{padding:7px 9px}.tile b{font-size:15px}.tile small{font-size:10.5px}
.hbadge{padding:7px 12px}.mring{width:38px;height:38px}.mring b{font-size:13px}.hbadge .ht b{font-size:14px}
#dashboardScreen .qa button{min-height:56px;padding:6px 3px;font-size:12px;gap:4px}
#dashboardScreen .qa .button-icon{width:21px;height:21px}
.strip{padding:8px 12px}
.nstrip{padding:8px 12px;border-radius:14px;background:var(--navy3);font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .35s ease}
/* assistant */
.asst{flex:1;min-height:150px;display:flex!important;flex-direction:column;gap:8px;padding:12px!important;background:linear-gradient(160deg,#fff,#eaf3ff);border:1px solid #d6e4f7;overflow:hidden}
.ahead{display:flex;align-items:center;gap:10px}.at{flex:1;display:flex;flex-direction:column}.at b{font-size:14px}.at small{font-size:11.5px;color:var(--muted)}
.aorb{width:32px;height:32px;border-radius:50%;flex:none;background:radial-gradient(circle at 30% 28%,#9ad6ff,#1d6fb8 58%,#0b1f3a);animation:orb 4s ease-in-out infinite}
@keyframes orb{0%,100%{transform:scale(1);box-shadow:0 0 0 0 rgba(29,111,184,.35)}50%{transform:scale(1.07);box-shadow:0 0 0 9px rgba(29,111,184,0)}}
.mic{width:38px;height:38px;min-height:0!important;border-radius:50%;background:var(--navy);display:grid;place-items:center;flex:none}
.mic.hidden{display:none}.mic svg{width:19px;height:19px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.alog{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:6px;scroll-behavior:smooth;padding:2px}
.msg{max-width:90%;padding:8px 11px;border-radius:14px;font-size:13.5px;line-height:1.4;animation:up .3s ease both}
.msg.u{align-self:flex-end;background:var(--navy);color:#fff;border-bottom-right-radius:4px}
.msg.b{align-self:flex-start;background:#fff;border:1px solid var(--line);border-bottom-left-radius:4px}
.dots i{display:inline-block;width:6px;height:6px;margin:0 2px;border-radius:50%;background:#8aa0bd;animation:dot 1s infinite}.dots i:nth-child(2){animation-delay:.15s}.dots i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,80%,100%{transform:translateY(0);opacity:.5}40%{transform:translateY(-4px);opacity:1}}
.cf{display:flex;gap:8px;margin-top:8px}.cf button{min-height:36px!important;padding:0 12px;border-radius:10px;font-weight:800;font-size:13px}.cf .y{background:#1b9a5a;color:#fff}.cf .n{background:var(--navy3);color:var(--navy)}
.chips{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}.chips::-webkit-scrollbar{display:none}
.chips button{flex:none;min-height:32px!important;padding:0 12px;border-radius:16px;background:#fff;border:1px solid var(--line);color:var(--navy);font-size:12.5px;font-weight:700;white-space:nowrap}
.arow{display:flex;gap:8px}.arow input{flex:1;min-height:42px!important;border-radius:14px}.arow button{min-height:42px!important;padding:0 16px;border-radius:14px;background:var(--navy);color:#fff;font-weight:800}
/* bell */
#dashboardScreen #fab{right:16px;bottom:calc(18px + env(safe-area-inset-bottom,0px));width:56px;height:56px;min-height:0!important;padding:0;border-radius:50%;justify-content:center;background:linear-gradient(135deg,#f59e0b,#dc2626);box-shadow:0 10px 26px rgba(220,38,38,.4);animation:fabin .5s cubic-bezier(.2,1.4,.4,1),ring 4s ease-in-out 1s infinite}
#fab.hidden{display:none!important}
#fab svg{width:26px;height:26px;stroke:#fff;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
#bellN{position:absolute;top:-3px;right:-3px;min-width:22px;height:22px;padding:0 5px;border-radius:11px;background:#0b1f3a;color:#fff;font-size:12px;display:grid;place-items:center;border:2px solid #fff}
@keyframes ring{0%,88%,100%{transform:rotate(0)}91%{transform:rotate(14deg)}94%{transform:rotate(-12deg)}97%{transform:rotate(8deg)}}
/* header fade */
.pro-top .brandline{transition:opacity .12s linear,transform .12s linear;will-change:opacity,transform}
/* misc */
.nav-act{display:flex;align-items:center;gap:14px;width:100%;padding:14px;margin-bottom:8px;border-radius:15px;background:linear-gradient(135deg,#0b1f3a,#1d6fb8);color:#fff;font-size:17px;font-weight:800;text-align:left}
.nav-act .icon{width:24px;height:24px;fill:none;stroke:#fff;stroke-width:1.8}
.cartbox{padding:10px;border:1px dashed var(--line);border-radius:14px;margin:8px 0}
.wa{background:#1b9a5a!important}
#savedTag{position:fixed;top:calc(10px + env(safe-area-inset-top,0px));right:14px;z-index:300;padding:6px 12px;border-radius:14px;background:#1b9a5a;color:#fff;font-size:13px;font-weight:700;opacity:0;transform:translateY(-8px);transition:.3s;pointer-events:none}
#savedTag.on{opacity:1;transform:none}
#lock{position:fixed;inset:0;z-index:400;display:flex;align-items:center;justify-content:center;background:linear-gradient(160deg,#0b1f3a,#1d6fb8);padding:24px}
#lock.hidden{display:none}
.lockbox{width:100%;max-width:340px;padding:26px 22px;border-radius:24px;background:#fff;text-align:center;animation:sheet .4s cubic-bezier(.2,.9,.3,1)}
.lockicon{width:64px;height:64px;margin:0 auto 10px;border-radius:50%;background:var(--navy3);display:grid;place-items:center}
.lockicon:before{content:"🔒";font-size:28px}
html[data-theme=dark] :is(.asst,.msg.b,.chips button,.lockbox){background:#1c2d4d!important;border-color:#3a4f78!important;color:#e8eef7}
html[data-theme=dark] :is(.nstrip,.cf .n,.lockicon){background:#27395f;color:#e8eef7}
html[data-theme=dark] #bellN{border-color:#1c2d4d}

/* ===== v13: Airbnb-style fields + dark palette ===== */
input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea{width:100%;min-height:54px;padding:15px 16px;border:1px solid #b0b0b0;border-radius:12px;background:#fff;color:#222;font-size:16px;font-family:inherit;transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}
input:not([type=checkbox]):not([type=radio]):not([type=range]):hover,select:hover,textarea:hover{border-color:#222}
input:not([type=checkbox]):not([type=radio]):not([type=range]):focus,select:focus,textarea:focus{border-color:#222;box-shadow:0 0 0 1px #222;outline:0;background:#fff}
input::placeholder,textarea::placeholder{color:#717171;opacity:1}
select{-webkit-appearance:none;appearance:none;padding-right:44px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23222' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 16px center}
label{color:#222}
.auth-card input{margin:6px 0 10px}
/* dark palette: bg #14223d · surface #1c2d4d · raised #27395f · border #3a4f78 · text #eaf1fb · accent #3b8de0 / #5aa9ff */
html[data-theme=dark] body,html[data-theme=dark] #authScreen{background:#14223d!important;color:#eaf1fb}
html[data-theme=dark] :is(.card,.stat,.tile,.modal-card,#drawer,.topbar,.auth-card,.mini-card,.install-card,.lockbox,.asst,.msg.b,.glass){background:#1c2d4d!important;border-color:#3a4f78!important;color:#eaf1fb!important}
html[data-theme=dark] :is(h1,h2,h3,h4,b,strong,.logo,.biz-name,.nav-item,label,.welcome-copy h1){color:#fff!important}
html[data-theme=dark] :is(p,small,.muted,.install-note,.welcome-copy p,.mini-card small,.install-copy p,.legal,.eyebrow){color:#a9bad4!important}
html[data-theme=dark] .logo span,html[data-theme=dark] a{color:#5aa9ff!important}
html[data-theme=dark] :is(.tabs,.seg,.note,.nstrip,.qa button,.chips button,.cf .n,.lockicon){background:#27395f!important;color:#eaf1fb!important;border-color:#3a4f78!important}
html[data-theme=dark] .tabs button{background:transparent!important;color:#a9bad4!important}
html[data-theme=dark] :is(.tabs button.active,.seg button.on,.seg button.active,.nav-item.active){background:#3b8de0!important;color:#fff!important;box-shadow:none}
html[data-theme=dark] :is(.primary,.arow button,.install-btn,.adj,.mic){background:linear-gradient(135deg,#3b8de0,#2563eb)!important;color:#fff!important}
html[data-theme=dark] .paid,html[data-theme=dark] .wa,html[data-theme=dark] .cf .y{background:#1fa971!important}
html[data-theme=dark] .danger-btn{background:#d9534f!important}
html[data-theme=dark] .type-choice{background:#1c2d4d!important;border-color:#3a4f78!important;color:#eaf1fb!important}
html[data-theme=dark] .type-choice:hover{border-color:#5aa9ff!important}
html[data-theme=dark] .type-choice.selected{background:#27395f!important;border:2px solid #5aa9ff!important}
html[data-theme=dark] .type-icon,html[data-theme=dark] .mini-icon,html[data-theme=dark] .install-icon{background:#27395f!important;color:#5aa9ff!important}
html[data-theme=dark] .type-choice.selected .type-icon{background:#3b8de0!important;color:#fff!important}
html[data-theme=dark] :is(.trial-banner,.install-badge){background:#ffb547!important;color:#1a1200!important}
html[data-theme=dark] .msg{color:#ff8a80!important}
html[data-theme=dark] :is(.row,.table,.mini th,.mini td,.drawer-head){border-color:#3a4f78!important}
html[data-theme=dark] input:not([type=checkbox]):not([type=radio]):not([type=range]),html[data-theme=dark] select,html[data-theme=dark] textarea{background-color:#182846!important;color:#eaf1fb!important;border-color:#4a6290!important}
html[data-theme=dark] input:not([type=checkbox]):not([type=radio]):not([type=range]):hover,html[data-theme=dark] select:hover{border-color:#8fb0e0!important}
html[data-theme=dark] input:not([type=checkbox]):not([type=radio]):not([type=range]):focus,html[data-theme=dark] select:focus,html[data-theme=dark] textarea:focus{border-color:#5aa9ff!important;box-shadow:0 0 0 1px #5aa9ff!important;background-color:#182846!important}
html[data-theme=dark] input::placeholder{color:#7f93b3!important}
html[data-theme=dark] select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23eaf1fb' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")}
html[data-theme=dark] .strip{background:#3a2e12!important;color:#ffd27a!important}
html[data-theme=dark] .burger span{background:#fff!important}
html[data-theme=dark] .sw input{background:#4a6290}html[data-theme=dark] .sw input:checked{background:#1fa971}
html[data-theme=dark] .gain{color:#4cc38a!important}html[data-theme=dark] .loss{color:#ff8a80!important}

/* ===== v14 final ===== */
#splash{position:fixed;inset:0;z-index:500;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#f5f7fb}
#splash.hidden{display:none}#splash .logo{font-size:34px;font-weight:800;animation:nameIn .6s ease}
.spin{width:30px;height:30px;border-radius:50%;border:3px solid rgba(29,111,184,.2);border-top-color:#1d6fb8;animation:sp .8s linear infinite}@keyframes sp{to{transform:rotate(360deg)}}
html[data-theme=dark] #splash{background:#14223d}
/* dark: lighter navy, readable everywhere */
html[data-theme=dark]{--navy:#2f7fd1;--navy2:#6db3ff;--navy3:#27395f;--ink:#eaf1fb;--muted:#a9bad4;--line:#3a4f78}
html[data-theme=dark] #dashboardScreen .burger span{background:#fff!important;width:24px;height:3px;opacity:1}
html[data-theme=dark] .hbadge{background:linear-gradient(135deg,#2a5ea8,#3b8de0)!important}
html[data-theme=dark] .mring{background:radial-gradient(circle,#2a5ea8 58%,transparent 59%),conic-gradient(#6ee7b0 calc(var(--p)*1%),rgba(255,255,255,.28) 0)}
html[data-theme=dark] .insight-stat,html[data-theme=dark] .highlight{background:#27395f!important;border-color:#3a4f78!important;color:#eaf1fb!important}
html[data-theme=dark] .chart-wrap svg rect{fill:#1c2d4d!important}
html[data-theme=dark] .chart-wrap svg .gridline{stroke:#3a4f78!important}
html[data-theme=dark] .chart-wrap svg text,html[data-theme=dark] .axis-label{fill:#c9d8ef!important}
html[data-theme=dark] .chart-wrap svg .revenue-line{stroke:#5aa9ff!important}
html[data-theme=dark] .chart-wrap svg .expense-line{stroke:#ff8a80!important}
html[data-theme=dark] .chart-wrap svg .profit-line{stroke:#6ee7b0!important}
html[data-theme=dark] .chart-wrap svg circle{stroke:#1c2d4d!important}
html[data-theme=dark] :is(.spark i){background:linear-gradient(180deg,#6db3ff,#2f7fd1)}
html[data-theme=dark] :is(.bar i){background:#27395f}html[data-theme=dark] .bar u{background:linear-gradient(90deg,#5aa9ff,#6ee7b0)}
html[data-theme=dark] :is(td,th,li,em,span,div,p){color:inherit}
html[data-theme=dark] #dashboardScreen{color:#eaf1fb}
/* quick actions: smooth, colourful */
#dashboardScreen .qa{gap:10px}
#dashboardScreen .qa button{position:relative;min-height:70px;padding:9px 4px;gap:6px;background:#fff;border:1px solid #e3eaf3;border-radius:18px;color:#132033;font-size:12px;font-weight:800;box-shadow:0 8px 20px rgba(11,31,58,.07);transition:transform .25s cubic-bezier(.2,1.2,.3,1),box-shadow .25s ease,border-color .25s ease}
#dashboardScreen .qa button:hover{transform:translateY(-2px);box-shadow:0 12px 26px rgba(11,31,58,.12)}
#dashboardScreen .qa button:active{transform:scale(.94);box-shadow:0 4px 10px rgba(11,31,58,.1)}
#dashboardScreen .qa .button-icon{width:36px;height:36px;padding:8px;border-radius:13px;color:#fff;stroke:#fff;fill:none;box-shadow:0 6px 14px rgba(0,0,0,.18);transition:transform .25s}
#dashboardScreen .qa button:active .button-icon{transform:scale(1.12) rotate(-6deg)}
.qa button:nth-child(1) .button-icon{background:linear-gradient(135deg,#34d399,#15803d)}
.qa button:nth-child(2) .button-icon{background:linear-gradient(135deg,#60a5fa,#1d4ed8)}
.qa button:nth-child(3) .button-icon{background:linear-gradient(135deg,#fb7185,#e11d48)}
.qa button:nth-child(4) .button-icon{background:linear-gradient(135deg,#fbbf24,#d97706)}
.qa button:nth-child(5) .button-icon{background:linear-gradient(135deg,#a78bfa,#7c3aed)}
.qa button:nth-child(6) .button-icon{background:linear-gradient(135deg,#2dd4bf,#0d9488)}
html[data-theme=dark] #dashboardScreen .qa button{background:#1c2d4d!important;border-color:#3a4f78!important;color:#eaf1fb!important;box-shadow:0 8px 20px rgba(0,0,0,.25)}
/* pop-up widgets: blurred background */
#modal{z-index:250;background:rgba(8,16,34,.42)!important;backdrop-filter:blur(12px) saturate(1.15);-webkit-backdrop-filter:blur(12px) saturate(1.15)}
#modal:not(.hidden){animation:fadein .3s ease both}
#modal:not(.hidden) .modal-card{animation:pop .45s cubic-bezier(.2,1.15,.3,1) both}
@keyframes pop{from{opacity:0;transform:translateY(34px) scale(.94)}to{opacity:1;transform:none}}
#modal.closing{animation:fadeout .23s ease both}#modal.closing .modal-card{animation:popout .23s ease both}
@keyframes fadeout{to{opacity:0}}@keyframes popout{to{opacity:0;transform:translateY(26px) scale(.96)}}
#modalContent>*{animation:up .5s cubic-bezier(.2,.8,.2,1) both}
#modalContent>*:nth-child(2){animation-delay:.04s}#modalContent>*:nth-child(3){animation-delay:.08s}#modalContent>*:nth-child(4){animation-delay:.12s}#modalContent>*:nth-child(5){animation-delay:.16s}#modalContent>*:nth-child(n+6){animation-delay:.2s}
body.modal-open #fab{opacity:0;pointer-events:none}

/* stop browsers (Samsung/Chrome "force dark") from darkening the light theme */
html[data-theme=light]{color-scheme:only light}
html[data-theme=dark]{color-scheme:dark}
html[data-theme=light] body{background:#f5f8fc}
html[data-theme=light] #dashboardScreen .card,html[data-theme=light] .tile{background:#fff}
