/* ===============================================
   SETTINGS MODULE - MODERN CSS SYSTEM
   =============================================== */

/* === SETTINGS CONTAINER === */
.settings-container {
  width: 100%;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
  padding: 0;
  margin: 0;
}

/* === SETTINGS HEADER === */
.settings-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem 0 3rem 0;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 2rem 2rem;
  margin-bottom: 2rem;
}

.settings-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
              linear-gradient(-45deg, rgba(255,255,255,0.1) 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.1) 75%), 
              linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.1) 75%);
  background-size: 30px 30px;
  background-position: 0 0, 0 15px, 15px -15px, -15px 0px;
  opacity: 0.1;
}

.settings-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

.settings-header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.settings-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  color: white;
}

.settings-header-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-header-subtitle {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0.5rem 0 0 0;
  font-weight: 400;
}

.settings-back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  text-decoration: none;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.settings-back-button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* === SETTINGS CONTENT === */
.settings-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem 1.5rem;
}

/* === SETTINGS TABS === */
.settings-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.5rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  overflow-x: auto;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  background: transparent;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  color: #6b7280;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.settings-tab:hover {
  background: #f3f4f6;
  color: #374151;
}

.settings-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* === SETTINGS FORM === */
.settings-form-container {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
}

.settings-form {
  padding: 0;
}

.settings-form-section {
  padding: 2rem;
  border-bottom: 1px solid #f3f4f6;
}

.settings-form-section:last-child {
  border-bottom: none;
}

.settings-form-section-header {
  margin-bottom: 1.5rem;
}

.settings-form-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
}

.settings-form-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.75rem;
  background: rgba(102, 126, 234, 0.12);
  color: #667eea;
}

.settings-form-section-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.settings-form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-form-label-text {
  flex: 1;
}

.settings-form-required {
  color: #ef4444;
  font-size: 0.75rem;
}

.settings-form-input,
.settings-form-select,
.settings-form-textarea {
  padding: 0.875rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.settings-form-input:focus,
.settings-form-select:focus,
.settings-form-textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.settings-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.settings-form-help {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.settings-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
}

/* === SETTINGS SWITCH === */
.settings-switch {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-switch-input {
  position: relative;
  width: 3rem;
  height: 1.5rem;
  background: #e5e7eb;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.settings-switch-input.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.settings-switch-input::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.settings-switch-input.active::before {
  transform: translateX(1.5rem);
}

.settings-switch-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

/* === SETTINGS BUTTONS === */
.settings-button-group {
  display: flex;
  gap: 1rem;
  padding: 2rem;
  background: #f8fafc;
  border-top: 1px solid #e5e7eb;
}

.settings-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.settings-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.settings-button-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.settings-button-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.settings-button-secondary {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
}

.settings-button-secondary:hover {
  background: #e5e7eb;
}

.settings-button-danger {
  background: #ef4444;
  color: white;
}

.settings-button-danger:hover {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

.settings-button-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
}

/* === SETTINGS CARD === */
.settings-card {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  overflow: hidden;
  margin-bottom: 2rem;
}

.settings-card-header {
  padding: 2rem 2rem 0 2rem;
  border-bottom: 1px solid #f3f4f6;
  margin-bottom: 0;
  padding-bottom: 1.5rem;
}

.settings-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-card-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
}

.settings-card-body {
  padding: 2rem;
}

.settings-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  color: white;
}

.settings-card-icon.profile {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.settings-card-icon.security {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.settings-card-icon.notifications {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.settings-card-icon.preferences {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* === SETTINGS NOTIFICATION === */
.settings-notification {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}

.settings-notification.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #059669;
}

.settings-notification.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.settings-notification.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #d97706;
}

.settings-notification.info {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #2563eb;
}

.settings-notification ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  color: inherit;
}

/* === SETTINGS LOADING === */
.settings-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
}

.settings-loading-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.settings-loading-spinner {
  width: 3rem;
  height: 3rem;
  border: 3px solid #e5e7eb;
  border-top: 3px solid #667eea;
  border-radius: 50%;
  animation: settingsLoadingSpin 1s linear infinite;
}

.settings-loading-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.5rem 0;
}

.settings-loading-description {
  font-size: 1rem;
  color: #6b7280;
  margin: 0;
}

@keyframes settingsLoadingSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === RESPONSIVE DESIGN === */
@media (min-width: 768px) {
  .settings-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .settings-form-grid.single {
    grid-template-columns: 1fr;
  }
  
  .settings-form-grid.triple {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .settings-header {
    padding: 3rem 0 4rem 0;
  }
  
  .settings-header-title {
    font-size: 3rem;
  }
}

@media (max-width: 640px) {
  .settings-container {
    padding: 0;
  }
  
  .settings-header {
    padding: 1.5rem 0 2rem 0;
    margin-bottom: 1rem;
  }
  
  .settings-header-title {
    font-size: 2rem;
  }
  
  .settings-content {
    padding: 0 1rem 1rem 1rem;
  }
  
  .settings-tabs {
    margin: 0 -1rem 2rem -1rem;
    border-radius: 0;
  }
  
  .settings-form-section {
    padding: 1.5rem;
  }
  
  .settings-button-group {
    padding: 1.5rem;
    flex-direction: column;
  }
  
  .settings-card-header,
  .settings-card-body {
    padding: 1.5rem;
  }
}

/* === SETTINGS PROFILE IMAGE === */
.settings-profile-image {
  position: relative;
  display: inline-block;
  margin-bottom: 1rem;
}

.settings-profile-avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.settings-profile-change {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 2rem;
  height: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  border: 3px solid white;
  transition: all 0.3s ease;
}

.settings-profile-change:hover {
  transform: scale(1.1);
}

/* === SETTINGS LIST === */
.settings-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.settings-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.settings-list-item:last-child {
  border-bottom: none;
}

.settings-list-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-list-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.settings-list-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: #f3f4f6;
  border-radius: 0.75rem;
  color: #6b7280;
}

.settings-list-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.settings-list-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

.settings-list-description {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 0;
}