/* ─── VL LOGIN PAGE ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --black: #1a1a1a;
  --white: #ffffff;
  --gray-50: #f7f7f7;
  --gray-100: #efefef;
  --gray-200: #e0e0e0;
  --gray-400: #a0a0a0;
  --gray-600: #555555;
  --gray-800: #2a2a2a;
  --green: #1a9e5d;
  --green-light: #e6f7ef;
  --red: #dc3545;
  --red-light: #fff0f0;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

body.vl-login-page {
  font-family: 'DM Sans', -apple-system, sans-serif;
  color: var(--black);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── LAYOUT ─── */
.vl-login-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

/* ─── NAV ─── */
.vl-login-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
}
.vl-login-nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vl-login-nav .nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--black);
  text-decoration: none;
}
.vl-login-nav .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  text-decoration: none;
  transition: color 0.15s;
}
.vl-login-nav .nav-link:hover { color: var(--black); }

/* ─── CARD ─── */
.vl-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.04);
  margin-top: 64px;
}

.vl-login-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--black);
  text-align: center;
  margin-bottom: 8px;
}

.vl-login-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.5px;
  color: var(--black);
  text-align: center;
  margin-bottom: 8px;
  line-height: 1.2;
}

.vl-login-subtitle {
  font-size: 14px;
  color: var(--gray-600);
  text-align: center;
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ─── TABS ─── */
.vl-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 28px;
}
.vl-auth-tab {
  flex: 1;
  padding: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-400);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.vl-auth-tab:hover { color: var(--black); }
.vl-auth-tab.active {
  color: var(--black);
  border-bottom-color: var(--black);
}

/* ─── FORMS ─── */
.vl-auth-form { display: none; }
.vl-auth-form.active { display: block; }

.vl-form-group {
  margin-bottom: 20px;
}
.vl-form-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-bottom: 8px;
}
.vl-form-input {
  width: 100%;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--black);
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: border-color 0.15s;
  outline: none;
}
.vl-form-input:focus { border-color: var(--black); }
.vl-form-input::placeholder { color: var(--gray-400); }

/* ─── ROLE SELECTOR (signup) ─── */
.vl-role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.vl-role-option {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  background: var(--white);
}
.vl-role-option:hover {
  border-color: var(--black);
  background: var(--gray-50);
}
.vl-role-option.selected {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}
.vl-role-option-icon {
  font-size: 24px;
  margin-bottom: 6px;
  display: block;
}
.vl-role-option h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}
.vl-role-option p {
  font-size: 11px;
  color: var(--gray-600);
  line-height: 1.4;
}
.vl-role-option.selected p { color: rgba(255,255,255,0.6); }

/* ─── BUTTONS ─── */
.vl-btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--black);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}
.vl-btn-submit:hover { background: var(--gray-800); }
.vl-btn-submit:disabled {
  background: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
}
.vl-btn-submit.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}
.vl-btn-submit.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 20px; height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: vl-spin 0.6s linear infinite;
}
@keyframes vl-spin {
  to { transform: rotate(360deg); }
}

/* ─── MESSAGES ─── */
.vl-msg {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
  display: none;
}
.vl-msg.error {
  display: block;
  background: var(--red-light);
  color: var(--red);
  border: 1px solid rgba(220,53,69,0.15);
}
.vl-msg.success {
  display: block;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid rgba(26,158,93,0.15);
}

/* ─── ROLE BADGE ─── */
.vl-role-badge {
  display: none;
  text-align: center;
  margin-bottom: 24px;
  padding: 10px 16px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
}
.vl-role-badge span:first-child {
  margin-right: 6px;
}

/* ─── STEP BACK LINK ─── */
.vl-step-back {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-400);
  cursor: pointer;
  margin-bottom: 20px;
  transition: color 0.15s;
}
.vl-step-back:hover {
  color: var(--black);
}

/* ─── WIDE CARD (merchant plan step) ─── */
.vl-login-card.vl-card-wide {
  max-width: 540px;
}

/* ─── PLAN CARDS ─── */
.vl-plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.vl-plan-card {
  position: relative;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
  background: var(--white);
}
.vl-plan-card:hover {
  border-color: var(--black);
  background: var(--gray-50);
}
.vl-plan-card.selected {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}
.vl-plan-popular {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.vl-plan-card.selected .vl-plan-popular {
  background: var(--white);
  color: var(--black);
}
.vl-plan-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.vl-plan-desc {
  font-size: 11px;
  color: var(--gray-400);
  line-height: 1.4;
  margin-bottom: 8px;
}
.vl-plan-card.selected .vl-plan-desc {
  color: rgba(255,255,255,0.5);
}
.vl-plan-price {
  margin-bottom: 12px;
}
.vl-plan-amount {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.vl-plan-period {
  font-size: 13px;
  color: var(--gray-400);
  font-weight: 500;
}
.vl-plan-card.selected .vl-plan-period {
  color: rgba(255,255,255,0.5);
}
.vl-plan-features {
  list-style: none;
  text-align: left;
  font-size: 12px;
  line-height: 1.8;
  color: var(--gray-600);
  padding: 0;
}
.vl-plan-card.selected .vl-plan-features {
  color: rgba(255,255,255,0.7);
}
.vl-plan-features li::before {
  content: '\2713  ';
  color: var(--green);
  font-weight: 700;
}
.vl-plan-card.selected .vl-plan-features li::before {
  color: rgba(255,255,255,0.8);
}

/* ─── EXTRAS ─── */
.vl-form-footer {
  text-align: center;
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 20px;
}
.vl-form-footer a {
  color: var(--black);
  font-weight: 600;
  text-decoration: none;
}

.vl-form-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  font-size: 12px;
  color: var(--gray-400);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vl-form-divider::before,
.vl-form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

.vl-terms {
  text-align: center;
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 16px;
  line-height: 1.6;
}
.vl-terms a {
  color: var(--gray-600);
  text-decoration: none;
}

/* ─── STEP VISIBILITY ─── */
/* Use visibility+height instead of display:none so elements stay in the
   accessibility tree — lets browser automation and screen readers find them. */
.vl-step-off {
  visibility: hidden;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  margin: 0;
  padding: 0;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 500px) {
  .vl-login-card { padding: 36px 24px; }
  .vl-login-card.vl-card-wide { max-width: 100%; }
  .vl-role-selector { grid-template-columns: 1fr; }
  .vl-plan-cards { grid-template-columns: 1fr; }
}
