:root {
  --codex-auth-bg: #f6f8fb;
}

body.venix-auth {
  min-height: 100vh;
  margin: 0;
  background: var(--codex-auth-bg);
}

.venix-auth a,
.venix-auth a:hover {
  text-decoration: none !important;
}

.auth-site-nav {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 max(1rem, calc((100vw - 72rem) / 2));
  border-bottom: 1px solid var(--tblr-border-color);
  background: var(--tblr-bg-surface);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--tblr-body-color);
  font-weight: 600;
  text-decoration: none;
}

.home-brand img {
  width: 2rem;
  height: 2rem;
}

.auth-site-nav nav {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.auth-site-nav nav a {
  min-height: 2.25rem;
  display: inline-flex;
  align-items: center;
  padding: 0 .75rem;
  border-radius: var(--tblr-border-radius);
  color: var(--tblr-secondary);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
}

.auth-site-nav nav a:hover {
  color: var(--tblr-primary);
  background: var(--tblr-active-bg);
}

.auth-site-nav .home-nav-button {
  color: #fff;
  background: var(--tblr-primary);
}

.auth-site-nav .home-nav-button:hover {
  color: #fff;
  background: var(--tblr-primary-darken);
}

.auth-shell {
  min-height: calc(100vh - 4rem);
  display: grid;
  place-items: start center;
  padding: 4rem 1rem 2rem;
}

.auth-panel-wrap {
  width: min(100%, 27rem);
}

.auth-panel {
  width: 100%;
  padding: 2rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius-lg);
  background: var(--tblr-bg-surface);
  box-shadow: var(--tblr-shadow-sm);
}

.auth-panel-wide {
  width: min(100vw - 2rem, 35rem);
}

.auth-title {
  margin: 0 0 1.5rem;
  color: var(--tblr-body-color);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}

.auth-form,
.auth-field {
  display: grid;
}

.auth-form {
  gap: 1rem;
}

.auth-field {
  gap: .375rem;
}

.auth-field label {
  margin: 0;
  color: var(--tblr-body-color);
  font-size: .875rem;
  font-weight: 500;
}

.auth-field input {
  width: 100%;
  min-height: 2.5rem;
  padding: .4375rem .75rem;
  border: var(--tblr-border-width) solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  background: var(--tblr-bg-forms);
  color: var(--tblr-body-color);
  outline: 0;
}

.auth-field input:focus {
  border-color: var(--tblr-primary);
  box-shadow: 0 0 0 .25rem rgba(var(--tblr-primary-rgb), .12);
}

.auth-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}

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

.auth-captcha {
  width: 6.5rem;
  height: 2.5rem;
  border: 1px solid var(--tblr-border-color);
  border-radius: var(--tblr-border-radius);
  object-fit: cover;
  cursor: pointer;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.auth-link {
  color: var(--tblr-primary);
  font-weight: 500;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: none;
}

.auth-button {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4375rem 1rem;
  border: 1px solid var(--tblr-primary);
  border-radius: var(--tblr-border-radius);
  background: var(--tblr-primary);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.auth-button:hover {
  background: var(--tblr-primary-darken);
}

.auth-button:disabled {
  cursor: not-allowed;
  opacity: .65;
}

.auth-button-secondary {
  border-color: var(--tblr-border-color);
  background: var(--tblr-bg-surface);
  color: var(--tblr-body-color);
}

.auth-button-secondary:hover {
  background: var(--tblr-bg-surface-secondary);
}

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

.auth-row-inline .auth-button {
  flex: 0 0 auto;
  min-width: 7.75rem;
}

.auth-message {
  display: none;
  padding: .75rem;
  border-radius: var(--tblr-border-radius);
  font-size: .875rem;
}

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

.auth-message.success {
  color: var(--tblr-success);
  background: rgba(var(--tblr-success-rgb), .1);
}

.auth-message.error {
  color: var(--tblr-danger);
  background: rgba(var(--tblr-danger-rgb), .1);
}

.auth-message.warning {
  color: var(--tblr-warning);
  background: rgba(var(--tblr-warning-rgb), .12);
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: none;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, .45);
}

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

.auth-modal-panel {
  width: min(42rem, 100%);
  max-height: min(45rem, 86vh);
  overflow: auto;
  padding: 1.5rem;
  border-radius: var(--tblr-border-radius-lg);
  background: var(--tblr-bg-surface);
  box-shadow: var(--tblr-shadow-lg);
}

.auth-modal-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
}

.auth-modal-panel ol {
  padding-left: 1.25rem;
  color: var(--tblr-secondary);
  line-height: 1.65;
}

.auth-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
}

@media (max-width: 36rem) {
  .auth-site-nav {
    padding: 0 .875rem;
  }

  .auth-site-nav nav a {
    padding: 0 .5rem;
  }

  .auth-shell {
    padding: 1.75rem .875rem;
  }

  .auth-panel {
    padding: 1.25rem;
  }

  .auth-actions,
  .auth-modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-actions .auth-button,
  .auth-modal-actions .auth-button {
    width: 100%;
  }
}
