/*
 * SureSuccess - Settings Page Stylesheet
 * Optimized styles for account settings and preferences
 */

/* ======================================
   BASE STYLES & VARIABLES
   ====================================== */
:root {
  /* Color Palette */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --primary-lighter: #93c5fd;
  --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  
  --secondary: #0f172a;
  --secondary-light: #1e293b;
  --secondary-lighter: #334155;
  
  --accent: #f59e0b;
  --accent-dark: #d97706;
  --accent-light: #fbbf24;
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  --background: #ffffff;
  --background-alt: #f8fafc;
  --background-dark: #f1f5f9;
  
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-white: #ffffff;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-headings: 'Poppins', var(--font-primary);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Borders */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  --border-radius-xl: 1.5rem;
  --border-radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition: all 0.3s ease;
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.5s ease;
}

/* ======================================
   RESET & BASE STYLES
   ====================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: var(--background-alt);
  overflow-x: hidden;
  position: relative;
  font-weight: 400;
  padding-top: 76px; /* Adjust for fixed navbar */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--secondary);
}

p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ======================================
   NAVBAR STYLES
   ====================================== */
.navbar {
  padding: 0.75rem 0;
  box-shadow: var(--shadow);
  background-color: var(--background);
}

.brand-logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--secondary);
}

.brand-highlight {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  padding: 0.625rem 0.75rem;
  transition: all 0.2s ease;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
  color: var(--primary);
}

.navbar-light .navbar-nav .nav-link.active::after {
  content: '';
  display: block;
  width: 2rem;
  height: 2px;
  background: var(--primary-gradient);
  margin-top: 4px;
  border-radius: var(--border-radius-full);
}

.navbar .btn {
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* ======================================
   HEADER SECTION
   ====================================== */
.module-detail-header {
  background: var(--primary-gradient);
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
  color: var(--text-white);
  margin-top: -76px;
}

.module-detail-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
}

.breadcrumb-wrapper {
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.breadcrumb {
  padding: 0;
  background-color: transparent;
  margin-bottom: 0;
}

.breadcrumb-item {
  font-size: 0.95rem;
  font-weight: 500;
}

.breadcrumb-item a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
}

.breadcrumb-item a:hover {
  color: white;
}

.breadcrumb-item.active {
  color: white;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.6);
}

.module-title {
  font-size: 2.75rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.module-description {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.wave-divider {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  z-index: 1;
}

.wave-divider svg {
  width: 100%;
  height: 90px;
  display: block;
}

/* ======================================
   CONTENT SECTION
   ====================================== */
.module-content-section {
  padding: 3rem 0;
  background-color: var(--background-alt);
  position: relative;
  z-index: 2;
}

/* ======================================
   CARD STYLES
   ====================================== */
.module-card {
  background: var(--background);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
  height: 100%;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.module-card .card-header {
  background-color: var(--background);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
}

.module-card .card-header h5 {
  font-size: 1.1rem;
  margin-bottom: 0;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.card-icon {
  color: var(--primary);
  margin-right: 0.75rem;
  font-size: 1.1rem;
}

.module-card .card-body {
  padding: 1.5rem;
}

/* ======================================
   NAVIGATION PILLS
   ====================================== */
.nav-pills .nav-link {
  color: var(--text-dark);
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.nav-pills .nav-link i {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.nav-pills .nav-link:hover {
  background-color: var(--background-alt);
  color: var(--primary);
}

.nav-pills .nav-link:hover i {
  color: var(--primary);
}

.nav-pills .nav-link.active {
  background-color: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.25);
}

.nav-pills .nav-link.active i {
  color: var(--text-white);
}

/* ======================================
   ACCOUNT STATUS
   ====================================== */
.account-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.account-status i {
  color: var(--success);
  font-size: 1.25rem;
}

/* ======================================
   FORM ELEMENTS
   ====================================== */
.form-label {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control:disabled {
  background-color: var(--background-alt);
  cursor: not-allowed;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%233b82f6'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z' clip-rule='evenodd' /%3E%3C/svg%3E");
  background-size: 16px 16px;
}

.form-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.25rem;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--primary);
  border-color: var(--primary);
}

.form-switch .form-check-input {
  width: 2.5rem;
  margin-left: -2.85rem;
}

.form-check-label {
  font-weight: 500;
  cursor: pointer;
}

textarea.form-control {
  line-height: 1.6;
}

/* ======================================
   AVATAR UPLOAD
   ====================================== */
.avatar-upload {
  position: relative;
  width: 120px;
  margin: 0 auto;
}

.avatar-preview {
  width: 120px;
  height: 120px;
  border-radius: var(--border-radius-full);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--border-radius-full);
  background-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.avatar-edit:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.avatar-edit input {
  display: none;
}

.avatar-edit label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  color: var(--text-white);
}

/* ======================================
   BUTTONS
   ====================================== */
.btn {
  font-weight: 500;
  padding: 0.625rem 1.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--primary-gradient);
  border: none;
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.35);
}

.btn-primary:hover, 
.btn-primary:focus {
  background: var(--primary-dark);
  color: var(--text-white);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.45);
  transform: translateY(-2px);
}

.btn-outline-primary {
  border: 1px solid var(--primary);
  color: var(--primary);
  background-color: transparent;
}

.btn-outline-primary:hover, 
.btn-outline-primary:focus {
  background-color: var(--primary);
  color: var(--text-white);
  transform: translateY(-2px);
}

.btn-warning {
  background-color: var(--warning);
  border: none;
  color: var(--text-dark);
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);
}

.btn-warning:hover, 
.btn-warning:focus {
  background-color: var(--accent-dark);
  color: var(--text-dark);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.45);
  transform: translateY(-2px);
}

.btn-outline-warning {
  border: 1px solid var(--warning);
  color: var(--warning);
  background-color: transparent;
}

.btn-outline-warning:hover, 
.btn-outline-warning:focus {
  background-color: var(--warning);
  color: var(--text-dark);
  transform: translateY(-2px);
}

.btn-danger {
  background-color: var(--danger);
  border: none;
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-danger:hover, 
.btn-danger:focus {
  background-color: #dc2626;
  color: var(--text-white);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.45);
  transform: translateY(-2px);
}

.btn-outline-danger {
  border: 1px solid var(--danger);
  color: var(--danger);
  background-color: transparent;
}

.btn-outline-danger:hover, 
.btn-outline-danger:focus {
  background-color: var(--danger);
  color: var(--text-white);
  transform: translateY(-2px);
}

/* ======================================
   ALERTS
   ====================================== */
.alert {
  padding: 1rem 1.25rem;
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert i {
  font-size: 1.25rem;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border-left: 4px solid var(--info);
}

/* ======================================
   SUBSCRIPTION PLANS
   ====================================== */
.subscription-plan {
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  background-color: var(--background);
}

.subscription-plan:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
  border-color: var(--primary-light);
}

.subscription-plan.active {
  border-color: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.1);
}

.subscription-plan.recommended {
  border-color: var(--warning);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.1);
}

.subscription-plan h5 {
  font-weight: 600;
  color: var(--text-dark);
}

.subscription-plan ul {
  list-style: none;
  padding-left: 0;
}

.subscription-plan ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.subscription-plan ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary);
  font-weight: 600;
}

.subscription-plan .price {
  margin-top: 1.5rem;
  text-align: center;
}

.subscription-plan .price .amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.subscription-plan .price .period {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.premium-badge {
  display: inline-block;
  background-color: var(--warning);
  color: var(--text-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-full);
}

/* ======================================
   TABLE STYLES
   ====================================== */
.table {
  --bs-table-hover-bg: var(--background-alt);
}

.table th {
  border-bottom-width: 1px;
  font-weight: 600;
  color: var(--text-dark);
  background-color: var(--background-alt);
  white-space: nowrap;
}

.table td {
  vertical-align: middle;
}

.table-responsive {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* ======================================
   BADGE STYLES
   ====================================== */
.badge {
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--border-radius-full);
}

.bg-success {
  background-color: var(--success) !important;
}

.bg-secondary {
  background-color: var(--text-muted) !important;
}

.bg-warning {
  background-color: var(--warning) !important;
}

.bg-danger {
  background-color: var(--danger) !important;
}

.bg-primary {
  background-color: var(--primary) !important;
}

/* ======================================
   DANGER ZONE
   ====================================== */
.danger-zone {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1.5rem;
}

.text-danger {
  color: var(--danger) !important;
}

/* ======================================
   MODAL STYLES
   ====================================== */
.modal-content {
  border: none;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: none;
  padding: 1.5rem;
}

.modal-header.bg-danger {
  background-color: var(--danger) !important;
}

.modal-header.bg-warning {
  background-color: var(--warning) !important;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: none;
  padding: 1.25rem 1.5rem;
}

.btn-close-white {
  filter: brightness(0) invert(1);
}

/* ======================================
   FOOTER
   ====================================== */
.site-footer {
  background-color: var(--secondary);
  color: var(--text-white);
  padding-top: 4rem;
  position: relative;
}

.footer-brand {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: white;
}

.footer-text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: white;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-lighter);
  text-decoration: none;
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.copyright {
  color: var(--text-light);
  text-align: center;
  margin: 0;
}

/* ======================================
   ANIMATIONS
   ====================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ======================================
   RESPONSIVE ADJUSTMENTS
   ====================================== */
@media (max-width: 991.98px) {
  .module-title {
    font-size: 2.25rem;
  }
  
  .module-description {
    font-size: 1rem;
  }
  
  .subscription-plan .price .amount {
    font-size: 1.75rem;
  }
}

@media (max-width: 767.98px) {
  .module-title {
    font-size: 2rem;
  }
  
  .module-description {
    font-size: 0.95rem;
  }
  
  .subscription-plan {
    padding: 1.25rem;
  }
  
  .subscription-plan .price .amount {
    font-size: 1.5rem;
  }
  
  .table-responsive {
    font-size: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  .module-title {
    font-size: 1.75rem;
  }
  
  .breadcrumb-wrapper {
    display: none;
  }
  
  .avatar-upload {
    width: 100px;
  }
  
  .avatar-preview {
    width: 100px;
    height: 100px;
  }
  
  .avatar-edit {
    width: 32px;
    height: 32px;
  }
  
  .module-card .card-header {
    padding: 1rem;
  }
  
  .module-card .card-body {
    padding: 1.25rem;
  }
  
  .btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .subscription-plan ul li {
    font-size: 0.9rem;
  }
}

/* Dark mode support (if needed in the future) */
@media (prefers-color-scheme: dark) {
  body[data-theme="system"] {
    /* Add dark mode styles here */
  }
}