:root {
  --primary-color: #ff2b2b;
  --primary-dark: #c41616;
  --secondary-color: #111827;
  --accent-color: #ff4d6d;
  --cta-color: #ff2b2b;
  --cta-secondary: #f59e0b;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --border-color: rgba(148, 163, 184, 0.35);
  --background-light: #fff5f6;
  --shadow-sm: 0 1px 2px 0 rgba(17, 24, 39, 0.06);
  --shadow-md: 0 8px 20px rgba(17, 24, 39, 0.08);
  --shadow-lg: 0 22px 50px rgba(17, 24, 39, 0.14);
  --radius: 0.75rem;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --vf-space-1: 0.25rem;
  --vf-space-2: 0.5rem;
  --vf-space-3: 0.75rem;
  --vf-space-4: 1rem;
  --vf-space-5: 1.25rem;
  --vf-space-6: 1.5rem;
  --vf-space-8: 2rem;
  --vf-space-10: 2.5rem;
  --vf-space-12: 3rem;
}

html,
body {
  height: 100%;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

body.vf-public {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji",
    "Segoe UI Emoji";
  color: var(--text-primary);
  font-size: clamp(0.875rem, 0.85rem + 0.2vw, 1rem);
  line-height: 1.5;
  overflow-x: hidden;
  background: radial-gradient(1200px circle at 15% 0%, rgba(255, 43, 43, 0.14) 0%, rgba(255, 43, 43, 0) 60%),
    radial-gradient(900px circle at 85% 10%, rgba(255, 77, 109, 0.12) 0%, rgba(255, 77, 109, 0) 55%),
    linear-gradient(180deg, #fff1f3 0%, #ffffff 30%, #fff1f3 100%);
}

pre,
code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

body.vf-public :focus-visible {
  outline: 3px solid rgba(255, 43, 43, 0.35);
  outline-offset: 2px;
}

body.vf-public a {
  color: inherit;
}

body.vf-public .navbar {
  background: rgba(255, 255, 255, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
  padding: 0.85rem 0;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

body.vf-public .navbar-brand {
  font-size: 1.4rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--text-primary) !important;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

body.vf-public .navbar-brand i {
  color: var(--cta-color);
}

.brand-logo {
  height: 42px;
  width: auto;
  max-width: 220px;
  flex: 0 0 auto;
  display: block;
}

.brand-wordmark {
  display: inline-flex;
  align-items: baseline;
  font-weight: 900;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
}

.brand-wordmark--sm {
  font-size: 1.3rem;
}

.brand-velox {
  color: #0f172a;
}

.brand-form {
  color: var(--cta-color);
}

.vf-password-wrapper {
  position: relative;
}

.vf-password-wrapper .vf-form-control {
  padding-right: 3rem;
}

.vf-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  padding: 0.25rem;
  line-height: 1;
  color: rgba(17, 24, 39, 0.62);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.vf-password-toggle:hover {
  color: var(--cta-color);
}

.vf-password-toggle:focus-visible {
  outline: 3px solid rgba(255, 43, 43, 0.35);
  outline-offset: 3px;
  border-radius: 8px;
}

body.vf-public .navbar-nav .nav-link {
  color: rgba(17, 24, 39, 0.85);
  font-weight: 600;
  margin: 0 1rem;
  transition: color 0.2s ease;
}

body.vf-public .navbar-nav .nav-link:hover {
  color: var(--text-primary);
}

body.vf-public .navbar-toggler {
  border: 1px solid rgba(148, 163, 184, 0.5);
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
}

body.vf-public .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 43, 43, 0.18);
}

body.vf-public .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(17,24,39,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body.vf-public .btn-primary {
  background: linear-gradient(135deg, var(--cta-color) 0%, var(--primary-dark) 100%);
  border-color: rgba(0, 0, 0, 0);
  font-weight: 700;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  box-shadow: 0 14px 26px rgba(255, 43, 43, 0.22);
}

body.vf-public .btn-primary:hover {
  background: linear-gradient(135deg, #ff4040 0%, var(--primary-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(255, 43, 43, 0.3);
  filter: brightness(1.02);
}

.vf-public-main {
  min-height: calc(100vh - 140px);
  padding-top: 6.5rem;
  padding-bottom: 3rem;
}

.vf-auth-shell {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.vf-auth-body {
  padding: 2.5rem;
}

.vf-auth-aside {
  padding: 2.5rem;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(255, 43, 43, 0.98) 0%, rgba(196, 22, 22, 0.98) 60%, rgba(255, 43, 43, 0.98) 100%);
  position: relative;
  overflow: hidden;
}

.vf-auth-aside::before {
  content: "";
  position: absolute;
  inset: -220px -260px auto -260px;
  height: 760px;
  background: radial-gradient(820px circle at 20% 35%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(940px circle at 80% 10%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 62%);
  pointer-events: none;
}

.vf-auth-aside > * {
  position: relative;
  z-index: 1;
}

.vf-auth-title {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

.vf-auth-subtitle {
  margin: 0 0 1.75rem;
  color: rgba(17, 24, 39, 0.72);
}

.vf-auth-subtitle.vf-auth-subtitle-inverse {
  color: rgba(255, 255, 255, 0.9);
}

.vf-auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 43, 43, 0.08);
  border: 1px solid rgba(255, 43, 43, 0.16);
  color: var(--cta-color);
}

.vf-auth-kicker i {
  color: var(--cta-color);
}

.vf-form-label {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.vf-form-control {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 1rem;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  background: rgba(255, 255, 255, 0.92);
}

.vf-form-control:focus {
  border-color: rgba(255, 43, 43, 0.5);
  box-shadow: 0 0 0 0.25rem rgba(255, 43, 43, 0.14);
  outline: none;
}

.vf-button-primary {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  padding: 0.95rem 1.25rem;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, var(--cta-color) 0%, var(--primary-dark) 100%);
  box-shadow: 0 16px 30px rgba(255, 43, 43, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.vf-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(255, 43, 43, 0.32);
  filter: brightness(1.02);
  color: #ffffff;
}

.vf-auth-links {
  text-align: center;
  margin-top: 1.25rem;
  color: var(--text-secondary);
}

.vf-auth-links a {
  color: var(--cta-color);
  text-decoration: none;
  font-weight: 700;
}

.vf-auth-links a:hover {
  text-decoration: underline;
}

.vf-aside-title {
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
}

.vf-aside-lead {
  margin: 0 0 1.5rem;
  opacity: 0.9;
}

.vf-aside-feature {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.vf-aside-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.vf-aside-icon i {
  color: #ffffff;
}

.vf-aside-text h4 {
  margin: 0 0 0.25rem;
  font-weight: 800;
  font-size: 1rem;
}

.vf-aside-text p {
  margin: 0;
  opacity: 0.85;
  font-size: 0.9rem;
}

.footer {
  padding: 3.75rem 0 2rem;
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}

.footer-brand {
  font-weight: 900;
  margin: 0 0 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: nowrap;
}

.footer-brand i {
  color: var(--cta-color);
}

.footer-brand .brand-logo {
  height: 38px;
  width: auto;
  max-width: 240px;
  display: block;
}

.footer-text {
  margin: 0;
  color: var(--text-secondary);
}

.footer-title {
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--text-primary);
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--cta-color);
  text-decoration: none;
}

.footer-divider {
  border-color: rgba(148, 163, 184, 0.25);
  margin: 3rem 0 2rem;
  opacity: 1;
}

.footer-meta {
  margin: 0;
  color: var(--text-secondary);
}

.footer-meta a {
  color: inherit;
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--cta-color);
  text-decoration: none;
}

.vf-loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.vf-loading-inner {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 18px;
  padding: 1.5rem 1.75rem;
  width: min(520px, 100%);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.vf-spinner {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid rgba(255, 43, 43, 0.2);
  border-top-color: rgba(255, 43, 43, 0.9);
  margin: 0 auto 0.75rem;
  animation: vfSpin 0.9s linear infinite;
}

@keyframes vfSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 991px) {
  .vf-auth-shell {
    grid-template-columns: 1fr;
  }

  .vf-auth-aside {
    order: -1;
  }

  body.vf-login .vf-auth-aside {
    display: none;
  }

  body.vf-login .footer {
    display: none;
  }
}

@media (max-width: 768px) {
  .vf-public-main {
    padding-top: 5.75rem;
    padding-bottom: 2.5rem;
  }

  body.vf-login .vf-public-main {
    padding-top: 5.25rem;
    padding-bottom: 1.75rem;
  }

  body.vf-public .btn,
  body.vf-public .vf-button-primary,
  body.vf-public .nav-link,
  body.vf-public .footer-link,
  body.vf-public .vf-password-toggle {
    min-height: 48px;
  }

  body.vf-public .vf-password-toggle {
    min-width: 48px;
  }

  body.vf-public .nav-link,
  body.vf-public .footer-link {
    display: inline-flex;
    align-items: center;
  }

  .footer .footer-link,
  .navbar .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    border-radius: 12px;
  }

  .navbar .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  body.vf-public .vf-auth-body p,
  body.vf-public .vf-auth-body li {
    max-width: 75ch;
  }

  body.vf-public .legal-page .legal-content {
    max-width: 75ch;
    margin-left: auto;
    margin-right: auto;
  }

  .vf-auth-body,
  .vf-auth-aside {
    padding: 1.75rem;
  }

  .vf-auth-title {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

@media (min-width: 1024px) {
  body.vf-public {
    font-size: 1rem;
  }
}
