:root {
  --primary: #4A90A4;
  --primary-dark: #3A7A8C;
  --primary-light: #E8F4F7;
  --accent: #7EB8A8;
  --bg: #F5F7FA;
  --card: #FFFFFF;
  --text: #1F2A37;
  --text-secondary: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  background:
    radial-gradient(1200px 600px at 100% -10%, rgba(126,184,168,0.28), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(74,144,164,0.22), transparent 60%),
    var(--bg);
}

.auth-shell { width: 100%; max-width: 400px; animation: rise 0.35s ease; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  text-decoration: none;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 24px rgba(74,144,164,0.3);
}

.brand-name { font-size: 1.35rem; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }

.auth-card {
  background: var(--card);
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.auth-card h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 6px; }
.auth-card .lead { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.5; margin-bottom: 22px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; }
.field .hint { font-size: 0.75rem; color: var(--text-secondary); margin-top: 6px; }

.field input {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}

.field input:focus { border-color: var(--primary); background: #fff; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 64px; }
.pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  color: var(--primary);
  font: 600 0.8rem inherit;
  font-family: inherit;
  padding: 8px;
  cursor: pointer;
}

.row-end { display: flex; justify-content: flex-end; margin: -4px 0 16px; }

.link-btn {
  background: none;
  border: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 22px;
  border-radius: 14px;
  border: none;
  font-size: 0.98rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background 0.15s, transform 0.15s, opacity 0.15s;
}
.btn:hover { background: var(--primary-dark); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.65; cursor: default; }

.auth-msg {
  font-size: 0.86rem;
  line-height: 1.45;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}
.auth-msg.error { background: #FEE2E2; color: #991B1B; }
.auth-msg.success { background: #DCFCE7; color: #166534; }
.auth-msg.info { background: var(--primary-light); color: var(--primary-dark); }

.switch { text-align: center; margin-top: 20px; font-size: 0.9rem; color: var(--text-secondary); }
.switch a { color: var(--primary); font-weight: 600; text-decoration: none; }
.switch a:hover { text-decoration: underline; }

.back { display: block; text-align: center; margin-top: 14px; font-size: 0.85rem; color: var(--text-secondary); text-decoration: none; }
.back:hover { color: var(--primary); }

.footnote { text-align: center; font-size: 0.75rem; color: var(--text-secondary); margin-top: 22px; line-height: 1.5; }

[hidden] { display: none !important; }

.benefits {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: -6px 0 22px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: 14px;
}
.benefits li { display: flex; gap: 12px; align-items: flex-start; font-size: 0.85rem; line-height: 1.45; color: var(--text-secondary); }
.benefits strong { color: var(--text); font-weight: 600; }
.b-icon { font-size: 1.1rem; line-height: 1.3; flex-shrink: 0; }
