/* Auth pages v2 (register, login, code login, verify, invitations).
   Loaded only by resources/views/components/auth-card.blade.php.
   Same look as the onboarding wizard (resources/views/app/onboarding/wizard.blade.php). */

:root { --purple: #5f58bc; --deep: #37327a; --light: #f3f2fc; --border: #e5e7eb; --line: #8e8a99; --muted: #4a4a4a; }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: #fcfafa; color: #000; font-family: 'Roboto', sans-serif; font-size: 16px; line-height: 1.6; letter-spacing: -0.01em; }
a { color: var(--deep); }
h1 { margin: 0; font-family: 'Roboto', sans-serif; font-weight: 900; font-size: clamp(26px, 5vw, 32px); line-height: 1.15; letter-spacing: -0.02em; }
p { margin: 0; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #8c85f7; outline-offset: 2px; }

/* Header and step bar: copied from the wizard */
.au-wrap { max-width: 1080px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px) { .au-wrap { padding-left: 40px; padding-right: 40px; } }
.au-header { background: #fff; border-bottom: 1px solid var(--border); }
.au-header .au-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-top: 12px; padding-bottom: 12px; }
.au-header img { height: 36px; width: auto; display: block; }
.au-link { min-height: 44px; display: inline-flex; align-items: center; gap: 8px; color: var(--deep); font-size: 15px; font-weight: 500; }
.au-progress { margin: 0; padding: 20px 0 0; list-style: none; display: grid; gap: 6px; }
.au-progress li { display: flex; flex-direction: column; gap: 8px; min-height: 44px; color: var(--muted); font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.au-progress li::before { content: ''; height: 5px; border-radius: 5px; background: #d9d5e3; }
.au-progress li.is-reached { color: var(--deep); }
.au-progress li.is-reached::before { background: var(--purple); }

/* Card */
.au-main { display: flex; justify-content: center; padding-top: 24px; padding-bottom: 56px; }
@media (min-width: 768px) { .au-main { padding-top: 48px; } }
.au-card { width: 100%; max-width: 480px; background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: clamp(20px, 5vw, 36px); display: flex; flex-direction: column; gap: 20px; }
.au-head { display: flex; flex-direction: column; gap: 8px; }
.au-head p { color: var(--muted); overflow-wrap: anywhere; }
.au-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--purple); }
.au-card form { display: flex; flex-direction: column; gap: 16px; margin: 0; }

/* Notices */
.au-notice { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--light); font-size: 15px; overflow-wrap: anywhere; }
.au-notice--error { background: #fef2f2; color: #b91c1c; font-weight: 500; }
.au-notice ul { margin: 0; padding-left: 18px; }

/* Fields */
.au-field { display: flex; flex-direction: column; gap: 6px; }
.au-field label, .au-label-row { font-size: 14px; font-weight: 600; }
.au-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.au-label-row a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 500; }
.au-field input { height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; font-size: 16px; background: #fff; color: #000; width: 100%; margin: 0; }
.au-field input:focus { outline: 3px solid #8c85f7; outline-offset: 2px; border-color: var(--purple); }
.au-field input[readonly] { background: var(--light); color: var(--muted); }
.au-field input[aria-invalid="true"] { border-color: #b91c1c; }
.au-help { font-size: 14px; color: var(--muted); }
.au-code { text-align: center; letter-spacing: 0.4em; font-size: 24px !important; font-weight: 600 !important; }
.au-hp { display: none; }

/* Terms checkbox: the whole label row is the tap target */
.au-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 14px; }
.au-check input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--purple); cursor: pointer; }

/* Buttons */
.au-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 50px; padding: 0 24px; border-radius: 50px; border: 0; background: var(--purple); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; text-align: center; }
.au-btn:hover { background: #4a44a0; }
.au-btn--ghost { border: 1px solid var(--line); background: #fff; color: #000; }
.au-btn--ghost:hover { background: var(--light); }
.au-btn[disabled] { opacity: 0.75; cursor: progress; }
.au-google svg { width: 20px; height: 20px; flex: none; display: block; }
.au-spin { flex: none; width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: au-spin .6s linear infinite; }
@keyframes au-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .au-spin { animation-duration: 1.5s; } }

/* Divider and links under the form */
.au-divider { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 14px; }
.au-divider::before, .au-divider::after { content: ''; height: 1px; flex: 1; background: var(--border); }
.au-switch { text-align: center; font-size: 15px; }
.au-switch a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.au-small { font-size: 14px; color: var(--muted); text-align: center; }

/* Register: split card with the plan panel (named slot "aside" in components/auth-card).
   Mobile: plan on top (label, name, price only), form below. From 760px: side by side. */
.au-split { width: 100%; max-width: 980px; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: 0 24px 56px rgba(95, 88, 188, 0.12); }
.au-split .au-card { max-width: none; border: 0; border-radius: 0; gap: 18px; }
.au-split .au-card form .au-btn { height: 54px; font-size: 17px; font-weight: 700; }
.au-split .au-google { height: 52px; }
.au-plan { background: var(--purple); color: #fff; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.au-plan a { color: #fff; }
.au-plan a:focus-visible { outline-color: #fff; }
.au-plan__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.au-plan__top a { min-height: 44px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 600; }
.au-plan__label { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #e4d9fb; }
.au-plan__name { font-family: 'Roboto', sans-serif; font-weight: 700; font-size: clamp(24px, 2.8vw, 36px); line-height: 1.12; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.au-plan__price { font-size: 16px; line-height: 1.5; }
.au-plan__more { display: none; }
.au-plan__perks { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.au-plan__perks li { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.au-plan__perks svg { flex: none; margin-top: 3px; }
.au-plan__contact { margin-top: auto; display: flex; align-items: center; gap: 14px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.3); font-size: 15px; line-height: 1.45; }
.au-plan__contact img { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.au-plan__contact p { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 760px) {
    .au-split { flex-direction: row; }
    .au-plan { flex: 1 1 0; min-width: 0; padding: clamp(22px, 3.2vw, 40px); gap: 12px; }
    .au-plan__price { font-size: 17px; }
    .au-plan__more { flex: 1; display: flex; flex-direction: column; gap: 24px; }
    .au-split .au-card { flex: 1.35 1 0; min-width: 0; padding: clamp(22px, 3.2vw, 40px); }
}
