/* ============================================ */
/* صفحات ورود و ثبت‌نام */
/* نسخه: 3.0 (با تب مدیر) */
/* ============================================ */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
  animation: fadeIn 0.5s ease;
}

.auth-logo {
  font-size: 60px;
  margin-bottom: 15px;
  filter: drop-shadow(0 0 20px var(--green-300));
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.auth-title {
  font-size: 28px;
  font-weight: 900;
  color: var(--text-primary);
  text-shadow: 0 0 20px var(--green-300);
  margin-bottom: 8px;
}

[data-theme="light"] .auth-title {
  text-shadow: none;
}

.auth-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px;
  backdrop-filter: blur(15px);
  box-shadow: var(--shadow);
  animation: fadeIn 0.6s ease;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 25px;
  padding: 6px;
  background: var(--bg-input);
  border-radius: var(--radius);
}

.auth-tab {
  padding: 12px 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 12px;
  font-weight: 900;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.3;
}

.auth-tab.active {
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: white;
  box-shadow: 0 4px 15px rgba(13, 102, 39, 0.4);
}

.auth-tab:hover:not(.active) {
  background: var(--bg-card-hover);
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.auth-form h2 {
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-light);
  text-align: center;
  margin-bottom: 20px;
}

[data-theme="light"] .auth-form h2 {
  color: var(--green-900);
}

.auth-form .btn {
  width: 100%;
  margin-top: 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--gold);
  font-weight: 900;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ثبت‌نام - فرم بلندتر */
.register-form {
  display: grid;
  gap: 12px;
}

.register-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============================================ */
/* موبایل */
/* ============================================ */
@media (max-width: 600px) {
  .auth-card { padding: 22px; }
  .auth-title { font-size: 22px; }
  .auth-logo { font-size: 48px; }
  .auth-tabs { 
    grid-template-columns: 1fr; 
    gap: 6px;
  }
  .auth-tab {
    padding: 12px;
    font-size: 13px;
  }
  .register-row { grid-template-columns: 1fr; }
}
/* دکمه نصب PWA */
#installBtn {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 9998;

  padding: 14px 26px;
  border: 2px solid #fff7c2;
  border-radius: 30px;

  background: linear-gradient(
    45deg,
    #ffd700,
    #ff9500
  );

  color: #0f5233;
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;

  cursor: pointer;
  box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#installBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 32px rgba(255, 215, 0, 0.85);
}

#installBtn:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

#installBtn[hidden] {
  display: none !important;
}