:root {
  --vcgl-primary: #1a3c5e;
  --vcgl-primary-dark: #122d47;
  --vcgl-primary-light: #2a5888;
  --vcgl-accent: #e8a020;
  --vcgl-bg: #f0f4f8;
  --vcgl-card-bg: #ffffff;
  --vcgl-text: #1e293b;
  --vcgl-text-muted: #64748b;
  --vcgl-border: #e2e8f0;
  --vcgl-radius: 0.75rem;
  --vcgl-radius-sm: 0.5rem;
  --vcgl-shadow: 0 10px 40px rgba(26, 60, 94, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--vcgl-bg);
  color: var(--vcgl-text);
  -webkit-font-smoothing: antialiased;
}

.vcgl-login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(26, 60, 94, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232, 160, 32, 0.05) 0%, transparent 50%),
    var(--vcgl-bg);
}

.vcgl-login-card {
  width: 100%;
  max-width: 440px;
  background: var(--vcgl-card-bg);
  border-radius: var(--vcgl-radius);
  box-shadow: var(--vcgl-shadow);
  border: 1px solid var(--vcgl-border);
  overflow: hidden;
}

.vcgl-login-header {
  background: linear-gradient(135deg, var(--vcgl-primary) 0%, var(--vcgl-primary-light) 100%);
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.vcgl-login-header::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.vcgl-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.vcgl-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: var(--vcgl-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--vcgl-radius-sm);
}

.sidebar-logo-fallback {
  display: none;
  width: 100%;
  height: 100%;
  background: var(--vcgl-accent);
  border-radius: var(--vcgl-radius-sm);
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
}

.vcgl-logo-text {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
}

.vcgl-tagline {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.85rem;
  margin: 0;
}

.vcgl-login-body {
  padding: 2rem;
}

.vcgl-login-footer {
  border-top: 1px solid var(--vcgl-border);
  color: var(--vcgl-text-muted);
  font-size: 0.78rem;
  text-align: center;
  padding: 0.85rem 1rem 1rem;
}

.vcgl-lang-switcher {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

.vcgl-lang-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: transparent;
  border: 1px solid var(--vcgl-border);
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  color: var(--vcgl-text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.vcgl-lang-dropdown:hover,
.vcgl-lang-dropdown.show {
  border-color: var(--vcgl-primary);
  color: var(--vcgl-primary);
  background: rgba(0, 0, 0, 0.04);
}

.vcgl-lang-menu {
  min-width: 150px;
  border: 1px solid var(--vcgl-border);
  background: var(--vcgl-card-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 0.25rem;
  border-radius: 8px;
}

.vcgl-lang-menu .dropdown-item {
  border-radius: 6px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
}

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--vcgl-text);
  margin-bottom: 0.4rem;
}

.form-control {
  border: 1.5px solid var(--vcgl-border);
  border-radius: var(--vcgl-radius-sm);
  padding: 0.6rem 0.875rem;
  font-size: 0.9rem;
  color: var(--vcgl-text);
  background: #fafbfc;
}

.form-control:focus {
  border-color: var(--vcgl-primary);
  box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.1);
  background: #fff;
  outline: none;
}

.input-group .form-control {
  border-right: none;
  border-radius: var(--vcgl-radius-sm) 0 0 var(--vcgl-radius-sm) !important;
}

.input-group .btn-outline-secondary {
  border: 1.5px solid var(--vcgl-border);
  border-left: none;
  background: #fafbfc;
  color: var(--vcgl-text-muted);
  border-radius: 0 var(--vcgl-radius-sm) var(--vcgl-radius-sm) 0 !important;
  padding: 0.6rem 0.75rem;
}

.input-group:focus-within .form-control,
.input-group:focus-within .btn-outline-secondary {
  border-color: var(--vcgl-primary);
}

.btn-vcgl-primary {
  background: linear-gradient(135deg, var(--vcgl-primary), var(--vcgl-primary-light));
  border: none;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--vcgl-radius-sm);
  width: 100%;
}

.btn-vcgl-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--vcgl-primary-dark), var(--vcgl-primary));
  color: #fff;
}

.vcgl-link {
  color: var(--vcgl-primary);
  font-weight: 600;
  text-decoration: none;
}

.vcgl-link:hover {
  color: var(--vcgl-primary-dark);
  text-decoration: underline;
}

.vcgl-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--vcgl-text-muted);
  font-size: 0.8rem;
}

.vcgl-divider::before,
.vcgl-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--vcgl-border);
}

.vcgl-divider::before {
  margin-right: 0.75rem;
}

.vcgl-divider::after {
  margin-left: 0.75rem;
}

.auth-state-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.auth-state-icon.success {
  background: rgba(22, 163, 74, 0.12);
  color: #16a34a;
}

.auth-state-icon.warning {
  background: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
}

.auth-state-icon.error {
  background: rgba(220, 38, 38, 0.12);
  color: #dc2626;
}

.otp-group {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.5rem 0;
}

.otp-input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 1.5px solid var(--vcgl-border);
  border-radius: 10px;
  background: #f8fafc;
  color: var(--vcgl-text);
  outline: none;
}

.otp-input:focus {
  border-color: var(--vcgl-primary);
  box-shadow: 0 0 0 3px rgba(30, 92, 151, 0.15);
}

.otp-input.is-invalid {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.04);
}

.otp-input.is-valid {
  border-color: #16a34a;
  background: rgba(22, 163, 74, 0.04);
}

.otp-separator {
  display: flex;
  align-items: center;
  color: #94a3b8;
  font-weight: 300;
  font-size: 1.2rem;
}

.email-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(30, 92, 151, 0.08);
  color: var(--vcgl-primary);
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 0.35rem;
}

.resend-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--vcgl-text-muted);
  margin-top: 0.5rem;
}

.resend-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--vcgl-primary);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.resend-btn:disabled {
  color: #94a3b8;
  text-decoration: none;
  cursor: default;
}

.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.error-card {
  text-align: center;
  max-width: 480px;
  background: var(--vcgl-card-bg);
  border: 1px solid var(--vcgl-border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--vcgl-shadow);
}

.error-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.error-desc {
  font-size: 0.9rem;
  color: var(--vcgl-text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.error-hint {
  font-size: 0.8rem;
  color: var(--vcgl-text-muted);
  background: #fff;
  border: 1px solid var(--vcgl-border);
  border-radius: 8px;
  padding: 0.65rem 1rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.error-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline-vcgl {
  background: transparent;
  color: var(--vcgl-text-muted);
  border: 1.5px solid var(--vcgl-border);
  border-radius: 8px;
  padding: 0.65rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-outline-vcgl:hover {
  border-color: var(--vcgl-primary);
  color: var(--vcgl-primary);
}

.validation-summary-errors ul {
  margin-bottom: 0;
  padding-left: 1rem;
}

@media (max-width: 576px) {
  .vcgl-login-body {
    padding: 1.5rem;
  }

  .vcgl-login-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .otp-input {
    width: 40px;
    height: 48px;
    font-size: 1.2rem;
  }
}
