/* ============================================================
   TimberDesk — Auth pages (login, register, recover, reset)
   Warm earth tones matching the workspace mockup
   ============================================================ */

:root {
  --canvas: #F7F5F2;
  --surface: #FFFFFF;
  --surface-2: #F2EFE9;
  --border: #E2DDD6;
  --border-light: #EDE9E3;
  --text-primary: #1C1A17;
  --text-secondary: #6B6459;
  --text-muted: #9B9189;
  --brand: #8B6F47;
  --brand-light: #C4A882;
  --brand-dark: #5C4730;
  --brand-bg: #F5EFE6;
  --stage-done: #4A7C59;
  --stage-done-bg: #EBF5EF;
  --stage-warn: #D4860A;
  --stage-blocked: #C0392B;
  --stage-blocked-bg: #FDEBE9;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Figtree', sans-serif;
  font-size: 14px;
  color: var(--text-primary);
  background: var(--canvas);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-image:
    radial-gradient(circle at top right, rgba(139, 111, 71, .08) 0%, transparent 55%),
    radial-gradient(circle at bottom left, rgba(196, 168, 130, .08) 0%, transparent 55%);
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(28, 26, 23, .08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  justify-content: center;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-weight: 600;
  letter-spacing: .02em;
}
.brand-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--brand-dark);
}

h1.auth-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 6px;
  text-align: center;
}
p.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
  line-height: 1.5;
}

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-input {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-bg);
}
.form-input.error {
  border-color: var(--stage-blocked);
  background: var(--stage-blocked-bg);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn-primary {
  width: 100%;
  padding: 11px 16px;
  background: var(--brand);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 8px;
  transition: background .15s;
}
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text-primary); }

.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-links a {
  color: var(--brand);
  text-decoration: none;
  font-weight: 500;
}
.auth-links a:hover { text-decoration: underline; color: var(--brand-dark); }
.auth-divider {
  margin: 0 8px;
  color: var(--border);
}

.alert {
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.alert.show { display: block; }
.alert-error {
  background: var(--stage-blocked-bg);
  color: var(--stage-blocked);
  border: 1px solid rgba(192, 57, 43, .2);
}
.alert-success {
  background: var(--stage-done-bg);
  color: var(--stage-done);
  border: 1px solid rgba(74, 124, 89, .2);
}
.alert-info {
  background: var(--brand-bg);
  color: var(--brand-dark);
  border: 1px solid rgba(139, 111, 71, .2);
}

.hint {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.loading {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.field-error {
  color: var(--stage-blocked);
  font-size: 12px;
  margin-top: 4px;
  display: none;
}
.field-error.show { display: block; }
