:root {
  --auth-accent: #5dd89e;
  --auth-accent-dark: #22b77c;
  --auth-ink: #111827;
  --auth-muted: #6b7280;
  --auth-line: #e5e7eb;
  --auth-panel: rgba(255, 255, 255, 0.94);
  --auth-home-ink: #ffffff;
  --auth-home-line: rgba(255, 255, 255, 0.26);
  --auth-home-dark: #173c72;
}

* {
  box-sizing: border-box;
}

body.venix-auth {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--auth-ink);
  background:
    linear-gradient(45deg, rgba(42, 27, 161, 0.7), rgba(29, 210, 177, 0.7) 100%),
    url("/theme/venix/images/home.jpeg") center center / cover no-repeat fixed;
  background-color: var(--auth-home-dark);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.auth-site-nav,
.auth-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.auth-site-nav {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0;
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
  text-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
}

.home-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.auth-site-nav nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-site-nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.auth-site-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.home-nav-button {
  color: #253047 !important;
  background: #fff;
}

.auth-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  place-content: center;
  padding: 22px 0 42px;
}

.auth-story {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px 56px;
  overflow: hidden;
}

.auth-story::before {
  content: "";
  position: absolute;
  inset: 24px;
  border: 1px solid rgba(17, 24, 39, 0.06);
  border-radius: 8px;
  pointer-events: none;
}

.auth-brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-ink);
  font-weight: 700;
  font-size: 20px;
  text-decoration: none;
  width: fit-content;
}

.auth-brand img {
  width: 36px;
  height: 36px;
}

.auth-story-main {
  position: relative;
  max-width: 680px;
}

.auth-kicker {
  margin: 0 0 16px;
  color: var(--auth-accent-dark);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.auth-story h1 {
  margin: 0;
  max-width: 620px;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-story-copy {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--auth-muted);
  font-size: 16px;
  line-height: 1.7;
}

.auth-illustration {
  width: min(460px, 76%);
  margin-top: 34px;
  filter: drop-shadow(0 22px 36px rgba(17, 24, 39, 0.12));
}

.auth-highlights {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 760px;
}

.auth-highlight {
  padding: 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(10px);
}

.auth-highlight strong {
  display: block;
  font-size: 14px;
}

.auth-highlight span {
  display: block;
  margin-top: 5px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.45;
}

.auth-panel-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.auth-panel {
  width: 100%;
  max-width: 440px;
  padding: 34px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background: var(--auth-panel);
  box-shadow: 0 24px 60px rgba(17, 24, 39, 0.12);
}

.auth-panel-wide {
  max-width: 560px;
}

.auth-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-title + .auth-form {
  margin-top: 24px;
}

.auth-subtitle {
  margin: 10px 0 26px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field label {
  color: #374151;
  font-size: 13px;
  font-weight: 600;
}

.auth-input,
.auth-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
  color: var(--auth-ink);
  font-size: 14px;
  outline: none;
  padding: 10px 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus,
.auth-field input:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 4px rgba(93, 216, 158, 0.18);
}

.auth-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-row > input {
  min-width: 0;
  flex: 1 1 auto;
}

.auth-row .auth-field,
.auth-row .auth-input {
  flex: 1;
}

.auth-row-inline .auth-button,
.auth-row-inline .auth-captcha {
  flex: 0 0 auto;
}

.auth-row-inline .auth-button {
  min-width: 112px;
}

.auth-captcha {
  width: 104px;
  height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.auth-link {
  color: var(--auth-accent-dark);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.auth-link:hover {
  color: #13875c;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--auth-accent);
  color: #062016;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 18px;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.auth-button:hover {
  background: #4ec991;
  box-shadow: 0 12px 22px rgba(93, 216, 158, 0.28);
  transform: translateY(-1px);
}

.auth-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.auth-button-secondary {
  border: 1px solid var(--auth-line);
  background: #fff;
  color: var(--auth-ink);
}

.auth-button-secondary:hover {
  background: #f9fafb;
  box-shadow: none;
}

.auth-button-block {
  width: 100%;
}

.auth-message {
  display: none;
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.auth-message.is-visible {
  display: block;
}

.auth-message.success {
  background: rgba(93, 216, 158, 0.16);
  color: #0f6848;
}

.auth-message.error {
  background: rgba(251, 44, 54, 0.1);
  color: #b4232a;
}

.auth-message.warning {
  background: rgba(239, 177, 0, 0.14);
  color: #805d00;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 24, 39, 0.5);
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal-panel {
  width: min(680px, 100%);
  max-height: min(760px, 86vh);
  overflow: auto;
  border-radius: 8px;
  background: #fff;
  padding: 26px;
  box-shadow: 0 26px 80px rgba(17, 24, 39, 0.26);
}

.auth-modal-panel h2 {
  margin: 0 0 16px;
  font-size: 22px;
}

.auth-modal-panel ol {
  margin: 0;
  padding-left: 20px;
  color: #374151;
  font-size: 14px;
  line-height: 1.7;
}

.auth-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}

@media (max-width: 980px) {
  body.venix-auth {
    background:
      linear-gradient(45deg, rgba(42, 27, 161, 0.74), rgba(29, 210, 177, 0.72) 100%),
      url("/theme/venix/images/home.jpeg") center center / cover no-repeat fixed;
  }

  .auth-site-nav {
    align-items: center;
    flex-direction: row;
    padding: 18px 0;
  }

  .auth-site-nav nav {
    justify-content: flex-end;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel-wrap {
    padding: 0;
  }
}

@media (max-width: 560px) {
  .auth-site-nav,
  .auth-shell {
    width: min(100% - 28px, 1180px);
  }

  .auth-site-nav nav {
    width: auto;
    gap: 6px;
  }

  .auth-site-nav a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 13px;
  }

  .home-brand {
    gap: 8px;
    font-size: 16px;
  }

  .home-brand img {
    width: 30px;
    height: 30px;
  }

  .auth-shell {
    padding: 14px 0 30px;
  }

  .auth-panel {
    padding: 24px;
  }

  .auth-actions,
  .auth-row:not(.auth-row-inline),
  .auth-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-row-inline {
    align-items: center;
    flex-direction: row;
  }

  .auth-captcha {
    width: 100%;
  }

  .auth-row-inline .auth-captcha {
    width: 104px;
  }
}
