/* Shared viewport, authentication, transcript, and dark-mode safeguards. */
html,body{max-width:100%;overflow-x:hidden}
input,select,textarea{max-width:100%;min-width:0}
#dashboardLogin{padding:12px!important;overflow:auto!important}
#dashboardLogin form{width:min(440px,100%)!important;max-width:100%!important;margin:auto!important;padding:clamp(18px,5vw,28px)!important;transform:none!important}
#dashboardLogin .google-login{background:#176f5e!important;color:#fff!important;border:1px solid #6ab09f!important}
#dashboardLogin h2{font-size:clamp(28px,8vw,36px)!important;overflow-wrap:anywhere}
#dashboardLogin p,#dashboardLogin code{overflow-wrap:anywhere}
.transcript-toolbar button#copyConversation{display:none!important}.transcript-toolbar button#emailConversation:not([hidden]){display:inline-flex!important;align-items:center;justify-content:center}
.voice-transcript{max-height:38dvh;overflow:auto;overscroll-behavior:contain}
.voice-transcript p{max-width:94%;padding:7px 9px!important;font-size:14px}
html[data-theme="dark"] #dashboardLogin form,html[data-theme="dark"] #customerConversationDialog,html[data-theme="dark"] #conversationRecorder{background:#10231c!important;color:#f7fbf8!important}
html[data-theme="dark"] .google-login{background:#176f5e!important;color:#fff!important}
html[data-theme="dark"] dialog,html[data-theme="dark"] dialog form,html[data-theme="dark"] .mobile-modal-head,html[data-theme="dark"] .history-entry,html[data-theme="dark"] .history-body,html[data-theme="dark"] .editable-transcript-row{background:#14251e!important;color:#f7fbf8!important;border-color:#60766b!important}
@media(max-width:760px){
  :root{--ink:#10251f!important;--paper:#081711!important;--card:#12271f!important;--line:#536d61!important;--muted:#b7c9c0!important}
  body{width:100%;min-width:0;background:#081711!important;color:#f5f8f6!important}.mast,main,.workspace,.profile,.lead-list,.profile-workspace-shell,.profile-workspace{max-width:100%;min-width:0}
  input,select,textarea,button,.metric,.lead-list,.lead-card,.profile,.profile-field-group,.profile-fields>.actions,.customer-attachments,.contact-history{background:#183028!important;color:#f5f8f6!important;border-color:#607b6e!important}
  h1,h2,h3,h4,.profile-field-group legend,.lead-card b,.profile b{color:#f5f8f6!important}.mast{background:#10251f!important}.mast a.active{color:#10251f!important}.pill{background:#07130f!important;color:#fff!important}
  input::placeholder,textarea::placeholder{color:#b7c9c0!important}.lead-card.active,.lead-card:hover{background:#24463a!important}.lead-card p,.lead-card small,.grid label{color:#c5d5ce!important}
  .mast{padding:12px}.mast h1{font-size:24px}.hero{display:none}
  .metrics{display:none!important}.controls{gap:6px;margin:8px 0}.mobile-search-tools{gap:5px!important}.mobile-search-tools .search-modes{display:flex!important;overflow-x:auto;flex-wrap:nowrap!important}.mobile-search-tools .search-modes label{flex:0 0 auto;min-height:36px!important;padding:5px 9px!important;background:#173027!important;color:#fff!important}
  .customer-picker select,.controls input,.controls select{min-height:40px!important;padding:8px!important}.lead-list{max-height:28dvh!important}.lead-card{padding:10px!important}
  .conversation-history{margin-inline:0!important}.conversation-body{padding:9px!important}.transcript p{padding:7px 0!important;font-size:14px!important}
  .history-transcript{display:grid;gap:7px}.editable-transcript-row{padding:8px!important;border-radius:10px}
  .chat{max-width:100vw}.voice-live{padding:7px}.voice-transcript{max-height:44dvh;padding:7px}.voice-transcript p{font-size:14px}
}
