/* DOBERTO APK — dark-mode consistency layer */
html[data-theme="dark"]{
  --bg:#080b12;
  --panel:#101520;
  --ink:#eef2fb;
  --muted:#909bb0;
  --line:#202a3a;
  --shadow:0 22px 60px rgba(0,0,0,.28);
}

html[data-theme="dark"] body,
html[data-theme="dark"] body.public-body,
html[data-theme="dark"] body.dashboard-body,
html[data-theme="dark"] body.auth-body,
html[data-theme="dark"] body.admin-body{background:#080b12;color:#eef2fb}

/* Public site */
html[data-theme="dark"] .public-section:not(.white){background:#080b12}
html[data-theme="dark"] .section-intro h2,
html[data-theme="dark"] .feature-card h3,
html[data-theme="dark"] .format-card h3,
html[data-theme="dark"] .faq-item summary,
html[data-theme="dark"] .legal-card h2{color:#f2f5ff}
html[data-theme="dark"] .stage-window{background:#0f1522;color:#e9edf7;border:1px solid #222c3d}
html[data-theme="dark"] .stage-form-row{background:#0b101a;border-color:#283246}
html[data-theme="dark"] .stage-dots i{background:#4a5569}
html[data-theme="dark"] .float-icon{background:#10261f;color:#43d5a6}
html[data-theme="dark"] .float-icon.purple{background:#1b1734;color:#a895ff}
html[data-theme="dark"] .format-list span{color:#a8b1c3}
html[data-theme="dark"] .format-card.recommended{border-color:#443b70;box-shadow:0 20px 50px rgba(0,0,0,.22)}
html[data-theme="dark"] .faq-item[open]{border-color:#373153;background:#111725}
html[data-theme="dark"] .legal-wrap{background:#080b12}

/* Authentication / preview artwork */
html[data-theme="dark"] .auth-shell{background:#080b12}
html[data-theme="dark"] .phone-screen{background:linear-gradient(180deg,#101725,#0b111c)}
html[data-theme="dark"] .preview-appbar span,
html[data-theme="dark"] .preview-lines i{background:#344055}
html[data-theme="dark"] .preview-grid b{background:#202a3b}
html[data-theme="dark"] .build-badge{background:#121925;color:#edf2ff;border:1px solid #263145}
html[data-theme="dark"] .build-badge small{color:#8e99ad}
html[data-theme="dark"] .checkbox-line{color:#9aa5b7!important}
html[data-theme="dark"] .eye-btn{color:#8995aa}

/* Dashboard chrome */
html[data-theme="dark"] .topbar-left small,
html[data-theme="dark"] .profile-chip small,
html[data-theme="dark"] .section-head p,
html[data-theme="dark"] .builder-head p,
html[data-theme="dark"] .step-card p,
html[data-theme="dark"] .stat-card small,
html[data-theme="dark"] .builder-footnote{color:#8f9aaf!important}
html[data-theme="dark"] .icon-btn{background:#111725!important;border-color:#273145!important;color:#c7d0df!important}
html[data-theme="dark"] .engine-pill{background:#111725;border-color:#273145;color:#aab4c7}
html[data-theme="dark"] .engine-pill.ready{background:#10231d;border-color:#1f493a;color:#50cfa6}
html[data-theme="dark"] .engine-pill.offline{background:#28151a;border-color:#57303a;color:#ed8294}
html[data-theme="dark"] .engine-card p{color:#8f9aad}
html[data-theme="dark"] .engine-state{background:#2a2110;color:#e6b552}
html[data-theme="dark"] .engine-state.ready{background:#10261f;color:#50d0a6}
html[data-theme="dark"] .engine-state.offline{background:#2a151b;color:#ee8496}
html[data-theme="dark"] .stat-icon,
html[data-theme="dark"] .step-icon,
html[data-theme="dark"] .upload-symbol,
html[data-theme="dark"] .preview-title span{background:#1b1734!important;color:#a994ff!important}
html[data-theme="dark"] .step-number{color:#242d3d}
html[data-theme="dark"] .input-prefix{border-color:#273145;background:#0c111b}
html[data-theme="dark"] .input-prefix span{background:#131a27;color:#8f99ac;border-right:1px solid #273145}
html[data-theme="dark"] .builder-status-strip{background:#0d131e;border-color:#263145}
html[data-theme="dark"] .builder-status-strip strong{color:#e8edf7}
html[data-theme="dark"] .builder-status-strip small{color:#8995aa}
html[data-theme="dark"] .builder-status-strip.ready{background:#0d1f19;border-color:#204536}
html[data-theme="dark"] .builder-status-strip.offline{background:#251419;border-color:#52303a}
html[data-theme="dark"] .play-store-mode{background:linear-gradient(180deg,#0e1420,#0b1019);border-color:#263145}
html[data-theme="dark"] .play-store-mode label{color:#cdd5e3}
html[data-theme="dark"] .play-store-mode select,
html[data-theme="dark"] .release-notes-field textarea{background:#0b1019!important;border-color:#283347!important;color:#e9eef8!important}
html[data-theme="dark"] .format-help,
html[data-theme="dark"] .release-notes-field>span small{color:#8d98ab!important}
html[data-theme="dark"] .project-main-copy p,
html[data-theme="dark"] .history-sub{color:#8f9aad!important}
html[data-theme="dark"] .format-badge{background:#1b1734;border-color:#3c3365;color:#aa97ff}
html[data-theme="dark"] .project-actions{border-top-color:#263145}
html[data-theme="dark"] .project-action,
html[data-theme="dark"] .history-action{background:#111725;border-color:#2a3548;color:#b9c2d2}
html[data-theme="dark"] .project-action:hover:not(:disabled),
html[data-theme="dark"] .history-action:hover:not(:disabled){background:#171d2b;border-color:#554a87;color:#b7a9ff}
html[data-theme="dark"] .project-action.danger,
html[data-theme="dark"] .history-action.danger{color:#f08396}
html[data-theme="dark"] .project-action.danger:hover:not(:disabled),
html[data-theme="dark"] .history-action.danger:hover:not(:disabled){background:#28151a;border-color:#633441;color:#ff9aac}
html[data-theme="dark"] .table-row{border-color:#253044!important}
html[data-theme="dark"] .table-head{color:#8793a8!important;background:#0d131e!important}
html[data-theme="dark"] .history-empty{color:#8995aa!important}
html[data-theme="dark"] .settings-profile{background:#0d131e!important;border-color:#263145!important}
html[data-theme="dark"] .modal-close{background:#151c29!important;color:#d7dfec!important;border-color:#2b3649!important}
html[data-theme="dark"] .build-result{background:#0e211a!important;border-color:#214838!important;color:#dff8ef!important}

/* Phone preview in builder */
html[data-theme="dark"] .device-screen{background:#0d1320!important;color:#edf2fb!important}
html[data-theme="dark"] .device-status{color:#cbd4e3!important}
html[data-theme="dark"] .device-webbar{background:#141c2a!important;color:#aeb8c9!important;border-color:#273246!important}
html[data-theme="dark"] .device-webbar div{background:#0b111b!important;color:#aeb8c9!important}
html[data-theme="dark"] .device-content{background:#0d1320!important;color:#edf2fb!important}
html[data-theme="dark"] .device-content p{color:#8f9aad!important}
html[data-theme="dark"] .fake-button{background:#1b1734!important;color:#b2a3ff!important}

/* Mobile history cards */
@media(max-width:700px){
  html[data-theme="dark"] .history-row-pro{background:#101520!important;border-color:#263145!important}
  html[data-theme="dark"] .history-row-pro>span:nth-child(5){border-top-color:#263145!important}
}

/* Owner admin */
html[data-theme="dark"] .admin-shell{color:#edf2fb}
html[data-theme="dark"] .admin-hero h1,
html[data-theme="dark"] .card-head h2,
html[data-theme="dark"] .admin-stats strong{color:#f1f4fc}
html[data-theme="dark"] .admin-hero p,
html[data-theme="dark"] .card-head p{color:#8f9aad}
html[data-theme="dark"] .access-state{background:#101520;border-color:#263145;color:#aab5c7}
html[data-theme="dark"] .access-state.error{background:#28151a;border-color:#633441;color:#f28b9e}
html[data-theme="dark"] .admin-stats article{background:#101520;border-color:#263145}
html[data-theme="dark"] .admin-stats small{color:#8591a6}
html[data-theme="dark"] .admin-card{background:#101520;border-color:#263145}
html[data-theme="dark"] .card-head input{background:#0b111b;border-color:#2a3548;color:#edf2fb}
html[data-theme="dark"] .card-head input::placeholder{color:#667287}
html[data-theme="dark"] .users-table th,
html[data-theme="dark"] .users-table td{border-bottom-color:#253044;color:#cfd7e5}
html[data-theme="dark"] .users-table th{color:#8591a6}
html[data-theme="dark"] .user-main small{color:#8995aa}
html[data-theme="dark"] .plan-badge{background:#1a2230;color:#aeb8ca}
html[data-theme="dark"] .plan-badge.pro{background:#10261f;color:#50d0a6}
html[data-theme="dark"] .plan-badge.owner{background:#1b1734;color:#ae9cff}
html[data-theme="dark"] .plan-select{background:#0b111b;border-color:#2a3548;color:#edf2fb}
html[data-theme="dark"] .save-plan{background:#6d5dfc;color:#fff}
html[data-theme="dark"] .loading-cell{color:#8995aa!important}
html[data-theme="dark"] .admin-toast{background:#171e2b;border:1px solid #2a3548;color:#edf2fb}

/* Native form controls and scrollbars */
html[data-theme="dark"] input[type="color"]{background:#0b111b!important}
html[data-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:#0a0f17}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#283347;border:2px solid #0a0f17;border-radius:999px}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#36445c}
