/* Online SolaimanLipi Fonts - High Speed & Zero FOUT (No flash of unstyled font) */
@font-face {
  font-family: 'SolaimanLipi';
  font-display: block;
  font-style: normal;
  font-weight: 400;
  src: local('SolaimanLipi'),
       local('SolaimanLipi Normal'),
       local('SolaimanLipi-Normal'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-normal-v1.0.woff2') format('woff2'),
       url('https://cdn.jsdelivr.net/gh/mirazmac/bengali-webfont-cdn@master/solaimanlipi/SolaimanLipiNormal.woff') format('woff'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-normal-v1.0.ttf') format('truetype');
}

@font-face {
  font-family: 'SolaimanLipi';
  font-display: block;
  font-style: normal;
  font-weight: 700;
  src: local('SolaimanLipi Bold'),
       local('SolaimanLipi-Bold'),
       local('SolaimanLipi'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.woff2') format('woff2'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.ttf') format('truetype');
}

@font-face {
  font-family: 'SolaimanLipi';
  font-display: block;
  font-style: normal;
  font-weight: 800;
  src: local('SolaimanLipi Bold'),
       local('SolaimanLipi-Bold'),
       local('SolaimanLipi'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.woff2') format('woff2'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.ttf') format('truetype');
}

@font-face {
  font-family: 'SolaimanLipi';
  font-display: block;
  font-style: normal;
  font-weight: 600;
  src: local('SolaimanLipi Bold'),
       local('SolaimanLipi-Bold'),
       local('SolaimanLipi'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.woff2') format('woff2'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.ttf') format('truetype');
}

:root {
  --bg-primary: #f8fafc;
  --bg-surface: #ffffff;
  --bg-sidebar: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  
  --success: #10b981;
  --success-light: #ecfdf5;
  --success-dark: #047857;
  
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --warning-dark: #b45309;
  
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --danger-dark: #b91c1c;

  --info: #0ea5e9;
  --info-light: #f0f9ff;
  
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --radius-sm: 5px;
  --radius-md: 5px;
  --radius-lg: 5px;
  --radius-card: 5px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 2px 10px rgba(0,0,0,0.04);
  --shadow-lg: 0 6px 20px rgba(0,0,0,0.06);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Universal Clean Bengali Font - SolaimanLipi */
html, body {
  font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

input, select, textarea, button, optgroup, option,
h1, h2, h3, h4, h5, h6, p, label, table, th, td, tr,
ul, ol, li, blockquote, code, pre, header, footer, aside, nav, main, section, span, div, strong, small {
  font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Currency Symbol */
span.currency-symbol,
strong.currency-symbol,
.currency-symbol,
.taka-symbol {
  font-family: 'SolaimanLipi', 'Noto Sans Bengali', 'Hind Siliguri', Arial, sans-serif !important;
  font-weight: 700 !important;
  font-style: normal !important;
  display: inline-block;
  margin-right: 2px;
}

/* Ensure FontAwesome icons ALWAYS use their own font family */
i.fa-solid, i.fa-regular, i.fa-brands, i.fa, .fa-solid, .fa-regular, .fa-brands, [class*="fa-"], [class^="fa-"] {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
  font-style: normal !important;
  font-weight: 900 !important;
  display: inline-block;
  line-height: 1;
}
i.fa-brands, .fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}
i.fa-regular, .fa-regular {
  font-weight: 400 !important;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  width: 100%;
  overflow-x: clip;
}

/* Layout */
.app-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
  overflow-x: clip;
}

/* Sidebar - Clean Light Theme */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  z-index: 100;
  overflow: hidden;
}

.brand-header {
  height: 70px;
  min-height: 70px;
  max-height: 70px;
  box-sizing: border-box;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  flex-shrink: 0;
}

.brand-logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 1.2rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-main);
  line-height: 1.25;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.2;
}

.sidebar-close-btn {
  display: none;
  background: #f1f5f9;
  border: 1px solid var(--border);
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
  outline: none;
}
.sidebar-close-btn:hover {
  background: #fee2e2;
  color: var(--danger-dark);
  border-color: #fca5a5;
}

.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99990;
  display: none;
}
.sidebar-backdrop.show {
  display: block;
}

.nav-menu {
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
}

/* Custom Sleek Scrollbar for Sidebar Menu */
.nav-menu::-webkit-scrollbar {
  width: 5px;
}
.nav-menu::-webkit-scrollbar-track {
  background: transparent;
}
.nav-menu::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 10px;
}
.nav-menu::-webkit-scrollbar-thumb:hover {
  background: #cbd5e1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #475569;
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-item span {
  white-space: nowrap;
}

.nav-item i {
  color: #64748b;
  font-size: 1rem;
  transition: color 0.2s;
}

.nav-item:hover {
  color: var(--primary);
  background: #f1f5f9;
}

.nav-item:hover i {
  color: var(--primary);
}

.nav-item.active {
  color: var(--primary);
  background: #eef2ff;
  font-weight: 700;
}

.nav-item.active i {
  color: var(--primary);
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

/* Sidebar Nav Submenu */
.nav-group {
  display: flex;
  flex-direction: column;
}
.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.nav-arrow {
  margin-left: auto;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  color: #94a3b8;
}
.nav-group.open .nav-arrow {
  transform: rotate(90deg);
}
.nav-submenu {
  display: none;
  flex-direction: column;
  padding-left: 24px;
  gap: 3px;
  margin-top: 2px;
  margin-bottom: 4px;
}
.nav-group.open .nav-submenu {
  display: flex;
}
.nav-subitem {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #64748b;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  font-weight: 500;
}
.nav-subitem i {
  font-size: 0.82rem;
  color: #94a3b8;
}
.nav-subitem:hover {
  color: var(--primary);
  background: #f1f5f9;
}
.nav-subitem:hover i {
  color: var(--primary);
}
.nav-subitem.active {
  color: var(--primary);
  background: #eef2ff;
  font-weight: 700;
}
.nav-subitem.active i {
  color: var(--primary);
}

.sidebar-footer {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #ffffff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
  position: relative;
  z-index: 10;
}

.sidebar-logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef2f2;
  color: #dc2626;
  border: 1.5px solid #fecaca;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.06);
  box-sizing: border-box;
}

.sidebar-logout-btn i {
  font-size: 1rem;
  color: #dc2626;
  transition: transform 0.2s ease;
}

.sidebar-logout-btn:hover {
  background: #dc2626;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.sidebar-logout-btn:hover i {
  color: #ffffff;
  transform: translateX(3px);
}

/* Main Content */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: calc(100% - 260px);
  margin-left: 260px;
}

.top-navbar {
  height: 70px;
  min-height: 70px;
  max-height: 70px;
  box-sizing: border-box;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.mobile-toggle-btn {
  display: none;
  background: #ffffff;
  border: 1.5px solid var(--border);
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 10px;
  color: var(--text-main);
  font-size: 1.2rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: all 0.2s;
  padding: 0;
  outline: none;
}
.mobile-toggle-btn:hover, .mobile-toggle-btn:active {
  background: #f1f5f9;
  border-color: var(--primary);
  color: var(--primary);
}

.page-title {
  flex: 1;
  min-width: 0;
}

.page-title h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

.page-title p {
  display: none !important;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.btn-header-live {
  color: #0080FE !important;
  border-color: #bae6fd !important;
  background: #ffffff !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(0, 128, 254, 0.08) !important;
  white-space: nowrap !important;
  font-size: 0.88rem !important;
}
.btn-header-live:hover {
  background: #f0f9ff !important;
  border-color: #0080FE !important;
  color: #0060df !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 128, 254, 0.18) !important;
}

.btn-header-logout {
  color: #ef4444 !important;
  border-color: #fca5a5 !important;
  background: #ffffff !important;
  font-weight: 700 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.08) !important;
  white-space: nowrap !important;
  font-size: 0.88rem !important;
}
.btn-header-logout:hover {
  background: #fef2f2 !important;
  border-color: #ef4444 !important;
  color: #dc2626 !important;
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.18) !important;
}

.content-body {
  padding: 24px 28px;
  flex: 1;
  min-width: 0;
}

/* Compact Modern Stats Cards (Exact Match to Reference Design) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  background: #ffffff;
  border-radius: 5px;
  padding: 16px 20px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 2px 6px rgba(15, 23, 42, 0.02);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  position: relative;
  min-height: 82px;
}
a.stat-card {
  text-decoration: none;
  cursor: pointer;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: #94a3b8;
}

.stat-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.stat-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}

.stat-value {
  font-size: 1.22rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.2px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value .currency-symbol {
  font-size: 0.85em;
  font-weight: 600;
  opacity: 0.9;
}

.stat-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.stat-card.stat-sell .stat-icon { background: #e6f2ff; color: #0080FE; }
.stat-card.stat-service .stat-icon, .stat-card.stat-charge .stat-icon { background: #ede9fe; color: #7c3aed; }
.stat-card.stat-cost .stat-icon { background: #ffe4e6; color: #e11d48; }
.stat-card.stat-profit .stat-icon { background: #dcfce7; color: #10b981; }
.stat-card.stat-alert .stat-icon { background: #fef3c7; color: #f59e0b; }
.stat-card.stat-info .stat-icon { background: #ede9fe; color: #7c3aed; }

.stat-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed rgba(226, 232, 240, 0.8);
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
}

.stat-footer strong {
  color: #0f172a;
  font-weight: 700;
}

/* Modern Alert Banners */
.alert-banner {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid var(--danger);
  border-radius: 5px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.alert-banner.urgent {
  background: #fff8f8;
  border-color: #fecaca;
  border-left: 4px solid #e11d48;
  box-shadow: 0 2px 8px rgba(244, 63, 94, 0.05);
}

/* Modern Clean Cards & Containers */
.card {
  background: #ffffff;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 2px 8px rgba(15, 23, 42, 0.02);
  margin-bottom: 24px;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title i {
  color: var(--primary);
  font-size: 1.1rem;
}

.card-body {
  padding: 22px 24px;
}

.table-responsive {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
  background: #f8fafc;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.custom-table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.custom-table td {
  padding: 15px 18px;
  font-size: 0.94rem;
  border-bottom: 1px solid #f1f5f9;
  color: #1e293b;
  vertical-align: middle;
  white-space: nowrap;
}

.custom-table td.cell-wrap,
.custom-table th.cell-wrap,
.custom-table .cell-wrap {
  white-space: normal !important;
  word-break: break-word;
}

.custom-table tfoot td {
  white-space: nowrap;
}

.custom-table tbody tr {
  transition: background-color 0.15s ease;
}

.custom-table tbody tr:hover {
  background-color: #f8fafc;
}

.custom-table td .btn,
.custom-table td .badge {
  white-space: nowrap;
}

/* Modern Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.badge-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-info { background: #e6f2ff; color: #0080FE; border: 1px solid #bfdbfe; }
.badge-secondary { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.pulse {
  animation: pulse-animation 1.5s infinite;
}

@keyframes pulse-animation {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Modern High-Visibility Buttons (InnoCraft IT Standard) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  touch-action: manipulation;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary Button */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%) !important;
  color: #ffffff !important;
  border-color: #4338ca !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3) !important;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%) !important;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4) !important;
  transform: translateY(-2px);
  color: #ffffff !important;
}

/* Success Button */
.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  border-color: #059669 !important;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
}
.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-2px);
  color: #ffffff !important;
}

/* Danger Button */
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.4) !important;
  transform: translateY(-2px);
  color: #ffffff !important;
}

/* Warning Button */
.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3) !important;
}
.btn-warning:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4) !important;
  transform: translateY(-2px);
  color: #ffffff !important;
}

/* Secondary Button */
.btn-secondary {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}
.btn-secondary:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #94a3b8 !important;
  transform: translateY(-1px);
}

/* Crisp, High-Contrast Outline Button */
.btn-outline {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}
.btn-outline:hover {
  background: #f8fafc !important;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
  transform: translateY(-1px);
}

/* Glassmorphism Outline Button for Dark/Hero Banners */
.btn-outline-white {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.6) !important;
  color: #ffffff !important;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15) !important;
}
.btn-outline-white:hover {
  background: #ffffff !important;
  border-color: #ffffff !important;
  color: #4338ca !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Solid White Action Button */
.btn-white {
  background: #ffffff !important;
  border: 1.5px solid #ffffff !important;
  color: #4338ca !important;
  font-weight: 800 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}
.btn-white:hover {
  background: #f8fafc !important;
  color: #3730a3 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25) !important;
}

/* Gold Icon Trophy Button */
.btn-icon-gold {
  background: #fffbeb !important;
  border: 1.5px solid #fde68a !important;
  color: #d97706 !important;
  padding: 6px 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
}
.btn-icon-gold:hover {
  background: #fef3c7 !important;
  border-color: #f59e0b !important;
  color: #b45309 !important;
  transform: translateY(-1px);
}

/* Table Icon Buttons & Action Pills */
.custom-table td .btn-sm {
  padding: 5px 12px;
  min-height: 32px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
}

/* Specific Action Colors inside Tables */
.custom-table td .btn-outline[style*="var(--danger)"] {
  background: #fef2f2 !important;
  border-color: #fca5a5 !important;
  color: #dc2626 !important;
}
.custom-table td .btn-outline[style*="var(--danger)"]:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

.custom-table td .btn-outline[style*="var(--primary)"] {
  background: #eef2ff !important;
  border-color: #c7d2fe !important;
  color: #4338ca !important;
}
.custom-table td .btn-outline[style*="var(--primary)"]:hover {
  background: #4338ca !important;
  border-color: #4338ca !important;
  color: #ffffff !important;
}

/* Exam Action Clear/Review Buttons */
.exam-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}
.exam-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  color: #1e293b;
}
.exam-action-review {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.exam-action-review:hover {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #92400e;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #1da851 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}
.btn-whatsapp:hover {
  background: linear-gradient(135deg, #1ea952 0%, #128C7E 100%);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 14px;
  min-height: 34px;
  font-size: 0.84rem;
  border-radius: 8px;
}

/* Filter Nav Tabs */
.filter-tabs {
  display: flex;
  gap: 6px;
  background: #f1f5f9;
  padding: 4px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.filter-tab {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.filter-tab:hover {
  color: var(--text-main);
}

.filter-tab.active {
  background: var(--bg-surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  padding: 10px 14px;
  min-height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: #fff;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .form-actions {
    flex-direction: column-reverse;
    width: 100%;
  }
  .form-actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

/* Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-backdrop.show {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border-radius: 5px;
  width: 100%;
  max-width: 550px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--border);
  animation: modalFadeIn 0.2s ease-out;
}

.modal-dialog-flex {
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  max-height: 90vh !important;
  max-height: 90dvh !important;
  overflow: hidden !important;
}

.modal-scroll-body {
  padding: 18px 20px !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.modal-action-footer {
  padding: 12px 18px !important;
  border-top: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px !important;
  flex-shrink: 0 !important;
  position: relative !important;
  z-index: 10 !important;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Print Styles */
@media print {
  .sidebar, .top-navbar, .no-print, .btn, .filter-tabs, .mobile-toggle-btn {
    display: none !important;
  }
  body, .app-container, .main-wrapper, .content-body {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
  }
}

/* Comprehensive Mobile Responsiveness */
@media (max-width: 1024px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
    position: relative !important;
  }

  .app-container {
    display: flex !important;
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: clip !important;
    position: relative !important;
  }

  .sidebar,
  .public-drawer,
  #studentMobileMenu,
  .student-drawer {
    position: fixed !important;
    top: 0 !important;
    left: -320px !important;
    width: 285px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 99999 !important;
    background: #ffffff !important;
    box-shadow: 10px 0 35px rgba(0,0,0,0.18) !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }

  .sidebar .nav-menu,
  .student-drawer .student-nav-menu,
  .public-drawer .public-drawer-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .sidebar .sidebar-footer,
  .student-drawer .sidebar-footer,
  .public-drawer .sidebar-footer {
    flex-shrink: 0 !important;
    margin-top: auto !important;
  }

  .sidebar.mobile-open,
  .sidebar.open,
  .public-drawer.mobile-open,
  .public-drawer.open,
  #studentMobileMenu.mobile-open,
  #studentMobileMenu.open,
  .student-drawer.mobile-open,
  .student-drawer.open {
    left: 0 !important;
  }

  .main-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    overflow-x: clip !important;
    flex: 1 1 auto !important;
  }

  .sidebar-close-btn {
    display: inline-flex !important;
  }

  .sidebar-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(15, 23, 42, 0.5) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    z-index: 99990 !important;
    display: none !important;
  }

  .sidebar-backdrop.show {
    display: block !important;
  }

  .mobile-toggle-btn {
    display: inline-flex !important;
  }

  .top-navbar {
    padding: 0 16px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    box-sizing: border-box;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    width: 100% !important;
    max-width: 100vw !important;
  }

  .brand-header {
    padding: 0 16px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    box-sizing: border-box;
  }

  .content-body {
    padding: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  .card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin-bottom: 16px !important;
  }

  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .stats-grid,
  .products-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: clip !important;
  }

  .app-container {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    overflow-x: clip !important;
  }

  .main-wrapper {
    width: 100% !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    overflow-x: clip !important;
  }

  .content-body {
    padding: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow-x: clip !important;
  }

  .top-navbar {
    padding: 0 16px !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    box-sizing: border-box;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .brand-header {
    padding: 0 16px !important;
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    box-sizing: border-box;
  }

  .mobile-toggle-btn {
    display: inline-flex !important;
    flex-shrink: 0 !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
  }

  .page-title {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .page-title h1 {
    font-size: 1.12rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.3 !important;
  }

  .page-title p {
    display: none !important;
  }

  .top-navbar .navbar-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .top-navbar .navbar-actions .btn span {
    display: none !important;
  }
  .top-navbar .navbar-actions .btn {
    padding: 6px 10px !important;
    min-height: 34px !important;
  }

  /* Universal 2 Cards Per Row on Mobile */
  .stats-grid,
  .products-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* When the last card in an odd-numbered set appears (e.g. 3rd card in expenses/clients), span full width gracefully */
  .stats-grid > *:last-child:nth-child(odd),
  .products-stats-grid > *:last-child:nth-child(odd),
  .stat-card.stat-action-card {
    grid-column: 1 / -1 !important;
  }

  .stat-card,
  .prod-stat-card {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    padding: 12px 10px !important;
    min-height: 70px !important;
    gap: 8px !important;
    border-radius: 6px !important;
  }

  .stat-content,
  .prod-stat-info {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .stat-label,
  .prod-stat-label {
    font-size: 0.74rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }

  .stat-value,
  .prod-stat-value {
    font-size: 1.05rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    line-height: 1.2 !important;
  }

  .stat-icon,
  .prod-stat-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    font-size: 0.92rem !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  /* Card and Responsive Tables */
  .card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    margin-bottom: 14px !important;
    border-radius: var(--radius-sm) !important;
  }

  .card-header {
    padding: 12px 14px !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    box-sizing: border-box !important;
  }

  .card-header .card-title {
    font-size: 1rem !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  .card-header input[type="text"],
  .card-header input[type="search"],
  .card-header .form-control {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px !important;
    box-sizing: border-box !important;
  }

  .card-header > div,
  .card-header form,
  form[method="GET"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .card-body {
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
    box-sizing: border-box !important;
  }

  .custom-table, .data-table, table.table {
    min-width: 580px !important;
    width: 100% !important;
  }

  .custom-table th,
  .custom-table td,
  .data-table th,
  .data-table td,
  table.table th,
  table.table td {
    padding: 10px 10px !important;
    font-size: 0.84rem !important;
    white-space: nowrap !important;
  }

  /* Horizontal Filter Tabs */
  .filter-tabs,
  .settings-nav-tabs {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    flex-wrap: nowrap !important;
    display: flex !important;
    gap: 6px !important;
    padding-bottom: 4px !important;
    box-sizing: border-box !important;
    scrollbar-width: none !important;
  }

  .filter-tabs::-webkit-scrollbar,
  .settings-nav-tabs::-webkit-scrollbar {
    display: none !important;
  }

  .filter-tab,
  .settings-tab-btn {
    padding: 8px 12px !important;
    font-size: 0.82rem !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .form-control {
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    min-height: 42px !important;
    box-sizing: border-box !important;
  }

  /* Modals */
  .modal-backdrop {
    padding: 8px !important;
    align-items: center !important;
    box-sizing: border-box !important;
  }

  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    padding: 18px 14px !important;
    border-radius: 12px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
  }

  .modal-dialog-flex {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88dvh !important;
    max-height: 88vh !important;
    padding: 0 !important;
    border-radius: 12px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .modal-scroll-body {
    padding: 14px 12px !important;
    box-sizing: border-box !important;
  }

  .modal-action-footer {
    padding: 10px 12px !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .modal-action-footer .btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 8px 6px !important;
    font-size: 0.82rem !important;
    min-height: 38px !important;
    white-space: nowrap !important;
  }

  .btn-sm {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: 0.80rem !important;
  }

  .pagination-wrapper {
    padding: 10px 6px !important;
    flex-wrap: wrap !important;
  }

  .pagination-container {
    gap: 4px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  .page-link {
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 6px !important;
    font-size: 0.82rem !important;
  }

  .page-nav {
    font-size: 0.78rem !important;
    padding: 0 8px !important;
  }

  .alert-banner {
    padding: 10px 12px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
  }

  /* Universal Settings & Editor Mobile Layouts */
  .settings-tab-pane {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .wc-editor-container,
  .wp-editor-container {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .wc-main-content,
  .wc-sidebar-settings,
  .wp-main-content,
  .wp-sidebar-settings {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .modal-overlay {
    padding: 10px !important;
    box-sizing: border-box !important;
  }

  .modal-dialog {
    max-width: 100% !important;
    max-height: 90vh !important;
    max-height: 90dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .modal-dialog .modal-body {
    overflow-y: auto !important;
    max-height: calc(90vh - 120px) !important;
  }
}

@media (max-width: 480px) {
  .content-body {
    padding: 10px 8px !important;
  }

  .top-navbar {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    box-sizing: border-box;
    flex-wrap: nowrap !important;
    padding: 0 12px !important;
    gap: 8px !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    background: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
  }

  .brand-header {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    box-sizing: border-box;
    padding: 0 12px !important;
  }

  .mobile-toggle-btn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    font-size: 1.1rem !important;
  }

  .page-title h1 {
    font-size: 1.05rem !important;
  }

  .page-title p {
    display: none !important;
  }

  .stats-grid,
  .products-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }

  .stat-card,
  .prod-stat-card {
    padding: 10px 8px !important;
    min-height: 64px !important;
    gap: 6px !important;
  }

  .stat-label,
  .prod-stat-label {
    font-size: 0.68rem !important;
  }

  .stat-value,
  .prod-stat-value {
    font-size: 0.92rem !important;
  }

  .stat-icon,
  .prod-stat-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
  }
}

/* Pagination Base Styles */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.pagination-container {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
}

.page-link:hover {
  background: #f1f5f9;
  color: var(--primary);
  border-color: #cbd5e1;
}

.page-link.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.page-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f8fafc;
  pointer-events: none;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 36px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
}

/* Settings Tabs and Components */
.settings-nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0px;
  overflow-x: auto;
  scrollbar-width: none;
}
.settings-nav-tabs::-webkit-scrollbar {
  display: none;
}
.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-bottom: -2px;
  text-decoration: none;
  font-family: inherit;
}
.settings-tab-btn:hover {
  color: var(--primary);
  background: var(--primary-light);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  text-decoration: none;
}
.settings-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
  background: #ffffff;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  text-decoration: none;
}
.settings-tab-pane {
  display: none;
}
.settings-tab-pane.active {
  display: block;
  animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Upload Preview Box */
.upload-preview-box {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border: 1.5px dashed var(--border);
  border-radius: 5px;
  background: #fafafa;
  transition: border-color 0.2s;
}
.upload-preview-box:hover {
  border-color: var(--primary);
  background: #f8fafc;
}
.upload-img-preview {
  width: 72px;
  height: 72px;
  border-radius: 5px;
  object-fit: contain;
  background: #ffffff;
  padding: 6px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* Modal Dialog */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.modal-dialog {
  background: #ffffff;
  border-radius: 5px;
  max-width: 540px;
  width: 100%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid var(--border);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.25s ease;
}
.modal-overlay.open .modal-dialog {
  transform: translateY(0);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}
.modal-close:hover {
  background: #fee2e2;
  color: #ef4444;
}
.modal-body {
  padding: 24px;
  max-height: 75vh;
  overflow-y: auto;
}
.modal-footer {
  padding: 16px 24px;
  background: #fafafa;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   Pagination Component
   ========================================================================== */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 18px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.pagination-container {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.page-link:hover {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.page-link.active {
  background: var(--primary, #0080FE);
  color: #ffffff;
  border-color: var(--primary, #0080FE);
  box-shadow: 0 4px 10px rgba(0, 128, 254, 0.25);
  cursor: default;
}

.page-link.page-nav {
  gap: 6px;
  font-size: 0.85rem;
  padding: 0 14px;
}

.page-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background: #f1f5f9;
}

.page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 36px;
  color: #94a3b8;
  font-weight: 700;
  letter-spacing: 2px;
}

@media (max-width: 640px) {
  .page-link {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 0.8rem;
  }
  .page-link.page-nav {
    padding: 0 10px;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Full-Width Desktop Layout Expansion (Eliminate cramped / narrow feeling)
   ========================================================================== */
@media (min-width: 1200px) {
  .site-container,
  .header-container,
  .hero-unified-container,
  .home-products-wrap,
  .portal-content,
  .shop-container,
  .order-main-container,
  .portal-nav-container,
  .footer-top,
  .footer-bottom-inner,
  .footer-bottom-container,
  .user-main-body,
  .user-footer-container {
    max-width: 1680px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (min-width: 1440px) {
  .header-container {
    padding-left: 36px !important;
    padding-right: 36px !important;
  }
  .portal-content,
  .hero-unified-container,
  .shop-container,
  .order-main-container,
  .user-main-body {
    padding-left: 36px !important;
    padding-right: 36px !important;
  }
  .footer-top,
  .footer-bottom-inner {
    padding-left: 36px !important;
    padding-right: 36px !important;
  }
}

@media (min-width: 1680px) {
  .site-container,
  .header-container,
  .hero-unified-container,
  .home-products-wrap,
  .portal-content,
  .shop-container,
  .order-main-container,
  .portal-nav-container,
  .footer-top,
  .footer-bottom-inner,
  .footer-bottom-container,
  .user-main-body,
  .user-footer-container {
    max-width: 1800px !important;
    padding-left: 48px !important;
    padding-right: 48px !important;
  }
}

/* ==========================================================================
   Mobile Footer Bar Center Alignment (Credit & Social Icons)
   ========================================================================== */
@media (max-width: 768px) {
  .footer-bottom {
    padding: 20px 16px !important;
    text-align: center !important;
  }
  .footer-bottom-container,
  .footer-bottom-inner {
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    gap: 14px !important;
  }
  .footer-social-wrap {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 auto !important;
    order: 1 !important;
  }
  .footer-social-links {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
  }
  .footer-copyright {
    width: 100% !important;
    text-align: center !important;
    font-size: clamp(0.72rem, 3.2vw, 0.84rem) !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
    letter-spacing: -0.01em !important;
    order: 2 !important;
  }
}

/* Universal Mobile Full-Width Containers & Cards */
@media (max-width: 768px) {
  .site-container,
  .blog-single-container,
  .blog-site-container,
  .shop-container,
  .product-container,
  .checkout-container,
  .order-main-container,
  .order-hero-container,
  .portal-content,
  .hero-unified-container,
  .contact-container,
  .home-products-wrap,
  .user-main-body {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
  }

  .portal-hero-packages-unified,
  .contact-hero-wrap,
  .order-hero {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  .hero-centered-wrap {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  .article-wrap,
  .product-showcase-grid,
  .product-desc-card,
  .checkout-card,
  .shop-top-card,
  .author-bio-card,
  .bottom-consultation-banner,
  .contact-card,
  .compact-prod-card {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .mobile-carousel {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    gap: 14px !important;
    padding: 8px 2.5% 18px !important;
    margin: 0 !important;
    width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    box-sizing: border-box !important;
  }

  .mobile-carousel::-webkit-scrollbar {
    display: none !important;
  }

  .mobile-carousel > * {
    flex: 0 0 95% !important;
    width: 95% !important;
    min-width: 95% !important;
    max-width: 95% !important;
    scroll-snap-align: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  .pricing-card,
  .duration-card,
  .feature-card {
    width: 95% !important;
    max-width: 95% !important;
    box-sizing: border-box !important;
  }
}






/* =========================================================================
   ChakriPlus Exam Engine, Question Bank & Learning Platform Component Styles
   ========================================================================= */

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  color: #ffffff;
  padding: 60px 24px;
  border-radius: 12px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(67, 56, 202, 0.3);
}

.hero-notice-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-title {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 14px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #e0e7ff;
  line-height: 1.6;
  max-width: 650px;
  margin-bottom: 24px;
}

/* Exam Interface */
.exam-header-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  position: sticky;
  top: 80px;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.exam-timer-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 30px;
  border: 1.5px solid rgba(79, 70, 229, 0.2);
}

.exam-timer-widget.urgent {
  background: var(--danger-light);
  color: var(--danger-dark);
  border-color: #fca5a5;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Question Cards */
.question-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.question-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.5;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.q-badge {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  .options-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
  user-select: none;
}

.option-label:hover {
  border-color: var(--primary);
  background: #ffffff;
}

.option-label.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  font-weight: 700;
  color: var(--primary);
}

.option-indicator {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: #ffffff;
  flex-shrink: 0;
}

.option-label.selected .option-indicator {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Question Navigation Palette */
.palette-container {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 170px;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
  padding: 4px;
}

.palette-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}

.palette-btn:hover {
  border-color: var(--primary);
}

.palette-btn.answered {
  background: var(--success);
  color: #ffffff;
  border-color: var(--success);
}

.palette-btn.review {
  background: var(--warning);
  color: #ffffff;
  border-color: var(--warning);
}

/* Practice MCQ Cards */
.practice-question-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 22px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.practice-opt-btn {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--text-main);
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
}

.practice-opt-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: #ffffff;
}

.practice-opt-btn.correct {
  background: var(--success-light) !important;
  border-color: var(--success) !important;
  color: var(--success-dark) !important;
  font-weight: 700;
}

.practice-opt-btn.incorrect {
  background: var(--danger-light) !important;
  border-color: var(--danger) !important;
  color: var(--danger-dark) !important;
  font-weight: 700;
}

.explanation-box {
  background: #f0fdf4;
  border-left: 4px solid var(--success);
  padding: 16px;
  border-radius: 0 6px 6px 0;
  margin-top: 14px;
  display: none;
  font-size: 0.93rem;
  line-height: 1.6;
  color: #14532d;
}

/* Course Cards */
.course-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}

.course-thumb-box {
  height: 160px;
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  position: relative;
  padding: 16px;
  text-align: center;
}

.course-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

/* Result Overview Card */
.score-circle-box {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 6px solid var(--primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  background: var(--primary-light);
}

/* ==============================================================
   RESPONSIVE GRID & FULL-WIDTH CONTAINER SYSTEM
   Standard by InnoCraft IT
   ============================================================== */

/* Full-Width Desktop Containers */
.container-full {
  width: 100% !important;
  max-width: 1540px !important;
  margin: 0 auto !important;
  padding: 0 24px !important;
  box-sizing: border-box !important;
}

/* 2-Column Split: 2fr 1fr (Main Content + Sidebar) */
.layout-grid-2-1 {
  display: grid !important;
  grid-template-columns: 2fr 1fr !important;
  gap: 24px !important;
  align-items: start !important;
  width: 100% !important;
}

/* 2-Column Split: 3fr 1fr (Take Exam + Palette) */
.layout-grid-3-1 {
  display: grid !important;
  grid-template-columns: 3fr 1fr !important;
  gap: 24px !important;
  align-items: start !important;
  width: 100% !important;
}

/* 2-Column Equal: 1fr 1fr (Dual Column Sections) */
.layout-grid-1-1 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px !important;
  align-items: start !important;
  width: 100% !important;
}

/* 3-Column Equal Grid */
.layout-grid-3 {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 24px !important;
  width: 100% !important;
}

/* 4-Column Equal Grid */
.layout-grid-4 {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 20px !important;
  width: 100% !important;
}

/* 6-Card Stats Grid for Admin Dashboard Overview */
.stats-grid-6 {
  display: grid !important;
  grid-template-columns: repeat(6, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
  width: 100% !important;
}

/* 4-Card Stats Grid & Dashboard Grid */
.stats-grid-4,
.dashboard-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin-bottom: 24px !important;
  width: 100% !important;
}

/* Cards Auto-Fitting Grid (Courses, Live Exams, Question Bank) */
.cards-auto-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)) !important;
  gap: 22px !important;
  width: 100% !important;
}

.cards-auto-grid-wide {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)) !important;
  gap: 24px !important;
  width: 100% !important;
}

/* Ensure all cards take full width of their grid column */
.card,
.course-card,
.stat-card {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Responsive Media Queries */
@media (max-width: 1400px) {
  .stats-grid-6 {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 1200px) {
  .layout-grid-2-1,
  .layout-grid-3-1 {
    grid-template-columns: 1fr !important;
  }
  .stats-grid-4,
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .layout-grid-3 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 991px) {
  .layout-grid-1-1 {
    grid-template-columns: 1fr !important;
  }
  .stats-grid-6 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .layout-grid-3 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 600px) {
  .stats-grid-6,
  .stats-grid-4,
  .dashboard-grid,
  .cards-auto-grid,
  .cards-auto-grid-wide {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   Back To Top Floating Button (InnoCraft IT Standard)
   ========================================================================== */
.back-to-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff !important;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.back-to-top-btn.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top-btn:hover {
  background: var(--primary-dark);
  color: #ffffff !important;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.45);
}

.back-to-top-btn:active {
  transform: translateY(0) scale(0.95);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.3);
}

@media (max-width: 768px) {
  .back-to-top-btn {
    bottom: 22px;
    right: 20px;
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
  }
}

/* ==========================================================================
   WhatsApp Floating Support Button (InnoCraft IT Standard)
   ========================================================================== */
.floating-whatsapp-btn {
  position: fixed;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #25D366;
  color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.42);
  z-index: 1040;
  text-decoration: none;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, box-shadow 0.25s ease;
  animation: wa-pulse 3s infinite;
}

.floating-whatsapp-btn.wa-pos-bottom-left {
  bottom: 28px;
  left: 28px;
}

.floating-whatsapp-btn.wa-pos-bottom-right {
  bottom: 86px;
  right: 28px;
}

@media (max-width: 768px) {
  .floating-whatsapp-btn {
    width: 44px;
    height: 44px;
    font-size: 1.5rem;
  }
  .floating-whatsapp-btn.wa-pos-bottom-left {
    bottom: 22px;
    left: 20px;
  }
  .floating-whatsapp-btn.wa-pos-bottom-right {
    bottom: 74px;
    right: 20px;
  }
}

.floating-whatsapp-btn:hover {
  background: #1eb956;
  color: #ffffff !important;
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
  animation: none;
}

.floating-whatsapp-btn:active {
  transform: scale(0.95);
  box-shadow: 0 3px 10px rgba(37, 211, 102, 0.35);
}

.floating-whatsapp-btn .whatsapp-badge-text {
  position: absolute;
  white-space: nowrap;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.floating-whatsapp-btn.wa-pos-bottom-left .whatsapp-badge-text {
  left: 60px;
  transform: translateX(-6px);
}

.floating-whatsapp-btn.wa-pos-bottom-right .whatsapp-badge-text {
  right: 60px;
  transform: translateX(6px);
}

.floating-whatsapp-btn:hover .whatsapp-badge-text {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

@keyframes wa-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}
