/* =============================================
   AgriGreenSkills — Auth pages shared styles
   ============================================= */

@import url("https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@300;400;700&family=Inter:wght@400;500;600&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", sans-serif;
  color: #222;
  min-height: 100vh;
  background: #f5f3ef;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* ── Background pattern ── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(
      circle at 20% 20%,
      rgba(58, 158, 110, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(215, 71, 80, 0.06) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

/* ── Card ── */
.auth-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  width: 100%;
  max-width: 460px;
  border-radius: 24px;
  padding: 38px 36px 30px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 12px 40px rgba(0, 0, 0, 0.1);
  animation: cardIn 0.3s ease;
}

.auth-card.narrow {
  max-width: 400px;
}

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

/* ── Logo ── */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  margin-bottom: 28px;
}

.auth-logo-center {
  justify-content: center;
}

/* ── Steps indicator ── */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 26px;
}

.auth-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #bbb;
  background: #fff;
  flex-shrink: 0;
  font-family: "Inter", sans-serif;
}

.auth-step-dot.done {
  background: #3a9e6e;
  border-color: #3a9e6e;
  color: #fff;
}

.auth-step-dot.current {
  border-color: #d74750;
  color: #d74750;
}

.auth-step-line {
  flex: 1;
  height: 2px;
  background: #e8e8e8;
}

.auth-step-line.done {
  background: #3a9e6e;
}

/* ── Headings ── */
.auth-card h1 {
  font-family: "Roboto Slab", serif;
  font-size: 23px;
  font-weight: 400;
  color: #1a1a1a;
  margin-bottom: 5px;
}

.auth-sub {
  font-size: 13.5px;
  color: #777;
  line-height: 1.55;
  margin-bottom: 26px;
}

/* ── Banners (error / success) ── */
.auth-banner {
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.45;
}

.auth-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-banner.error {
  background: #fff0f0;
  color: #b83038;
  border: 1px solid #fccaca;
}

.auth-banner.success {
  background: #f0faf5;
  color: #2b7a56;
  border: 1px solid #b8e4cf;
}

/* ── Form groups ── */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 7px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2e2e2;
  border-radius: 12px;
  font-size: 14px;
  font-family: "Inter", sans-serif;
  color: #222;
  background: #fafafa;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    background 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #3a9e6e;
  box-shadow: 0 0 0 3px rgba(58, 158, 110, 0.13);
  background: #fff;
}

.form-group input.input-error {
  border-color: #d74750;
}

.form-group input[type="password"] {
  letter-spacing: 3px;
  font-size: 16px;
}

.form-group input[type="password"]::placeholder {
  letter-spacing: normal;
  font-size: 14px;
}

.form-group .hint {
  font-size: 11.5px;
  color: #aaa;
  margin-top: 5px;
}

.form-group .hint-error {
  color: #d74750;
}

.is-hidden {
  display: none;
}

/* ── Two-column row ── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.form-row .form-group {
  margin-bottom: 0;
}

/* ── Forgot link ── */
.forgot-link {
  display: block;
  text-align: right;
  font-size: 12.5px;
  color: #3a9e6e;
  text-decoration: none;
  margin-top: -10px;
  margin-bottom: 18px;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #2b7a56;
  text-decoration: underline;
}

/* ── Buttons ── */
.btn-auth {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  border: none;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition:
    background 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  letter-spacing: 0.01em;
}

.btn-auth.red {
  background: #d74750;
  color: #fff;
  box-shadow: 0 2px 10px rgba(215, 71, 80, 0.22);
}

.btn-auth.red:hover {
  background: #c13840;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(215, 71, 80, 0.3);
}

.btn-auth.green {
  background: #3a9e6e;
  color: #fff;
  box-shadow: 0 2px 10px rgba(58, 158, 110, 0.22);
}

.btn-auth.green:hover {
  background: #2d8559;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(58, 158, 110, 0.3);
}

.btn-auth:active {
  transform: translateY(0);
}

.btn-auth-link {
  display: block;
  text-align: center;
  text-decoration: none;
}

/* ── Switch / link row ── */
.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: #777;
}

.auth-switch a {
  color: #d74750;
  text-decoration: none;
  font-weight: 500;
}

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

.auth-switch.back a {
  color: #3a9e6e;
}

.auth-switch-spaced {
  margin-top: 20px;
}

/* ── Icon state (success / error full page) ── */
.auth-state {
  text-align: center;
  padding-top: 6px;
}

.state-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border: 2px solid;
}

.state-icon.green {
  background: #f0faf5;
  border-color: #3a9e6e;
  color: #3a9e6e;
}

.state-icon.red {
  background: #fff0f0;
  border-color: #d74750;
  color: #d74750;
}

.state-icon svg {
  width: 26px;
  height: 26px;
}

.auth-state h1 {
  margin-bottom: 8px;
}
.auth-state .auth-sub {
  margin-bottom: 24px;
}
