/* Capzo Auth Page — Minimal Centered Dark Slate & Teal Card */

.auth-body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font, "Vazirmatn", Tahoma, sans-serif);
  color: var(--text, #eef2f7);
  background-color: #07090e;
  background-image:
    radial-gradient(ellipse 70% 50% at 20% -5%, rgba(20, 184, 166, 0.14), transparent 60%),
    radial-gradient(ellipse 60% 45% at 85% 105%, rgba(56, 189, 248, 0.08), transparent 55%),
    linear-gradient(180deg, #0b0f17 0%, #07090e 100%);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.auth-backdrop-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.55), transparent 76%);
  -webkit-mask-image: radial-gradient(circle at 50% 45%, rgba(0, 0, 0, 0.55), transparent 76%);
  z-index: 0;
}

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem) clamp(0.85rem, 3vw, 1.5rem);
}

.auth-frame {
  width: 100%;
  max-width: 410px;
  display: grid;
  grid-template-columns: 1fr;
  background: rgba(15, 19, 28, 0.9);
  border: 1px solid rgba(45, 212, 191, 0.16);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.52),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.auth-card {
  padding: clamp(1.6rem, 4vw, 2.25rem);
  display: flex;
  flex-direction: column;
  position: relative;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2.5px;
  background: linear-gradient(90deg, transparent, #2dd4bf, #5eead4, transparent);
}

.auth-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.auth-title {
  margin: 0 0 1.15rem;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-align: center;
  color: #f4f7fb;
}

.auth-plugin-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  margin-bottom: 1.1rem;
  border-radius: 11px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.24);
  color: #ccfbf1;
  font-size: 0.8rem;
  font-weight: 600;
}

.auth-plugin-banner svg {
  flex-shrink: 0;
  color: #2dd4bf;
}

/* Segmented Tabs */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.3rem;
  padding: 0.28rem;
  margin-bottom: 1.25rem;
  border-radius: 13px;
  background: rgba(8, 10, 15, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.75rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #8b97a8;
  text-decoration: none;
  transition: color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.auth-tab:hover {
  color: #e2e8f0;
}

.auth-tab.is-active {
  color: #042f2e;
  background: linear-gradient(135deg, #5eead4, #2dd4bf);
  box-shadow: 0 5px 18px rgba(45, 212, 191, 0.24);
  font-weight: 700;
}

/* Alert */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  font-size: 0.83rem;
  line-height: 1.5;
  background: rgba(239, 68, 68, 0.11);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fecaca;
}

.auth-alert svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #f87171;
}

/* Form Fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #cbd5e1;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  inset-inline-start: 13px;
  color: #64748b;
  pointer-events: none;
  display: flex;
  align-items: center;
  transition: color 180ms ease;
}

.auth-input-wrap input {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 2.6rem 0.65rem 2.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(8, 11, 17, 0.85);
  color: #f1f5f9;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.auth-input-wrap input[dir="ltr"] {
  text-align: left;
  padding: 0.65rem 2.75rem 0.65rem 2.6rem;
}

.auth-input-wrap input::placeholder {
  color: #475569;
  font-size: 0.83rem;
}

.auth-input-wrap input:focus {
  border-color: #2dd4bf;
  background: rgba(10, 15, 23, 0.98);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.auth-input-wrap input.is-valid {
  border-color: rgba(45, 212, 191, 0.45);
}

.auth-input-wrap input.is-invalid {
  border-color: rgba(248, 113, 113, 0.55);
}

.auth-input-wrap:focus-within .auth-input-icon {
  color: #2dd4bf;
}

.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 40px #0a0f17 inset !important;
  -webkit-text-fill-color: #f1f5f9 !important;
  caret-color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.45);
}

.auth-eye-btn {
  position: absolute;
  inset-inline-end: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 150ms ease, background-color 150ms ease;
}

.auth-input-wrap input[dir="ltr"] ~ .auth-eye-btn {
  inset-inline-end: auto;
  inset-inline-start: auto;
  right: 8px;
  left: auto;
}

.auth-eye-btn:hover {
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.08);
}

.auth-eye-btn .hidden {
  display: none;
}

.auth-field-hint {
  font-size: 0.73rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-top: 0.15rem;
}

.auth-inline-error {
  margin: 0.1rem 0 0;
  font-size: 0.78rem;
  color: #fda4af;
  line-height: 1.45;
}

.auth-inline-error.hidden {
  display: none;
}

/* Submit CTA */
.auth-submit-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 0.3rem;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 55%, #0d9488 100%);
  color: #042f2e;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow:
    0 10px 26px rgba(20, 184, 166, 0.26),
    0 1px 0 rgba(255, 255, 255, 0.28) inset;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow:
    0 14px 32px rgba(45, 212, 191, 0.34),
    0 1px 0 rgba(255, 255, 255, 0.32) inset;
}

.auth-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.auth-spinner {
  width: 17px;
  height: 17px;
  border: 2.2px solid rgba(4, 47, 46, 0.25);
  border-top-color: #042f2e;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
  display: none;
}

.auth-submit-btn.is-loading .auth-spinner {
  display: inline-block;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-footer-links {
  margin-top: 1.25rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.81rem;
}

.auth-footer-links a {
  color: #8b97a8;
  text-decoration: none;
  transition: color 150ms ease;
}

.auth-footer-links a:hover {
  color: #5eead4;
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .auth-main {
    padding: 1rem 0.75rem 1.75rem;
    align-items: flex-start;
  }

  .auth-frame {
    border-radius: 18px;
  }

  .auth-card {
    padding: 1.4rem 1.15rem;
  }

  .auth-input-wrap input {
    font-size: 16px;
  }

  .auth-title {
    font-size: 1.18rem;
  }
}
