/* Sign in / create account page. Uses the tokens from styles.css. */

.auth { min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
@media (min-width: 900px) { .auth { grid-template-columns: 1fr 1fr; } }

/* Brand side */
.auth-brand {
  display: none; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 40px; background: #141312; color: #ecebe8;
}
@media (min-width: 900px) { .auth-brand { display: flex; } }
.auth-brand .logo { color: #ecebe8; }
.auth-brand h2 { font-size: clamp(28px, 3vw, 38px); letter-spacing: -.025em; line-height: 1.1; margin: 0 0 24px; max-width: 420px; }
.perks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.perks li { display: flex; gap: 12px; align-items: center; color: #c9c5be; }
.perks svg { width: 20px; height: 20px; color: #e07a5f; flex: none; }
.brand-foot { color: #9a958d; font-size: 14px; margin: 0; }

/* Form side */
.auth-panel { display: flex; flex-direction: column; justify-content: center; padding: 32px 16px; width: 100%; max-width: 440px; margin: 0 auto; }
.auth-mobile-logo { margin-bottom: 32px; }
@media (min-width: 900px) { .auth-mobile-logo { display: none; } }
.auth-panel h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-panel .muted { margin: 0 0 24px; font-size: 15px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; }
.tabs [role="tab"] { min-height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: 500 14px var(--font); cursor: pointer; transition: background .15s, color .15s; }
.tabs [role="tab"][aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.btn-block { width: 100%; min-height: 46px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; }
.google-btn { gap: 10px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.label-row { display: flex; justify-content: space-between; align-items: baseline; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-wrap input {
  width: 100%; min-height: 46px; padding: 0 44px 0 40px; font: 16px var(--font);
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input-wrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.input-wrap input[aria-invalid="true"] { border-color: #c0392b; }
.eye { position: absolute; right: 4px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.eye:hover { color: var(--text); background: var(--surface-2); }
.eye svg { width: 18px; height: 18px; }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--accent); font: 13px var(--font); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.field-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.field-error { font-size: 13px; color: #c0392b; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error, :root:not([data-theme="light"]) .form-message { color: #f08a78; } }
:root[data-theme="dark"] .field-error, :root[data-theme="dark"] .form-message { color: #f08a78; }

.form-message { font-size: 14px; color: #c0392b; margin: 0 0 14px; }
.form-message:empty { display: none; }
.form-message.success { color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; }

.btn.loading { position: relative; color: transparent; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid currentColor; border-color: var(--accent-text) transparent var(--accent-text) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.google-btn.loading::after { border-color: var(--text) transparent var(--text) transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

.fine-print { font-size: 13px; color: var(--muted); margin: 20px 0 0; text-align: center; }

.signed-in { text-align: center; display: grid; gap: 12px; justify-items: center; }
.signed-in p { color: var(--muted); margin: 0 0 8px; }
.big-icon { width: 44px; height: 44px; color: var(--accent); }
