/* 360 E-Sign — dark/light theme layer (daisyUI variable override) */
html[data-theme="dark"] {
  color-scheme: dark;
  /* status colors unchanged */
  --in: 198 93% 60%;
  --su: 158 64% 52%;
  --wa: 43 96% 56%;
  --er: 0 91% 71%;
  --inc: 198 100% 12%;
  --suc: 158 100% 10%;
  --wac: 43 100% 11%;
  --erc: 0 100% 14%;
  /* brand accents kept */
  --p: 345 7% 89%;
  --pf: 345 7% 82%;
  --pc: 345 1% 17%;
  --s: 338 71% 78%;
  --sf: 338 71% 71%;
  --sc: 340 15% 16%;
  --a: 39 84% 58%;
  --af: 39 84% 51%;
  --ac: 37 41% 13%;
  /* neutral flipped for dark surfaces */
  --n: 217 20% 82%;
  --nf: 217 20% 74%;
  --nc: 280 46% 12%;
  /* base surfaces: dark navy */
  --b1: 222 32% 12%;
  --b2: 222 32% 9%;
  --b3: 223 32% 7%;
  --bc: 220 20% 88%;
}

/* smooth theme transitions */
body, .card, input, select, textarea {
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

/* floating theme toggle */
.esign-theme-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 9999;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: hsl(var(--b2));
  color: hsl(var(--bc));
  border: 1px solid hsl(var(--bc) / .25);
  box-shadow: 0 6px 18px rgb(0 0 0 / .28);
}
.esign-theme-toggle:hover { transform: scale(1.06); }
.esign-theme-toggle svg { width: 22px; height: 22px; }

/* form fields: dark text on white surface in dark mode */
html[data-theme="dark"] input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=hidden]):not([type=submit]):not([type=button]),
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: #ffffff;
  color: #1f2937;
  border-color: #d1d5db;
  caret-color: #1f2937;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #9ca3af;
  opacity: 1;
}
html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] textarea:-webkit-autofill {
  -webkit-text-fill-color: #1f2937;
  transition: background-color 999999s ease-in-out 0s;
}
