/* My.Zapp auth — Vodafone-like: red brand pane + clean white form */

:root {
  --vf-red: #e10600;
  --vf-red-hover: #c40500;
  --vf-ink: #222;
  --vf-muted: #666;
  --vf-line: #ddd;
  --vf-bg: #fff;
  --vf-soft: #f6f6f6;
  --vf-radius: 4px;
  --font: "Outfit", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

.auth-body {
  min-height: 100vh;
  background: var(--vf-bg);
  color: var(--vf-ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(280px, 42%) 1fr;
}

/* Left: solid red brand pane */
.auth-brand-pane {
  background: var(--vf-red);
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 3rem 3.25rem 3.5rem;
  position: relative;
  overflow: hidden;
}

.auth-brand-pane::after {
  content: "";
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 70%;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand-pane__inner {
  position: relative;
  z-index: 1;
  max-width: 22rem;
  animation: authIn 0.45s ease both;
}

.auth-brand-pane__mark {
  margin: 0;
  font-size: clamp(2.75rem, 5vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.auth-brand-pane__line {
  margin: 1.25rem 0 0;
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  max-width: 26ch;
}

.auth-brand-pane__foot {
  margin: 2.5rem 0 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Right: white form */
.auth-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--vf-bg);
}

.auth-main__top {
  padding: 1.5rem 2.5rem 0;
}

.auth-main__logo {
  display: inline-flex;
  opacity: 0.95;
}
.auth-main__logo img {
  display: block;
  height: 28px;
  width: auto;
}

.auth-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 2.5rem 3rem;
}

.auth-panel--register {
  justify-content: flex-start;
  padding-top: 1.25rem;
  overflow-y: auto;
}

.auth-content {
  width: 100%;
  max-width: 400px;
  animation: authIn 0.45s ease 0.05s both;
}

.auth-content--wizard { max-width: 480px; }

@keyframes authIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-title {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--vf-ink);
}

.auth-lead {
  margin: 0 0 1.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--vf-muted);
}

.auth-alert {
  margin-bottom: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--vf-radius);
  font-size: 0.875rem;
  line-height: 1.4;
}

.auth-alert--error {
  background: #fdecec;
  border: 1px solid #f5c2c2;
  color: #9b1c1c;
}
.auth-alert--ok {
  background: #eef9f2;
  border: 1px solid #b7e0c8;
  color: #0b7a45;
}

.auth-otp {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin: 0.35rem 0 0.75rem;
}
.auth-otp__digit {
  width: 100%;
  height: 52px;
  border: 1px solid var(--vf-line);
  border-radius: 10px;
  background: #fff;
  color: var(--vf-ink);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.auth-otp__digit:focus {
  outline: none;
  border-color: var(--vf-red);
  box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.12);
}
.auth-otp.is-error .auth-otp__digit {
  border-color: #f5c2c2;
  background: #fff8f8;
  animation: auth-otp-shake 0.45s ease;
}
.auth-otp.is-ok .auth-otp__digit {
  border-color: #b7e0c8;
  background: #f3fbf6;
  color: #0b7a45;
}
@keyframes auth-otp-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-3px); }
}
.auth-otp-cancel {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  text-align: center;
  background: none;
  border: 0;
  cursor: pointer;
}

.auth-form { width: 100%; }

.auth-field {
  position: relative;
  margin-bottom: 1.1rem;
}

.auth-field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.auth-field__row .auth-field__label { margin-bottom: 0; }

.auth-field__label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--vf-ink);
}

.auth-field__hint {
  margin: 0.4rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--vf-muted);
}
.auth-field__hint a { color: var(--vf-red); font-weight: 600; text-decoration: none; }
.auth-field__hint a:hover { text-decoration: underline; }
.auth-field__hint code {
  font-size: 0.9em;
  color: var(--vf-ink);
}

.auth-optional {
  font-weight: 500;
  color: var(--vf-muted);
}

.auth-field__input,
.auth-field__select {
  width: 100%;
  height: 48px;
  padding: 0 0.85rem;
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  background: #fff;
  color: var(--vf-ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-field__input::placeholder { color: #999; }

.auth-field__input:focus,
.auth-field__select:focus {
  outline: none;
  border-color: var(--vf-red);
  box-shadow: 0 0 0 2px rgba(225, 6, 0, 0.15);
}

.auth-field__input.is-invalid {
  border-color: #d32f2f;
}

.auth-field--password .auth-field__input { padding-right: 2.75rem; }

.auth-field__toggle {
  position: absolute;
  right: 0.25rem;
  bottom: 0.25rem;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--vf-radius);
  background: transparent;
  color: #777;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-field__toggle:hover { color: var(--vf-ink); }

.auth-link-btn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vf-red);
  cursor: pointer;
}
.auth-link-btn:hover { text-decoration: underline; }

.auth-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-submit,
.auth-wizard__btn--next,
.auth-wizard__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  height: 48px;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--vf-red);
  color: #fff;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.auth-submit:hover,
.auth-wizard__btn--next:hover,
.auth-wizard__submit:hover {
  background: var(--vf-red-hover);
}

.auth-footnote {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--vf-muted);
}
.auth-footnote a {
  color: var(--vf-red);
  font-weight: 700;
  text-decoration: none;
}
.auth-footnote a:hover { text-decoration: underline; }

.auth-legal {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: #999;
}
.auth-legal a {
  color: #777;
  text-decoration: none;
}
.auth-legal a:hover { color: var(--vf-ink); text-decoration: underline; }
.auth-legal span { margin: 0 0.35rem; }

.auth-footnote__sep {
  margin: 0 0.35rem;
  color: #bbb;
}

/* Register */
.auth-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.auth-segment__opt { cursor: pointer; }
.auth-segment__opt input { display: none; }
.auth-segment__opt span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 0.75rem;
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.auth-segment__opt span strong {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vf-ink);
}
.auth-segment__opt span small {
  font-size: 0.75rem;
  color: var(--vf-muted);
}
.auth-segment__opt input:checked + span {
  border-color: var(--vf-red);
  background: #fff5f5;
}

.auth-type-panel {
  display: none;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid var(--vf-line);
  border-radius: var(--vf-radius);
  background: var(--vf-soft);
}
.auth-type-panel.is-visible { display: block; }

.auth-field--contract {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--vf-line);
}

.auth-wizard__head { margin-bottom: 1.15rem; }
.auth-wizard__bar {
  height: 3px;
  border-radius: 99px;
  background: #eee;
  overflow: hidden;
  margin-bottom: 0.65rem;
}
.auth-wizard__bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--vf-red);
  transition: width 0.3s ease;
}
.auth-wizard__steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
}
.auth-wizard__step {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #999;
}
.auth-wizard__step.is-active { color: var(--vf-red); }
.auth-wizard__step.is-done { color: #555; }

.auth-wizard__panel { display: none; }
.auth-wizard__panel.is-active { display: block; }
.auth-wizard__panel-title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--vf-ink);
}

.auth-wizard__nav {
  display: flex;
  gap: 0.65rem;
  margin-top: 1.1rem;
}
.auth-wizard__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 48px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.auth-wizard__btn--ghost {
  background: #fff;
  border: 1px solid var(--vf-line);
  color: var(--vf-ink);
}
.auth-wizard__btn--ghost:hover { background: var(--vf-soft); }
.auth-wizard__btn--next,
.auth-wizard__submit {
  flex: 1;
  margin-top: 0;
}
.auth-wizard__btn[hidden],
.auth-wizard__submit[hidden] { display: none !important; }

.auth-meter { margin: 0.35rem 0 0.75rem; }
.auth-meter__track {
  height: 5px;
  border-radius: 99px;
  background: #eee;
  overflow: hidden;
}
.auth-meter__fill {
  display: block;
  height: 100%;
  width: 0;
  background: #e53935;
  transition: width 0.2s ease, background 0.2s ease;
}
.auth-meter__fill[data-level="mid"] { background: #fb8c00; }
.auth-meter__fill[data-level="strong"] { background: #43a047; }
.auth-meter__label {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.74rem;
  color: var(--vf-muted);
}

.auth-checklist {
  list-style: none;
  margin: 0 0 0.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem 0.75rem;
}
.auth-checklist li {
  position: relative;
  padding-left: 1.05rem;
  font-size: 0.75rem;
  color: var(--vf-muted);
}
.auth-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ccc;
}
.auth-checklist li.is-ok { color: #2e7d32; }
.auth-checklist li.is-ok::before { background: #43a047; }

.auth-consent {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--vf-line);
}
.auth-consent__item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem;
  align-items: start;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--vf-muted);
  cursor: pointer;
}
.auth-consent__item input {
  margin-top: 0.15rem;
  width: 1rem;
  height: 1rem;
  accent-color: var(--vf-red);
}
.auth-consent__item a {
  color: var(--vf-red);
  font-weight: 700;
  text-decoration: none;
}
.auth-consent__item a:hover { text-decoration: underline; }

.auth-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(420px, calc(100vw - 2rem));
}
.auth-dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
}
.auth-dialog__panel {
  position: relative;
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--vf-line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}
.auth-dialog__close {
  position: absolute;
  top: 0.5rem;
  right: 0.65rem;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 1.4rem;
  cursor: pointer;
}
.auth-dialog__title {
  margin: 0 2rem 0.75rem 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.auth-dialog__list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.5rem;
  color: var(--vf-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}
.auth-dialog__list a {
  color: var(--vf-red);
  font-weight: 700;
}

.auth-contract-status {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.7rem;
  border-radius: var(--vf-radius);
  font-size: 0.76rem;
  line-height: 1.45;
}
.auth-contract-status.is-checking {
  color: var(--vf-muted);
  background: var(--vf-soft);
}
.auth-contract-status.is-ok {
  color: #1b5e20;
  background: #e8f5e9;
  border: 1px solid #c8e6c9;
}
.auth-contract-status.is-error {
  color: #9b1c1c;
  background: #fdecec;
  border: 1px solid #f5c2c2;
}

.mz-hp {
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand-pane {
    min-height: 180px;
    align-items: center;
    padding: 1.75rem 1.35rem;
  }
  .auth-brand-pane__mark { font-size: 2.25rem; }
  .auth-brand-pane__line { margin-top: 0.65rem; font-size: 1rem; }
  .auth-brand-pane__foot { margin-top: 1.25rem; }
  .auth-main__top { padding: 1.15rem 1.35rem 0; }
  .auth-panel { padding: 1.25rem 1.35rem 2.5rem; }
}

@media (max-width: 560px) {
  .auth-field-row,
  .auth-segment,
  .auth-checklist { grid-template-columns: 1fr; }
  .auth-wizard__nav { flex-direction: column; }
}

.auth-confirm-pulse {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 1.35rem;
  margin-bottom: 1.25rem;
}
.auth-confirm-pulse span {
  display: block; /* transform nu merge pe inline */
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--vf-red);
  opacity: 0.45;
  will-change: transform, opacity, background-color;
  animation: auth-bounce 0.85s linear infinite;
}
.auth-confirm-pulse span:nth-child(1) { animation-delay: 0s; }
.auth-confirm-pulse span:nth-child(2) { animation-delay: 0.14s; }
.auth-confirm-pulse span:nth-child(3) { animation-delay: 0.28s; }
@keyframes auth-bounce {
  0%, 100% {
    opacity: 0.4;
    transform: translate3d(0, 0, 0);
  }
  25% {
    opacity: 1;
    transform: translate3d(0, -9px, 0);
  }
  50% {
    opacity: 0.7;
    transform: translate3d(0, 0, 0);
  }
  75% {
    opacity: 0.45;
    transform: translate3d(0, 0, 0);
  }
}

/* Aprobat — sar împreună, se unesc, verde */
.auth-confirm-pulse.is-ok {
  gap: 0.2rem;
  transition: gap 0.35s ease;
}
.auth-confirm-pulse.is-ok span {
  background: #0b7a45;
  animation: auth-dots-ok 0.7s cubic-bezier(0.2, 0.9, 0.3, 1) forwards;
}
.auth-confirm-pulse.is-ok span:nth-child(1) { animation-delay: 0s; }
.auth-confirm-pulse.is-ok span:nth-child(2) { animation-delay: 0.06s; }
.auth-confirm-pulse.is-ok span:nth-child(3) { animation-delay: 0.12s; }
@keyframes auth-dots-ok {
  0% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
  35% { opacity: 1; transform: translate3d(0, -12px, 0) scale(1.15); }
  70% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.05); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}

/* Refuzat — tremură și se sting */
.auth-confirm-pulse.is-no span {
  background: #9b1c1c;
  animation: auth-dots-no 0.65s ease forwards;
}
.auth-confirm-pulse.is-no span:nth-child(1) { animation-delay: 0s; }
.auth-confirm-pulse.is-no span:nth-child(2) { animation-delay: 0.05s; }
.auth-confirm-pulse.is-no span:nth-child(3) { animation-delay: 0.1s; }
@keyframes auth-dots-no {
  0% { opacity: 1; transform: translate3d(0, 0, 0); }
  15% { transform: translate3d(-5px, 0, 0); }
  30% { transform: translate3d(5px, 0, 0); }
  45% { transform: translate3d(-4px, 0, 0); }
  60% { transform: translate3d(3px, 0, 0); }
  100% { opacity: 0.25; transform: translate3d(0, 2px, 0) scale(0.85); }
}

/* Expirat — cad pe rând */
.auth-confirm-pulse.is-expired span {
  background: #8a8a8a;
  animation: auth-dots-expired 0.75s ease forwards;
}
.auth-confirm-pulse.is-expired span:nth-child(1) { animation-delay: 0s; }
.auth-confirm-pulse.is-expired span:nth-child(2) { animation-delay: 0.1s; }
.auth-confirm-pulse.is-expired span:nth-child(3) { animation-delay: 0.2s; }
@keyframes auth-dots-expired {
  0% { opacity: 0.9; transform: translate3d(0, 0, 0) scale(1); }
  55% { opacity: 0.55; transform: translate3d(0, 10px, 0) scale(0.9); }
  100% { opacity: 0.15; transform: translate3d(0, 14px, 0) scale(0.7); }
}

.auth-confirm-hint.is-ok { color: #0b7a45; font-weight: 600; }
.auth-confirm-hint.is-no,
.auth-confirm-hint.is-expired { color: #9b1c1c; font-weight: 600; }

.auth-content[data-pulse-state="is-ok"] .auth-title { color: #0b7a45; }
.auth-content[data-pulse-state="is-no"] .auth-title { color: #9b1c1c; }
.auth-content[data-pulse-state="is-expired"] .auth-title { color: #6b7280; }
.auth-content[data-pulse-state="is-ok"] .auth-confirm-card,
.auth-content[data-pulse-state="is-no"] .auth-confirm-card,
.auth-content[data-pulse-state="is-expired"] .auth-confirm-card {
  transition: border-color 0.25s ease, background 0.25s ease;
}
.auth-content[data-pulse-state="is-ok"] .auth-confirm-card {
  border-color: #b7e0c8;
  background: #f3fbf6;
}
.auth-content[data-pulse-state="is-no"] .auth-confirm-card {
  border-color: #f5c2c2;
  background: #fff5f5;
}
.auth-content[data-pulse-state="is-expired"] .auth-confirm-card {
  border-color: #d7dbe3;
  background: #f6f7f9;
}

.auth-confirm-card {
  margin: 0 0 1.25rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--vf-line);
  border-radius: calc(var(--vf-radius) + 4px);
  background: #fafafa;
}
.auth-confirm-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
}
.auth-confirm-row strong { font-weight: 700; color: var(--vf-ink); text-align: right; }
.auth-confirm-label { color: var(--vf-muted); font-weight: 600; font-size: 0.8rem; }
.auth-confirm-hint {
  margin: 0.75rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--vf-line);
  font-size: 0.875rem;
  color: var(--vf-muted);
  line-height: 1.45;
}
.auth-submit--ghost {
  background: #fff;
  color: var(--vf-ink);
  border: 1px solid var(--vf-line);
  box-shadow: none;
}
.auth-submit--ghost:hover {
  background: #f6f7f9;
  border-color: #d0d4dc;
}

@media (prefers-reduced-motion: reduce) {
  .auth-content,
  .auth-brand-pane__inner { animation: none !important; }
  .auth-confirm-pulse:not(.is-ok):not(.is-no):not(.is-expired) span {
    animation: auth-bounce-soft 1.4s linear infinite !important;
  }
  @keyframes auth-bounce-soft {
    0%, 100% { opacity: 0.35; transform: translate3d(0, 0, 0); }
    50% { opacity: 1; transform: translate3d(0, -4px, 0); }
  }
}
