:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --danger-gradient: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  --warning-gradient: linear-gradient(135deg, #ffd93d 0%, #ffb800 100%);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.18);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);
}

body {
  background: #ffffff;
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* Animated Mesh Gradient Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(102, 126, 234, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 60%, rgba(79, 172, 254, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(240, 147, 251, 0.05) 0%, transparent 50%);
  z-index: -2;
  animation: meshMove 25s ease-in-out infinite;
}

@keyframes meshMove {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(20px, -20px) rotate(2deg); }
  66% { transform: translate(-20px, 20px) rotate(-2deg); }
}

/* Wave Animation */
.wave-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  z-index: -1;
  opacity: 0.3;
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 100%;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50% 50% 0 0;
  animation: wave 15s linear infinite;
}

.wave:nth-child(2) {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  animation-delay: -5s;
  animation-duration: 18s;
  opacity: 0.5;
}

.wave:nth-child(3) {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  animation-delay: -2s;
  animation-duration: 20s;
  opacity: 0.3;
}

@keyframes wave {
  0% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-25%) translateY(-10px); }
  100% { transform: translateX(-50%) translateY(0); }
}

/* Floating Geometric Shapes */
.geometric-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  opacity: 0.08;
}

.shape-circle {
  width: 100px;
  height: 100px;
  border: 3px solid #667eea;
  border-radius: 50%;
  top: 20%;
  left: 10%;
  animation: rotate 20s linear infinite, float 6s ease-in-out infinite;
}

.shape-square {
  width: 80px;
  height: 80px;
  border: 3px solid #4facfe;
  top: 60%;
  right: 15%;
  animation: rotate 25s linear infinite reverse, float 7s ease-in-out infinite;
  animation-delay: 2s;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 50px solid transparent;
  border-right: 50px solid transparent;
  border-bottom: 87px solid rgba(240, 147, 251, 0.8);
  top: 40%;
  right: 5%;
  animation: rotate 30s linear infinite, float 8s ease-in-out infinite;
  animation-delay: 4s;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.card-body-head {
    flex: 1 1 auto;
    color: var(--bs-card-color);
    padding: 20px;
}

/* Dot Grid Pattern */
.dot-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: radial-gradient(circle, rgba(102, 126, 234, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.5;
  animation: dotMove 20s linear infinite;
}

@keyframes dotMove {
  0% { background-position: 0 0; }
  100% { background-position: 30px 30px; }
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInDown 0.8s ease-out;
  position: relative;
}

.page-title {
  font-size: 3rem;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  display: inline-block;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 4px;
  background: var(--primary-gradient);
  border-radius: 2px;
  animation: expandCenter 0.8s ease-out 0.3s forwards;
}

@keyframes expandCenter {
  from { width: 0; }
  to { width: 150px; }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.glass-card {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.12);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.6s ease-out;
  position: relative;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  animation: glassShine 8s linear infinite;
}

@keyframes glassShine {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(50%, 50%) rotate(360deg); }
}

.card-header-gradient {
  background: var(--primary-gradient);
  color: white;
  padding: 1.5rem;
  border: none;
  position: relative;
  overflow: hidden;
}

.card-header-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: slideLight 3s infinite;
}

@keyframes slideLight {
  0%, 100% { left: -100%; }
  50% { left: 100%; }
}

.alert-custom {
  border: none;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  animation: fadeInUp 0.6s ease-out 0.2s both;
  position: relative;
  overflow: hidden;
}

.alert-custom::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  animation: heightGrow 0.6s ease-out 0.2s both;
}

@keyframes heightGrow {
  from { height: 0%; }
  to { height: 100%; }
}

.alert-info-custom {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
}

.alert-info-custom::before {
  background: var(--primary-gradient);
}

.alert-warning-custom {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 152, 0, 0.1) 100%);
}

.alert-warning-custom::before {
  background: var(--warning-gradient);
}

.form-control-modern {
  border: 2px solid #e0e6ed;
  border-radius: 12px;
  padding: 0.75rem 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
}

.form-control-modern:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: translateY(-2px) scale(1.01);
}

.btn-gradient {
  background: var(--primary-gradient);
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-gradient::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-gradient:hover::after {
  width: 300px;
  height: 300px;
}

.btn-gradient:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.btn-success-gradient {
  background: var(--success-gradient);
}

.btn-success-gradient:hover {
  box-shadow: 0 8px 24px rgba(79, 172, 254, 0.4);
}

.btn-danger-gradient {
  background: var(--danger-gradient);
}

.btn-danger-gradient:hover {
  box-shadow: 0 8px 24px rgba(255, 107, 107, 0.4);
}

.table-modern {
  border-collapse: separate;
  border-spacing: 0 0.75rem;
}

.table-modern thead th {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 1.25rem;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  position: relative;
}

.table-modern thead th:first-child {
  border-radius: 12px 0 0 12px;
}

.table-modern thead th:last-child {
  border-radius: 0 12px 12px 0;
}

.table-modern thead th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.table-modern tbody tr {
  background: white;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  animation: slideInRight 0.6s ease-out;
}

.table-modern tbody tr:hover {
  transform: translateX(8px) scale(1.01);
  box-shadow: var(--shadow-md);
}

.table-modern tbody td {
  padding: 1.25rem;
  border: none;
  vertical-align: middle;
}

.table-modern tbody tr td:first-child {
  border-radius: 12px 0 0 12px;
  border-left: 4px solid transparent;
  transition: border-color 0.3s ease;
}

.table-modern tbody tr:hover td:first-child {
  border-left-color: #667eea;
}

.table-modern tbody tr td:last-child {
  border-radius: 0 12px 12px 0;
}

.table-secondary {
  opacity: 0.6;
  position: relative;
}

.table-secondary::after {
  content: 'INACTIVE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 0, 0, 0.1);
  color: #dc3545;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.table-secondary:hover::after {
  opacity: 1;
}

.editable-field {
  border: 2px solid #e0e6ed;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.editable-field:focus {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
  transform: scale(1.02);
}

.border-warning {
  border-color: #ffc107 !important;
  border-width: 2px !important;
  animation: warningPulse 2s infinite;
}

@keyframes warningPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 193, 7, 0);
  }
}

.bg-warning-subtle {
  background: linear-gradient(135deg, #fff3cd 0%, #ffe5a1 100%) !important;
}

.border-success {
  border-color: #198754 !important;
  border-width: 2px !important;
  background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
  animation: successFlash 0.6s ease;
}

@keyframes successFlash {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.save-btn {
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.save-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.save-btn:hover::before {
  width: 200px;
  height: 200px;
}

.btn-toggle {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  border: none;
}

.btn-toggle:hover {
  transform: rotate(360deg) scale(1.2);
}

.btn-success {
  background: var(--success-gradient);
  border: none;
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  border: none;
}

.badge-modern {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.toast-notification {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  min-width: 350px;
  animation: slideInRight 0.6s ease-out;
  box-shadow: var(--shadow-lg);
}

.font-monospace {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

.icon-animate {
  display: inline-block;
  animation: bounceRotate 2s infinite;
}

@keyframes bounceRotate {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  25% {
    transform: translateY(-10px) rotate(-10deg);
  }
  75% {
    transform: translateY(-10px) rotate(10deg);
  }
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-gradient);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.stagger-fade > * {
  opacity: 0;
  animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-fade > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-fade > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-fade > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-fade > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-fade > *:nth-child(5) { animation-delay: 0.5s; }

/* Search highlight styles */
.search-match {
  background: rgba(255, 255, 0, 0.1) !important;
  transition: all 0.3s ease;
}

.search-current {
  background: rgba(102, 126, 234, 0.15) !important;
  border-left-color: #667eea !important;
  border-left-width: 5px !important;
  box-shadow: 0 0 20px rgba(102, 126, 234, 0.3) !important;
  animation: highlightPulse 1.5s ease-in-out infinite;
}

@keyframes highlightPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.5);
  }
}

.sparkle {
  position: absolute;
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  pointer-events: none;
  animation: sparkleAnim 1s ease-out forwards;
}

@keyframes sparkleAnim {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: scale(3) rotate(180deg);
    opacity: 0;
  }
}

/* ========================================
   📢 SHARED SETTINGS STYLES
   ======================================== */

/* ✅ Ensure font inheritance */
.settings-container,
.settings-card,
.form-control,
.table-modern,
.alert-custom {
  font-family: inherit !important;
}

/* ✅ Keep code elements monospace */
code,
pre {
  font-family: 'Courier New', Consolas, Monaco, monospace !important;
}
