/**
 * User Pages Stylesheet
 * Styles for user center pages (dashboard, settings, password, etc.)
 */

/* ==================== Common Layout ==================== */
.user-dashboard-wrapper {
  min-height: 100vh;
  background: #f8f9fa;
  padding: 40px 0;
}

.main-content {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 32px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: #45474F;
  margin-bottom: 8px;
}

.page-subtitle {
  color: #6C757D;
  margin-bottom: 32px;
}

/* ==================== Sidebar Menu Component ==================== */
.user-sidebar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 24px;
  position: sticky;
  top: 20px;
}

.sidebar-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 20px;
}

.sidebar-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
}

.sidebar-username {
  font-size: 18px;
  font-weight: 600;
  color: #45474F;
  margin-bottom: 4px;
}

.sidebar-email {
  font-size: 14px;
  color: #6C757D;
  word-break: break-all;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu > li {
  margin-bottom: 4px;
}

.sidebar-menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #45474F;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 15px;
}

.sidebar-menu-item:hover {
  background: #f8f9fa;
  color: #667eea;
  transform: translateX(4px);
}

.sidebar-menu-item.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sidebar-menu-item i {
  margin-right: 12px;
  width: 20px;
  text-align: center;
}

.sidebar-submenu {
  list-style: none;
  padding-left: 36px;
  margin: 4px 0;
  display: none;
}

.sidebar-submenu.show {
  display: block;
}

.sidebar-submenu .sidebar-menu-item {
  padding: 8px 16px;
  font-size: 14px;
}

.menu-toggle {
  cursor: pointer;
}

.menu-toggle::after {
  content: '\f078';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  float: right;
  transition: transform 0.3s ease;
}

.menu-toggle.expanded::after {
  transform: rotate(180deg);
}

/* ==================== Dashboard Page (index.html) ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  border-left: 4px solid #667eea;
}

.stat-card.success {
  border-left-color: #28A745;
}

.stat-card.warning {
  border-left-color: #FFC107;
}

.stat-card.info {
  border-left-color: #17A2B8;
}

.stat-label {
  font-size: 13px;
  color: #6C757D;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #45474F;
}

.action-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.action-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 24px;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.action-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
  color: white;
}

.action-card.secondary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.action-card.success {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.action-card-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.action-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.action-card-desc {
  font-size: 14px;
  opacity: 0.9;
}

/* ==================== Form Elements ==================== */
.form-group {
  margin-bottom: 24px;
}

.form-label {
  font-weight: 600;
  color: #45474F;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-control {
  border-radius: 12px;
  border: 2px solid #E9ECEF;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.3s ease;
  width: 100%;
}

.form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  outline: none;
}

.form-control:read-only {
  background-color: #F8F9FA;
  cursor: not-allowed;
}

.form-control.is-valid {
  border-color: #28A745;
}

.form-control.is-invalid {
  border-color: #DC3545;
}

.form-text {
  font-size: 13px;
  color: #6C757D;
  margin-top: 4px;
}

.form-check-input {
  cursor: pointer;
}

.form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

/* ==================== Buttons ==================== */
.btn-primary, .btn-secondary {
  padding: 12px 32px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #6C757D;
  color: white;
}

.btn-secondary:hover {
  background: #5a6268;
  transform: translateY(-2px);
}

.btn-group-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 32px;
}

/* ==================== Password Page ==================== */
.security-tips {
  background: #E7F3FF;
  border-left: 4px solid #17A2B8;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.security-tips h6 {
  color: #17A2B8;
  margin-bottom: 12px;
  font-weight: 600;
}

.security-tips ul {
  margin: 0;
  padding-left: 20px;
}

.security-tips li {
  color: #45474F;
  margin-bottom: 8px;
}

.password-requirements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.requirement-item {
  display: flex;
  align-items: center;
  padding: 12px;
  background: #F8F9FA;
  border-radius: 8px;
  gap: 12px;
}

.requirement-item i {
  font-size: 20px;
  color: #28A745;
}

.requirement-item span {
  font-size: 14px;
  color: #45474F;
  font-weight: 500;
}

/* ==================== Settings Page ==================== */
.avatar-section {
  text-align: center;
  margin-bottom: 32px;
  padding: 24px;
  background: #f8f9fa;
  border-radius: 12px;
}

.avatar-preview {
  position: relative;
  display: inline-block;
}

.avatar-image {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #667eea;
}

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #667eea;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.avatar-upload-btn:hover {
  background: #764ba2;
  transform: scale(1.1);
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.info-card {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  background: #f8f9fa;
}

.info-card.primary {
  background: rgba(102, 126, 234, 0.1);
}

.info-card.success {
  background: rgba(40, 167, 69, 0.1);
}

.info-card.info {
  background: rgba(23, 162, 184, 0.1);
}

.info-card i {
  font-size: 32px;
  margin-bottom: 12px;
}

.info-card.primary i {
  color: #667eea;
}

.info-card.success i {
  color: #28A745;
}

.info-card.info i {
  color: #17A2B8;
}

.info-card-label {
  font-size: 13px;
  color: #6C757D;
  margin-bottom: 4px;
}

.info-card-value {
  font-size: 16px;
  font-weight: 700;
  color: #45474F;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 991px) {
  .user-sidebar {
    margin-bottom: 24px;
    position: relative;
    top: 0;
  }

  .main-content {
    padding: 24px;
  }

  .page-title {
    font-size: 24px;
  }

  .btn-group-actions {
    flex-direction: column;
  }

  .btn-primary, .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .user-dashboard-wrapper {
    padding: 20px 0;
  }

  .main-content {
    padding: 20px;
  }

  .page-title {
    font-size: 22px;
  }

  .stat-value {
    font-size: 20px;
  }

  .action-card {
    padding: 20px;
  }

  .action-card-icon {
    font-size: 28px;
  }
}

/* ==================== Utility Classes ==================== */
.d-none {
  display: none !important;
}

.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 1rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.me-2 {
  margin-right: 0.5rem;
}

.gap-4 {
  gap: 1.5rem;
}
