/* ==================== مودال احراز هویت ==================== */
.auth-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Vazirmatn", sans-serif;
}

.auth-modal-content {
  background: white;
  border-radius: 32px;
  max-width: 550px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 35px;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 28px;
  cursor: pointer;
  color: #999;
  transition: 0.3s;
}

.close-modal:hover {
  color: var(--danger);
}

.auth-modal-header {
  text-align: center;
  margin-bottom: 25px;
}

.auth-modal-header span {
  font-size: 60px;
}

.auth-modal-header h2 {
  margin-top: 10px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #eee;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: #666;
  font-family: "Vazirmatn", sans-serif;
  transition: 0.3s;
}

.auth-tab.active {
  color: var(--primary);
  border-bottom: 2px solid var(--primary);
}

.auth-panel {
  display: none;
}

.auth-panel.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark);
  font-size: 14px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 16px;
  font-family: "Vazirmatn", sans-serif;
  font-size: 14px;
  transition: 0.3s;
}

.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.role-selector {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.role-option {
  flex: 1;
  text-align: center;
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.role-option.selected {
  border-color: var(--primary);
  background: rgba(67, 97, 238, 0.05);
  transform: scale(1.02);
}

.role-option i {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.role-option span {
  font-size: 14px;
  font-weight: 500;
}

.auth-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  padding: 14px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.3s;
}

.auth-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.auth-error {
  background: #fee;
  color: var(--danger);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

.auth-success {
  background: #e6ffe6;
  color: #27ae60;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--gray);
}

.auth-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

/* ==================== پنل کاربری (داشبورد کناری) ==================== */
.user-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: white;
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 10001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  font-family: "Vazirmatn", sans-serif;
}

.user-panel.open {
  right: 0;
}

.user-panel-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  padding: 30px 25px;
  color: white;
  text-align: center;
}

.user-panel-avatar {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto 15px;
}

.user-panel-header h3 {
  font-size: 20px;
  margin-bottom: 5px;
}

.user-panel-role {
  font-size: 13px;
  opacity: 0.8;
}

.user-panel-stats {
  display: flex;
  padding: 20px;
  gap: 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.panel-stat {
  flex: 1;
  text-align: center;
}

.panel-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}

.panel-stat-label {
  font-size: 11px;
  color: var(--gray);
}

.user-panel-progress {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.progress-label {
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 8px;
}

.progress-bar-bg {
  background: #e0e0e0;
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 100%;
  width: 0%;
  transition: width 0.3s;
}

.user-panel-section {
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.user-panel-section h4 {
  font-size: 16px;
  color: var(--dark);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-progress-item {
  margin-bottom: 12px;
}

.lesson-name {
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.lesson-status {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 20px;
}

.lesson-status.completed {
  background: #e6ffe6;
  color: #27ae60;
}

.lesson-status.pending {
  background: #fff3e0;
  color: #f9c74f;
}

.user-panel-logout {
  width: calc(100% - 40px);
  margin: 20px;
  background: var(--danger);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 50px;
  cursor: pointer;
  font-family: "Vazirmatn", sans-serif;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.panel-close-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  color: white;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== دکمه باز کردن پنل ==================== */
.user-panel-toggle {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 55px;
  height: 55px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10000;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  border: none;
}

.user-panel-toggle i {
  font-size: 28px;
  color: white;
}

.user-panel-toggle:hover {
  transform: scale(1.05);
}

/* ==================== پنل استاد (Teacher Panel) ==================== */
.teacher-panel {
  background: white;
  border-radius: 24px;
  padding: 25px;
  margin-top: 20px;
}

.teacher-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.teacher-stat-card {
  background: linear-gradient(135deg, #f8f9fa, #fff);
  border-radius: 20px;
  padding: 20px;
  text-align: center;
  border: 1px solid #eee;
}

.teacher-stat-card i {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 10px;
}

.teacher-stat-card .stat-number {
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
}

.students-list {
  background: var(--light);
  border-radius: 20px;
  overflow: hidden;
}

.student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #e0e0e0;
  cursor: pointer;
  transition: 0.3s;
}

.student-row:hover {
  background: white;
}

.student-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.student-avatar {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.student-details h4 {
  font-size: 16px;
  margin-bottom: 4px;
}

.student-details p {
  font-size: 12px;
  color: var(--gray);
}

.student-progress {
  display: flex;
  align-items: center;
  gap: 20px;
}

.progress-circle {
  width: 50px;
  height: 50px;
}

.view-student-btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  font-family: "Vazirmatn", sans-serif;
}
