/* ── Auth pages (login & register) ──────────────────────────────────────────
   Scoped to .auth-page. Token aliases point at --gg-* from main.css.
   No new global custom properties are added here.
   ─────────────────────────────────────────────────────────────────────────── */

.auth-page {
  /* local aliases so the rules below stay readable */
  --a-bg:         var(--gg-bg);
  --a-dark:       var(--gg-dark);
  --a-line:       var(--gg-line);
  --a-line-2:     oklch(0.85 0.016 95);
  --a-ink:        var(--gg-ink);
  --a-body:       var(--gg-body);
  --a-muted:      var(--gg-muted);
  --a-label:      oklch(0.50 0.018 100);
  --a-faint:      oklch(0.62 0.016 95);
  --a-brand:      var(--gg-emerald);
  --a-brand-deep: var(--gg-emerald-deep);
  --a-brand-soft: var(--gg-emerald-light);
  --a-brand-bg2:  oklch(0.90 0.05 162);
  --a-coral:      var(--gg-terracotta);
  --a-coral-ink:  var(--gg-terracotta-deep);
  --a-font-head:  var(--gg-font-head);
  --a-font-body:  var(--gg-font-body);

  min-height: 100vh;
  background: var(--a-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  font-family: var(--a-font-body);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  box-sizing: border-box;
}

.auth-page *, .auth-page *::before, .auth-page *::after {
  box-sizing: border-box;
}

/* ── Split card ──────────────────────────────────────────────────────────── */

.auth-card {
  display: flex;
  width: 100%;
  max-width: 920px;
  min-height: 564px;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--a-line);
  box-shadow: 0 30px 70px -28px rgba(18, 42, 28, .38), 0 8px 22px rgba(18, 42, 28, .06);
}

/* ── Brand panel (left, desktop) ─────────────────────────────────────────── */

.auth-brand {
  position: relative;
  width: 43%;
  flex-shrink: 0;
  background: var(--a-dark);
  color: #fff;
  padding: 42px 38px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-brand__bgtoad {
  position: absolute;
  right: -54px;
  bottom: -46px;
  width: 290px;
  height: 290px;
  opacity: .08;
  pointer-events: none;
}

.auth-brand__lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.auth-brand__mark {
  width: 48px;
  height: 48px;
  display: block;
  flex-shrink: 0;
}

.auth-brand__stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.auth-brand__name {
  font-family: var(--a-font-head);
  font-weight: 700;
  font-size: 25px;
  letter-spacing: -.015em;
  line-height: 1;
  color: #fff;
  white-space: nowrap;
}

.auth-brand__name i {
  color: var(--a-coral);
  font-style: normal;
}

.auth-brand__desc {
  font-family: var(--a-font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--a-brand-soft);
  line-height: 1;
}

.auth-brand__mid {
  margin: auto 0;
  position: relative;
  z-index: 1;
  padding: 28px 0;
}

.auth-brand__tag {
  font-family: var(--a-font-head);
  font-weight: 700;
  font-size: 33px;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: #fff;
  max-width: 11ch;
}

.auth-brand__blurb {
  margin: 16px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(237, 251, 239, .74);
  max-width: 31ch;
}

.auth-brand__note {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: rgba(237, 251, 239, .6);
}

.auth-brand__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--a-brand-soft);
  box-shadow: 0 0 0 3px rgba(61, 169, 123, .22);
  flex-shrink: 0;
}

/* ── Form panel (right) ───────────────────────────────────────────────────── */

.auth-form {
  flex: 1;
  padding: 46px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--a-body);
}

/* ── Mobile masthead (hidden on desktop) ─────────────────────────────────── */

.auth-mast {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
}

.auth-mast__mark {
  display: block;
  width: 68px;
  height: 68px;
}

.auth-mast__name {
  font-family: var(--a-font-head);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -.015em;
  color: var(--a-ink);
  line-height: 1;
  white-space: nowrap;
}

.auth-mast__name i {
  color: var(--a-coral);
  font-style: normal;
}

.auth-mast__desc {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--a-coral-ink);
}

/* ── Heading & subtitle ───────────────────────────────────────────────────── */

.auth-h {
  font-family: var(--a-font-head);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -.02em;
  color: var(--a-ink);
  margin: 0;
  line-height: 1.1;
}

.auth-sub {
  margin: 9px 0 0;
  font-size: 14.5px;
  color: var(--a-muted);
  line-height: 1.5;
}

/* ── Field stack ──────────────────────────────────────────────────────────── */

.auth-fields {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Field ────────────────────────────────────────────────────────────────── */

.f-group {
  display: flex;
  flex-direction: column;
}

.f-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--a-label);
  margin-bottom: 6px;
  letter-spacing: .01em;
}

.f-label label {
  font: inherit;
  color: inherit;
}

.f-forgot {
  font-size: 12px;
  font-weight: 600;
  color: var(--a-coral-ink);
  text-decoration: none;
}

.f-forgot:hover { text-decoration: underline; }

.f-wrap {
  position: relative;
}

.f-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--a-faint);
  display: flex;
  pointer-events: none;
}

.f-input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 40px;
  border: 1.5px solid var(--a-line-2);
  border-radius: 11px;
  background: #fff;
  font-family: var(--a-font-body);
  font-size: 15px;
  color: var(--a-ink);
  transition: border-color .12s, box-shadow .12s;
  outline: none;
}

.f-input::placeholder { color: var(--a-faint); }

.f-input:focus {
  border-color: var(--a-brand);
  box-shadow: 0 0 0 3px var(--a-brand-bg2);
}

.f-input--pw { padding-right: 46px; }

.f-eye {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--a-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .12s, color .12s;
  padding: 0;
}

.f-eye:hover { background: var(--a-bg); color: var(--a-ink); }

.f-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--a-faint);
}

/* ── Checkbox (pure CSS) ──────────────────────────────────────────────────── */

.cb {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.cb__input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.cb__box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--a-line-2);
  background: #fff;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s, border-color .12s;
}

.cb__input:checked + .cb__box {
  background: var(--a-brand);
  border-color: var(--a-brand);
}

.cb__input:checked + .cb__box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border-right: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(45deg) translate(-1px, -2px);
}

.cb__input:focus-visible + .cb__box {
  outline: 2px solid var(--a-brand);
  outline-offset: 2px;
}

.cb__lbl {
  font-size: 13px;
  color: var(--a-body);
  line-height: 1.45;
}

.cb__lbl a {
  color: var(--a-coral-ink);
  text-decoration: none;
  font-weight: 600;
}

.cb__lbl a:hover { text-decoration: underline; }

/* ── Submit button ────────────────────────────────────────────────────────── */

.auth-submit {
  margin-top: 22px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 12px;
  background: var(--a-coral);
  color: #fff;
  font-family: var(--a-font-body);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(170, 57, 2, .28);
  transition: filter .12s;
}

.auth-submit:hover  { filter: brightness(.97); }
.auth-submit:active { filter: brightness(.93); }

/* ── Switch link ──────────────────────────────────────────────────────────── */

.auth-switch {
  margin: 24px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--a-muted);
}

.auth-switch a {
  color: var(--a-coral-ink);
  font-weight: 700;
  text-decoration: none;
}

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

/* ── Mobile layout ────────────────────────────────────────────────────────── */

@media (max-width: 700px) {
  .auth-page {
    padding: 0;
    align-items: stretch;
  }

  .auth-card {
    flex-direction: column;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--a-bg);
    min-height: 100vh;
  }

  .auth-brand { display: none; }

  .auth-form {
    flex: none;
    background: var(--a-bg);
    padding: 60px 24px 40px;
    justify-content: flex-start;
  }

  .auth-mast { display: flex; }

  .auth-h {
    text-align: center;
    font-size: 25px;
    margin-top: 28px;
  }

  .auth-sub { text-align: center; }

  .auth-fields { margin-top: 24px; }
}
