/* Sign-in pages (login, signup, forgot, reset, verify OTP, two-step). Loaded by partials/auth-head. Tokens only. */
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font-body); }
[x-cloak] { display: none !important; }

.rc-auth, .rc-auth * { box-sizing: border-box; }
.rc-auth { display: flex; flex-wrap: wrap; min-height: 100vh; min-height: 100dvh; background: var(--page); font-family: var(--font-body); color: var(--ink); }
.rc-auth :focus-visible { outline: 2px solid var(--brand-700); outline-offset: 2px; }
.rc-auth a { color: var(--brand-700); font-weight: 600; text-decoration: none; }
.rc-auth a:hover { color: var(--brand-800); text-decoration: underline; }
.rc-auth h1, .rc-auth h2 { font-family: var(--font-display); }

/* Brand panel */
.rc-auth-brand { flex: 1 1 480px; display: flex; flex-direction: column; justify-content: space-between; gap: var(--space-10); padding: 48px; background: radial-gradient(120% 70% at 100% 0%, var(--brand-800) 0%, transparent 60%), var(--brand-900); color: var(--surface); }
.rc-auth-brand :focus-visible { outline-color: var(--accent); }
.rc-auth-brand-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.rc-auth .rc-auth-logo { display: inline-flex; align-items: center; gap: var(--space-3); color: var(--surface); text-decoration: none; }
.rc-auth .rc-auth-logo:hover { color: var(--surface); text-decoration: none; }
.rc-auth-logo-mark { width: 40px; height: 40px; flex: none; border-radius: 11px; background: var(--brand-700); display: grid; place-items: center; }
.rc-auth-logo-mark .rc-auth-logo-dot { fill: var(--accent); }
.rc-auth-logo-name { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.rc-auth-logo-anim { display: block; width: 180px; }
.rc-auth .rc-auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--sidebar-text); }
.rc-auth .rc-auth-back:hover { color: var(--surface); }
.rc-auth-pitch { max-width: 460px; display: flex; flex-direction: column; gap: var(--space-6); }
.rc-auth-headline { margin: 0; font-size: 32px; line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
.rc-auth-api { align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 6px; border: 1px solid var(--sidebar-active); border-radius: var(--radius-pill); background: var(--sidebar-raised); font-size: 12px; font-weight: 600; color: var(--sidebar-text); }
.rc-auth-api-wa, .rc-auth-api-meta { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #ffffff; }
.rc-auth-api-wa { background: var(--whatsapp); }
.rc-auth-api-meta { background: var(--meta); }
.rc-auth-api-sep { width: 1px; height: 14px; margin: 0 3px; background: var(--sidebar-active); }
.rc-auth-chat { display: flex; flex-direction: column; gap: 8px; padding: 0 14px 16px; border-radius: var(--radius-xl); background: var(--chat-wall-app); box-shadow: 0 18px 40px rgba(0,0,0,0.28); overflow: hidden; }
.rc-auth-chat-head { display: flex; align-items: center; gap: 10px; margin: 0 -14px 6px; padding: 10px 14px; background: var(--brand-700); color: #ffffff; font-size: 13px; }
.rc-auth-chat-head strong { display: block; font-weight: 600; }
.rc-auth-chat-head small { display: block; font-size: 11px; opacity: .8; }
.rc-auth-chat-avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); font-weight: 700; font-size: 13px; }
.rc-auth-bubble time { float: right; margin: 6px 0 -4px 10px; font-size: 10.5px; color: var(--ink-subtle); }
.rc-auth-ticks { color: var(--read-tick); letter-spacing: -3px; }
.rc-auth-points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; color: var(--sidebar-text); }
.rc-auth-points li { display: flex; align-items: center; gap: 10px; }
.rc-auth-points svg { color: var(--accent); }
.rc-auth-bubble { max-width: 300px; padding: 8px 10px; font-size: 13.5px; box-shadow: 0 1px 1px rgba(0,0,0,0.08); line-height: 1.45; color: var(--ink); }
.rc-auth-bubble-in { align-self: flex-start; border-radius: 4px 14px 14px 14px; background: var(--chat-in); }
.rc-auth-bubble-out { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--chat-out); }
.rc-auth-legal { margin: 0; font-size: 13px; color: var(--sidebar-text); }

/* Form side */
.rc-auth-main { flex: 1 1 480px; display: grid; place-items: center; padding: 48px 24px; min-width: 0; }
.rc-auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 18px; }
.rc-auth-card-wide { max-width: 520px; }
.rc-auth-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.rc-auth-title { margin: 0; font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
.rc-auth-sub { margin: 6px 0 0; font-size: 15px; line-height: 1.5; color: var(--ink-muted); }
.rc-auth-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.rc-auth .rc-auth-label-row a { font-size: 13px; }
.rc-auth .rc-input { height: 46px; }
.rc-auth-pw { position: relative; }
.rc-auth-pw .rc-input { padding-right: 48px; }
.rc-auth-pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: var(--radius-md); background: transparent; color: var(--ink-subtle); display: grid; place-items: center; cursor: pointer; }
.rc-auth-pw-toggle:hover { color: var(--brand-700); background: var(--brand-100); }
.rc-auth-submit { height: 48px; border-radius: 11px; font-size: 15px; }
.rc-auth-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-muted); text-align: center; }
.rc-auth-links { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }
.rc-auth-link-btn { padding: 0; border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--brand-700); cursor: pointer; }
.rc-auth-link-btn:hover { color: var(--brand-800); text-decoration: underline; }
.rc-auth-link-btn[disabled] { opacity: .5; cursor: not-allowed; text-decoration: none; }
.rc-auth .rc-auth-muted-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); }

/* Messages (state pairs + icon + words) */
.rc-auth-alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-md); border: 1px solid transparent; font-size: 14px; line-height: 20px; }
.rc-auth-alert svg { flex: none; margin-top: 1px; }
.rc-auth-alert-error { background: var(--danger-bg); color: var(--danger-ink); }
.rc-auth-alert-success { background: var(--brand-100); color: var(--brand-ink); border-color: var(--brand-200); }
.rc-auth-alert-info { background: var(--info-bg); color: var(--info-ink); }

/* Code entry (OTP / two-step) */
.rc-auth .rc-auth-code { height: 60px; font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: 0.5em; text-indent: 0.5em; text-align: center; color: var(--ink); }
.rc-auth-code-icon { width: 48px; height: 48px; border-radius: var(--radius-lg); background: var(--brand-100); color: var(--brand-700); display: grid; place-items: center; margin-bottom: var(--space-3); }

/* Signup */
.rc-auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 14px; }
.rc-auth-plan { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 12px 16px; border-radius: var(--radius-lg); border: 1px solid var(--brand-200); background: var(--brand-100); }
.rc-auth-plan-label { font-size: 12px; font-weight: 600; color: var(--brand-ink); }
.rc-auth-plan-name { margin: 2px 0 0; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.rc-auth-plan-desc { margin: 2px 0 0; font-size: 13px; color: var(--ink-muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.rc-auth-plan .selected-price { flex: none; text-align: right; white-space: nowrap; }
.rc-auth-plan .currency { font-size: 12px; font-weight: 600; color: var(--ink-muted); }
.rc-auth-plan .amount { display: inline; font-family: var(--font-display); font-size: 22px; font-weight: 600; color: var(--brand-700); line-height: 1.1; }
.rc-auth-plan .duration { display: inline; font-size: 12px; color: var(--ink-muted); }

/* Phones and tablets: brand panel becomes a slim header bar */
@media (max-width: 900px) {
  .rc-auth { flex-direction: column; flex-wrap: nowrap; }
  .rc-auth-brand { flex: none; padding: 16px; gap: 0; }
  .rc-auth-pitch, .rc-auth-legal { display: none; }
  .rc-auth-logo-mark { width: 34px; height: 34px; border-radius: 10px; }
  .rc-auth-logo-name { font-size: 19px; }
  .rc-auth-logo-anim { width: 153px; }
  .rc-auth-main { flex: 1 0 auto; place-items: start center; padding: 32px 16px 40px; }
}
@media (max-width: 560px) {
  .rc-auth-grid { grid-template-columns: 1fr; }
  .rc-auth-title { font-size: 20px; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .rc-auth-brand { padding: 32px 48px; }
  .rc-auth-headline { font-size: 26px; }
}

/* Sign-up phone: country code select + national number */
.rc-auth-phone { display: flex; gap: 8px; }
.rc-auth-phone .rc-input { flex: 1; min-width: 0; }
.rc-auth-phone .rc-input.rc-auth-phone-country { flex: 0 0 112px; padding-right: 6px; text-overflow: ellipsis; cursor: pointer; }
.rc-auth-legal a { color: inherit; font-weight: 600; text-decoration: none; }
.rc-auth-legal a:hover { color: var(--surface); text-decoration: underline; }
