/* ====================== auth.css (clean, compact) ====================== */

/* --- Layout ------------------------------------------------------------ */
.auth-wrap{
  display:grid;
  grid-template-columns: 1fr;          /* mobile: one column */
  gap: 20px;
  align-items: center;
  min-height: calc(100dvh - 72px);     /* respect dynamic viewport */
  padding: 20px 0;
}
@media (min-width: 980px){
  .auth-wrap{
    grid-template-columns: 1.05fr 1fr; /* form | side panel */
    gap: 28px;
  }
}

.auth-form{
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  display: grid;
  gap: 14px;
}

.auth-hero{ padding: 20px; }
.auth-side{ display: none; }
@media (min-width: 980px){ .auth-side{ display: block; } }

.auth-side .card{
  padding: 28px;
  border-radius: var(--r-lg);
}

/* --- Brand + heading --------------------------------------------------- */
.auth-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-weight: 800;
  /* Fix: --accent-3 doesn't exist in core.css */
  background: linear-gradient(90deg, var(--fg), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-note{
  color: var(--muted);
  font-size: 14px;
}

/* --- Tabs (login/register) -------------------------------------------- */
/* Works with your JS that toggles .tab.active and .view.active */
.auth-tabs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.tab{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--fg);
  font-weight: 700;
  cursor: pointer;
  transition: background .15s var(--easing), border-color .15s var(--easing), transform .06s ease;
}
.tab:hover{ background: color-mix(in srgb, var(--surface) 96%, transparent); }
.tab.active{
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent) inset;
}

.view{ display: none; }
.view.active{ display: block; }

/* --- Form parts -------------------------------------------------------- */
.form-stack{ display: grid; gap: 12px; }
.form-row{ display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px){ .form-row{ grid-template-columns: 1fr 1fr; } }

.input-help{ color: var(--muted); font-size: 12px; }
.input-error{ color: #fda4af; font-size: 12px; } /* soft red */
label > span{ color: var(--muted); font-size: 12px; margin-bottom: 6px; }

/* Divider (for “or continue with”) */
.divider{
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  color: var(--muted); font-size: 12px; margin: 4px 0;
}
.divider::before, .divider::after{
  content: ""; height: 1px; background: var(--line);
}

/* Buttons: block by default on auth */
.auth-form .btn{ margin-top: 6px; }
.auth-form .btn.block{ width: 100%; }

/* Small muted footer (terms, links) */
.auth-foot{
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

/* --- Media / side visuals --------------------------------------------- */
/* If you place an image/video in .auth-side, keep it tidy */
.auth-media{
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.auth-media img,
.auth-media video{
  display: block;
  width: 100%;
  height: auto;
}

/* --- A11y & polish ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce){
  .tab{ transition: none; }
}
.auth-wrap{ padding-bottom: calc(20px + env(safe-area-inset-bottom, 0)); }
