:root {
  --bg: #0b0e14;
  --bg-2: #12172245;
  --card: #0d0f1433;
  --border: #ffffff1a;
  --text: #f5f6f8;
  --muted: #b7bec9;
  --accent: #7c9bff;
  --accent-2: #b26cff;
  --success: #4ade80;
  --error: #f87171;
  --nav-height: 66px;
}

@media (max-width: 480px) {
  :root {
    --nav-height: 58px;
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background-color: #0a0a0b;
  background-image: url('/bg-leather-pattern-128.png');
  background-repeat: repeat;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-top: calc(24px + var(--nav-height));
  overflow: hidden;
  background-image: url('/background_mainlogo.png');
  background-size: cover;
  background-position: center var(--nav-height);
  background-repeat: no-repeat;
}

@media (min-width: 700px) {
  .wrap {
    background-attachment: fixed;
  }
}

.wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 60% at 50% 40%, #00000000 0%, #05060980 70%, #050609d9 100%);
  pointer-events: none;
}

.glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(40% 40% at 30% 20%, var(--accent) 0%, transparent 60%),
    radial-gradient(35% 35% at 80% 70%, var(--accent-2) 0%, transparent 60%);
  opacity: 0.15;
  filter: blur(60px);
  pointer-events: none;
}

.card {
  position: relative;
  z-index: 1;
  max-width: 560px;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  box-shadow: 0 20px 60px #00000066;
  text-align: center;
  margin-top: calc(330px + var(--nav-height) + 115px);
}

@media (min-width: 700px) {
  .card {
    margin-top: calc(120px + var(--nav-height) + 115px);
  }
}

.badge {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: #7c9bff1a;
  border: 1px solid #7c9bff33;
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 20px;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.25;
  margin: 0 0 12px;
}

.sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 32px;
}

form {
  margin: 0 auto;
}

.field-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="email"],
input[type="text"],
input[type="password"] {
  flex: 1 1 220px;
  min-width: 0;
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff0d;
  color: var(--text);
  font-size: 1rem;
}

input[type="email"]::placeholder,
input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: var(--muted);
}

input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #7c9bff33;
}

.field-label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0 0 6px;
}

#login-form .field-label:not(:first-child) {
  margin-top: 18px;
}

#login-form button {
  width: 100%;
  margin-top: 24px;
}

.login-keyhole {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  display: block;
}

button {
  padding: 14px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0e14;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.message {
  min-height: 1.4em;
  margin: 16px 0 0;
  font-size: 0.9rem;
}

.message.success {
  color: var(--success);
}

.message.error {
  color: var(--error);
}

.fine-print {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.badge-404 {
  font-size: 20px;
  padding: 10px 22px;
}

.footer-style-link,
.footer-style-link:visited {
  display: inline-block;
  margin-top: 8px;
  color: var(--muted);
  text-decoration: none;
}

.footer-style-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

.notfound-home-btn:hover {
  transform: translateY(-1px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.features {
  position: relative;
  z-index: 1;
  padding: 24px 24px 60px;
}

.logo-divider {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-bottom: 39px;
}

.logo-divider img {
  width: 20px;
  height: 20px;
  display: block;
}

@media (max-width: 480px) {
  .logo-divider img {
    width: 16px;
    height: 16px;
  }
}

.subheadline {
  text-align: center;
  color: var(--text);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  max-width: 700px;
  margin: 0 auto 32px;
}

.feature-col a {
  display: block;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.feature-col a:hover {
  transform: translateY(-3px);
  opacity: 0.9;
}

.feature-col a:link,
.feature-col a:visited,
.feature-col a:link .feature-label,
.feature-col a:visited .feature-label,
.feature-col a:link .feature-label span,
.feature-col a:visited .feature-label span {
  color: var(--muted) !important;
  text-decoration: none !important;
}

.feature-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.feature-label-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.features-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.feature-img {
  display: block;
  width: 233px;
  max-width: 233px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  border: 2px solid #b5b4b11a;
}

.feature-divider {
  width: 2px;
  align-self: stretch;
  background: #b5b4b133;
}

@media (max-width: 700px) {
  .feature-divider {
    display: none;
  }
  .features-inner {
    flex-direction: column;
    align-items: center;
  }
}

.site-footer {
  position: relative;
  z-index: 1;
  background-color: #0a0a0b;
  background-image: url('/bg-leather-pattern-128.png');
  background-repeat: repeat;
  text-align: center;
  padding: 20px 24px;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1080px;
  height: 2px;
  background: #b5b4b133;
}

.footer-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: 8px;
}

.site-footer a,
.site-footer a:visited {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer .dot {
  margin: 0 8px;
  color: var(--border);
}

.site-footer .divider {
  margin: 0 14px;
  color: var(--border);
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 50;
  background: #0a0a0bbf;
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.site-nav-inner {
  max-width: 1080px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.site-logo {
  display: flex;
  margin-right: auto;
  transition: opacity 0.15s ease;
}

.site-logo:hover {
  opacity: 0.85;
}

@media (min-width: 700px) {
  .site-logo {
    position: absolute;
    top: 50%;
    left: calc(50% - 280px - 139px);
    transform: translateY(-50%);
    margin-right: 0;
  }
}

.site-logo img {
  width: 40px;
  height: 40px;
  display: block;
}

.site-nav-divider {
  color: var(--border);
  font-size: 1.1rem;
  line-height: 1;
}

.crm-login {
  display: flex;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.crm-login:hover {
  transform: translateY(-2px);
  filter: brightness(1.25);
}

.crm-login img {
  width: 32px;
  height: 32px;
  display: block;
}

.crm-login:hover {
  color: #ffffff;
}

.social-nav {
  display: flex;
  gap: 16px;
}

.social-nav a {
  display: flex;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.social-nav a:hover {
  transform: translateY(-2px);
  filter: brightness(1.25);
}

.social-nav img {
  width: 34px;
  height: 34px;
  display: block;
}

.social-nav img.icon-facebook {
  width: 38px;
  height: 38px;
  position: relative;
  top: -1px;
}

@media (max-width: 480px) {
  .site-nav-inner {
    padding: 0 16px;
    gap: 12px;
  }
  .site-logo img {
    width: 32px;
    height: 32px;
  }
  .crm-login img {
    width: 27px;
    height: 27px;
  }
  .social-nav {
    gap: 10px;
  }
  .social-nav img {
    width: 28px;
    height: 28px;
  }
  .social-nav img.icon-facebook {
    width: 31px;
    height: 31px;
  }
  .crm-login {
    font-size: 0.78rem;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 36px 24px;
  }
  .field-row {
    flex-direction: column;
  }
  input[type="email"] {
    flex: none;
    width: 100%;
  }
  button {
    width: 100%;
  }
}
