/* =========================================================
   cognexas · auth pages (login / signup)
   v2.0 beta · wine / rose
   ========================================================= */

/* =========================================================
   1. SHELL
   ========================================================= */
   /* =========================================================
   Wine / rose tokens (local to auth pages so the ribbon and
   accents resolve even when landing.css is not loaded)
   ========================================================= */
:root {
  --wine-900: #5A0A2E;
  --wine-700: #740938;
  --wine-600: #AF1740;
  --rose-500: #CC2B52;
  --rose-300: #DE7C7D;
  --blush-100: #F9EFF1;
  --blush-50:  #FDF7F8;
}

body.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 1100px;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 640px;
}
@media (max-width: 880px) {
  .auth-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

/* =========================================================
   2. BETA RIBBON
   ========================================================= */

.beta-ribbon {
  position: relative;
  z-index: 10;
  background: linear-gradient(90deg, var(--wine-700) 0%, var(--wine-600) 50%, var(--wine-700) 100%);
  color: #F6D5DC;
  font-size: .84rem;
  border-bottom: 1px solid rgba(247,204,172,.18);
  width: 100%;
  align-self: start;
}
.beta-ribbon__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 11px 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.beta-ribbon__pill {
  padding: 2px 10px;
  border-radius: 999px;
  background: #F7CCAC;
  color: var(--wine-700);
  font-family: var(--mono);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  flex: none;
}
.beta-ribbon__text {
  color: rgba(255,255,255,.85);
  line-height: 1.5;
}
.beta-ribbon__text strong { color: #fff; font-weight: 600; }
.beta-ribbon__link {
  margin-left: auto;
  color: #F7CCAC;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid rgba(247,204,172,.4);
  transition: border-color .15s, color .15s;
}
.beta-ribbon__link:hover {
  color: #fff;
  border-color: #fff;
}

/* when the ribbon is present, body becomes a vertical stack */
body.auth:has(.beta-ribbon) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}
body.auth:has(.beta-ribbon) .auth-shell {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px;
  width: 100%;
  max-width: none;
}

@media (max-width: 720px) {
  .beta-ribbon__link { display: none; }
  .beta-ribbon__text { font-size: .8rem; }
}

/* =========================================================
   3. LEFT brand + vision panel
   ========================================================= */

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 40px 32px;
  background:
    radial-gradient(560px 320px at 20% 0%, rgba(222,124,125,.35), transparent 60%),
    linear-gradient(160deg, #740938 0%, #8E0F32 45%, #5A0A2E 100%);
  color: #FFF5F7;
  overflow: hidden;
}
.auth-aside::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 20%, #000 40%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 40%, transparent 75%);
  pointer-events: none;
}

/* brand */
.auth-aside .brand {
  position: relative;
  z-index: 1;
  color: #FFF5F7;
  align-self: flex-start;
}
.auth-aside .brand:hover { color: #FFF5F7; }
.auth-aside .brand__tld { color: rgba(255,245,247,.55); }
.auth-aside .brand__mark { filter: drop-shadow(0 0 8px rgba(255,194,209,.5)); }

.brand__badge {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,194,209,.18);
  border: 1px solid rgba(255,194,209,.4);
  color: #FFC2D1;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
}

/* body */
.auth-aside__body {
  position: relative;
  z-index: 1;
  margin: auto 0;
  padding: 28px 0;
}

.auth-aside__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #FFC2D1;
  margin-bottom: 18px;
}
.auth-aside__eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFC2D1;
  box-shadow: 0 0 8px #FFC2D1;
}

.auth-aside h1,
.auth-aside__body h1 {
  font-size: clamp(1.45rem, 2vw, 1.85rem);
  line-height: 1.22;
  letter-spacing: -.03em;
  color: #FFF5F7;
  margin: 0 0 18px;
  font-weight: 600;
  max-width: 24ch;
}
.auth-aside h1 em {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 600;
  color: #F7CCAC;
}

.auth-aside p,
.auth-aside__lede {
  color: rgba(255,245,247,.78);
  font-size: .92rem;
  line-height: 1.68;
  margin: 0 0 24px;
  max-width: 46ch;
}
.auth-aside__lede strong {
  color: #F7CCAC;
  font-weight: 700;
}

/* stat strip */
.auth-aside__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.auth-stat {
  padding: 11px 12px 9px;
  border-radius: var(--radius);
  background: rgba(247,204,172,.08);
  border: 1px solid rgba(247,204,172,.2);
}
.auth-stat b {
  display: block;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: #F7CCAC;
  line-height: 1.1;
  margin-bottom: 3px;
}
.auth-stat span {
  display: block;
  font-size: .66rem;
  color: rgba(255,255,255,.55);
  letter-spacing: .01em;
  line-height: 1.35;
}

/* why-free callout */
.auth-aside__why {
  padding: 18px 20px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(247,204,172,.22);
  margin-bottom: 24px;
}
.auth-aside__why-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #F7CCAC;
  margin-bottom: 12px;
}
.auth-aside__why-head strong {
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: -.005em;
}
.auth-aside__why ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.auth-aside__why li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: .82rem;
  line-height: 1.5;
  color: rgba(255,255,255,.75);
}
.auth-aside__why li svg {
  flex: none;
  color: #F7CCAC;
  margin-top: 3px;
}
.auth-aside__why li b {
  color: #fff;
  font-weight: 600;
}

/* feature list */
.auth-aside__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 11px;
}
.auth-aside__list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .85rem;
  color: rgba(255,245,247,.85);
  line-height: 1.5;
}
.auth-aside__list svg {
  flex: none;
  margin-top: 4px;
  color: #FFC2D1;
}

/* footer */
.auth-aside__foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: .74rem;
  color: rgba(255,245,247,.55);
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.auth-aside__foot a {
  color: #F7CCAC;
  border-bottom: 1px solid rgba(247,204,172,.35);
}
.auth-aside__foot a:hover {
  color: #fff;
  border-color: #fff;
}

/* =========================================================
   4. RIGHT form panel
   ========================================================= */

.auth-main {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
@media (max-width: 560px) {
  .auth-main { padding: 28px 22px; }
}

/* feedback callout */
.feedback-callout {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(222,124,125,.14), rgba(222,124,125,.05));
  border: 1px solid rgba(204,43,82,.24);
  margin-bottom: 22px;
}
.feedback-callout__icon {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(204,43,82,.22);
  color: var(--wine-600);
}
.feedback-callout strong {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--wine-700);
  letter-spacing: -.01em;
  margin-bottom: 3px;
}
.feedback-callout p {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-2);
}

/* tabs */
.auth-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-bottom: 26px;
  align-self: flex-start;
}
.auth-tab {
  padding: 8px 18px;
  border: 0;
  background: transparent;
  border-radius: 999px;
  font: inherit;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-3);
  cursor: pointer;
  transition: background .15s, color .15s, box-shadow .15s;
}
.auth-tab:hover { color: var(--text); }
.auth-tab.is-active {
  background: #fff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(116,9,56,.08);
}

/* forms */
.auth-form { display: none; }
.auth-form.is-active {
  display: block;
  animation: authIn .3s cubic-bezier(.2,.9,.3,1.1);
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(6px); }
}

.auth-form h2 {
  font-size: 1.45rem;
  letter-spacing: -.025em;
  margin: 0 0 6px;
}
.auth-sub {
  color: var(--text-3);
  font-size: .88rem;
  margin: 0 0 24px;
}

.auth-form .field { margin-bottom: 16px; }
.auth-form .field > span {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: -.005em;
}

/* =========================================================
   5. Password field + strength
   ========================================================= */

.pw { position: relative; }
.pw .input { padding-right: 42px; }
.pw__toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--text-4);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: color .15s, background .15s;
}
.pw__toggle:hover {
  color: var(--text);
  background: var(--surface-3);
}
.pw__toggle.is-on { color: var(--accent); }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
  font-size: .8rem;
}
.auth-hint { color: var(--text-4); }
.auth-link { color: var(--accent); font-weight: 500; }
.auth-link:hover {
  color: var(--accent-2);
  text-decoration: underline;
}

.auth-demo { margin-top: 10px; }

.strength { margin: -6px 0 18px; }
.strength__bar {
  height: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-bottom: 7px;
}
.strength__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--border-3);
  transition: width .3s, background .3s;
}
.strength__fill.is-w1 { background: #C0334D; }
.strength__fill.is-w2 { background: #C68F4D; }
.strength__fill.is-w3 { background: #7BA46F; }
.strength__fill.is-w4 { background: #4F8C5C; }
.strength__label {
  display: block;
  font-size: .74rem;
  color: var(--text-4);
  line-height: 1.45;
}

/* =========================================================
   6. Checkbox
   ========================================================= */

.check {
  display: inline-flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.5;
  cursor: pointer;
}
.check input {
  flex: none;
  margin-top: 3px;
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}
.check--block { display: flex; margin: 4px 0 20px; }

/* =========================================================
   7. Beta perks (signup)
   ========================================================= */

.beta-perks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 14px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(249,239,241,.6);
  border: 1px solid var(--border);
  margin-bottom: 22px;
}
@media (max-width: 480px) {
  .beta-perks { grid-template-columns: 1fr; }
}
.beta-perk {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: .8rem;
  color: var(--text-2);
}
.beta-perk svg {
  flex: none;
  color: var(--success);
}

/* =========================================================
   8. Demo credentials box (signin)
   ========================================================= */

.auth-demo-box {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--blush-100), #fff);
  border: 1px dashed var(--border-3);
}
.auth-demo-box__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
}
.auth-demo-box__pill {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--wine-600);
  color: #fff;
  font-family: var(--mono);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-demo-box__head strong {
  font-size: .88rem;
  color: var(--text);
  letter-spacing: -.01em;
}
.auth-demo-box p {
  margin: 0 0 12px;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-3);
}
.auth-demo-box__creds {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border-2);
}
.auth-demo-box__creds code {
  padding: 0;
  border: none;
  background: none;
  font-family: var(--mono);
  font-size: .82rem;
  font-weight: 600;
  color: var(--wine-700);
  letter-spacing: -.005em;
}
.auth-demo-box__creds span { color: var(--text-4); }

/* keep the old auth-note look for compatibility */
.auth-note {
  text-align: center;
  font-size: .78rem;
  color: var(--text-4);
  margin: 22px 0 0;
}
.auth-note code {
  font-size: .76rem;
  background: var(--surface-3);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--text-2);
}

/* =========================================================
   9. Signup footnote
   ========================================================= */

.auth-footnote {
  margin: 16px 0 0;
  text-align: center;
  font-size: .76rem;
  line-height: 1.55;
  color: var(--text-4);
}

/* =========================================================
   10. Inline field errors
   ========================================================= */

.field.has-error .input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(192,51,77,.14);
}
.field__error {
  display: block;
  font-size: .76rem;
  color: var(--danger);
  margin-top: 5px;
  letter-spacing: -.005em;
}

/* =========================================================
   11. Buttons on auth pages (uses base tokens)
   ========================================================= */

.auth-form .btn--lg {
  margin-top: 4px;
}
.auth-form .btn--block + .btn--block {
  margin-top: 10px;
}

/* =========================================================
   12. Responsive
   ========================================================= */

@media (max-width: 980px) {
  .auth-aside { padding: 32px 28px; }
  .auth-aside__body h1 { font-size: 1.4rem; max-width: none; }
  .auth-aside__lede { font-size: .88rem; }
  .auth-aside__why { padding: 14px 16px; }
  .auth-aside__stats {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 20px;
  }
  .auth-main { padding: 32px 28px; }
}

@media (max-width: 640px) {
  body.auth { padding: 20px 14px; }
  .auth-aside { padding: 28px 22px; }
  .auth-aside__list { display: none; }
  .auth-aside__why ul li:nth-child(n+3) { display: none; }
  .auth-aside__foot { font-size: .72rem; }
  .auth-main { padding: 26px 20px; }
  .auth-form h2 { font-size: 1.3rem; }
  .feedback-callout { padding: 12px 14px; }
}

@media (max-width: 420px) {
  .auth-aside__stats { grid-template-columns: 1fr 1fr; gap: 6px; }
  .auth-stat { padding: 9px 10px 8px; }
  .auth-stat b { font-size: .9rem; }
  .auth-tabs { width: 100%; }
  .auth-tab { flex: 1; text-align: center; }
}

/* =========================================================
   13. Reduced motion
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .auth-form.is-active { animation: none; }
  .beta-ribbon__link:hover { border-color: rgba(247,204,172,.4); }
}