/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: #1d1d1f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

/* ── Card ── */
.auth-card {
  width: 100%;
  max-width: 400px;
}

/* ── Brand ── */
.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-brand .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #000;
  margin-bottom: 1.25rem;
}

.auth-brand .logo-mark svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}

.auth-brand h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #1d1d1f;
  margin-bottom: 0.35rem;
}

.auth-brand p {
  font-size: 0.9375rem;
  color: #6e6e73;
}

/* ── Error area ── */
.error-area {
  background: #fff2f2;
  border: 1px solid #ffc5c5;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: #c0392b;
}

.error-area ul { margin: 0; padding-left: 1.1rem; }
.error-area li { margin-bottom: 0.2rem; }
.error-area[hidden] { display: none; }

/* ── Form fields ── */
.form-field {
  margin-bottom: 0.875rem;
}

.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #1d1d1f;
  margin-bottom: 0.4rem;
  letter-spacing: -0.1px;
}

.form-field input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: #1d1d1f;
  background: #f5f5f7;
  border: 1.5px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.form-field input::placeholder { color: #aeaeb2; }

.form-field input:focus {
  background: #fff;
  border-color: #0071e3;
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* ── Submit button ── */
.btn-primary {
  width: 100%;
  padding: 0.8125rem;
  margin-top: 0.75rem;
  background: #0071e3;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: -0.1px;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover  { background: #0077ed; }
.btn-primary:active { background: #006edb; transform: scale(0.99); }
.btn-primary:disabled { background: #aeaeb2; cursor: not-allowed; transform: none; }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: #aeaeb2;
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e5ea;
}

/* ── Social buttons ── */
.btn-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.75rem;
  margin-bottom: 0.625rem;
  background: #fff;
  color: #1d1d1f;
  font-size: 0.9375rem;
  font-weight: 500;
  font-family: inherit;
  border: 1.5px solid #d2d2d7;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-social:hover { background: #f5f5f7; border-color: #aeaeb2; }
.btn-social svg   { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Footer link ── */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: #6e6e73;
}

.auth-footer a {
  color: #0071e3;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover { text-decoration: underline; }

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  body { background: #000; color: #f5f5f7; }

  .auth-brand h1 { color: #f5f5f7; }
  .auth-brand p  { color: #86868b; }
  .auth-brand .logo-mark { background: #1c1c1e; border: 1px solid #3a3a3c; }

  .form-field label { color: #f5f5f7; }
  .form-field input {
    background: #1c1c1e;
    color: #f5f5f7;
    border-color: transparent;
  }
  .form-field input::placeholder { color: #48484a; }
  .form-field input:focus {
    background: #2c2c2e;
    border-color: #0a84ff;
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.2);
  }

  .btn-primary          { background: #0a84ff; }
  .btn-primary:hover    { background: #1a8fff; }
  .btn-primary:disabled { background: #3a3a3c; }

  .btn-social       { background: #1c1c1e; color: #f5f5f7; border-color: #3a3a3c; }
  .btn-social:hover { background: #2c2c2e; }

  .divider              { color: #48484a; }
  .divider::before,
  .divider::after       { background: #3a3a3c; }

  .auth-footer   { color: #86868b; }
  .auth-footer a { color: #0a84ff; }

  .error-area {
    background: #2c1010;
    border-color: #7b2020;
    color: #ff6b6b;
  }
}
