/* =====================================================================
   SyncBooking — Auth pages (Claude design). Standalone, niente Metronic.
   Login / Sign up / Reset password / Change password.
   ===================================================================== */

:root {
  --paper: #f7f6f1;
  --paper-2: #efece3;
  --surface: #ffffff;
  --ink: #1f1e1b;
  --ink-soft: #44423c;
  --muted: #8a8579;
  --line: #e6e2d6;
  --line-strong: #d9d4c6;
  --clay: #d97757;
  --clay-deep: #c15f3c;
  --ring: rgba(217, 119, 87, .18);
  --radius: 12px;
  --radius-lg: 16px;
  --danger: #c0392b;
  --danger-bg: #fdf0ee;
  --danger-bd: #f0cfc9;
  --success: #2f7d57;
  --success-bg: #eef7f1;
  --success-bd: #cfe7da;
  --warn: #9a6a00;
  --warn-bg: #fdf6e7;
  --warn-bd: #ecdcae;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.sb-auth {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ---- Brand (logo) ---- */
.sb-brand { display: flex; justify-content: center; }
.sb-brand a { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.sb-brand .sb-icon { height: 38px; width: 38px; flex: 0 0 auto; }
.sb-brand .sb-word {
  font-family: "Spectral", ui-serif, "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  font-size: 25px;
  letter-spacing: -.01em;
  color: var(--ink);
}

/* ---- Card ---- */
.sb-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(31, 30, 27, .04), 0 12px 34px rgba(31, 30, 27, .07);
  padding: 30px;
}

.sb-head { text-align: center; margin-bottom: 22px; }
.sb-head h1 {
  margin: 0 0 6px;
  font-family: "Spectral", ui-serif, "Iowan Old Style", Georgia, serif;
  font-weight: 600;
  font-size: 21px;
  letter-spacing: -.01em;
  color: var(--ink);
}
.sb-head p { margin: 0; font-size: 14px; color: var(--muted); }
.sb-head p a { color: var(--clay-deep); font-weight: 600; text-decoration: none; }
.sb-head p a:hover { text-decoration: underline; }

/* ---- Form ---- */
.sb-form { display: flex; flex-direction: column; gap: 15px; }
.sb-field { display: flex; flex-direction: column; gap: 6px; }
.sb-field-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.sb-label-link { font-size: 13px; color: var(--clay-deep); font-weight: 600; text-decoration: none; white-space: nowrap; }
.sb-label-link:hover { text-decoration: underline; }

.sb-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.sb-input::placeholder { color: #b6b0a2; }
.sb-input:focus { border-color: var(--clay); box-shadow: 0 0 0 3px var(--ring); }
.sb-input:disabled { background: var(--paper-2); color: var(--muted); cursor: not-allowed; }
.sb-input.has-error { border-color: #e0654f; }

/* password field with eye toggle */
.sb-pass { position: relative; }
.sb-pass .sb-input { padding-right: 44px; }
.sb-eye {
  position: absolute; top: 0; right: 0;
  height: 44px; width: 44px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0;
}
.sb-eye:hover { color: var(--ink-soft); }
.sb-eye svg { width: 18px; height: 18px; }

/* ---- Button ---- */
.sb-btn {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: var(--radius);
  background: var(--clay);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .12s ease, transform .04s ease;
}
.sb-btn:hover { background: var(--clay-deep); }
.sb-btn:active { transform: translateY(1px); }
.sb-btn:disabled { opacity: .7; cursor: default; }

.sb-foot { text-align: center; margin-top: 2px; }
.sb-foot a, .sb-link { font-size: 14px; color: var(--clay-deep); font-weight: 600; text-decoration: none; }
.sb-foot a:hover, .sb-link:hover { text-decoration: underline; }
.sb-pagefoot { text-align: center; font-size: 12px; color: var(--muted); }

/* ---- Alerts / errors ---- */
.sb-alert { border-radius: 10px; padding: 12px 14px; font-size: 13.5px; line-height: 1.5; }
.sb-alert .sb-alert-title { font-weight: 600; margin-bottom: 2px; }
.sb-alert ul { margin: 6px 0 0; padding-left: 18px; }
.sb-alert ul li + li { margin-top: 3px; }
.sb-alert-danger { background: var(--danger-bg); border: 1px solid var(--danger-bd); color: var(--danger); }
.sb-alert-success { background: var(--success-bg); border: 1px solid var(--success-bd); color: var(--success); }
.sb-alert-warning { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn); }
.sb-alert-actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 14px; }
.sb-err { font-size: 12.5px; color: var(--danger); margin-top: 1px; }

/* ---- Turnstile responsive ---- */
.sb-turnstile { display: flex; justify-content: center; max-width: 100%; }
@media (max-width: 345px) {
  .sb-turnstile { transform: scale(.85); transform-origin: center top; }
}

/* ===== Dark mode (classe .dark su <html>) ===== */
html.dark body { background: #1c1b19; color: #ececE9; }
html.dark .sb-card {
  background: #28272300; background: #282723;
  border-color: #3a3833;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 14px 36px rgba(0, 0, 0, .45);
}
html.dark .sb-word, html.dark .sb-head h1 { color: #f5f4ee; }
html.dark .sb-head p, html.dark .sb-pagefoot { color: #a8a39a; }
html.dark .sb-label { color: #cfcabf; }
html.dark .sb-input { background: #201f1c; border-color: #3a3833; color: #ececE9; }
html.dark .sb-input::placeholder { color: #6f6a60; }
html.dark .sb-input:disabled { background: #242320; color: #8a8579; }
html.dark .sb-alert-danger { background: rgba(69, 10, 10, .35); border-color: rgba(248, 113, 113, .22); color: #fecaca; }
html.dark .sb-alert-success { background: rgba(20, 83, 45, .35); border-color: rgba(74, 222, 128, .22); color: #bbf7d0; }
html.dark .sb-alert-warning { background: rgba(69, 26, 3, .35); border-color: rgba(251, 191, 36, .22); color: #fde68a; }
