/* Shared account/onboarding forms; Postilo's existing palette and typography. */
.postilo-flow { font-family: var(--font-sans); font-size: 14px; line-height: 1.6; min-width: 0; }
.flow-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; background: var(--bg-body); }
.flow-card { width: 100%; max-width: 440px; padding: 32px; background: #fff; border-radius: 12px; box-shadow: 0 8px 32px rgba(47,43,61,.09); color: var(--text-primary); font-family: var(--font-sans); }
.flow-wide { max-width: 780px; }
.flow-card h1 { font-size: 26px; line-height: 1.3; margin: 24px 0 12px; }
.postilo-flow h2 { font-size: 18px; margin: 20px 0 12px; }
.flow-brand { display: flex; gap: 12px; align-items: center; color: var(--text-primary); font-size: 24px; font-weight: 700; text-decoration: none; }
.flow-muted { color: var(--text-secondary); margin: 12px 0 18px; line-height: 1.6; }
.flow-caption { font-size: 12px; color: var(--text-secondary); line-height: 1.6; margin: 10px 0; }
.flow-field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; font-size: 13px; color: var(--text-primary); }
.flow-field-label { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flow-field-label > label { cursor: pointer; }
.flow-input-wrap { position: relative; display: block; }
.flow-field input, .flow-field select { width: 100%; min-width: 0; height: 44px; border: 1px solid var(--input-border); border-radius: 6px; background: #fff; color: var(--text-primary); padding: 10px 12px; font: inherit; font-size: 16px; }
.flow-primary, .flow-secondary { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; border-radius: 6px; border: 1px solid #7367f0; padding: 10px 16px; background: #7367f0; color: #fff; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.flow-primary { margin-top: 10px; }
.postilo-flow > .flow-primary { display: flex; width: 100%; margin-top: 16px; }
.flow-secondary { background: #fff; border-color: var(--divider); color: var(--text-primary); }
.flow-primary:disabled, .flow-secondary:disabled, .flow-link:disabled { opacity: .5; cursor: not-allowed; }
.flow-link { border: 0; background: none; color: #6559cf; font: inherit; cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.postilo-flow a, .flow-footer a, .flow-consent a { color: #6559cf; text-underline-offset: 3px; }
.flow-notice { margin: 14px 0; padding: 12px 14px; background: #f1efff; color: #514c6b; border: 1px solid #dfdafb; border-radius: 6px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.flow-error { background: #fff1f2; border-color: #fac7cb; color: #aa2933; }
.flow-actions, .flow-social, .flow-footer { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; font-size: 13px; }
.flow-actions { justify-content: space-between; }
.flow-social { gap: 10px; margin-top: 8px; }
.flow-social > button { flex: 1; }
.flow-footer { justify-content: space-between; padding-top: 18px; border-top: 1px solid var(--divider); }
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin: 22px 0; }
.flow-steps button { min-width: 0; padding: 10px; border-radius: 6px; border: 1px solid var(--divider); background: #fafafa; color: var(--text-primary); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.flow-steps button.active { background: #f1efff; color: #6559cf; border-color: #7367f0; }
.flow-steps small { display: block; margin-top: 3px; font-size: 10px; }
.flow-instructions { padding-left: 22px; color: var(--text-secondary); }
.flow-instructions li { padding: 4px 0; }
.flow-delay { margin: 16px 0 10px; padding: 0; border: 0; min-width: 0; }
.flow-delay legend { margin-bottom: 7px; font-size: 13px; color: var(--text-primary); }
.flow-delay-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
.flow-delay-options button { min-height: 38px; padding: 7px 8px; border: 1px solid var(--divider); border-radius: 6px; background: #fff; color: var(--text-primary); font: inherit; font-size: 12px; cursor: pointer; }
.flow-delay-options button.active { border-color: #7367f0; background: #f1efff; color: #6559cf; box-shadow: 0 0 0 2px rgba(115,103,240,.08); }
.flow-delay p { margin: 7px 0 0; color: var(--text-secondary); font-size: 12px; line-height: 1.5; }
.flow-first-delivery { margin: 16px 0; padding: 14px; display: grid; gap: 6px; border: 1px solid #dfdafb; border-radius: 8px; background: #f8f7ff; color: #514c6b; }
.flow-first-delivery.success { border-color: #afe5c7; background: #f1fbf5; color: #196e41; }
.flow-first-delivery.error { border-color: #fac7cb; background: #fff1f2; color: #aa2933; }
.flow-first-delivery strong { color: inherit; font-size: 14px; }
.flow-first-delivery span { font-size: 13px; line-height: 1.55; }
.flow-first-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 5px; }
.flow-first-actions .flow-secondary { min-height: 36px; padding: 7px 12px; }
.flow-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.7; margin: 20px 0; }
.flow-consent input { margin-top: 4px; width: 18px; height: 18px; accent-color: #7367f0; flex-shrink: 0; }
.postilo-flow :focus-visible, .flow-card :focus-visible { outline: 2px solid #7367f0; outline-offset: 3px; }

/* Vuexy-inspired auth: deliberate hierarchy, soft surfaces, compact controls. */
.auth-shell {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 32px;
  background:
    radial-gradient(circle at 12% 18%, rgba(115,103,240,.12), transparent 26%),
    radial-gradient(circle at 88% 82%, rgba(40,199,111,.07), transparent 24%),
    #f8f7fa;
}
.auth-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 380px;
  height: 380px;
  left: -190px;
  bottom: -210px;
  border: 1px solid rgba(115,103,240,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 44px rgba(115,103,240,.035), 0 0 0 88px rgba(115,103,240,.025);
}
.auth-card {
  max-width: 960px;
  min-height: 620px;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(420px, 1.18fr);
  overflow: hidden;
  border: 1px solid rgba(47,43,61,.08);
  border-radius: 14px;
  box-shadow: 0 20px 56px rgba(47,43,61,.12);
  animation: authCardIn .42s cubic-bezier(.22,1,.36,1) both;
}
.auth-aside {
  min-width: 0;
  padding: 36px 38px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, #efedff 0%, #f8f7ff 72%);
  border-right: 1px solid rgba(115,103,240,.13);
}
.auth-aside .flow-brand { font-size: 22px; }
.auth-aside-body { margin: auto 0; }
.auth-eyebrow, .auth-kicker {
  margin: 0;
  color: #7367f0;
  font-size: 11px;
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.auth-aside h2 {
  max-width: 290px;
  margin: 12px 0 14px;
  color: #2f2b3d;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.14;
  letter-spacing: -.025em;
}
.auth-aside-body > p:not(.auth-eyebrow):not(.auth-trust) {
  max-width: 300px;
  margin: 0;
  color: #6d6a77;
  font-size: 14px;
  line-height: 1.65;
}
.auth-route {
  margin: 34px 0 26px;
  padding: 18px 14px;
  display: grid;
  grid-template-columns: minmax(0,1fr) 24px minmax(0,1fr) 24px minmax(0,1fr);
  align-items: start;
  gap: 5px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(115,103,240,.12);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(115,103,240,.07);
}
.auth-route-node { min-width: 0; display: grid; justify-items: center; gap: 8px; color: #5d5967; font-size: 10px; }
.auth-route-node > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 5px 12px rgba(47,43,61,.12);
}
.auth-route-node strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.auth-route-tg > span { background: #fff; }
.auth-route-postilo > span { background: #7367f0; }
.auth-route-max > span { background: #fff; }
.auth-route-line { height: 1px; margin-top: 19px; background: rgba(115,103,240,.35); position: relative; }
.auth-route-line::after { content: ""; position: absolute; right: -1px; top: -3px; width: 6px; height: 6px; border-top: 1px solid #7367f0; border-right: 1px solid #7367f0; transform: rotate(45deg); }
.auth-trust { display: flex; align-items: flex-start; gap: 9px; margin: 0; color: #5d5967; font-size: 12px; line-height: 1.55; }
.auth-trust > span { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 5px; border-radius: 50%; background: #28c76f; box-shadow: 0 0 0 4px rgba(40,199,111,.12); }
.auth-main {
  min-width: 0;
  padding: 46px 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #fff;
}
.auth-heading { margin-bottom: 20px; }
.auth-heading h1 { margin: 8px 0 8px; color: #2f2b3d; font-size: 30px; line-height: 1.25; letter-spacing: -.02em; }
.auth-heading > p:last-child { margin: 0; color: #6d6a77; font-size: 14px; line-height: 1.55; }
.auth-form .flow-field { margin: 0 0 16px; }
.auth-form .flow-field-label { color: #4b465c; font-size: 13px; font-weight: 500; }
.auth-form .flow-input-wrap.has-trailing input { padding-right: 108px; }
.auth-form .flow-field input {
  height: 46px;
  border-color: #d8d6de;
  border-radius: 6px;
  color: #2f2b3d;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.auth-form .flow-field input::placeholder { color: #aaa7b2; }
.auth-form .flow-field input:hover:not(:disabled) { border-color: #b9b5c6; }
.auth-form .flow-field input:focus { border-color: #7367f0; outline: 0; box-shadow: 0 0 0 3px rgba(115,103,240,.12); }
.flow-label-link { flex: 0 0 auto; font-size: 12px; font-weight: 400; text-decoration: none; }
.flow-label-link:hover { text-decoration: underline; }
.flow-password-toggle {
  position: absolute;
  top: 50%;
  right: 11px;
  transform: translateY(-50%);
  min-height: 32px;
  padding: 4px 2px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: #6d6a77;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.flow-password-toggle:hover { color: #7367f0; }
.auth-form > .flow-primary {
  min-height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: 6px;
  background: #7367f0;
  box-shadow: 0 7px 16px rgba(115,103,240,.24);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.auth-form > .flow-primary:hover:not(:disabled) { background: #655bd3; box-shadow: 0 9px 20px rgba(115,103,240,.3); transform: translateY(-1px); }
.auth-form > .flow-primary:active:not(:disabled) { transform: translateY(0); }
.auth-password-hint { margin: -7px 0 14px; }
.auth-social { margin-top: 20px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 0; color: #8b8795; font-size: 11px; white-space: nowrap; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #ebe9f1; }
.auth-social .flow-social { margin-top: 14px; }
.auth-provider { gap: 8px; height: 44px; border-color: #dedce4; color: #4b465c; transition: border-color .18s ease, background-color .18s ease; }
.auth-provider:hover:not(:disabled) { border-color: #bbb7c6; background: #faf9fb; }
.auth-provider-google { color: #4285f4; font-weight: 800; font-size: 16px; }
.auth-main .flow-notice { margin: 12px 0; }
.auth-footer { justify-content: center; gap: 5px; margin-top: 20px; padding-top: 20px; color: #6d6a77; border-color: #ebe9f1; }
.auth-footer a { font-weight: 500; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
@keyframes authCardIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 900px) {
  .auth-card { grid-template-columns: minmax(260px,.72fr) minmax(390px,1.28fr); }
  .auth-aside { padding: 30px; }
  .auth-main { padding: 42px; }
}
@media (max-width: 720px) {
  .flow-shell.auth-shell { min-height: 100dvh; padding: 18px; align-items: flex-start; }
  .flow-card.auth-card { max-width: 500px; min-height: 0; padding: 0; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-aside { padding: 22px 24px; border-right: 0; border-bottom: 1px solid rgba(115,103,240,.12); }
  .auth-aside .flow-brand { font-size: 20px; }
  .auth-aside-body { display: none; }
  .auth-main { padding: 30px 24px; }
  .auth-heading { margin-bottom: 22px; }
  .auth-heading h1 { font-size: 27px; }
}
@media (max-width: 420px) {
  .flow-shell.auth-shell { padding: 0; background: #fff; }
  .flow-card.auth-card { min-height: 100dvh; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .auth-aside { padding: 18px 20px; }
  .auth-main { padding: 28px 20px 32px; justify-content: flex-start; }
  .auth-social .flow-social { flex-direction: column; }
  .auth-social .flow-social > button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-card, .auth-form .flow-field input, .auth-form > .flow-primary, .auth-provider { animation: none; transition: none; }
}
@media (max-width: 600px) { .flow-shell { padding: 16px; align-items: flex-start; } .flow-card { padding: 22px; } .flow-steps { grid-template-columns: repeat(2,minmax(0,1fr)); } .flow-delay-options { grid-template-columns: repeat(2,minmax(0,1fr)); } .flow-primary { width: 100%; } .flow-actions { gap: 12px; } }
