/* E-Vantis Vademécum — production mobile/theme hardening 2026-09-14 */
html[data-theme="dark"] :is(input,textarea,[contenteditable="true"]){caret-color:#65d6ff!important}
html[data-theme="light"] :is(input,textarea,[contenteditable="true"]){caret-color:#0a66ff!important}

/* Preserve readable structured tables in both themes. */
html[data-theme="dark"] :is(.backend-data-block,.backend-table-wrap,.backend-table-container){color:#f4f8fc!important}
html[data-theme="dark"] .backend-data-block table{background:#0d1a28!important;color:#f4f8fc!important;border-color:#30465a!important}
html[data-theme="dark"] .backend-data-block :is(th,td){background:#0d1a28!important;color:#f4f8fc!important;-webkit-text-fill-color:#f4f8fc!important;border-color:#30465a!important}
html[data-theme="dark"] .backend-data-block thead :is(th,td){background:#102131!important;color:#f8fbff!important;-webkit-text-fill-color:#f8fbff!important}

@media(max-width:680px){
  .topbar{padding:8px 10px!important;gap:8px!important;align-items:center!important}
  .brand{min-width:0!important;flex:1 1 auto!important}
  .vademecum-brand-logos{max-width:112px!important;min-width:82px!important}
  .brand-copy{min-width:0!important}
  .topbar-actions{min-width:0!important;max-width:52vw!important;gap:4px!important;display:flex!important;justify-content:flex-end!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important}
  .topbar-actions::-webkit-scrollbar{display:none!important}
  .topbar-actions>*{flex:0 0 auto!important}
  .theme-switch{width:40px!important;min-width:40px!important;height:40px!important}
  .api-indicator{max-width:98px!important;padding:7px 8px!important}
  #apiLabel{max-width:68px!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}

  .hero-content{width:calc(100vw - 24px)!important}
  .audience-switch{width:100%!important;grid-template-columns:1fr!important}
  .audience-option{min-width:0!important}
  .search-wrap{width:100%!important}
  .search-box{height:58px!important;padding:0 12px!important}
  .search-box input{font-size:16px!important}
  .quick-row{width:100%!important}
  .hero-trust{width:100%!important}

  .drug-view-inner{width:calc(100vw - 24px)!important}
  .drug-header{padding:20px!important;border-radius:18px!important}
  .drug-header-top{flex-direction:column!important}
  .status-badge{white-space:normal!important}
  .section-card{padding:18px!important}
  .modal-card{width:calc(100vw - 24px)!important;max-width:100%!important;padding:22px 18px!important}
  .modal-actions{display:grid!important;grid-template-columns:1fr!important}
  .modal-actions>*{width:100%!important}

  .backend-data-block{overflow:hidden!important}
  .backend-table-wrap,.backend-table-container,.backend-data-block>div:has(table){max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important}
  .backend-data-block table{min-width:680px!important}
}
