/* Kentunez — dark auth pages (login / signup) */

.hidden {
  display: none !important;
}

body.kn-auth-page {
  background: #000;
  color: #fff;
  min-height: 100vh;
}

body.kn-auth-page .kn-nav {
  position: fixed;
}

.kn-auth {
  padding-top: calc(var(--header-offset) + var(--nav-h));
  padding-bottom: 48px;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.kn-auth__wrap {
  width: 100%;
  max-width: 480px;
  padding: 48px 24px 32px;
}

.kn-auth__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted-dim, #727272);
  text-decoration: none;
  margin-bottom: 28px;
  transition: color 0.15s ease;
}

.kn-auth__back:hover {
  color: #fff;
}

.kn-auth__head {
  text-align: center;
  margin-bottom: 32px;
}

.kn-auth__title {
  font-size: clamp(26px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 8px;
}

.kn-auth__sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted, #b3b3b3);
  margin: 0;
}

/* Card-less form area */
.kn-auth .auth-card {
  max-width: none;
  padding: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0;
  animation: none;
}

.kn-auth .auth-providers {
  margin-bottom: 0;
}

.kn-auth .auth-provider-btn {
  width: 100%;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.kn-auth .auth-provider-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.45);
}

.kn-auth .auth-provider-btn svg {
  flex-shrink: 0;
}

.kn-auth .auth-divider {
  margin: 28px 0;
  font-size: 13px;
  color: var(--muted-dim, #727272) !important;
}

.kn-auth .auth-divider::before,
.kn-auth .auth-divider::after {
  background: rgba(255, 255, 255, 0.14) !important;
}

/* Form layout */
.kn-auth-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.kn-auth .auth-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.kn-auth .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.kn-auth .form-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kn-auth .form-label {
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  margin-bottom: 0;
  text-transform: none;
  letter-spacing: 0;
}

.kn-auth .form-input,
.kn-auth .form-select {
  width: 100%;
  padding: 12px 14px !important;
  font-size: 15px !important;
  border-radius: 4px !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
  transition: border-color 0.15s ease, background 0.15s ease;
  color-scheme: dark;
}

.kn-auth .form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b3b3b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px !important;
}

.kn-auth .form-input::placeholder {
  color: rgba(255, 255, 255, 0.38) !important;
}

.kn-auth .form-input:focus,
.kn-auth .form-select:focus {
  border-color: rgba(255, 255, 255, 0.55) !important;
  background: rgba(255, 255, 255, 0.08) !important;
  box-shadow: none !important;
  outline: none;
}

.kn-auth select.form-input option {
  background: #121212;
  color: #fff;
}

.kn-auth .form-error {
  font-size: 12px;
  color: #ff6b6b;
}

.kn-auth .auth-submit {
  width: 100%;
  min-height: 48px;
  padding: 14px 20px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border-radius: 999px !important;
  background: var(--accent, #1ed760) !important;
  color: #121212 !important;
  border: none !important;
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.kn-auth .auth-submit:hover:not(:disabled) {
  transform: scale(1.02);
  background: var(--accent-hover, #1fdf64) !important;
}

.kn-auth .auth-submit--secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
}

.kn-auth .auth-submit--outline {
  background: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}

.kn-auth .auth-form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 8px;
  padding: 2px 0;
}

.kn-auth .auth-form-options .form-check {
  align-items: center;
}

.kn-auth .auth-form-options .form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent, #1ed760);
  margin: 0;
}

.kn-auth .auth-form-options a {
  font-size: 13px;
  font-weight: 600;
  color: #fff !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kn-auth .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.kn-auth .form-check span {
  font-size: 13px;
  color: var(--muted, #b3b3b3) !important;
  line-height: 1.5;
}

.kn-auth .form-check a {
  color: var(--accent, #1ed760);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.kn-auth .auth-switch {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: var(--muted, #b3b3b3) !important;
}

.kn-auth .auth-switch a {
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kn-auth .auth-legal {
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-dim, #727272) !important;
}

.kn-auth .auth-legal a {
  color: var(--muted, #b3b3b3);
  text-decoration: underline;
}

.kn-auth .auth-alert {
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.kn-auth .auth-alert-error {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.35);
  color: #ffb4b4;
  padding: 12px 14px;
}

.kn-auth .auth-alert-success {
  background: rgba(30, 215, 96, 0.12);
  border: 1px solid rgba(30, 215, 96, 0.35);
  color: #8ef0b0;
  padding: 12px 14px;
}

/* Signup steps */
.kn-auth .signup-steps {
  margin-bottom: 24px;
}

.kn-auth .signup-step .step-number {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted, #b3b3b3);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.kn-auth .signup-step.active .step-number {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.kn-auth .signup-step.completed .step-number,
.kn-auth .signup-step.done .step-number {
  background: var(--accent, #1ed760);
  color: #121212;
  border-color: var(--accent, #1ed760);
}

.kn-auth .step-label {
  color: var(--muted-dim, #727272);
}

.kn-auth .signup-step.active .step-label {
  color: #fff;
  font-weight: 600;
}

.kn-auth .signup-step-connector {
  background: rgba(255, 255, 255, 0.14);
}

/* Verification */
.kn-auth .verification-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.kn-auth .verification-header span {
  color: #fff;
  font-weight: 600;
}

.kn-auth .verification-header svg {
  stroke: var(--accent, #1ed760);
}

.kn-auth .code-input {
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: #fff !important;
}

.kn-auth .code-input:focus {
  border-color: rgba(255, 255, 255, 0.55) !important;
  outline: none;
}

.kn-auth .resend-text a {
  color: var(--accent, #1ed760);
}

.kn-auth #twoFaStep .form-input {
  border-radius: 4px !important;
}

.kn-auth #tfaBackLink {
  color: var(--muted, #b3b3b3) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.kn-auth #tfaBackLink:hover {
  color: #fff !important;
}

/* Two-factor step */
.kn-auth-tfa {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 0 4px;
  width: 100%;
}

.kn-auth-tfa__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 215, 96, 0.12);
  border: 1px solid rgba(30, 215, 96, 0.28);
  color: var(--accent, #1ed760);
  margin-bottom: 20px;
}

.kn-auth-tfa__title {
  font-size: clamp(22px, 3.5vw, 26px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 10px;
}

.kn-auth-tfa__sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted, #b3b3b3);
  margin: 0 auto;
  max-width: 340px;
}

.kn-auth-tfa__codes {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 380px;
  margin: 28px auto 24px;
}

.kn-auth-tfa__digit {
  width: 48px !important;
  height: 56px !important;
  flex: 0 0 48px;
  padding: 0 !important;
  text-align: center;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  letter-spacing: 0;
}

.kn-auth-tfa__digit:focus {
  border-color: var(--accent, #1ed760) !important;
  background: rgba(30, 215, 96, 0.08) !important;
}

.kn-auth-tfa .auth-alert {
  width: 100%;
  margin-bottom: 16px;
}

.kn-auth-tfa__submit {
  width: 100%;
  margin-top: 4px;
}

.kn-auth-tfa__back {
  margin-top: 22px;
  font-size: 13px;
  color: var(--muted-dim, #727272);
}

.kn-auth-tfa__back a {
  color: var(--muted, #b3b3b3);
  font-weight: 600;
}

.kn-auth-tfa__back a:hover {
  color: #fff;
}

.kn-auth .google-password-intro {
  color: var(--muted, #b3b3b3);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
}

.kn-auth .google-password-intro strong {
  color: #fff;
}

/* Success state */
.kn-auth .signup-success {
  text-align: center;
  padding: 24px 0 8px;
}

.kn-auth .success-title {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.kn-auth .success-message {
  color: var(--muted, #b3b3b3);
  margin-bottom: 24px;
}

.kn-auth .form-hint,
.kn-auth .verification-text,
.kn-auth .resend-text {
  color: var(--muted-dim, #727272) !important;
  font-size: 13px;
}

.kn-auth .verification-text strong {
  color: #fff;
}

.kn-auth .form-actions {
  display: flex;
  gap: 10px;
}

.kn-auth .form-actions .auth-submit {
  flex: 1;
}

.kn-auth .input-icon-wrap {
  position: relative;
}

.kn-auth .input-icon-right {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-dim, #727272);
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.kn-auth .input-icon-right:hover {
  color: #fff;
}

.kn-auth .input-icon-wrap .form-input {
  padding-right: 42px !important;
}

/* Maintenance overlay */
.kn-auth .auth-maint-overlay {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.kn-auth .auth-maint-overlay h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.kn-auth .auth-maint-overlay p {
  font-size: 0.9rem;
  color: var(--muted, #b3b3b3);
}

@media (max-width: 640px) {
  .kn-auth .form-row {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

@media (max-width: 480px) {
  .kn-auth__wrap {
    padding-top: 32px;
  }

  .kn-auth .auth-form {
    gap: 20px;
  }

  .kn-auth-tfa__codes {
    gap: 8px;
    max-width: 100%;
  }

  .kn-auth-tfa__digit {
    width: 44px !important;
    height: 52px !important;
    flex-basis: 44px;
    font-size: 1.2rem !important;
  }

  .kn-auth .form-actions {
    flex-direction: column;
  }

  .kn-auth .signup-steps {
    gap: 8px;
  }

  .kn-auth .step-label {
    font-size: 11px;
  }

  .kn-auth .signup-step-connector {
    width: 20px;
  }
}
