/* =========================================================
   Viventra – Auth & Forms (Luxury Dark Theme)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg:        #0e0d0b;
  --bg-2:      #161410;
  --bg-3:      #1e1c18;
  --bg-card:   #1a1815;
  --cream:     #e8dcc8;
  --cream-dim: #b8a98a;
  --gold:      #c9a96e;
  --gold-dim:  #8a6f44;
  --text-muted:#8a8070;
  --text-dim:  #5a5248;
  --border:    rgba(200,180,140,0.12);
  --border-md: rgba(200,180,140,0.22);
  --radius:    8px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  background-image:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(201,169,110,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 80%, rgba(201,169,110,0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

/* ===== Auth Layout ===== */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  padding: 40px 20px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-md);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
}

.auth-logo {
  height: 52px;
  width: auto;
  margin: 0 auto 32px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.auth-card h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 300;
  font-style: italic;
  color: var(--cream);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.auth-card .auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 32px;
  font-weight: 300;
}

/* ===== Form Inputs ===== */
.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea,
.auth-form select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 14px 18px;
  margin: 0;
  border: 1px solid var(--border-md);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 300;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  color-scheme: dark;
}

.auth-form input::placeholder,
.auth-form textarea::placeholder,
input::placeholder,
textarea::placeholder { color: var(--text-dim); }

.auth-form input:focus,
.auth-form textarea:focus,
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}

/* Input stack spacing */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.auth-form textarea { min-height: 80px; resize: vertical; }

/* ===== Buttons ===== */
.btn {
  appearance: none; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500; font-size: 14px;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--gold); color: var(--bg);
  padding: 14px 28px; border-radius: 999px;
  transition: background var(--transition), transform var(--transition);
  min-height: 50px; white-space: nowrap; width: 100%;
  margin-top: 4px;
}
.btn:hover { background: var(--cream); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-login { background: var(--gold); color: var(--bg); }
.btn-login:hover { background: var(--cream); }

/* ===== Auth Links ===== */
.auth-card > a,
.auth-links a {
  display: block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-muted);
  transition: color var(--transition);
  font-weight: 300;
}
.auth-card > a:hover,
.auth-links a:hover { color: var(--gold); }

/* ===== Feedback ===== */
.error {
  background: rgba(180,60,60,0.12);
  color: #e07070;
  border: 1px solid rgba(180,60,60,0.25);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  text-align: left;
  line-height: 1.5;
}
.success {
  background: rgba(40,140,80,0.12);
  color: #6dbd8f;
  border: 1px solid rgba(40,140,80,0.25);
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  text-align: left;
}

/* ===== Divider ===== */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 4px 0; color: var(--text-dim); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; border-top: 1px solid var(--border);
}

/* ===== Reset container ===== */
.reset-container { max-width: 480px; margin: 0 auto; }
.reset-card { padding: 2rem; background: var(--bg-card); border: 1px solid var(--border-md); border-radius: var(--radius-lg); }
.reset-title { margin: 0 0 8px; font-family: 'Cormorant Garamond', serif; color: var(--cream); }
.reset-msg { font-size: 14px; color: var(--text-muted); margin-bottom: 24px; }
.reset-actions { text-align: center; margin-top: 16px; }
.reset-actions a { color: var(--gold-dim); font-size: 14px; }
.reset-actions a:hover { color: var(--gold); }

/* ===== Modern Form ===== */
.modern-form input,
.modern-form textarea,
.modern-form select { margin: 0; }
.modern-form button { margin-top: 8px; }

/* ===== Mobile ===== */
@media (max-width: 430px) {
  .auth-card { padding: 36px 24px; border-radius: var(--radius-lg); }
  .auth-card h2 { font-size: 1.7rem; }
  .btn { min-height: 54px; font-size: 15px; }
}
