/* IBEX PHONE V7 — unified dark appearance.
 * One color system, restrained hierarchy, no rainbow accents or glass-on-glass layers.
 * Dark: background / surface / raised / separator / primary text / muted text / action.
 */
html[data-theme="dark"] {
  color-scheme: dark;
  --navy:#D5E5FA;
  --navy2:#C2D6F3;
  --deep:#0B111B;
  --ink:#F1F5FA;
  --muted:#AAB8C9;
  --light:#0B111B;
  --border:#304052;
  --shadow:none;
  --v5-ink:#EEF3FA;
  --v5-divider:#293647;
  --v5-bg:#0B111B;
  --v5-elevated:#161F2D;
  --v5-glass:rgba(22,31,45,.94);
  --v6-bg:#0B111B;
  --v6-surface:#161F2D;
  --v6-surface-alt:#212C3C;
  --v6-text:#F1F5FA;
  --v6-muted:#AAB8C9;
  --v6-line:#293647;
  --v6-elevation:none;
  --night-bg:#0B111B;
  --night-panel:#161F2D;
  --night-panel-2:#202B3B;
  --night-key:#263347;
  --night-line:#2E3C50;
  --night-text:#F1F5FA;
  --night-muted:#B2BFD0;
  --night-orange:#F58220;
}
html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] .app,
html[data-theme="dark"] .content-wrap,
html[data-theme="dark"] .main {background:var(--night-bg)!important;color:var(--night-text)}
html[data-theme="dark"] .app {background-image:none!important}
html[data-theme="dark"] .topbar {
  background:#0E1623!important;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  border-bottom:1px solid var(--night-line);
  box-shadow:none!important;
}
html[data-theme="dark"] .top-brand img {filter:brightness(0) invert(1)}
html[data-theme="dark"] .top-brand-divider {background:#405064}
html[data-theme="dark"] .top-brand strong,
html[data-theme="dark"] .desktop-top-title,
html[data-theme="dark"] .page-intro h1,
html[data-theme="dark"] .page-intro h1 .orange-period{color:var(--night-text)}
html[data-theme="dark"] .page-intro h1 .orange-period {color:var(--night-orange)}
html[data-theme="dark"] .page-intro p,
html[data-theme="dark"] .kicker,
html[data-theme="dark"] .section-kicker,
html[data-theme="dark"] .stat-label,
html[data-theme="dark"] .uppercase {color:var(--night-muted)}
html[data-theme="dark"] .sidebar{background:#101A2A!important;border-color:var(--night-line)}
html[data-theme="dark"] .side-product,
html[data-theme="dark"] .side-menu-label {color:var(--night-muted)}
html[data-theme="dark"] .nav-link{color:var(--night-muted)}
html[data-theme="dark"] .nav-link.selected {background:var(--night-panel-2)!important;color:var(--night-text)}
html[data-theme="dark"] .side-ai {background:var(--night-panel-2)!important;border-color:var(--night-line)}
html[data-theme="dark"] .side-account{color:var(--night-text);border-color:var(--night-line)}
html[data-theme="dark"] .side-account small{color:var(--night-muted)}
html[data-theme="dark"] .top-incoming-btn,
html[data-theme="dark"] .preview-status,
html[data-theme="dark"] .avatar-btn {background:var(--night-panel-2)!important;border:1px solid var(--night-line)!important;color:var(--night-text)!important;box-shadow:none!important}
/* Single level for cards; second level for controls. */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .page-panel,
html[data-theme="dark"] .account-panel,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .dialer-panel,
html[data-theme="dark"] .voicemail-panel,
html[data-theme="dark"] .contacts-grid {
  background:var(--night-panel)!important;
  background-image:none!important;
  border:1px solid var(--night-line)!important;
  color:var(--night-text);
  box-shadow:none!important;
}
html[data-theme="dark"] #page-dialer .dialer-panel::before,
html[data-theme="dark"] #page-dialer .dialer-panel::after {display:none!important}
html[data-theme="dark"] .preview-note {
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  color:var(--night-muted)!important;
}
html[data-theme="dark"] .preview-note .icon{color:#B5C1D1}
html[data-theme="dark"] .preview-note strong{color:var(--night-text)}
html[data-theme="dark"] .panel h2,
html[data-theme="dark"] .page-panel h2,
html[data-theme="dark"] .stat-bottom strong,
html[data-theme="dark"] .activity-details strong,
html[data-theme="dark"] .contact-details strong,
html[data-theme="dark"] .voicemail-entry-details strong,
html[data-theme="dark"] .preference-row strong,
html[data-theme="dark"] .setting-line strong,
html[data-theme="dark"] .service-row strong,
html[data-theme="dark"] .line-settings-row strong,
html[data-theme="dark"] .incoming-preview-action strong,
html[data-theme="dark"] .detail-value,
html[data-theme="dark"] .contact-card strong {color:var(--night-text)}
html[data-theme="dark"] .panel p,
html[data-theme="dark"] .activity-details small,
html[data-theme="dark"] .contact-details small,
html[data-theme="dark"] .contact-details span,
html[data-theme="dark"] .setting-line small,
html[data-theme="dark"] .service-row small,
html[data-theme="dark"] .activity-time,
html[data-theme="dark"] .line-picker-label small,
html[data-theme="dark"] .preference-row small,
html[data-theme="dark"] .line-settings-row small,
html[data-theme="dark"] .theme-preview-row small,
html[data-theme="dark"] .voicemail-entry-time,
html[data-theme="dark"] .voicemail-entry-details small,
html[data-theme="dark"] .contact-count,
html[data-theme="dark"] .list-meta,
html[data-theme="dark"] .detail-label,
html[data-theme="dark"] .settings-intro,
html[data-theme="dark"] .preference-note,
html[data-theme="dark"] .account-note,
html[data-theme="dark"] .dialer-foot,
html[data-theme="dark"] .call-action-hint {color:var(--night-muted)!important}
/* Inputs, line selector and other inset controls */
html[data-theme="dark"] .line-picker,
html[data-theme="dark"] .number-field,
html[data-theme="dark"] .search-field input,
html[data-theme="dark"] .account-panel input,
html[data-theme="dark"] .inline-placeholder,
html[data-theme="dark"] .line-select-wrap,
html[data-theme="dark"] .detail-box,
html[data-theme="dark"] .incoming-preview-action,
html[data-theme="dark"] .voicemail-transcript {
  background:var(--night-panel-2)!important;
  background-image:none!important;
  border:1px solid var(--night-line)!important;
  color:var(--night-text)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .number-field {border:0!important;background:transparent!important}
html[data-theme="dark"] .number-field input,
html[data-theme="dark"] .number-field input:focus,
html[data-theme="dark"] .account-panel input {color:var(--night-text)!important}
html[data-theme="dark"] input::placeholder {color:#98A8BD!important;opacity:1}
html[data-theme="dark"] .line-picker-label strong,
html[data-theme="dark"] .line-picker-label small {color:var(--night-text)}
html[data-theme="dark"] .line-picker-label small {color:var(--night-muted)}
html[data-theme="dark"] .line-picker-icon,
html[data-theme="dark"] .incoming-preview-icon,
html[data-theme="dark"] .erase,
html[data-theme="dark"] .mini-call,
html[data-theme="dark"] .service-icon,
html[data-theme="dark"] .account-large-icon,
html[data-theme="dark"] .line-avatar-small,
html[data-theme="dark"] .appearance-glyph,
html[data-theme="dark"] .voicemail-icon,
html[data-theme="dark"] .activity-avatar,
html[data-theme="dark"] .contact-avatar {
  background:var(--night-key)!important;
  border:1px solid var(--night-line)!important;
  color:var(--night-text)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .key,
html[data-theme="dark"] #page-dialer .key {
  background:var(--night-key)!important;
  background-image:none!important;
  border:1px solid #344559!important;
  color:var(--night-text)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .key:active {background:#34445B!important}
html[data-theme="dark"] .key strong {color:#F4F7FC!important}
html[data-theme="dark"] .key small{color:#BDCADB!important}
html[data-theme="dark"] .dial-button#start-call {background:#F58220!important;border:0!important;box-shadow:none!important;color:#fff!important}
html[data-theme="dark"] .incoming-preview-button {
  background:rgba(245,130,32,.14)!important;
  color:#FFB674!important;
  border:1px solid rgba(245,130,32,.20);
}
html[data-theme="dark"] .incoming-preview-action small {color:var(--night-muted)}
/* Grouped rows: separators only, not another boxed card per item */
html[data-theme="dark"] .activity-row,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .voicemail-entry,
html[data-theme="dark"] .service-row,
html[data-theme="dark"] .setting-line,
html[data-theme="dark"] .preference-row,
html[data-theme="dark"] .line-settings-row {border-color:var(--night-line)!important}
html[data-theme="dark"] .activity-row::after,
html[data-theme="dark"] .contact-card::after {background:var(--night-line)!important}
html[data-theme="dark"] .activity-row .call-result,
html[data-theme="dark"] .call-result {color:#C7D6E9}
html[data-theme="dark"] .favorite-action {color:#B1C1D5}
html[data-theme="dark"] .favorite-action[aria-pressed="true"] {color:#FFB778;background:rgba(245,130,32,.12)}
html[data-theme="dark"] .favorite-action[aria-pressed="true"] .icon {fill:#F58220;stroke:#F58220}
html[data-theme="dark"] .filter-tabs,
html[data-theme="dark"] .contact-segments,
html[data-theme="dark"] .theme-picker {
  background:var(--night-panel-2)!important;
  border:1px solid var(--night-line)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .filter-tab,
html[data-theme="dark"] .contact-segment,
html[data-theme="dark"] .theme-picker button {color:var(--night-muted)!important}
html[data-theme="dark"] .filter-tab.current,
html[data-theme="dark"] .contact-segment.selected,
html[data-theme="dark"] .theme-picker button[aria-pressed="true"] {
  background:#34455D!important;
  color:var(--night-text)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .contact-segment #favorite-count {background:rgba(245,130,32,.16);color:#FFBD86}
html[data-theme="dark"] .voicemail-entry-main {color:var(--night-text)}
html[data-theme="dark"] .voicemail-entry-main:hover {background:transparent!important}
html[data-theme="dark"] .voicemail-entry.listened .voicemail-entry-details strong {color:#C6D2E2}
html[data-theme="dark"] .voicemail-transcript p {color:#D9E2EE!important}
html[data-theme="dark"] .voicemail-transcript-title {color:#B9C8DA}
html[data-theme="dark"] .voicemail-actions button {
  background:#27384D!important;color:#E9F2FF!important;
  border:1px solid #34465D!important;
}
html[data-theme="dark"] .voicemail-actions button:first-child {
  background:var(--night-key)!important;color:#fff!important;border-color:#405572!important;
}
/* One calm accent treatment in voicemail / AI summaries */
html[data-theme="dark"] .voicemail-feature,
html[data-theme="dark"] .siren-hero,
html[data-theme="dark"] .siren-promo {
  background:#172C46!important;
  background-image:none!important;
  border:1px solid #344B67!important;
  box-shadow:none!important;
  color:#F3F7FE;
}
html[data-theme="dark"] .voicemail-feature p,
html[data-theme="dark"] .siren-hero p,
html[data-theme="dark"] .siren-promo p{color:#C3D0E2!important}
html[data-theme="dark"] .voicemail-feature-icon,
html[data-theme="dark"] .siren-hero-icon,
html[data-theme="dark"] .siren-icon {background:#2A4260!important;border-color:#3C5878!important;color:#F0F6FF}
html[data-theme="dark"] .siren-link {
  background:var(--night-key)!important;
  color:var(--night-text)!important;
  border:1px solid #3F5370;
}
/* Preferences and identity controls */
html[data-theme="dark"] .theme-picker button[aria-pressed="true"] {font-weight:760}
html[data-theme="dark"] .ios-switch {background:#475668}
html[data-theme="dark"] .preference-row input:checked + .ios-switch{background:#F58220}
html[data-theme="dark"] .sample-chip,
html[data-theme="dark"] .voicemail-bubble{
  background:rgba(245,130,32,.12)!important;
  border:1px solid rgba(245,130,32,.19)!important;
  color:#FFBA81!important;
}
html[data-theme="dark"] .service-pill,
html[data-theme="dark"] .service-pill.neutral {
  background:var(--night-panel-2)!important;
  border:1px solid var(--night-line)!important;
  color:#C0D0E3!important;
}
html[data-theme="dark"] .outline-button,
html[data-theme="dark"] .secondary-button{
  background:var(--night-panel-2)!important;
  color:var(--night-text)!important;
  border:1px solid var(--night-line)!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .theme-dot-light{border-color:#79869B}
html[data-theme="dark"] .theme-dot-dark{background:#0B111B;border-color:#52637A}
/* Bottom navigation: same material as the rest of the surfaces, no glowing selected pill. */
html[data-theme="dark"] .mobile-nav {
  background:rgba(20,29,42,.96)!important;
  border:1px solid var(--night-line)!important;
  -webkit-backdrop-filter:blur(18px);
  backdrop-filter:blur(18px);
  box-shadow:0 8px 26px rgba(0,0,0,.20)!important;
}
html[data-theme="dark"] .mobile-nav button{color:#B3C1D3!important}
html[data-theme="dark"] .mobile-nav button.mobile-selected{
  background:#2B3B50!important;
  color:#F5F8FC!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .mobile-nav button.mobile-selected::after {background:#F58220}
html[data-theme="dark"] .sheet-overlay .line-sheet-panel{
  background:var(--night-panel)!important;
  border:1px solid var(--night-line)!important;
  color:var(--night-text)!important;
}
html[data-theme="dark"] .sheet-top h2,
html[data-theme="dark"] .sheet-line-text strong{color:var(--night-text)!important}
html[data-theme="dark"] .sheet-line-list,
html[data-theme="dark"] .line-sheet-list,
html[data-theme="dark"] .sheet-line {
  background:var(--night-panel-2)!important;
  border-color:var(--night-line)!important;
  color:var(--night-text)!important;
}
html[data-theme="dark"] .sheet-line:active {background:var(--night-key)!important}
html[data-theme="dark"] .sheet-close,
html[data-theme="dark"] .sheet-line-badge{background:var(--night-key)!important;color:var(--night-text)!important}
html[data-theme="dark"] .sheet-footnote,
html[data-theme="dark"] .sheet-line-text small{color:var(--night-muted)!important}
html[data-theme="dark"] .toast {background:#23344A;color:#F3F7FC;border:1px solid #34465F;box-shadow:none}
html[data-theme="dark"] .call-mini{background:#172A42;color:#F3F7FC;border-color:#3B536E;box-shadow:0 8px 26px rgba(0,0,0,.22)}
html[data-theme="dark"] .call-mini-info small{color:#BDCADB}
/* Incoming / active-call surfaces remain intentionally distinct from regular screens. */
html[data-theme="dark"] .incoming-screen,
html[data-theme="dark"] .call-screen{
  background:linear-gradient(180deg,#152844 0%,#0C1729 100%)!important;
  border-color:#34475F;
}
@media(max-width:740px){
  html[data-theme="dark"] #page-dialer .dialer-panel{
    border-radius:26px;
    padding:11px 15px 14px;
  }
  html[data-theme="dark"] .topbar{background:#0E1623!important}
  html[data-theme="dark"] .page-intro{margin-bottom:13px}
  html[data-theme="dark"] .mobile-nav {box-shadow:0 12px 30px rgba(0,0,0,.21)!important}
  html[data-theme="dark"] .contacts-grid{padding:3px 14px}
  html[data-theme="dark"] .contacts-grid .contact-card{border:0!important;border-bottom:1px solid var(--night-line)!important;background:transparent!important;box-shadow:none!important;border-radius:0}
  html[data-theme="dark"] .contacts-grid .contact-card:last-child{border-bottom:0!important}
  html[data-theme="dark"] .incoming-screen,
  html[data-theme="dark"] .call-screen{border:0!important}
}
/* Final contrast and divider harmonization for dynamic list rows. */
html[data-theme="dark"] .list-tools,
html[data-theme="dark"] .records-list .activity-row,
html[data-theme="dark"] .recent-list .activity-row,
html[data-theme="dark"] .siren-record,
html[data-theme="dark"] #siren-list .siren-record,
html[data-theme="dark"] .line-settings-list .line-settings-row {
  border-color:var(--night-line)!important;
}
html[data-theme="dark"] .siren-record strong {color:var(--night-text)!important}
html[data-theme="dark"] .siren-record small {color:var(--night-muted)!important}
html[data-theme="dark"] .call-result {
  background:rgba(149,176,207,.14)!important;
  border:1px solid rgba(149,176,207,.19);
  color:#CAD8E9!important;
}
html[data-theme="dark"] .call-result.missed {
  background:rgba(238,116,101,.11)!important;
  border-color:rgba(238,116,101,.22);
  color:#FFB8AE!important;
}
html[data-theme="dark"] .call-result.siren {
  background:rgba(178,165,235,.12)!important;
  border-color:rgba(178,165,235,.2);
  color:#D8CCFF!important;
}
html[data-theme="dark"] .activity-row .call-result{white-space:nowrap}
html[data-theme="dark"] .detail-box{color:#E6EDF8!important}
html[data-theme="dark"] .line-status,
html[data-theme="dark"] .mode-badge,
html[data-theme="dark"] .offline-pill{
  background:rgba(245,130,32,.12)!important;
  border:1px solid rgba(245,130,32,.22)!important;
  color:#FFBA80!important;
  box-shadow:none!important;
}
html[data-theme="dark"] .side-avatar {background:var(--night-key);color:var(--night-text);border:1px solid var(--night-line)}
html[data-theme="dark"] .today-label {color:var(--night-muted)}
