/**
 * OZInvoice — تم ورود بر اساس LoginSample (گرادیان + حباب + کارت شیشه‌ای)
 * body.auth-compact
 */
@import url("../assets/css/fonts/vazirmatn.css");

@keyframes auth-float-bubbles {
  0% {
    transform: translateY(100vh) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) rotate(720deg);
    opacity: 0;
  }
}

@keyframes auth-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.auth-compact {
  font-family: "Vazirmatn FD", Vazirmatn, Tahoma, sans-serif;
  margin: 0;
  min-height: 100vh;
  /* اگر .auth-main پوشش کامل نداشت، پس‌زمینه همین‌جا هم دیده می‌شود */
  background: linear-gradient(135deg, #7e0101 0%, #c50a17 50%, #f68b8b 100%);
  background-attachment: fixed;
}

body.auth-compact .fas,
body.auth-compact .far,
body.auth-compact .fab {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900;
}

/* ناحیه اصلی: شفاف تا گرادیان body دیده شود؛ حباب‌ها روی همین لایه‌اند */
body.auth-compact .auth-main.v1 {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

body.auth-compact .auth-main.v1::before,
body.auth-compact .auth-main.v1::after {
  display: none;
}

/* لایه حباب‌ها */
body.auth-compact .auth-bg-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

body.auth-compact .auth-bg-animation span {
  position: absolute;
  display: block;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  animation: auth-float-bubbles 25s infinite;
  border-radius: 50%;
}

body.auth-compact .auth-bg-animation span:nth-child(1) {
  left: 25%;
  width: 80px;
  height: 80px;
  animation-delay: 0s;
  animation-duration: 20s;
}
body.auth-compact .auth-bg-animation span:nth-child(2) {
  left: 10%;
  width: 20px;
  height: 20px;
  animation-delay: 2s;
  animation-duration: 12s;
}
body.auth-compact .auth-bg-animation span:nth-child(3) {
  left: 70%;
  width: 40px;
  height: 40px;
  animation-delay: 4s;
  animation-duration: 18s;
}
body.auth-compact .auth-bg-animation span:nth-child(4) {
  left: 40%;
  width: 60px;
  height: 60px;
  animation-delay: 0s;
  animation-duration: 22s;
}
body.auth-compact .auth-bg-animation span:nth-child(5) {
  left: 65%;
  width: 20px;
  height: 20px;
  animation-delay: 0s;
  animation-duration: 15s;
}
body.auth-compact .auth-bg-animation span:nth-child(6) {
  left: 75%;
  width: 110px;
  height: 110px;
  animation-delay: 3s;
  animation-duration: 25s;
}
body.auth-compact .auth-bg-animation span:nth-child(7) {
  left: 35%;
  width: 150px;
  height: 150px;
  animation-delay: 7s;
  animation-duration: 30s;
}
body.auth-compact .auth-bg-animation span:nth-child(8) {
  left: 50%;
  width: 25px;
  height: 25px;
  animation-delay: 15s;
  animation-duration: 20s;
}
body.auth-compact .auth-bg-animation span:nth-child(9) {
  left: 20%;
  width: 15px;
  height: 15px;
  animation-delay: 2s;
  animation-duration: 35s;
}
body.auth-compact .auth-bg-animation span:nth-child(10) {
  left: 85%;
  width: 90px;
  height: 90px;
  animation-delay: 0s;
  animation-duration: 28s;
}

body.auth-compact .auth-main.v1 > .auth-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
}

body.auth-compact .auth-main.v1 > .auth-wrapper > * {
  position: relative;
  z-index: 1;
}

/* کارت شیشه‌ای (login-card) */
body.auth-compact .auth-main .auth-form .card {
  position: relative;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: auth-fade-in-up 0.75s ease-out;
}

body.auth-compact .auth-main .auth-form .card::before {
  display: none;
}

body.auth-compact .auth-main .auth-form .card .card-body {
  padding: 2rem 1.75rem 1.5rem;
}

@media (max-width: 480px) {
  body.auth-compact .auth-main .auth-form .card .card-body {
    padding: 1.75rem 1.35rem 1.35rem;
  }
}

body.auth-compact .auth-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

body.auth-compact .auth-page-lead {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 0.85rem;
  line-height: 1.55;
}

body.auth-compact .auth-page-lead a {
  color: #fff !important;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.auth-compact .auth-page-lead strong {
  font-weight: 700;
  color: #fff;
}

/* unified-auth — وسط‌چین */
body.auth-compact .auth-unified-form .form-label {
  display: block;
  width: 100%;
  text-align: center;
  color: rgba(255, 255, 255, 0.92);
}

body.auth-compact .auth-unified-form .form-control:not(.otp-single-input) {
  
  margin-left: auto;
  margin-right: auto;
}

body.auth-compact .auth-unified-form .input-group {
  
  margin-left: auto;
  margin-right: auto;
}

body.auth-compact .auth-unified-form .alert {
  text-align: center;
}

body.auth-compact .auth-unified-form .form-check {
  text-align: center;
}

/* wrapper آیکن (مثل LoginSample) */
body.auth-compact .auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* دو ستون ثبت‌نام: عرض کامل داخل ستون */
body.auth-compact .auth-form .row .auth-input-wrap {
  max-width: none;
  width: 100%;
}

body.auth-compact .auth-input-wrap .auth-input-icon {
  position: absolute;
  inset-inline-end: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.65);
  font-size: 1.1rem;
  pointer-events: none;
  transition: color 0.25s ease, transform 0.25s ease;
  z-index: 2;
}

body.auth-compact .auth-input-wrap .form-control:focus ~ .auth-input-icon,
body.auth-compact .auth-input-wrap:focus-within .auth-input-icon {
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}

body.auth-compact .auth-input-wrap .form-control {
  width: 100%;
  padding: 14px 48px 14px 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.2s ease, background 0.2s ease;
}

body.auth-compact .auth-input-wrap .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

body.auth-compact .auth-input-wrap .form-control:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* گروه رمز + دکمه نمایش */
body.auth-compact .auth-input-wrap--password .input-group {
  width: 100%;
  max-width: none;
}

body.auth-compact .auth-input-wrap--password .form-control {
  flex: 1;
  border-radius: 12px 0 0 12px;
  border-inline-end: 0;
  padding: 14px 16px 14px 48px;
}

body.auth-compact .auth-input-wrap--password .btn-auth-toggle {
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-inline-start: 0;
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.8125rem;
  padding: 0 14px;
}

body.auth-compact .auth-input-wrap--password .btn-auth-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* آیکن قفل کنار لبه چپ فیلد رمز (متن LTR) */
body.auth-compact .auth-input-wrap--password .auth-input-icon {
  inset-inline-start: 16px;
  inset-inline-end: auto;
}

/* بدون آیکن کنار فیلد رمز (مثلاً صفحه ورود یکپارچه) */
body.auth-compact .auth-input-wrap--password-noicon .form-control {
  padding: 14px 16px !important;
}

/* بدون آیکن در فیلد موبایل / ورودی ساده */
body.auth-compact .auth-input-wrap--noicon .form-control {
  padding: 14px 16px !important;
}

body.auth-compact .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.9);
}

body.auth-compact .auth-form .card-body .form-label {
  display: block;
  text-align: center;
}

body.auth-compact .auth-form a.link-primary {
  color: #fff !important;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.auth-compact .auth-form .text-primary {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* فیلدهای بدون wrapper (ثبت‌نام / فراموشی) */
body.auth-compact .form-control {
  padding: 0.52rem 0.8rem;
  font-size: 0.9375rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.auth-compact .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

body.auth-compact .form-control:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

body.auth-compact .form-text {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.65) !important;
}

body.auth-compact .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

body.auth-compact .input-group .btn:not(.btn-auth-toggle) {
  padding: 0.45rem 0.7rem;
  font-size: 0.8125rem;
  border-radius: 0 12px 12px 0;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-left: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

body.auth-compact .input-group .form-control {
  border-radius: 12px 0 0 12px;
}

body.auth-compact .alert {
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.auth-compact .alert-info {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.3);
}

body.auth-compact .alert-success {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.45);
  color: #ecfdf5;
}

body.auth-compact .alert-warning {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.45);
  color: #fffbeb;
}

body.auth-compact .alert-danger {
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.45);
  color: #fff;
}

body.auth-compact .text-danger,
body.auth-compact .text-danger.small {
  color: #fecaca !important;
}

/* دکمه اصلی سفید (btn-login) */
body.auth-compact .btn {
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.auth-compact .btn-primary {
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.92) 100%);
  color: #667eea !important;
  font-size: 1.05rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

body.auth-compact .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  color: #5a67d8 !important;
}

body.auth-compact .btn-primary:active {
  transform: translateY(-1px);
}

body.auth-compact .btn-lg {
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
}

body.auth-compact .form-check-label {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.85) !important;
}

body.auth-compact .form-check-input {
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(255, 255, 255, 0.15);
}

body.auth-compact .form-check-input:checked {
  background-color: #667eea;
  border-color: #fff;
}

body.auth-compact .auth-link-muted {
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.95) !important;
}

body.auth-compact .auth-link-muted:hover {
  text-decoration: underline;
  color: #fff !important;
}

body.auth-compact .auth-ltr-input {
  direction: ltr;
  text-align: center;
}

/* شماره موبایل LTR چسبیده به لبه راست باکس (مثلاً فراموشی رمز) */
body.auth-compact .auth-input-wrap--mobile-end .form-control.auth-ltr-input {
  text-align: right;
}

body.auth-compact .otp-single-input {
  font-size: 1.1rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.35em !important;
  width: 100%;
  max-width: 200px;
  padding: 12px 10px !important;
  border-radius: 12px !important;
  border: 2px solid rgba(255, 255, 255, 0.25) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  text-align: center;
}

body.auth-compact .otp-single-input::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

body.auth-compact .otp-single-input:focus {
  border-color: rgba(255, 255, 255, 0.55) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
  outline: none;
}

body.auth-compact .otp-single-input.filled {
  border-color: rgba(52, 211, 153, 0.8) !important;
  background: rgba(255, 255, 255, 0.18) !important;
}

body.auth-compact .otp-single-input.error {
  border-color: rgba(248, 113, 113, 0.9) !important;
  background: rgba(127, 29, 29, 0.25) !important;
}

body.auth-compact .otp-single-input.success {
  border-color: rgba(74, 222, 128, 0.9) !important;
  background: rgba(20, 83, 45, 0.25) !important;
}

body.auth-compact .auth-footer-bar {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

body.auth-compact .btn-outline-secondary {
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.95) !important;
  background: rgba(255, 255, 255, 0.08);
}

body.auth-compact .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
  color: #fff !important;
}

body.auth-compact .btn-outline-primary {
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06);
}

body.auth-compact .btn-outline-primary:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff !important;
}

body.auth-compact .btn-link {
  color: rgba(255, 255, 255, 0.9) !important;
}

body.auth-compact .btn-link:hover {
  color: #fff !important;
}

/* فوتر کنار فرم */
body.auth-compact .auth-sidefooter {
  color: rgba(255, 255, 255, 0.9);
}

body.auth-compact .auth-sidefooter a {
  color: #fff !important;
}

body.auth-compact .auth-sidefooter .footer-link a {
  color: rgba(255, 255, 255, 0.95) !important;
}

body.auth-compact .auth-sidefooter hr {
  border-color: rgba(255, 255, 255, 0.2);
}

/* لوگوی سفید از PHP؛ بدون invert */
body.auth-compact .auth-sidefooter .img-brand {
  filter: none;
  opacity: 0.98;
  max-height: 40px;
}

/* Register: shake */
@keyframes auth-btn-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-4px);
  }
  40%,
  80% {
    transform: translateX(4px);
  }
}

body.auth-compact .btn-shake {
  animation: auth-btn-shake 0.45s;
  border: 2px solid #fbbf24 !important;
  box-shadow: 0 0 12px rgba(251, 191, 36, 0.45) !important;
}

body.auth-compact #register_submit_btn {
  transition: all 0.25s ease;
}

body.auth-compact #register_submit_btn.btn-secondary {
  opacity: 0.72;
}

body.auth-compact #register_submit_btn.btn-success {
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  body.auth-compact .auth-bg-animation span,
  body.auth-compact .auth-main .auth-form .card {
    animation: none !important;
  }

  body.auth-compact .btn-primary:hover {
    transform: none;
  }
}
