.settings-content {
  padding: 2rem;
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.settings-page-header {
  margin-bottom: 2rem;
  text-align: center;
}

.settings-page-header h1 {
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  font-weight: 700;
}

.settings-page-header p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
}

.settings-message {
  padding: 1rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  font-weight: 500;
}

.settings-message.success {
  background-color: var(--color-success-light);
  color: var(--color-success-dark);
  border: 1px solid var(--color-success);
}

.settings-message.error {
  background-color: var(--color-danger-light);
  color: var(--color-danger-dark);
  border: 1px solid var(--color-danger);
}

.settings-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Retention info card styles */
.retention-info-card {
  background-color: rgba(66, 135, 245, 0.05);
  border: 1px solid rgba(66, 135, 245, 0.2);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.retention-info-header h3 {
  color: #4287f5;
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.retention-info-list {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--color-text-primary);
}

.retention-info-list li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.retention-info-list li strong {
  color: #4287f5;
  font-weight: 600;
}

.settings-section-card {
  background: var(--color-bg-primary);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
}

.settings-section-header {
  padding: 2rem 2rem 1rem 2rem;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-bg-secondary);
}

.settings-section-header h2 {
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.5rem;
  font-weight: 600;
}

.settings-section-header p {
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.5;
}

.settings-section-content {
  padding: 2rem;
}

.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

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

.setting-info {
  flex: 1;
  margin-right: 2rem;
}

.setting-title {
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.setting-description {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.4;
}

.setting-control {
  flex-shrink: 0;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.settings-input {
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border-light);
  border-radius: 8px;
  font-size: 1rem;
  width: 100px;
  text-align: center;
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.settings-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-suffix {
  color: var(--color-text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 40px;
}

.settings-section-actions {
  padding: 1.5rem 2rem;
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.settings-btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.settings-btn.primary {
  background-color: var(--color-primary);
  color: white;
}

.settings-btn.primary:hover:not(:disabled) {
  background-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.settings-btn.secondary {
  background-color: var(--color-text-secondary);
  color: white;
  border: 1px solid transparent;
}

.settings-btn.secondary:hover:not(:disabled) {
  background-color: var(--color-text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

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

.settings-placeholder {
  text-align: center;
  padding: 2rem;
  color: var(--color-text-secondary);
}

.settings-placeholder p {
  margin: 0;
  font-style: italic;
}

/* Loading State */
.settings-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-border-light);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.settings-loading p {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
}

/* Responsive Design - Sidebar-aware breakpoints */
/* Large desktop screens - sidebar + content fits comfortably */

/* Medium desktop - account for sidebar width (1024px - 280px = 744px content) */

/* Small desktop/large tablet - sidebar significantly reduces available width */

/* Small tablets and large mobile screens */

/* Mobile phone screens */

/* Very small mobile screens */

/* Dark theme specific adjustments */
[data-theme='dark'] .settings-section-card {
  background: var(--color-bg-secondary);
  border-color: var(--color-border);
}

[data-theme='dark'] .settings-section-header {
  background: var(--color-bg-tertiary);
  border-bottom-color: var(--color-border);
}

[data-theme='dark'] .settings-section-actions {
  background: var(--color-bg-tertiary);
  border-top-color: var(--color-border);
}

[data-theme='dark'] .setting-item {
  border-bottom-color: var(--color-border);
}

[data-theme='dark'] .settings-input {
  background: var(--color-bg-tertiary);
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

[data-theme='dark'] .settings-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

[data-theme='dark'] .settings-btn.secondary {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-light);
}

[data-theme='dark'] .settings-btn.secondary:hover:not(:disabled) {
  background-color: var(--color-bg-tertiary);
  color: var(--color-text-primary);
  border-color: var(--color-border-light);
  box-shadow: var(--shadow-sm);
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-right: 10px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: #4CAF50;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.toggle-label {
  font-weight: 500;
  color: #666;
  vertical-align: middle;
}

.setting-control {
  display: flex;
  align-items: center;
}

/* Dark theme toggle switch styles */
[data-theme='dark'] .toggle-slider {
  background-color: #555;
}

[data-theme='dark'] input:checked + .toggle-slider {
  background-color: #4CAF50;
}

[data-theme='dark'] .toggle-label {
  color: var(--color-text-secondary);
}

/* Global Settings Actions */
.settings-global-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

[data-theme='dark'] .settings-global-actions {
  background-color: var(--color-bg-secondary);
  border-color: var(--color-border-light);
}

/* SSO Settings Styles */
.status-indicator {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-indicator.enabled {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-indicator.disabled {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

[data-theme='dark'] .status-indicator.enabled {
  background-color: #1e4620;
  color: #4caf50;
  border: 1px solid #2e7d32;
}

[data-theme='dark'] .status-indicator.disabled {
  background-color: #4a1d1d;
  color: #f44336;
  border: 1px solid #d32f2f;
}

.sso-provider-info {
  font-size: 0.875rem;
  color: #666;
  margin-top: 4px;
  font-style: italic;
}

[data-theme='dark'] .sso-provider-info {
  color: var(--color-text-secondary);
}

.sso-test-result {
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 8px;
}

.sso-test-result.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.sso-test-result.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

[data-theme='dark'] .sso-test-result.success {
  background-color: #1e4620;
  color: #4caf50;
  border: 1px solid #2e7d32;
}

[data-theme='dark'] .sso-test-result.error {
  background-color: #4a1d1d;
  color: #f44336;
  border: 1px solid #d32f2f;
}

.sso-disabled-info {
  background-color: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  margin-top: 16px;
}

.sso-disabled-info p {
  margin: 0 0 12px 0;
  color: #333;
  font-weight: 500;
}

.sso-disabled-info ul {
  margin: 0;
  padding-left: 20px;
  color: #666;
}

.sso-disabled-info li {
  margin-bottom: 4px;
  line-height: 1.4;
}

.sso-disabled-info code {
  background-color: #e9ecef;
  color: #495057;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.875rem;
}

[data-theme='dark'] .sso-disabled-info {
  background-color: var(--color-bg-secondary);
  border-color: var(--color-border-light);
}

[data-theme='dark'] .sso-disabled-info p {
  color: var(--color-text-primary);
}

[data-theme='dark'] .sso-disabled-info ul {
  color: var(--color-text-secondary);
}

[data-theme='dark'] .sso-disabled-info code {
  background-color: #343a40;
  color: #adb5bd;
}
