/* ── auth.css ─────────────────────────────────────────────────────────────────
   Auth page layouts: login + register (auth-split pattern + register extras).
   ────────────────────────────────────────────────────────────────────────── */

/* ── Split layout ────────────────────────────────────────────────── */
.auth-split {
  display: grid;
  grid-template-columns: 40% 60%;
  min-height: calc(100vh - var(--nav-height));
}

@media (max-width: 768px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-split__panel--left { display: none; }
}

/* Left panel */
.auth-split__panel--left {
  background: linear-gradient(160deg, #142038 0%, #2B4C7E 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.auth-split__panel--left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.left-panel__brand {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--c-white);
  margin-bottom: 1rem;
  position: relative;
}

.left-panel__tagline {
  color: rgba(255,255,255,.75);
  font-size: .95rem;
  line-height: 1.65;
  max-width: 280px;
  position: relative;
  margin-bottom: 2rem;
}

.mountain-svg {
  width: 100%;
  max-width: 280px;
  opacity: .25;
  position: relative;
}

/* Right panel */
.auth-split__panel--right {
  background: var(--c-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

/* Register right panel scrolls */
.auth-split__panel--right.scrollable {
  align-items: flex-start;
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

.auth-form-wrap--wide {
  max-width: 440px;
}

.auth-form-wrap__heading {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  color: var(--c-text);
  margin-bottom: .35rem;
}

.auth-form-wrap__sub {
  color: var(--c-text-muted);
  font-size: .92rem;
  margin-bottom: 1.75rem;
}

/* ── Google OAuth button ─────────────────────────────────────────── */
.btn--google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  width: 100%;
  padding: .7rem 1.25rem;
  background: var(--c-white);
  color: var(--c-text);
  border: 1.5px solid var(--c-grey-light);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, box-shadow .15s;
  box-shadow: var(--shadow-sm);
}
.btn--google:hover {
  background: var(--c-snow);
  box-shadow: var(--shadow-md);
}

/* ── Divider ─────────────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0;
  color: var(--c-grey-mid);
  font-size: .825rem;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-grey-light);
}

/* ── Form fields (auth pattern) ──────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--c-text);
  margin-bottom: .4rem;
}

.form-group input,
.form-group > input {
  width: 100%;
  padding: .65rem .9rem;
  border: 1.5px solid var(--c-grey-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--c-text);
  background: var(--c-white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}

.form-group input:focus,
.form-group > input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(43,76,126,.12);
}

.form-group input.has-error,
.form-group > input.has-error { border-color: var(--c-danger); }

.field-error {
  color: var(--c-danger);
  font-size: .8rem;
  margin-top: .3rem;
}

.non-field-errors {
  background: #fdeaea;
  border: 1px solid var(--c-danger);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  color: #7a1a1a;
  font-size: .875rem;
  margin-bottom: 1rem;
}

/* ── Form footer & switch ────────────────────────────────────────── */
.form-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  font-size: .85rem;
}

.form-footer-row a {
  color: var(--c-primary);
  text-decoration: none;
}
.form-footer-row a:hover { text-decoration: underline; }

.auth-switch {
  text-align: center;
  margin-top: 1.5rem;
  font-size: .875rem;
  color: var(--c-text-muted);
}

.auth-switch a {
  color: var(--c-primary);
  font-weight: 500;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* ── Register extras ─────────────────────────────────────────────── */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; }
@media (max-width: 480px) { .form-row-2 { grid-template-columns: 1fr; } }

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  padding: .65rem .9rem;
  padding-right: 2.5rem;
  border: 1.5px solid var(--c-grey-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .92rem;
  color: var(--c-text);
  background: var(--c-white);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.input-wrap input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(43,76,126,.12);
}
.input-wrap input.has-error { border-color: var(--c-danger); }

.reveal-btn {
  position: absolute;
  right: .6rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-grey-mid);
  padding: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s;
}
.reveal-btn:hover { color: var(--c-primary); }

/* zxcvbn strength meter */
.strength-meter { margin-top: .45rem; }
.strength-meter__bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  height: 4px;
}
.strength-meter__bar {
  border-radius: 2px;
  background: var(--c-grey-light);
  transition: background .3s;
}
.strength-meter__bar.active-0 { background: var(--c-danger); }
.strength-meter__bar.active-1 { background: #e0832a; }
.strength-meter__bar.active-2 { background: #e0c22a; }
.strength-meter__bar.active-3 { background: var(--c-accent); }
.strength-meter__bar.active-4 { background: var(--c-accent); }
.strength-meter__label {
  font-size: .75rem;
  color: var(--c-text-muted);
  margin-top: .25rem;
  min-height: 1em;
}

/* Password match indicator */
.match-indicator {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  margin-top: .3rem;
  min-height: 1.1em;
  transition: color .2s;
}
.match-indicator--match   { color: var(--c-accent); }
.match-indicator--mismatch { color: var(--c-danger); }

/* Help / extra text */
.help-text { font-size: .78rem; color: var(--c-text-muted); margin-top: .3rem; }

/* Benefit list */
.benefit-list { display: flex; flex-wrap: wrap; gap: .5rem .75rem; margin: 1.1rem 0; }
.benefit-list__item { font-size: .8rem; color: var(--c-accent); font-weight: 500; }
