/* Original clinic sign-in / setup theme (tokens from the SPA). */
:root {
  color-scheme: light only;
  --enamel: #f2f6f5;
  --surface: #ffffff;
  --surface-2: #eef4f4;
  --ink: #0d2b2d;
  --muted: #5e7577;
  --faint: #a9b6b6;
  --line: #e1eae9;
  --input-line: #c5d3d2;
  --teal: #0c7c7e;
  --teal-deep: #0b5f66;
  --teal-tint: #ddf2f1;
  --accent-text: #0b6b69;
  --side-bg: #0b4f54;
  --danger: #c23b27;
  --shadow: 0 1px 2px rgba(13, 43, 45, 0.06), 0 6px 18px -10px rgba(13, 43, 45, 0.2);
  --radius: 10px;
  --radius-lg: 18px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --enamel: #0c0e1f;
  --surface: #171a33;
  --surface-2: #20244a;
  --ink: #eef0ff;
  --muted: #9298c6;
  --faint: #5b6193;
  --line: #262b52;
  --input-line: #343a6b;
  --teal: #6468ee;
  --teal-deep: #4a4ed0;
  --teal-tint: #25295a;
  --accent-text: #a9acff;
  --side-bg: #0a0c1b;
  --danger: #ff7a7a;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font: 16px/1.5 var(--font);
  color: var(--ink);
  background: var(--enamel);
}
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 600; }
p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }

.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; text-align: center; }
.hint a { color: var(--accent-text); text-decoration: none; font-weight: 500; }
.hint a:hover { text-decoration: underline; }
.hidden { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 48px; padding: 0 1.2rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); cursor: pointer; font-weight: 500;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-deep); }
.btn.wide { width: 100%; }

.field { display: grid; gap: 0.3rem; }
.field > span { font-weight: 500; font-size: 0.95rem; }
.field small { color: var(--muted); }
input, select, textarea { color-scheme: light only; }
input[type="text"], input[type="password"], input[type="tel"], input[type="email"], input:not([type]), textarea {
  width: 100%; min-height: 46px; padding: 0 1.1rem;
  border: 1px solid var(--input-line); border-radius: 999px;
  background: var(--surface-2); color: var(--ink);
}
textarea { min-height: 96px; padding: 0.7rem 1.1rem; border-radius: 16px; resize: vertical; }
input:focus { border-color: var(--teal); outline: none; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--teal); cursor: pointer; }
.form-error { color: var(--danger); min-height: 1.2em; font-size: 0.95rem; }
.form-check { display: flex; align-items: center; gap: 0.55rem; }
.notice {
  border-radius: var(--radius); padding: 0.7rem 0.9rem;
  background: var(--teal-tint); color: var(--accent-text);
}

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(280px, 42%) 1fr; }
.auth-side {
  background: var(--side-bg); color: #eaf6f5;
  padding: 3rem 2.5rem; display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
}
.auth-side h1 { font-size: 2.4rem; letter-spacing: -0.01em; max-width: 14ch; }
.auth-side p { color: #b9dad8; max-width: 32ch; margin-top: 0.8rem; }
.arch { width: 100%; max-width: 440px; color: #4fb5b1; opacity: 0.9; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-form > div { width: min(400px, 100%); display: grid; gap: 1.4rem; }
.auth-form h2 { font-size: 1.2rem; }
.auth-form .card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 24px; box-shadow: var(--shadow);
  padding: 1.6rem; display: grid; gap: 1.2rem;
}

:root[data-theme="dark"] .auth-side { color: #eef0ff; }
:root[data-theme="dark"] .auth-side p { color: #9298c6; }
:root[data-theme="dark"] .arch { color: #7fd4d0; }
:root[data-theme="dark"] .auth-form .card { border-color: transparent; }

@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { padding: 1.6rem 1.4rem; }
  .auth-side h1 { font-size: 1.7rem; }
  .arch { display: none; }
  .auth-form { padding: 1.2rem 1rem 2rem; }
}
