/**
 * Modern Theme 2024 - HubBackOffice
 * Overlay for INSPINIA theme to modernize look & feel
 * Upgrade from 2016 aesthetic to contemporary design
 */

/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
  /* Modern Color Palette - 2024 */
  --primary-color: #6366f1;        /* Indigo - Modern primary */
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary-color: #8b5cf6;      /* Purple - Modern secondary */
  --success-color: #10b981;        /* Emerald green */
  --danger-color: #ef4444;         /* Modern red */
  --warning-color: #f59e0b;        /* Amber */
  --info-color: #06b6d4;           /* Cyan */

  /* Neutrals - Modern grayscale */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Background colors */
  --bg-primary: #ffffff;
  --bg-secondary: var(--gray-50);
  --bg-sidebar: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);

  /* Shadows - Modern elevated look */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Border radius - Modern rounded corners */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;

  /* Spacing */
  --spacing-unit: 0.25rem;

  /* Transitions */
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL RESETS & IMPROVEMENTS
   ============================================ */

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--gray-100);
}

/* Modern scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ============================================
   SIDEBAR NAVIGATION - MODERN DARK THEME
   ============================================ */

/* Sidebar container */
.navbar-default.navbar-static-side {
  background: var(--bg-sidebar);
  border: none;
  box-shadow: var(--shadow-xl);
}

/* Sidebar menu items */
.nav.metismenu > li > a {
  color: rgba(255, 255, 255, 0.85);
  transition: var(--transition-fast);
  border-radius: var(--radius-md);
  margin: 2px 8px;
  padding: 12px 16px;
  background: transparent !important;
}

.nav.metismenu > li > a:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: #ffffff;
  transform: translateX(4px);
}

.nav.metismenu > li.active > a,
.nav.metismenu > li.active > a:hover,
.nav.metismenu > li.active > a:focus {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  font-weight: 600;
}

/* Submenu styling */
.nav.metismenu li ul {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-md);
  margin: 4px 8px;
  padding: 4px 0;
}

.nav.metismenu li ul li a {
  color: rgba(255, 255, 255, 0.75);
  padding-left: 40px;
  transition: var(--transition-fast);
}

.nav.metismenu li ul li a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

/* Icons in sidebar */
.nav.metismenu > li > a i,
.nav.metismenu > li > a .mdi {
  margin-right: 10px;
  opacity: 0.9;
}

/* ============================================
   TOP NAVBAR - CLEAN & MODERN
   ============================================ */

.navbar-static-top {
  background: #ffffff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.navbar-static-top .navbar-brand {
  font-weight: 700;
  color: var(--gray-900);
}

/* Search bar modernization */
.navbar-static-top .form-control {
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-300);
  transition: var(--transition-fast);
}

.navbar-static-top .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ============================================
   BUTTONS - MODERN DESIGN
   ============================================ */

.btn {
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-base);
  border: none;
  padding: 0.625rem 1.25rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #3730a3 100%);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success-color);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: #059669;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-color);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.35);
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--warning-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.btn-warning:hover {
  background: #d97706;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

.btn-info {
  background: var(--info-color);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.btn-info:hover {
  background: #0891b2;
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.35);
  transform: translateY(-1px);
}

/* Outline buttons */
.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  background: transparent;
}

.btn-outline-primary:hover {
  background: var(--primary-color);
  color: #ffffff;
  transform: translateY(-1px);
}

/* ============================================
   CARDS & PANELS - MODERN ELEVATION
   ============================================ */

.ibox,
.card {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
  background: #ffffff;
  overflow: hidden;
}

.ibox:hover,
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.ibox-title,
.card-header {
  background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
}

.ibox-content,
.card-body {
  padding: 1.5rem;
}

/* ============================================
   FORMS - MODERN INPUT STYLING
   ============================================ */

.form-control,
.form-select {
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  padding: 0.625rem 0.875rem;
  transition: var(--transition-fast);
  font-size: 0.9375rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
}

.form-label {
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.input-group .form-control {
  border-radius: 0;
}

.input-group .form-control:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group .form-control:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group-text {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
}

/* ============================================
   TABLES - CLEAN & MODERN
   ============================================ */

.table {
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table thead th {
  background: var(--gray-100);
  color: var(--gray-700);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--gray-300);
  padding: 1rem 0.75rem;
}

.table tbody tr {
  transition: var(--transition-fast);
}

.table tbody tr:hover {
  background: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
  background: rgba(0, 0, 0, 0.02);
}

/* DataTables modernization */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-300);
  padding: 0.375rem 0.75rem;
}

/* ============================================
   BADGES & LABELS - MODERN PILLS
   ============================================ */

.badge,
.label {
  border-radius: var(--radius-lg);
  padding: 0.375rem 0.75rem;
  font-weight: 500;
  font-size: 0.75rem;
}

.badge-primary,
.label-primary {
  background: var(--primary-color);
}

.badge-success,
.label-success {
  background: var(--success-color);
}

.badge-danger,
.label-danger {
  background: var(--danger-color);
}

.badge-warning,
.label-warning {
  background: var(--warning-color);
}

.badge-info,
.label-info {
  background: var(--info-color);
}

/* ============================================
   MODALS - MODERN DIALOG DESIGN
   ============================================ */

.modal-content {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 700;
  color: var(--gray-900);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  padding: 1rem 1.5rem;
}

/* ============================================
   ALERTS - MODERN NOTIFICATION STYLE
   ============================================ */

.alert {
  border: none;
  border-radius: var(--radius-lg);
  border-left: 4px solid;
  padding: 1rem 1.25rem;
}

.alert-success {
  background: #d1fae5;
  border-left-color: var(--success-color);
  color: #065f46;
}

.alert-danger {
  background: #fee2e2;
  border-left-color: var(--danger-color);
  color: #991b1b;
}

.alert-warning {
  background: #fef3c7;
  border-left-color: var(--warning-color);
  color: #92400e;
}

.alert-info {
  background: #cffafe;
  border-left-color: var(--info-color);
  color: #164e63;
}

/* ============================================
   BREADCRUMBS - MODERN NAVIGATION
   ============================================ */

.breadcrumb {
  background: transparent;
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "→";
  color: var(--gray-400);
}

.breadcrumb-item a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.breadcrumb-item a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ============================================
   DROPDOWN MENUS - MODERN ELEVATION
   ============================================ */

.dropdown-menu {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: var(--radius-md);
  padding: 0.625rem 1rem;
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--gray-100);
  color: var(--gray-900);
}

.dropdown-divider {
  border-top-color: var(--gray-200);
  margin: 0.5rem 0;
}

/* ============================================
   PAGINATION - MODERN CONTROLS
   ============================================ */

.pagination {
  gap: 0.25rem;
}

.page-link {
  border: none;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.875rem;
  color: var(--gray-700);
  transition: var(--transition-fast);
  margin: 0 2px;
}

.page-link:hover {
  background: var(--gray-100);
  color: var(--primary-color);
}

.page-item.active .page-link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* ============================================
   PROGRESS BARS - MODERN GRADIENT
   ============================================ */

.progress {
  height: 0.75rem;
  border-radius: var(--radius-lg);
  background: var(--gray-200);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
  transition: width 0.6s ease;
}

/* ============================================
   UTILITY CLASSES - MODERN SPACING
   ============================================ */

.shadow-modern-sm {
  box-shadow: var(--shadow-sm);
}

.shadow-modern-md {
  box-shadow: var(--shadow-md);
}

.shadow-modern-lg {
  box-shadow: var(--shadow-lg);
}

.shadow-modern-xl {
  box-shadow: var(--shadow-xl);
}

.rounded-modern {
  border-radius: var(--radius-lg);
}

.rounded-modern-xl {
  border-radius: var(--radius-xl);
}

/* Glassmorphism effect for special cards */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: var(--shadow-lg);
}

/* ============================================
   PAGE WRAPPER - BACKGROUND UPDATE
   ============================================ */

#page-wrapper {
  background: var(--gray-100);
  min-height: 100vh;
}

.gray-bg {
  background-color: var(--gray-100) !important;
}

.white-bg {
  background-color: #ffffff !important;
}

/* ============================================
   RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
  .ibox-title,
  .card-header {
    padding: 1rem;
  }

  .ibox-content,
  .card-body {
    padding: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
  }
}

/* ============================================
   ANIMATION ENHANCEMENTS
   ============================================ */

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-in {
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Smooth transitions for all interactive elements */
a, button, input, select, textarea {
  transition: var(--transition-fast);
}

/* ============================================
   OVERRIDE OLD INSPINIA COLORS
   ============================================ */

/* Remove old purple/lavender backgrounds from INSPINIA */
.nav > li.active {
  background: transparent !important;
}

.nav > li > a:hover,
.nav > li > a:focus {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Fix navy/blue colors to modern palette */
.navy-bg,
.bg-primary {
  background-color: var(--primary-color) !important;
}

.text-navy {
  color: var(--primary-color) !important;
}

/* Update old success/warning/danger colors */
.bg-success {
  background-color: var(--success-color) !important;
}

.bg-warning {
  background-color: var(--warning-color) !important;
}

.bg-danger {
  background-color: var(--danger-color) !important;
}

.bg-info {
  background-color: var(--info-color) !important;
}

.text-success {
  color: var(--success-color) !important;
}

.text-warning {
  color: var(--warning-color) !important;
}

.text-danger {
  color: var(--danger-color) !important;
}

.text-info {
  color: var(--info-color) !important;
}

/* Remove old border colors */
.border-bottom {
  border-bottom-color: var(--gray-200) !important;
}

.border-top {
  border-top-color: var(--gray-200) !important;
}

/* Update stat boxes / widgets */
.stat-percent {
  color: var(--success-color);
}

.widget {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.widget:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Fix any remaining blue links */
a:not(.btn) {
  color: var(--primary-color);
  text-decoration: none;
}

a:not(.btn):hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Update old INSPINIA gradients */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

/* Profile image / avatar styling */
.img-circle,
.rounded-circle {
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-md);
}

/* Notification badges */
.label-primary {
  background-color: var(--primary-color) !important;
}

.label-success {
  background-color: var(--success-color) !important;
}

.label-warning {
  background-color: var(--warning-color) !important;
}

.label-danger {
  background-color: var(--danger-color) !important;
}

/* Top navbar adjustments */
.navbar-top-links li a {
  padding: 20px 10px;
  min-height: 50px;
  color: var(--gray-700);
  transition: var(--transition-fast);
}

.navbar-top-links li a:hover {
  background-color: var(--gray-100);
  color: var(--primary-color);
}

/* Search input in top nav */
.navbar-form-custom .form-control {
  background-color: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 8px 16px;
  transition: var(--transition-fast);
}

.navbar-form-custom .form-control:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Footer modernization */
.footer {
  background: #ffffff;
  border-top: 1px solid var(--gray-200);
  color: var(--gray-600);
  padding: 20px;
}

/* List group items */
.list-group-item {
  border: 1px solid var(--gray-200);
  transition: var(--transition-fast);
}

.list-group-item:hover {
  background-color: var(--gray-50);
  border-color: var(--gray-300);
}

.list-group-item.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* Tabs modernization */
.nav-tabs {
  border-bottom: 2px solid var(--gray-200);
}

.nav-tabs .nav-link {
  border: none;
  color: var(--gray-600);
  padding: 12px 24px;
  transition: var(--transition-fast);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.nav-tabs .nav-link:hover {
  background-color: var(--gray-100);
  color: var(--gray-900);
}

.nav-tabs .nav-link.active {
  background-color: #ffffff;
  color: var(--primary-color);
  border-bottom: 3px solid var(--primary-color);
  font-weight: 600;
}

/* Pills navigation */
.nav-pills .nav-link {
  border-radius: var(--radius-lg);
  padding: 10px 20px;
  transition: var(--transition-fast);
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* Tooltips */
.tooltip-inner {
  background-color: var(--gray-900);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.875rem;
}

/* Popovers */
.popover {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.popover-header {
  background-color: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-weight: 600;
}

/* ============================================
   CHART & GRAPH CONTAINERS
   ============================================ */

.flot-chart,
.chart-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

/* ============================================
   TIMELINE STYLING (if exists)
   ============================================ */

.timeline-item {
  border-left: 2px solid var(--primary-color);
  padding-left: 20px;
  position: relative;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -6px;
  top: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* ============================================
   CONTACT/USER CARDS
   ============================================ */

.contact-box {
  border: none;
  box-shadow: var(--shadow-md);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
  overflow: hidden;
}

.contact-box:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ============================================
   FILE MANAGER / UPLOAD AREAS
   ============================================ */

.file-manager,
.file-box {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.file-box:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

/* Dropzone modernization */
.dropzone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  transition: var(--transition-fast);
}

.dropzone:hover {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.05);
}

.dropzone.dz-drag-hover {
  border-color: var(--primary-color);
  background: rgba(99, 102, 241, 0.1);
}

/* ============================================
   PRICE TABLES
   ============================================ */

.pricing-plan {
  border: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: var(--transition-base);
  overflow: hidden;
}

.pricing-plan:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.pricing-plan.featured {
  border: 2px solid var(--primary-color);
  transform: scale(1.05);
}

/* ============================================
   SOCIAL BUTTONS/ICONS
   ============================================ */

.social-feed-box {
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: #ffffff;
  padding: 20px;
  margin-bottom: 20px;
}

/* ============================================
   LANDING PAGE ELEMENTS
   ============================================ */

.landing-page-container {
  background: linear-gradient(135deg, var(--gray-50) 0%, #ffffff 100%);
}

/* ============================================
   SPECIAL FIXES FOR COLOR CLASHES
   ============================================ */

/* Override any remaining INSPINIA purple (#8b5cf6 in old theme) */
.nav-header {
  background: var(--bg-sidebar) !important;
  padding: 20px;
}

.profile-element {
  text-align: center;
  padding: 20px 0;
}

/* Logo area */
.logo-element {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
}

/* Minimized sidebar */
.mini-navbar .nav-header {
  padding: 0;
}

/* Sidebar footer if exists */
.sidebar-footer {
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px;
}

/* ============================================
   TEXT UTILITIES - MODERN COLORS
   ============================================ */

.text-muted {
  color: var(--gray-500) !important;
}

.text-primary {
  color: var(--primary-color) !important;
}

.text-white {
  color: #ffffff !important;
}

/* ============================================
   SPINNER / LOADING STATES
   ============================================ */

.spinner-border-primary {
  border-color: var(--primary-color);
  border-right-color: transparent;
}

.sk-spinner {
  color: var(--primary-color);
}

/* Loading overlay */
.loading-overlay {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
}

/* ============================================
   CALENDAR WIDGET (if using)
   ============================================ */

.calendar {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.fc-event {
  background-color: var(--primary-color);
  border-color: var(--primary-dark);
  border-radius: var(--radius-md);
}

/* ============================================
   TOASTR NOTIFICATION OVERRIDES
   ============================================ */

.toast-success {
  background-color: var(--success-color) !important;
}

.toast-error {
  background-color: var(--danger-color) !important;
}

.toast-info {
  background-color: var(--info-color) !important;
}

.toast-warning {
  background-color: var(--warning-color) !important;
}

/* ============================================
   HUB-SHEEP LOGO ANIMATION
   ============================================ */

#spinnerimg {
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

#spinnerimg:hover {
  transform: scale(1.1);
}

/* Spinning animation for loading state */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

#spinnerimg.spinning {
  animation: spin 1s linear infinite;
}

/* Pulsing animation variant */
@keyframes pulse-glow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(139, 92, 246, 0.8));
    transform: scale(1.05);
  }
}

#spinnerimg.thinking {
  animation: pulse-glow 1.5s ease-in-out infinite;
}

/* ============================================
   SIDEBAR FULL HEIGHT
   ============================================ */

/* Force sidebar to extend full page height */
.navbar-static-side {
  min-height: 100vh !important;
  height: 100vh !important;
  position: fixed !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  overflow-y: auto !important;
  width: 220px !important;
  z-index: 2001;
}

#wrapper {
  min-height: 100vh;
}

/* Adjust page wrapper margin for fixed sidebar */
#page-wrapper {
  margin-left: 220px !important;
}

.sidebar-collapse {
  min-height: 100vh !important;
  height: 100% !important;
}

/* Ensure nav element fills sidebar */
.navbar-default.navbar-static-side nav,
.navbar-default.navbar-static-side > nav {
  min-height: 100vh;
}

/* Make sure the sidebar background extends fully */
body .navbar-default.navbar-static-side {
  background: var(--bg-sidebar) !important;
  min-height: 100vh !important;
}

/* ============================================
   FIX DASHBOARD GREEN COLOR CLASHES
   ============================================ */

/* Override old green colors in dashboard with distinct modern colors */

/* YTD Revenue/Month/Agent - use modern cyan to stand out */
#revAgent {
  font-size: 1.3em;
  color: #0891b2 !important; /* Modern dark cyan */
  font-weight: 700;
}

/* Your YTD Commissions - use modern emerald green (different from old green) */
#commissionsAgent {
  color: #059669 !important; /* Modern dark emerald */
  font-weight: 700;
}

/* YTD Revenue numbers on right side - use modern blue */
/* Removed blanket h3 rule - now using specific color overrides in top-nav.css */

/* Override specifically inline styled greens */
h3 > span[style*="#10b981"],
span[style*="color:#10b981"] {
  color: #0891b2 !important; /* Replace old green with cyan */
}
