:root {
  color-scheme: light;
}

.theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  padding: 0.25rem 0.45rem 0.25rem 0.65rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  color: #52677a;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 2px rgba(11, 31, 51, 0.05);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.theme-picker-corner {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 30;
}

.theme-picker:hover {
  border-color: #8fd8ff;
  color: #147ec5;
}

.theme-picker > svg {
  width: 1rem;
  height: 1rem;
  flex: none;
}

.theme-picker > span {
  font-size: 0.7rem;
  font-weight: 700;
}

.theme-picker select {
  min-width: 6.6rem;
  border: 0;
  border-radius: 0.55rem;
  outline: 0;
  color: #0b1f33;
  background: #f1f5f9;
  padding: 0.35rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-picker select:focus-visible {
  box-shadow: 0 0 0 2px #59c0ff;
}

html[data-theme="dark"] body {
  color: #d9e7f3;
  background: #07111d !important;
}

html[data-theme="dark"] [class~="bg-white"],
html[data-theme="dark"] [class*="bg-white/"],
html[data-theme="dark"] [class~="bg-slate-50"],
html[data-theme="dark"] [class*="bg-slate-50/"],
html[data-theme="dark"] [class~="bg-slate-100"] {
  background-color: #0d1d2c !important;
}

html[data-theme="dark"] [class~="text-ink"] {
  color: #edf6fd !important;
}

html[data-theme="dark"] [class~="text-slate-700"] {
  color: #cfdeeb !important;
}

html[data-theme="dark"] [class~="text-slate-600"] {
  color: #b7c9d8 !important;
}

html[data-theme="dark"] [class~="text-slate-500"] {
  color: #91a8bb !important;
}

html[data-theme="dark"] [class~="text-slate-400"] {
  color: #718ba1 !important;
}

html[data-theme="dark"] [class~="text-ocean-600"],
html[data-theme="dark"] [class~="text-ocean-700"] {
  color: #6dccf9 !important;
}

html[data-theme="dark"] [class~="border-slate-100"],
html[data-theme="dark"] [class~="border-slate-200"],
html[data-theme="dark"] [class*="border-slate-200/"],
html[data-theme="dark"] [class~="border-white"],
html[data-theme="dark"] [class*="border-white/"] {
  border-color: #20374a !important;
}

html[data-theme="dark"] .brand-logo {
  background: transparent;
  box-shadow: none;
}

html[data-theme="dark"] .brand-logo img {
  content: url("./logo-dark.png");
  opacity: 1;
  filter: invert(1) hue-rotate(180deg) brightness(1.42) saturate(1.12) contrast(1.05);
  mix-blend-mode: normal;
}

html[data-theme="dark"] .glass-card,
html[data-theme="dark"] .table-shell {
  border-color: #20374a;
  background: rgba(13, 29, 44, 0.9);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .icon-button {
  border-color: #29445a;
  color: #c6d7e5;
  background: #102538;
}

html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .icon-button:hover {
  border-color: #2c9fea;
  color: #8fd8ff;
  background: #12304a;
}

html[data-theme="dark"] .form-label {
  color: #c6d7e5;
}

html[data-theme="dark"] .form-input {
  border-color: #29445a;
  color: #e8f2fa;
  background: #0b1b2a;
}

html[data-theme="dark"] .form-input::placeholder {
  color: #607a90;
}

html[data-theme="dark"] .form-input:-webkit-autofill,
html[data-theme="dark"] .form-input:-webkit-autofill:hover,
html[data-theme="dark"] .form-input:-webkit-autofill:focus {
  border-color: #29445a;
  -webkit-text-fill-color: #e8f2fa;
  caret-color: #e8f2fa;
  box-shadow: 0 0 0 1000px #0b1b2a inset !important;
}

html[data-theme="dark"] .form-input:focus {
  border-color: #2c9fea;
  box-shadow: 0 0 0 4px rgba(44, 159, 234, 0.16);
}

html[data-theme="dark"] .admin-nav-button {
  color: #91a8bb;
}

html[data-theme="dark"] .admin-nav-button:hover,
html[data-theme="dark"] .admin-nav-button.is-active {
  color: #8fd8ff;
  background: #102d45;
  box-shadow: inset 0 0 0 1px #1e4a68;
}

html[data-theme="dark"] .data-table thead {
  color: #8ba3b7;
  background: #102538;
}

html[data-theme="dark"] .data-table td {
  border-color: #1d3345;
  color: #a9bdcd;
}

html[data-theme="dark"] .data-table tbody tr:hover {
  background: rgba(23, 51, 73, 0.45);
}

html[data-theme="dark"] .badge-neutral {
  color: #b5c8d7;
  background: #172d40;
  box-shadow: inset 0 0 0 1px #29445a;
}

html[data-theme="dark"] .badge-success {
  color: #6ee7b7;
  background: #123b34;
  box-shadow: inset 0 0 0 1px #1d5e4e;
}

html[data-theme="dark"] .badge-warning {
  color: #fcd34d;
  background: #3b3117;
  box-shadow: inset 0 0 0 1px #66511b;
}

html[data-theme="dark"] .badge-danger {
  color: #fda4af;
  background: #44212a;
  box-shadow: inset 0 0 0 1px #6b2d3b;
}

html[data-theme="dark"] .modal-dialog {
  color: #e8f2fa;
  background: #0d1d2c;
}

html[data-theme="dark"] .theme-picker {
  border-color: #29445a;
  color: #9eb3c4;
  background: rgba(13, 29, 44, 0.94);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
}

html[data-theme="dark"] .theme-picker:hover {
  border-color: #2c9fea;
  color: #8fd8ff;
}

html[data-theme="dark"] .theme-picker select {
  color: #dceaf5;
  background: #142b3f;
}

html[data-theme="dark"] [data-call-page] > .pointer-events-none,
html[data-theme="dark"] body > .pointer-events-none {
  opacity: 0.38;
}

html[data-theme="dark"] .caller-reminder {
  border-color: #214d69;
  background:
    radial-gradient(circle at 100% 0%, rgba(44, 159, 234, 0.2), transparent 42%),
    rgba(13, 29, 44, 0.88);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

html[data-theme="dark"] .caller-reminder__icon {
  color: #8fd8ff;
  background: #12304a;
}

html[data-theme="dark"] .caller-reminder__header h2,
html[data-theme="dark"] .caller-reminder__list strong,
html[data-theme="dark"] .call-targets__heading h3,
html[data-theme="dark"] .call-target-card__body strong {
  color: #e8f2fa;
}

html[data-theme="dark"] .caller-reminder__intro,
html[data-theme="dark"] .caller-reminder__list small,
html[data-theme="dark"] .call-targets__heading p,
html[data-theme="dark"] .call-target-card__body small {
  color: #94aabd;
}

html[data-theme="dark"] .caller-reminder__list li,
html[data-theme="dark"] .call-target-card {
  border-color: #29445a;
  background: rgba(16, 37, 56, 0.86);
}

html[data-theme="dark"] .call-target-card:hover,
html[data-theme="dark"] .call-target-card.is-selected {
  border-color: #2c9fea;
  background: #12304a;
  box-shadow: 0 0 0 3px rgba(44, 159, 234, 0.16);
}

html[data-theme="dark"] .call-target-card__check {
  border-color: #486176;
  background: #0d1d2c;
}

html[data-theme="dark"] .call-target-card.is-selected .call-target-card__check {
  border-color: #2c9fea;
  background: #147ec5;
}

html[data-theme="dark"] .protected-line {
  border-color: #1d5e4e !important;
  color: #6ee7b7 !important;
  background: rgba(18, 59, 52, 0.9) !important;
}

@media (max-width: 640px) {
  [data-call-page] header .brand-logo {
    width: 8.25rem;
    height: 2.7rem;
  }

  [data-call-page] header .brand-logo img {
    width: 160px;
    top: -57px;
  }

  .theme-picker > span {
    display: none;
  }

  .theme-picker select {
    min-width: 5.7rem;
  }

  .protected-line {
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    padding: 0 !important;
  }

  .protected-line > span {
    display: none;
  }
}
