/* ============================================================
   Auth — exact Convy replica
   ============================================================ */

.vz-auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #0d0d0d;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.vz-auth-card {
  width: 100%;
  max-width: 452px;
  background: #000000;
  border: 1px solid #1a1a1a;
  border-radius: 8px;
  padding: 40px;
}

.vz-auth-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.045em;
  margin: 0 0 4px;
  line-height: 1.05;
}

.vz-auth-subtitle {
  font-size: 0.9375rem;
  color: #8a8a8a;
  margin: 0 0 28px;
}

.vz-form-group {
  margin-bottom: 16px;
}

.vz-form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #c4c4c4;
  margin-bottom: 8px;
}

.vz-input-wrap input {
  width: 100%;
  padding: 11px 12px;
  background: #000000;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
.vz-input-wrap input:hover { border-color: #3a3a3a; }
.vz-input-wrap input:focus { border-color: #555; }

.vz-form-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.vz-btn-login {
  padding: 10px 22px;
  background: #ffffff;
  border: none;
  border-radius: 6px;
  color: #000000;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s ease;
  position: relative;
}
.vz-btn-login:hover { background: #e5e5e5; }
.vz-btn-login:active { transform: translateY(1px); }
.vz-btn-login:disabled { opacity: 0.6; cursor: not-allowed; }
.vz-btn-login.loading .btn-text { visibility: hidden; }
.vz-btn-login.loading::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  margin: -8px 0 0 -8px;
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #000;
  border-radius: 50%;
  animation: vzSpin 0.7s linear infinite;
}
@keyframes vzSpin { to { transform: rotate(360deg); } }

.vz-bottom-bar {
  width: 100%;
  max-width: 452px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding: 0 2px;
}
.vz-copyright {
  font-size: 0.8125rem;
  color: #6b6b6b;
}
.vz-theme-toggle {
  position: relative;
  width: 42px;
  height: 22px;
  background: #2563eb;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
}
.vz-theme-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 22px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
}
.vz-theme-toggle .toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  display: flex;
  align-items: center;
}
.vz-theme-toggle .toggle-icon.moon { left: 5px; }
.vz-theme-toggle .toggle-icon.sun { right: 5px; }

@media (max-width: 520px) {
  .vz-auth-wrapper { padding: 24px 16px; }
  .vz-auth-card { padding: 32px 24px; }
  .vz-auth-title { font-size: 2rem; }
}


/* ---------- Convy error state ---------- */
.vz-form-group.has-error .vz-input-wrap input {
  border-color: #ef4444 !important;
}
.vz-error-msg {
  display: none;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #ef4444;
}
.vz-form-group.has-error .vz-error-msg {
  display: flex;
}
.vz-error-msg svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}



/* ---------- Column wrapper so card + banner share width ---------- */
.vz-auth-column {
  width: 100%;
  max-width: 452px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ---------- Error banner ABOVE the card ---------- */
.vz-form-banner {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #ef4444;
  border-radius: 6px;
  margin-bottom: 10px;
  animation: vzBannerIn 0.3s ease;
}
.vz-form-banner.visible {
  display: flex;
}
.vz-banner-label {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  background: rgba(0,0,0,0.25);
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.vz-banner-msg {
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
  line-height: 1.4;
}
@keyframes vzBannerIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Keep the card and bottom bar aligned with the column */
.vz-auth-column .vz-auth-card {
  max-width: none;
  width: 100%;
}

/* ---------- Theme toggle: sharper visuals ---------- */
.vz-theme-toggle {
  position: relative;
  width: 46px;
  height: 24px;
  background: #2563eb;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.25s ease;
  flex-shrink: 0;
}
.vz-theme-toggle::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 25px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.vz-theme-toggle .toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.vz-theme-toggle .toggle-icon.moon { left: 5px; }
.vz-theme-toggle .toggle-icon.sun  { right: 5px; }

/* ---------- Light theme overrides ---------- */
html.light-mode body {
  background: #f5f5f5;
  color: #0a0a0a;
}
html.light-mode .vz-auth-wrapper {
  background: #f5f5f5;
}
html.light-mode .vz-auth-card {
  background: #ffffff;
  border-color: #e5e5e5;
}
html.light-mode .vz-auth-title {
  color: #0a0a0a;
}
html.light-mode .vz-auth-subtitle {
  color: #6b6b6b;
}
html.light-mode .vz-form-label {
  color: #333333;
}
html.light-mode .vz-input-wrap input {
  background: #ffffff;
  border-color: #d4d4d4;
  color: #0a0a0a;
}
html.light-mode .vz-input-wrap input:hover { border-color: #b8b8b8; }
html.light-mode .vz-input-wrap input:focus { border-color: #888888; }
html.light-mode .vz-btn-login {
  background: #0a0a0a;
  color: #ffffff;
}
html.light-mode .vz-btn-login:hover { background: #262626; }
html.light-mode .vz-copyright { color: #6b6b6b; }
html.light-mode .vz-form-banner { background: #ef4444; }

/* Toggle in light mode */
html.light-mode .vz-theme-toggle { background: #0a0a0a; }
html.light-mode .vz-theme-toggle::after {
  left: 3px;
}

/* ---------- Logo mark before wordmark ---------- */
.vz-auth-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vz-brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
@media (max-width: 520px) {
  .vz-brand-mark { width: 40px; height: 40px; }
  .vz-auth-title { gap: 10px; }
}

/* TabiCloud sign-in */
.vz-auth-wrapper {
  background: radial-gradient(ellipse at 50% 30%, #202343 0%, #10121f 38%, #0d0d10 74%);
}
html.light-mode .vz-auth-wrapper {
  background: radial-gradient(ellipse at 50% 27%, #e0e7ff, #f4f5fb 64%);
}
.vz-auth-wrapper .vz-auth-column .vz-auth-card {
  border-radius: 18px;
  border-color: var(--border-secondary);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.21);
}
html.light-mode .vz-auth-wrapper .vz-auth-column .vz-auth-card {
  box-shadow: 0 24px 72px rgba(56, 65, 112, 0.14);
}
.vz-auth-kicker { margin: 22px 0 6px; }
.vz-auth-card .vz-btn-login {
  min-height: 42px;
  background: #4f46e5;
  color: #fff;
}
.vz-auth-card .vz-btn-login:hover { background: #4338ca; }
.vz-auth-card .vz-input-wrap input:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.22);
}

/* TabiCloud identity */
.vz-auth-wrapper {
  background: radial-gradient(ellipse at 50% 28%, #163250 0%, #0b1727 44%, #090f18 80%);
}
html.light-mode .vz-auth-wrapper {
  background: radial-gradient(ellipse at 50% 28%, #d8f3ff, #f4f8fc 68%);
}
.vz-auth-card .vz-btn-login { background: #1467ac; }
.vz-auth-card .vz-btn-login:hover { background: #10538c; }
.vz-auth-card .vz-input-wrap input:focus { border-color: #48b2e9; }
