:root {
  --auth-bg: #f7f6f0;
  --auth-surface: #ffffff;
  --auth-text: #182026;
  --auth-muted: #5c6670;
  --auth-line: rgba(16, 24, 40, 0.1);
  --auth-green: #1f8b4d;
  --auth-yellow: #f7cb46;
  --auth-red: #d92d20;
  --auth-radius: 16px;
  --auth-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--auth-text);
  background: var(--auth-bg);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.auth-shell__top {
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: linear-gradient(90deg, #f7cb46 0%, #f3b32d 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.auth-shell__brand {
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  text-decoration: none;
}

.auth-shell__main {
  width: min(100%, 440px);
  margin: 0 auto;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom));
}

.auth-flash-stack {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-flash {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--auth-line);
  background: var(--auth-surface);
}

.auth-flash--success {
  border-color: rgba(31, 139, 77, 0.25);
  background: #eef9f1;
  color: #145a32;
}

.auth-flash--error {
  border-color: rgba(217, 45, 32, 0.2);
  background: #fef3f2;
  color: #912018;
}

.auth-flash--info,
.auth-flash--message {
  background: #fffbeb;
  color: #7a5900;
}

.auth-flash__close {
  border: 0;
  background: transparent;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  color: inherit;
  opacity: 0.7;
}

.auth-container {
  width: 100%;
}

.auth-card {
  background: var(--auth-surface);
  border: 1px solid var(--auth-line);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  padding: 20px;
}

.auth-header {
  margin-bottom: 18px;
}

.auth-header h1 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.auth-header p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.92rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--auth-text);
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  background: #fff;
  color: var(--auth-text);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: rgba(31, 139, 77, 0.45);
  box-shadow: 0 0 0 3px rgba(31, 139, 77, 0.12);
}

.form-control--otp {
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding-left: 0.5em;
}

.form-errors {
  display: grid;
  gap: 4px;
  color: var(--auth-red);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-actions {
  margin-top: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary,
.btn-full {
  width: 100%;
}

.btn-primary {
  background: var(--auth-green);
  color: #fff;
}

.btn-primary:active {
  transform: scale(0.99);
}

.auth-links {
  margin-top: 16px;
  display: grid;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--auth-muted);
}

.auth-links p {
  margin: 0;
}

.auth-links a {
  color: var(--auth-green);
  font-weight: 700;
  text-decoration: none;
}

.auth-links--center {
  text-align: center;
}

.auth-note {
  margin-top: 14px;
  font-size: 0.85rem;
  text-align: center;
  color: var(--auth-muted);
}

.auth-note a {
  color: var(--auth-green);
  font-weight: 700;
  text-decoration: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 400px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 480px) {
  .auth-shell__main {
    padding-top: 28px;
  }

  .auth-card {
    padding: 24px;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }
}
