:root {
  --bg: #f5f4ef;
  --surface: #fffdfa;
  --surface-2: #f1ede7;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #d7d3cb;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --error-bg: #fdf0f4;
  --error-text: #8a1c57;
  --success-bg: #ebfaf6;
  --success-text: #0f5c53;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  font-family: 'Inter', sans-serif;
  background:
    radial-gradient(circle at top left, rgba(15,118,110,0.08), transparent 34%),
    radial-gradient(circle at bottom right, rgba(15,118,110,0.06), transparent 28%),
    var(--bg);
  color: var(--text);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 100%;
  justify-items: center;
  align-items: start;
  padding: 48px 24px 24px 24px;
}

.auth-panel {
  width: min(100%, 480px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px;
}
.brand-modal {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}
.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.1;
}
.subcopy {
  margin: 0 0 24px;
  color: var(--muted);
}
.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.flash {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
}
.flash-error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: #efc2d4;
}
.flash-success {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: #b9eadb;
}
.auth-form {
  display: grid;
  gap: 10px;
}
.auth-form label {
  margin-top: 6px;
  font-size: 14px;
  font-weight: 600;
}
.auth-form input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px 15px;
  font-size: 16px;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
  background: #fff;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 6px;
  color: var(--muted);
}
.checkbox-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-dark);
}
.auth-foot {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.auth-foot a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

/* Flex row for Remember Me and Forgot Password link */
.auth-form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 1.25rem;
  flex-wrap: wrap; /* Allows stacking if the screen is too narrow */

}

.auth-form-row .checkbox-row {
  margin-bottom: 0;
}

.auth-form-row a {
  font-size: 13px;
  color: var(--primary, #0f766e);
  text-decoration: none;
  font-weight: 500;
}

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

/* Ensure consistent spacing on auth forms with multiple inputs */
.auth-form input[type="password"] {
  margin-bottom: 1rem;
}

@media (max-width: 600px) {
  .auth-shell {
    padding: 24px 16px;
  }

  .auth-panel {
    padding: 24px;
    border-radius: 16px;
  }
}
