/* ==========================================================================
   Salon SaaS – Auth-Seiten (Phase 2)
   Setzt die Variablen aus main.css voraus (im <head> zuerst main.css laden).
   ========================================================================== */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: linear-gradient(180deg, var(--bg-elev), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.auth-card .brand { margin-bottom: 6px; }
.auth-card h1 {
  font-size: 1.6rem;
  margin: 12px 0 4px;
  -webkit-text-fill-color: initial;
  background: none;
  color: var(--text);
}
.auth-sub { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 22px; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.18);
}
.field .hint { font-size: 0.78rem; color: var(--text-dim); margin-top: 5px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 420px) { .grid-2 { grid-template-columns: 1fr; } }

.btn {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #0b0b0d;
  transition: transform 0.08s, filter 0.15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: none;
  border: 1px solid transparent;
}
.alert.show { display: block; }
.alert.error { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.4); color: #fecaca; }
.alert.success { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.4); color: #bbf7d0; }
.alert.info { background: rgba(200, 162, 74, 0.1); border-color: rgba(200, 162, 74, 0.35); color: var(--gold-soft); }
.alert a { color: inherit; text-decoration: underline; word-break: break-all; }

.auth-foot { margin-top: 20px; font-size: 0.9rem; color: var(--text-dim); text-align: center; }
.auth-foot a { color: var(--gold-soft); text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

.pw-toggle {
  position: relative;
}
.pw-toggle button {
  position: absolute;
  right: 8px; top: 30px;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  background: none; border: none; color: var(--text-dim);
  cursor: pointer; border-radius: 8px; transition: color .15s;
}
.pw-toggle button:hover { color: var(--gold); }
.pw-toggle button svg { width: 20px; height: 20px; }
.pw-toggle input { padding-right: 46px; }

.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid rgba(11,11,13,0.35);
  border-top-color: #0b0b0d;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Touch/Mobile --- */
html { -webkit-text-size-adjust: 100%; }
* { -webkit-tap-highlight-color: transparent; }
.auth-wrap { min-height: 100dvh; padding-top: max(32px, env(safe-area-inset-top)); padding-bottom: max(32px, env(safe-area-inset-bottom)); }
@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; border-radius: 16px; }
  .field input, .field select { font-size: 16px; }
  .btn { min-height: 50px; }
}
