/* EZZY IT WebPhone visual refresh: Avaya-inspired blue, slate and white.
   UI-only stylesheet. SIP/JsSIP behavior is intentionally untouched. */
:root {
  --wp-bg: #eaf0f7;
  --wp-card: #ffffff;
  --wp-card2: #f4f7fb;
  --wp-border: #cbd7e6;
  --wp-text: #172b45;
  --wp-muted: #5c6f86;
  --wp-accent: #1769aa;
  --wp-green: #138a55;
  --wp-red: #c93643;
  --wp-shadow: 0 16px 42px rgba(23, 48, 78, .12);
  color-scheme: light;
}

/* Default dark theme: deep navy with clear Avaya-blue actions. */
html:not([data-theme="light"]) {
  --wp-bg: #071a2c;
  --wp-card: #10263c;
  --wp-card2: #17334f;
  --wp-border: #2b4864;
  --wp-text: #f3f7fb;
  --wp-muted: #b4c5d6;
  --wp-accent: #3b9be8;
  --wp-green: #19a66a;
  --wp-red: #e04752;
  --wp-shadow: 0 20px 54px rgba(0, 0, 0, .28);
  color-scheme: dark;
}
html:not([data-theme="light"]) body {
  background: radial-gradient(ellipse at 50% -20%, #163d5f 0, transparent 52%), var(--wp-bg) !important;
  color: var(--wp-text) !important;
}
html:not([data-theme="light"]) .wp-card,
html:not([data-theme="light"]) .phone,
html:not([data-theme="light"]) .account-card {
  background: linear-gradient(155deg, #14304a, #0e2237) !important;
  border-color: var(--wp-border) !important;
}
html:not([data-theme="light"]) .brand-mark,
html:not([data-theme="light"]) .avatar {
  background: linear-gradient(135deg, #1676bb, #39a4eb) !important;
  color: #fff !important;
}
html:not([data-theme="light"]) .primary,
html:not([data-theme="light"]) .bigbtn {
  background: linear-gradient(135deg, #1479bd, #2498df) !important;
  color: #fff !important;
}
html:not([data-theme="light"]) .call-btn,
html:not([data-theme="light"]) .ctrl.call {
  background: #138a55 !important;
  color: #fff !important;
}
html:not([data-theme="light"]) .danger,
html:not([data-theme="light"]) .ctrl.danger,
html:not([data-theme="light"]) .ctrl.end {
  background: #c93643 !important;
  color: #fff !important;
}
html:not([data-theme="light"]) .field input,
html:not([data-theme="light"]) .field select,
html:not([data-theme="light"]) input.number-display,
html:not([data-theme="light"]) .number-display,
html:not([data-theme="light"]) .settings-section select {
  background: #071a2c !important;
  color: #f7fbff !important;
  -webkit-text-fill-color: #f7fbff !important;
  border-color: #41617f !important;
  caret-color: #65baff !important;
}
html:not([data-theme="light"]) .field input::placeholder,
html:not([data-theme="light"]) input.number-display::placeholder,
html:not([data-theme="light"]) .number-display::placeholder {
  color: #9eb3c9 !important;
  -webkit-text-fill-color: #9eb3c9 !important;
  opacity: 1 !important;
}
html:not([data-theme="light"]) .dial-key,
html:not([data-theme="light"]) .ctrl,
html:not([data-theme="light"]) .clear-btn,
html:not([data-theme="light"]) .secondary {
  background: #193650 !important;
  color: #f4f8fc !important;
  border-color: #355672 !important;
}
html:not([data-theme="light"]) .tab.active {
  background: #1769aa !important;
  color: #fff !important;
}

/* Light / lite theme: inputs are explicitly dark text on white, including password. */
html[data-theme="light"] {
  color-scheme: light !important;
  --wp-bg: #edf2f8;
  --wp-card: #ffffff;
  --wp-card2: #f6f9fc;
  --wp-border: #cfdae7;
  --wp-text: #172b45;
  --wp-muted: #52677f;
  --wp-accent: #1769aa;
  --wp-green: #138a55;
  --wp-red: #c93643;
  --wp-shadow: 0 14px 38px rgba(23, 48, 78, .10);
}
html[data-theme="light"] body {
  background: radial-gradient(ellipse at 50% -20%, #d5e7f6 0, transparent 55%), #edf2f8 !important;
  color: #172b45 !important;
}
html[data-theme="light"] .wp-card,
html[data-theme="light"] .phone,
html[data-theme="light"] .account-card,
html[data-theme="light"] .settings-section {
  background: #fff !important;
  color: #172b45 !important;
  border-color: #cfdae7 !important;
  box-shadow: 0 12px 32px rgba(23, 48, 78, .08) !important;
}
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] strong,
html[data-theme="light"] .account-name,
html[data-theme="light"] .peer,
html[data-theme="light"] .field label,
html[data-theme="light"] .check,
html[data-theme="light"] .call-top,
html[data-theme="light"] .call-state,
html[data-theme="light"] .timer {
  color: #172b45 !important;
}
html[data-theme="light"] .muted,
html[data-theme="light"] .small,
html[data-theme="light"] .brand p,
html[data-theme="light"] .footer,
html[data-theme="light"] .account-sub {
  color: #52677f !important;
}
html[data-theme="light"] .field input,
html[data-theme="light"] .field select,
html[data-theme="light"] input.number-display,
html[data-theme="light"] .number-display,
html[data-theme="light"] .settings-section select,
html[data-theme="light"] .recording-folder-path {
  background: #fff !important;
  color: #172b45 !important;
  -webkit-text-fill-color: #172b45 !important;
  border-color: #b9c9da !important;
  caret-color: #1769aa !important;
  opacity: 1 !important;
}
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] input.number-display::placeholder,
html[data-theme="light"] .number-display::placeholder {
  color: #75869a !important;
  -webkit-text-fill-color: #75869a !important;
  opacity: 1 !important;
}
html[data-theme="light"] .field input:focus,
html[data-theme="light"] .field select:focus,
html[data-theme="light"] input.number-display:focus {
  border-color: #1769aa !important;
  box-shadow: 0 0 0 3px rgba(23, 105, 170, .15) !important;
}
html[data-theme="light"] input:-webkit-autofill,
html[data-theme="light"] input:-webkit-autofill:hover,
html[data-theme="light"] input:-webkit-autofill:focus,
html[data-theme="light"] input:-webkit-autofill:active {
  -webkit-text-fill-color: #172b45 !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
  caret-color: #1769aa !important;
}
html[data-theme="light"] .brand-mark,
html[data-theme="light"] .avatar {
  background: linear-gradient(135deg, #1769aa, #39a4eb) !important;
  color: #fff !important;
}
html[data-theme="light"] .primary,
html[data-theme="light"] .bigbtn,
html[data-theme="light"] .theme-toggle {
  background: #1769aa !important;
  color: #fff !important;
  border-color: #1769aa !important;
}
html[data-theme="light"] .call-btn,
html[data-theme="light"] .ctrl.call {
  background: #138a55 !important;
  color: #fff !important;
}
html[data-theme="light"] .danger,
html[data-theme="light"] .ctrl.danger,
html[data-theme="light"] .ctrl.end {
  background: #c93643 !important;
  color: #fff !important;
}
html[data-theme="light"] .dial-key,
html[data-theme="light"] .ctrl,
html[data-theme="light"] .clear-btn,
html[data-theme="light"] .secondary {
  background: #f4f7fb !important;
  color: #17324d !important;
  border-color: #cbd7e6 !important;
}
html[data-theme="light"] .dial-key span { color: #52677f !important; }
html[data-theme="light"] .tabs { background: #e5edf5 !important; border-color: #cfdae7 !important; }
html[data-theme="light"] .tab { color: #52677f !important; }
html[data-theme="light"] .tab.active { background: #1769aa !important; color: #fff !important; }
html[data-theme="light"] .recent-item { background: #f8fafc !important; border-color: #d5e0eb !important; color: #172b45 !important; }
html[data-theme="light"] .status-pill { background: #fff !important; color: #52677f !important; border-color: #cfdae7 !important; }
html[data-theme="light"] .gateway-note { background: #e8f3fc !important; color: #244662 !important; border-color: #bed9ee !important; }
html[data-theme="light"] .gateway-note strong { color: #173c5b !important; }
html[data-theme="light"] .toast { background: #fff !important; color: #172b45 !important; border-color: #cfdae7 !important; }
@media (max-width: 600px) {
  .wp-shell { width: calc(100% - 18px) !important; }
  .wp-header { gap: 10px; }
  .brand h1 { font-size: 17px; }
  .header-actions { gap: 6px; }
  .theme-toggle { padding: 8px 10px !important; }
}
