/* Log in / sign up: a showcase panel beside a simple form (stacked on phones, form first). */
.auth {
  --a-ink: #1f2430;
  --a-ink-2: #4b5160;
  --a-line: #e7c9b8;
  --a-field: #ffffff;
  --a-page: #ffffff;
  --a-side: #fdf7f3;
  --a-brand: #c4262e;
  --a-brand-2: #a01c23;
  --a-brand-soft: #f2b896;
  --a-head: #b34816;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  min-height: 100vh;
  height: auto;
  background: var(--a-page);
  color: var(--a-ink);
  font-size: 15px;
}
:root[data-theme="dark"] .auth { --a-ink: #f3ece7; --a-ink-2: #c3b6ad; --a-line: #5a4436; --a-field: #241c18; --a-page: #1a1512; --a-side: #221a16; --a-brand: #f2777a; --a-brand-2: #f6a372; --a-brand-soft: #7a4024; --a-head: #f6a372; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth { --a-ink: #f3ece7; --a-ink-2: #c3b6ad; --a-line: #5a4436; --a-field: #241c18; --a-page: #1a1512; --a-side: #221a16; --a-brand: #f2777a; --a-brand-2: #f6a372; --a-brand-soft: #7a4024; --a-head: #f6a372; }
}
html:has(body.auth) { height: auto; }

/* ---- showcase panel ---- */
.auth-side { position: relative; overflow: hidden; background: var(--a-side); display: flex; flex-direction: column; }
.auth-side::after { content: ''; position: absolute; inset: 45% 0 0 0; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--a-brand) 30%, transparent) 75%, color-mix(in srgb, var(--a-brand) 55%, transparent)); pointer-events: none; }
.side-copy { position: relative; z-index: 2; padding: 136px 15% 0 15%; }
.side-copy h2 { margin: 0 0 36px; font-size: 26px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; color: var(--a-head); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { position: relative; padding-left: 28px; color: var(--a-head); font-size: 14.5px; line-height: 1.45; }
.checks li::before { content: ''; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--a-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.5 3.5 7.5-8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

/* isometric stack of real slides */
.iso { position: absolute; left: -6%; right: -14%; bottom: -8%; height: 62%; z-index: 1; perspective: 2000px; }
.iso-plane { position: absolute; left: 50%; top: 52%; width: 0; height: 0; transform: rotateX(56deg) rotateZ(-38deg); transform-style: preserve-3d; }
.iso-card { position: absolute; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, -10px 18px 28px color-mix(in srgb, var(--a-brand) 28%, transparent); opacity: 0; transform: translateZ(0); animation: iso-in 0.9s cubic-bezier(.2, .7, .2, 1) forwards; }
.iso-card img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.iso-card .sl { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.iso-tile { position: absolute; border-radius: 12px; background: color-mix(in srgb, var(--a-page) 80%, var(--a-brand) 6%); box-shadow: -8px 14px 22px color-mix(in srgb, var(--a-brand) 16%, transparent); opacity: 0; animation: iso-in 1s ease forwards; display: grid; place-items: center; }
.iso-tile svg { width: 46%; height: 46%; stroke: var(--a-brand); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0.85; }
@keyframes iso-in { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) { .iso-card, .iso-tile { animation: none; opacity: 1; } }

/* ---- form column ---- */
.auth-main { display: flex; flex-direction: column; padding: 30px 8% 22px 8%; min-width: 0; }
.auth-logo { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--a-ink); font-size: 19px; letter-spacing: -0.01em; align-self: flex-start; }
.auth-logo b { color: var(--a-brand); font-weight: 600; }
.auth-form-wrap { width: 100%; max-width: 400px; margin: auto 0; padding: 48px 0; }
.auth h1 { font-size: 34px; letter-spacing: -0.02em; font-weight: 600; margin: 0 0 40px; color: var(--a-ink); }
.afield { display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.afield > span:first-child { font-size: 14px; font-weight: 500; color: var(--a-ink); }
.afield input { height: 42px; width: 100%; border: 1px solid var(--a-line); border-radius: 3px; background: var(--a-field); color: var(--a-ink); padding: 0 12px; font: inherit; font-size: 15px; transition: border-color 0.15s, box-shadow 0.15s; }
.afield input::placeholder { color: #9a9aa3; }
.afield input:focus { outline: none; border-color: var(--a-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-brand) 18%, transparent); }
.afield input[aria-invalid="true"] { border-color: var(--danger); }
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 36px; height: 34px; border: none; background: none; cursor: pointer; color: var(--a-ink-2); border-radius: 3px; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--a-ink); background: color-mix(in srgb, var(--a-brand) 8%, transparent); }
.pw-toggle svg { width: 20px; height: 20px; }
.auth .error-text { min-height: 20px; margin: -6px 0 12px; }
.abtn { width: 68%; min-width: 220px; height: 48px; border: none; border-radius: 3px; background: var(--a-brand); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background 0.15s, opacity 0.15s; margin-top: 6px; }
.abtn:hover:not(:disabled) { background: var(--a-brand-2); }
.abtn:disabled { background: var(--a-brand-soft); cursor: default; }
:root[data-theme="dark"] .abtn { color: #1f0d04; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .abtn { color: #1f0d04; } }
.abtn.busy { opacity: 0.75; cursor: progress; }
.legal { margin: 22px 0 0; font-size: 14px; line-height: 1.5; color: var(--a-ink); max-width: 330px; }
.legal a, .switch a { color: var(--a-brand); font-weight: 600; text-decoration: none; }
.legal a:hover, .switch a:hover { text-decoration: underline; }
.switch { margin: 22px 0 0; font-size: 14px; color: var(--a-ink); }
.switch a { margin-left: 4px; }
.auth-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--a-ink-2); }
.auth-foot a { color: var(--a-ink-2); text-decoration: none; }
.auth-foot a:hover { color: var(--a-brand); }

/* ---- phones and narrow windows: form first, showcase below ---- */
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-main { order: 1; padding: 22px 16px 28px; }
  .auth-form-wrap { max-width: none; margin: 0; padding: 26px 0 12px; }
  .auth h1 { font-size: 32px; margin-bottom: 30px; }
  .abtn { width: 100%; }
  .auth-side { order: 2; min-height: 440px; }
  .side-copy { padding: 52px 32px 0; }
  .side-copy h2 { font-size: 21px; margin-bottom: 24px; }
  .iso { height: 52%; bottom: -12%; left: -20%; right: -30%; }
  .auth-foot { order: 3; }
}
