/* Log in / sign up (views/auth). Loaded via $meta['styles'] on auth pages only. */

.auth { background: radial-gradient(900px 420px at 100% 0%, var(--accent-soft), transparent 60%), var(--soft); min-height: calc(100vh - var(--header-h)); min-height: calc(100dvh - var(--header-h)); padding: 20px 0 40px; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; max-width: 1120px; }
@media (min-width: 960px) {
  .auth { padding: 48px 0 64px; display: flex; align-items: center; }
  .auth-grid { grid-template-columns: minmax(0, 500px) minmax(0, 1fr); gap: 56px; align-items: center; }
}

/* Form card */
.auth-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 22px 18px; display: flex; flex-direction: column; gap: 18px; }
@media (min-width: 480px) { .auth-card { padding: 32px; } }
.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-title { font-size: clamp(24px, 3vw, 30px); letter-spacing: -.025em; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn-block { margin-top: 4px; }
.auth-card .notice svg { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 1px; }
.auth-card .notice a { color: inherit; font-weight: 700; }
.auth-alt { font-size: 15px; color: var(--muted); text-align: center; }
.auth-alt a { font-weight: 700; }
.auth-forgot { font-size: 13px; color: var(--muted-2); text-align: center; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 14px; }
.auth-terms { font-size: 13px; color: var(--muted-2); text-align: center; line-height: 1.5; }
.auth-foot { display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; padding: 0 8px; }
.auth-legal { font-size: 12px; color: var(--muted-2); line-height: 1.5; max-width: 420px; }
.auth-legal a { color: inherit; }
.auth-lang a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; text-decoration: none; }
.auth-lang svg { width: 16px; height: 16px; }
/* The v3 badge is replaced by the notice above (allowed by Google when the notice is shown). */
.grecaptcha-badge { visibility: hidden !important; }

/* Context: claimed handle / chosen plan / template */
.auth-context { display: flex; flex-direction: column; gap: 8px; background: var(--accent-tint); border: 1px solid var(--accent-line); border-radius: var(--r-md); padding: 12px 14px; }
.auth-context .pill { background: var(--surface); flex-wrap: wrap; max-width: 100%; }
.auth-context .pill svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 auto; }
.auth-context .pill b { color: var(--ink); overflow-wrap: anywhere; }
.auth-context .pill-accent { border-color: var(--accent-line); }
.auth-context .hint { color: var(--ink-2); }

/* Password field */
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 54px; }
.pw-toggle { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); width: 42px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { background: var(--soft); color: var(--ink); }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle[aria-pressed="true"] { color: var(--accent); }
.pw-toggle[aria-pressed="true"]::after { content: ""; position: absolute; width: 24px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(-45deg); box-shadow: 0 0 0 1.5px var(--surface); }
.caps-hint { display: flex; align-items: center; gap: 6px; color: var(--amber); font-weight: 600; }
.caps-hint svg { width: 15px; height: 15px; }

.pw-strength { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; flex: 1; max-width: 220px; }
.pw-meter i { height: 6px; border-radius: 999px; background: var(--line); transition: background .2s; }
.pw-strength[data-level="1"] .pw-meter i:nth-child(-n+1) { background: var(--red); }
.pw-strength[data-level="2"] .pw-meter i:nth-child(-n+2) { background: var(--amber); }
.pw-strength[data-level="3"] .pw-meter i:nth-child(-n+3) { background: var(--green); }
.pw-strength[data-level="4"] .pw-meter i { background: var(--green); }
.pw-strength[data-level="1"] .pw-level { color: var(--red); }
.pw-strength[data-level="2"] .pw-level { color: var(--amber); }
.pw-strength[data-level="3"] .pw-level, .pw-strength[data-level="4"] .pw-level { color: var(--green); }

.pw-rules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 4px 12px; font-size: 13px; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 7px; line-height: 1.4; }
.pw-rules li::before { content: ""; flex: 0 0 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); background: var(--surface); transition: background .15s, border-color .15s; }
.pw-rules li.ok { color: var(--green-ink); }
.pw-rules li.ok::before { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.pw-rules.show-missing li:not(.ok) { color: var(--red); }
.pw-rules.show-missing li:not(.ok)::before { border-color: var(--red); }
.pw-match { min-height: 0; font-weight: 600; }
.pw-match:empty { display: none; }
.pw-match.ok { color: var(--green-ink); }
.pw-match.bad { color: var(--red); }

/* Success state */
.auth-done { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }

/* Benefits panel */
.auth-side { min-width: 0; }
.auth-side-inner { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 16px; border-radius: var(--r-xl); padding: 24px 20px; background: var(--surface); border: 1px solid var(--line); }
@media (min-width: 960px) {
  .auth-side-inner { padding: 40px; background: var(--dark); border-color: var(--dark); color: #fff; }
  .auth-side-inner::after { content: ""; position: absolute; right: -120px; top: -140px; width: 380px; height: 380px; border-radius: 50%; background: radial-gradient(circle, rgba(142, 136, 240, .35), transparent 70%); pointer-events: none; }
  .auth-side-inner h2 { color: #fff; font-size: clamp(26px, 2.6vw, 34px); max-width: 520px; }
  .auth-side-inner .eyebrow { color: #B9B5F7; }
  .auth-side .check-list li::before { background: #5AD3A3; }
  .auth-side .check-list small { color: var(--dark-text); }
}
.auth-benefits { gap: 14px; position: relative; z-index: 1; }
.auth-benefits li > span { display: flex; flex-direction: column; gap: 2px; }
.auth-benefits strong { font-size: 16px; display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.auth-benefits small { font-size: 14px; color: var(--muted); line-height: 1.5; }
.auth-sample { display: none; }
@media (min-width: 960px) {
  .auth-sample { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255, 255, 255, .06); border: 1px solid var(--dark-line); max-width: 420px; }
  .auth-sample-ico, .auth-sample-qr { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
  .auth-sample-ico { background: #3730C9; color: #fff; }
  .auth-sample-qr { background: #fff; color: #101326; margin-left: auto; }
  .auth-sample svg { width: 22px; height: 22px; }
  .auth-sample-txt { display: flex; flex-direction: column; min-width: 0; }
  .auth-sample-txt b { font-size: 17px; overflow-wrap: anywhere; }
  .auth-sample-txt small { font-size: 13px; color: var(--dark-text); }
}
@media (max-width: 959px) {
  .auth-side h2 { font-size: 20px; }
}
