/* =========================================================
   Floosio — sign-in page (extends styles.css)
   ========================================================= */
.auth {
  position: relative; overflow: hidden; overflow: clip; /* clip keeps position: sticky working */
  display: grid; place-items: center;
  padding: clamp(32px, 6vw, 72px) clamp(20px, 4vw, 56px);
}
.auth .blob-a { top: -260px; }
.auth .blob-b { inset-inline-start: -120px; bottom: -220px; }

.auth-grid {
  position: relative; width: 100%; max-width: 1080px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch;
}

/* ---------- Brand panel (dark, like the contact info card) ---------- */
.auth-panel {
  position: relative; overflow: hidden;
  padding: 40px; color: #fff; border-color: var(--panel-border);
  background: linear-gradient(160deg, #0E1726, #1B2A4A);
  display: flex; flex-direction: column;
}
.auth-panel::after {
  content: ""; position: absolute; width: 360px; height: 360px; border-radius: 50%;
  inset-inline-end: -140px; top: -140px; pointer-events: none;
  background: radial-gradient(circle, rgba(91, 140, 255, .35), transparent 65%);
}
.auth-panel .eyebrow { color: #8FB0FF; }
.auth-panel h2 { font-size: clamp(28px, 3vw, 36px); letter-spacing: -.03em; line-height: 1.12; margin: 12px 0; }
.auth-panel p { color: var(--rail-text); font-size: 15px; line-height: 1.65; }

.auth-mini {
  margin: 28px 0; padding: 20px; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
}
.auth-mini .dash-head { color: var(--rail-text); }
.auth-mini-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.auth-mini .bars { height: 110px; flex: none; gap: 10px; margin-top: 16px; border-bottom-color: rgba(255, 255, 255, .12); }
.auth-mini .bars i.soft { background: rgba(255, 255, 255, .14); }

.auth-points { list-style: none; padding: 0; margin-top: auto; display: grid; gap: 12px; font-size: 14.5px; font-weight: 600; }
.auth-points li { display: flex; align-items: center; gap: 12px; }
.auth-points span {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255, 255, 255, .08); color: #8FB0FF;
}
.auth-points .ic { width: 18px; height: 18px; }

/* ---------- Form card ---------- */
.auth-card { padding: clamp(28px, 4vw, 44px); display: flex; }
.auth-view { width: 100%; display: flex; flex-direction: column; justify-content: center; }
.auth-view[hidden] { display: none; }
.auth-view.swap-in { animation: fadeUp .5s var(--ease); }
.auth-ic {
  width: 50px; height: 50px; border-radius: 14px; margin-bottom: 18px;
  display: grid; place-items: center; background: var(--tint); color: var(--brand);
}
.auth-ic .ic { width: 22px; height: 22px; }
.auth-card h1 { font-size: clamp(26px, 3vw, 32px); letter-spacing: -.03em; line-height: 1.15; }
.auth-sub { color: var(--muted); font-size: 15px; line-height: 1.6; margin: 8px 0 24px; }

.auth-form { display: grid; gap: 18px; }
.field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.input-wrap { position: relative; display: block; }
.input-wrap > .ic {
  position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none; transition: color .2s;
}
.input-wrap input { width: 100%; padding-inline-start: 44px; }
.input-wrap:focus-within > .ic { color: var(--brand); }
.input-wrap input[type="password"], .input-wrap input.has-toggle { padding-inline-end: 48px; }
.input-wrap input[dir="ltr"] { text-align: start; }

.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: 10px; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; background: transparent; color: var(--muted);
  transition: color .2s, background .2s;
}
.pw-toggle:hover { color: var(--ink); background: var(--tint); }
.pw-toggle .ic { grid-area: 1 / 1; width: 18px; height: 18px; }
.pw-toggle .i-eye-off, .pw-toggle.on .i-eye { display: none; }
.pw-toggle.on .i-eye-off { display: block; }
html:not(.js) .pw-toggle { display: none; }

.field-err { color: var(--rose); font-size: 12.5px; font-weight: 600; }
.field-err:empty { display: none; }
.field input.invalid, .field input.input-validation-error { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(244, 63, 94, .1); }

.link { color: var(--brand); font-weight: 700; font-size: 13px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-back { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.link-back .ic { width: 16px; height: 16px; }

/* Custom checkbox — the real input stays in the DOM for model binding */
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; justify-self: start; }
.check input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); background: var(--field); color: #fff;
  transition: background .2s, border-color .2s;
}
.check-box .ic { width: 14px; height: 14px; stroke-width: 3; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .25s var(--ease); }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check-box .ic { opacity: 1; transform: none; }
.check input:focus-visible + .check-box { outline: 3px solid rgba(47, 107, 255, .45); outline-offset: 2px; }

.btn-block { width: 100%; padding-block: 15px; margin-top: 4px; }
.btn.disabled, .btn:disabled { opacity: .55; pointer-events: none; }

.auth-foot { margin-top: 24px; text-align: center; color: var(--muted); font-size: 14px; }
.auth-foot .link { font-size: 14px; }

/* ---------- Notices (incl. the _EmailSent partial's .alert markup) ---------- */
.notice, .auth-msg .alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 12px; margin-bottom: 18px;
  font-size: 14px; line-height: 1.5; border: 1px solid;
}
.notice[hidden] { display: none; }
.auth-msg .alert { margin: 16px 0 0; }
.notice .ic { width: 18px; height: 18px; margin-top: 1px; }
.notice-info { color: var(--brand); background: var(--tint); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }
.notice-err, .auth-msg .alert-danger { color: var(--rose); background: color-mix(in srgb, var(--rose) 10%, var(--card)); border-color: color-mix(in srgb, var(--rose) 30%, transparent); }
.auth-msg .alert-success { color: var(--mint); background: color-mix(in srgb, var(--mint) 10%, var(--card)); border-color: color-mix(in srgb, var(--mint) 30%, transparent); }
.notice b, .auth-msg strong { font-weight: 800; margin-inline-end: 4px; }
#loading-area { margin: 16px 0 0; align-items: center; }
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.topbar-hint { color: var(--muted); font-size: 14px; }

/* =========================================================
   Sign-up page
   ========================================================= */
.auth-grid-wide { max-width: 1180px; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; }
.auth-panel-sticky { position: sticky; top: 86px; min-height: 560px; }
.auth-steps { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 18px; }
.auth-steps li { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; color: var(--rail-text); line-height: 1.5; }
.auth-steps b { display: block; color: #fff; font-size: 15px; }
.auth-steps li > span {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 18px -8px rgba(47, 107, 255, .9);
}
.req { color: var(--rose); }

.signup-form { gap: 26px; }
.form-sec {
  margin: 0; padding: 0; border: 0; min-width: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.form-sec legend {
  float: left; width: 100%; grid-column: 1 / -1; padding: 0 0 10px; margin-bottom: 2px;
  font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
  border-bottom: 1px solid var(--line);
}
.form-sec legend + * { clear: both; }
.field { min-width: 0; }
.input-wrap input[type="date"] { min-height: 49px; }
:root[data-theme="dark"] .input-wrap input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.6); }
.input-wrap input[type="number"] { -moz-appearance: textfield; }

/* Password checklist */
.pw-rules { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -4px; }
.pw-rules span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--muted); background: var(--field); border: 1px solid var(--line);
  transition: color .2s, background .2s, border-color .2s;
}
.pw-rules span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.pw-rules span.ok { color: var(--mint); border-color: color-mix(in srgb, var(--mint) 35%, transparent); background: color-mix(in srgb, var(--mint) 10%, var(--card)); }
.pw-rules span.ok::before { opacity: 1; }

.check-terms { align-items: flex-start; line-height: 1.5; font-weight: 500; }
.check-terms .check-box { margin-top: 1px; flex-shrink: 0; }
.check-terms .link { font-size: 14px; }
.check input.invalid + .check-box { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(244, 63, 94, .1); }
#terms-err { margin-top: -18px; }
.btn[aria-busy="true"] .ic { animation: nudge .8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }

.auth-done { text-align: center; align-items: center; padding: 40px 0; }
.auth-ic-ok { width: 64px; height: 64px; border-radius: 50%; color: var(--mint); background: color-mix(in srgb, var(--mint) 14%, var(--card)); }
.auth-ic-ok .ic { width: 30px; height: 30px; stroke-width: 2.6; }
.auth-done .auth-sub { max-width: 420px; }
.auth-done .btn { max-width: 320px; }

/* Phone field: restyle intl-tel-input to match the other inputs */
.phone-wrap { display: block; }
.phone-wrap .intl-tel-input { display: block; width: 100%; }
.phone-wrap input { width: 100%; }
.field .phone-wrap input {
  font: inherit; font-weight: 500; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; background: var(--field);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field .phone-wrap input:focus { outline: none; border-color: var(--brand); background: var(--card); box-shadow: 0 0 0 4px rgba(47, 107, 255, .12); }
.field .phone-wrap input.invalid { border-color: var(--rose); box-shadow: 0 0 0 4px rgba(244, 63, 94, .1); }
.phone-wrap .intl-tel-input .selected-flag { border-radius: 12px 0 0 12px; padding-left: 14px; }
/* The flag sprite (Images/flags.png) isn't in the project, so show the dial code only */
.iti-flag { display: none; }
.phone-wrap .intl-tel-input.separate-dial-code .selected-dial-code { padding-left: 0; }
.intl-tel-input .country-list .flag-box { display: none; }
.phone-wrap .intl-tel-input.separate-dial-code .selected-dial-code { color: var(--ink); font-weight: 600; font-size: 14px; }
.phone-wrap .intl-tel-input.separate-dial-code .selected-flag,
.phone-wrap .intl-tel-input.allow-dropdown .flag-container:hover .selected-flag { background: transparent; }
.phone-wrap .intl-tel-input .country-list, .iti-container .country-list {
  color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-strong); font-size: 14px; max-width: min(360px, 80vw); white-space: normal;
}
.intl-tel-input .country-list .country.highlight { background: var(--tint); }
.intl-tel-input .country-list .divider { border-bottom-color: var(--line); }
.intl-tel-input .country-list .dial-code { color: var(--muted); }

/* Google Places dropdown */
.pac-container { border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-strong); font-family: inherit; margin-top: 4px; }

@media (max-width: 900px) {
  .auth-grid-wide { max-width: 640px; grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form-sec { grid-template-columns: 1fr; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; max-width: 520px; }
  .auth-panel { display: none; }
}
@media (max-width: 760px) {
  .auth { place-items: start center; }
}
