/* ========== CSS Variables for Theme (Professional) ========== */
:root {
  --primary-gradient-start: #1e3a8a;
  --primary-gradient-end: #1d4ed8;
  --accent-color: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #dbeafe;
  --sidebar-width: 272px;
  --topbar-height: 64px;
  --transition-speed: 0.2s;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 6px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 12px 24px -4px rgb(0 0 0 / 0.1), 0 4px 8px -2px rgb(0 0 0 / 0.06);
  --shadow-xl: 0 20px 40px -8px rgb(0 0 0 / 0.12);
  --border-radius: 10px;
  --border-radius-sm: 8px;
  --card-hover-transform: translateY(-1px);
  --sidebar-bg: #1e3a8a;
  --sidebar-header-bg: rgba(0, 0, 0, 0.12);
  --sidebar-link-color: rgba(219, 234, 254, 0.75);
  --sidebar-link-hover: #ffffff;
  --sidebar-link-active: #ffffff;
  --sidebar-link-active-bg: rgba(255, 255, 255, 0.15);
  --surface: #ffffff;
  --surface-elevated: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 15px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 2px white, 0 0 0 4px var(--accent-color);
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Manrope', 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Layout ========== */
.wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.wrapper.no-sidebar #content {
  width: 100%;
  margin-left: 0;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 40%, #1d4ed8 100%);
  color: #fff;
  transition: all var(--transition-speed) var(--transition-smooth);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-right: none;
  box-shadow: 4px 0 30px -4px rgba(30, 58, 138, 0.35);
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(96, 165, 250, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.sidebar.active {
  margin-left: calc(-1 * var(--sidebar-width));
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  background: rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.sidebar ul.components {
  padding: 20px 12px;
  flex-grow: 1;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

/* Custom scrollbar */
.sidebar ul.components::-webkit-scrollbar {
  width: 4px;
}

.sidebar ul.components::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}

.sidebar ul.components::-webkit-scrollbar-thumb {
  background: rgba(147, 197, 253, 0.25);
  border-radius: 4px;
}

.sidebar ul.components::-webkit-scrollbar-thumb:hover {
  background: rgba(147, 197, 253, 0.4);
}

.sidebar ul li {
  margin-bottom: 4px;
  position: relative;
}

.sidebar ul li a {
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  color: var(--sidebar-link-color);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-speed) var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.sidebar ul li a::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  transition: width var(--transition-speed) var(--transition-smooth);
  border-radius: var(--border-radius-sm);
}

.sidebar ul li a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(4px);
}

.sidebar ul li a:hover::after {
  width: 100%;
}

.sidebar ul li a i {
  font-size: 1.25rem;
  margin-right: 12px;
  width: 20px;
  text-align: center;
  transition: transform var(--transition-speed) var(--transition-smooth);
  opacity: 0.85;
}

.sidebar ul li a:hover i {
  transform: scale(1.1);
  opacity: 1;
}

.sidebar ul li.active > a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.sidebar ul li.active > a i {
  color: #93c5fd;
  transform: scale(1.1);
  opacity: 1;
}

.sidebar ul li.active > a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: #93c5fd;
  border-radius: 0 3px 3px 0;
  box-shadow: 0 0 12px rgba(147, 197, 253, 0.6);
}

.sidebar .menu-section {
  padding: 20px 16px 8px 16px;
  color: rgba(147, 197, 253, 0.6);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  position: relative;
}

.sidebar .menu-section::before {
  content: '';
  position: absolute;
  bottom: 8px;
  left: 16px;
  right: 16px;
  height: 1px;
  background: linear-gradient(90deg, rgba(147, 197, 253, 0.2) 0%, transparent 100%);
}

/* Sidebar Profile Section */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

.sidebar-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(147, 197, 253, 0.4) 50%, transparent 100%);
}

/* Role Badge in Sidebar */
.sidebar .role-badge {
  margin-top: 4px;
}

.sidebar .role-badge .badge {
  font-size: 0.65rem;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Logout Button Enhancement */
.sidebar .logout-btn {
  transition: all var(--transition-speed) var(--transition-smooth);
  border-radius: var(--border-radius-sm);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(219, 234, 254, 0.7) !important;
}

.sidebar .logout-btn:hover {
  color: #fca5a5 !important;
  background: rgba(239, 68, 68, 0.15);
}

.sidebar .logout-btn i {
  font-size: 1.1rem;
}

.user-profile-sm {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.user-profile-sm .avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(147, 197, 253, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
}

/* Content Area */
#content {
  flex: 1;
  margin-left: var(--sidebar-width);
  transition: all var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
}

#content.active {
  margin-left: 0;
}

.app-topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.04);
}

.main-content {
  padding: 28px 32px;
  flex-grow: 1;
}

/* Footer */
.app-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-color);
  padding: 20px 32px;
  margin-top: auto;
  box-shadow: 0 -1px 3px 0 rgb(0 0 0 / 0.03);
}

.app-footer .footer-logo {
  height: 36px;
  width: auto;
  border-radius: 6px;
}

/* KPI Cards Refined */
.kpi-card {
  border: none;
  border-radius: var(--border-radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  overflow: hidden;
}

.kpi-card:hover {
  transform: var(--card-hover-transform);
  box-shadow: var(--shadow-md);
}

.kpi-icon-container {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
}

.kpi-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #64748b;
}

/* Custom Utilities */
.text-gradient {
  background: linear-gradient(90deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.bg-soft-primary { background-color: rgba(56, 189, 248, 0.1); color: #0ea5e9; }
.bg-soft-success { background-color: rgba(34, 197, 94, 0.1); color: #16a34a; }
.bg-soft-warning { background-color: rgba(234, 179, 8, 0.1); color: #ca8a04; }
.bg-soft-danger { background-color: rgba(239, 44, 44, 0.1); color: #dc2626; }
.bg-soft-info { background-color: rgba(6, 182, 212, 0.1); color: #0891b2; }

/* Dashboard Tables */
.dashboard-table thead th {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-top: none;
  border-bottom: none;
  padding: 12px 16px;
}

.dashboard-table tbody td {
  padding: 11px 16px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.dashboard-table tbody tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

/* Hero Carousel and Footer (Keep existing but refined) */
/* ... existing styles ... */


/* ========== Advanced Card Styles ========== */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: var(--card-hover-transform);
}

.card-header {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  border-bottom: 2px solid rgba(96, 165, 250, 0.1);
  font-weight: 600;
  padding: 16px 20px;
}

.card-body {
  padding: 20px;
}

.card-footer {
  background: rgba(248, 249, 250, 0.8);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* KPI Cards */
.kpi-card {
  position: relative;
  overflow: hidden;
  border-left: 4px solid transparent;
  transition: all var(--transition-speed) ease;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.1) 0%, transparent 70%);
  transform: translate(30%, -30%);
  transition: all var(--transition-speed) ease;
}

.kpi-card:hover::before {
  transform: translate(20%, -20%) scale(1.2);
}

.kpi-card:hover {
  border-left-color: var(--accent-color);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.kpi-value {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.kpi-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== Enhanced Buttons ========== */
.btn {
  border-radius: 8px;
  font-weight: 500;
  padding: 10px 20px;
  transition: all var(--transition-speed) ease;
  position: relative;
  overflow: hidden;
  border: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

.btn-white {
  background: #fff;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-white:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: var(--text-primary);
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.nav-link-profile:hover {
  background: rgba(37, 99, 235, 0.06);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.875rem;
}

/* ========== Enhanced Tables ========== */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 0.875rem;
}

.table thead th {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
  color: #ffffff;
  border-bottom: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
  padding: 13px 14px;
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
}

.table thead th:first-child {
  border-top-left-radius: 0;
}

.table thead th:last-child {
  border-top-right-radius: 0;
}

.table thead th .sort-icon {
  color: rgba(255, 255, 255, 0.5);
}

.table tbody tr {
  transition: all 0.15s ease;
}

.table tbody tr:nth-child(even) {
  background: rgba(30, 58, 138, 0.02);
}

.table tbody tr:hover {
  background: rgba(37, 99, 235, 0.07);
  box-shadow: inset 3px 0 0 0 #2563eb;
}

.table tbody td {
  padding: 11px 14px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: #374151;
}

.table tbody td a:not(.btn) {
  color: #1e3a8a;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

.table tbody td a:not(.btn):hover {
  color: #2563eb;
  text-decoration: underline;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* Row numbering via CSS counter */
.table.table-numbered {
  counter-reset: row-num;
}

.table.table-numbered tbody tr {
  counter-increment: row-num;
}

.table.table-numbered tbody td:first-child::before {
  content: counter(row-num) ". ";
  font-weight: 600;
  color: #9ca3af;
  font-size: 0.75rem;
  margin-right: 4px;
}

/* Status badges — uniform style */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.status-badge.status-paid,
.status-badge.status-success,
.status-badge.status-active,
.status-badge.status-approved {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.status-badge.status-unpaid,
.status-badge.status-danger,
.status-badge.status-rejected {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.status-badge.status-pending,
.status-badge.status-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
}

.status-badge.status-inactive,
.status-badge.status-secondary {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
}

.status-badge i {
  font-size: 0.55rem;
}

/* Empty state for tables */
.table-empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
}

.table-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 12px;
  display: block;
  opacity: 0.4;
}

/* Card wrapping tables */
.card.table-card {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
}

.card.table-card .card-header {
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card.table-card .card-header .record-count {
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

/* ========== Enhanced Forms ========== */
.form-control, .form-select {
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  padding: 10px 14px;
  transition: all var(--transition-speed) ease;
  background: rgba(255, 255, 255, 0.9);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1);
  background: #fff;
  transform: translateY(-1px);
}

.form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* ========== Toast Notifications ========== */
.toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 1050;
}

.toast {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  border: none;
  backdrop-filter: blur(10px);
  animation: slideInRight 0.4s ease;
}

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

.toast-header {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-bottom: 2px solid rgba(96, 165, 250, 0.2);
  font-weight: 600;
}

/* ========== Loading Spinner ========== */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3rem;
  border-color: var(--accent-color);
  border-right-color: transparent;
}

/* ========== Badges ========== */
.badge {
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.3px;
}

/* ========== Alerts ========== */
.alert {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-sm);
  padding: 16px 20px;
  animation: slideInDown 0.4s ease;
}

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

.alert-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-danger {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-info {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* ========== Page Headers ========== */
.page-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1, .page-header .h1,
.page-header h2, .page-header .h2,
.page-header h3, .page-header .h3,
.page-header h4, .page-header .h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin: 0;
}

/* Dashboard content cards */
.card .card-header.bg-white {
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* Ensure header action buttons don't get clipped on mid-size screens */
.d-flex.align-items-center.justify-content-between.mb-3 {
  flex-wrap: wrap;
  gap: 12px;
}

/* ========== Breadcrumbs ========== */
.breadcrumb {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  font-size: 1.2rem;
  color: var(--accent-color);
}

.breadcrumb-item.active {
  color: #1e3a8a;
  font-weight: 600;
}

/* ========== Pagination ========== */
.pagination {
  gap: 6px;
}

.page-link {
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  color: #1e3a8a;
  font-weight: 600;
  padding: 8px 14px;
  transition: all 0.2s ease;
  margin: 0;
}

.page-link:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(96, 165, 250, 0.3);
}

.page-item.active .page-link {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

/* ========== Dropdown Menus ========== */
.dropdown-menu {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  animation: fadeInDown 0.3s ease;
}

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

.dropdown-item {
  border-radius: 6px;
  padding: 10px 14px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.dropdown-item:hover {
  background: rgba(96, 165, 250, 0.1);
  color: #1e3a8a;
  transform: translateX(4px);
}

/* ========== Modal Enhancements ========== */
.modal-content {
  border-radius: var(--border-radius);
  border: none;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
  border-bottom: 2px solid rgba(96, 165, 250, 0.2);
  padding: 20px 24px;
}

.modal-title {
  color: #1e3a8a;
  font-weight: 700;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  background: rgba(248, 249, 250, 0.5);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 16px 24px;
}

/* ========== Utility Classes ========== */
.text-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hover-lift {
  transition: transform var(--transition-speed) ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* ========== Scrollbar Styling ========== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent-color) 0%, var(--accent-hover) 100%);
  border-radius: 5px;
}

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

/* ========== DataTables Enhancements ========== */
.dataTables_wrapper {
  padding: 0;
}

.dataTables_wrapper .dataTables_filter input {
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  padding: 7px 14px;
  margin-left: 8px;
  font-size: 0.85rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}

.dataTables_wrapper .dataTables_length select {
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  padding: 5px 10px;
  margin: 0 6px;
  font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_info {
  font-size: 0.8rem;
  color: #6b7280;
  padding-top: 12px;
}

.dataTables_wrapper .dataTables_paginate {
  padding-top: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 6px !important;
  margin: 0 2px;
  font-size: 0.8rem;
  padding: 5px 11px !important;
  border: 1px solid #e5e7eb !important;
  color: #374151 !important;
  transition: all 0.15s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
  color: #fff !important;
  border-color: #1e3a8a !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
  color: #fff !important;
  border-color: #1e3a8a !important;
  font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  opacity: 0.4;
  cursor: default;
}

.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
  padding: 14px 16px 8px;
  font-size: 0.85rem;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 14px;
}

div.dt-buttons {
  gap: 6px;
  display: flex;
  flex-wrap: wrap;
  padding: 14px 16px 4px;
}

.dt-button {
  border-radius: 6px !important;
  border: 1px solid #e5e7eb !important;
  background: #fff !important;
  color: #374151 !important;
  padding: 6px 14px !important;
  font-weight: 500 !important;
  font-size: 0.8rem !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.dt-button:hover {
  background: linear-gradient(135deg, #1e3a8a, #2563eb) !important;
  color: #fff !important;
  border-color: #1e3a8a !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(30, 58, 138, 0.2) !important;
}

/* DataTables column sorting icons */
table.dataTable thead th.sorting::after,
table.dataTable thead th.sorting_asc::after,
table.dataTable thead th.sorting_desc::after {
  opacity: 0.7;
}

table.dataTable thead th.sorting::before,
table.dataTable thead th.sorting_asc::before,
table.dataTable thead th.sorting_desc::before {
  opacity: 0.7;
}

table.dataTable.table thead th {
  border-bottom: none;
}

/* No results message */
.dataTables_empty {
  text-align: center;
  padding: 32px 16px !important;
  color: #9ca3af;
  font-style: italic;
}

/* ========== Select2 Enhancements ========== */
.select2-container--bootstrap-5 .select2-selection {
  border-radius: 8px !important;
  border: 2px solid #e5e7eb !important;
  min-height: 42px !important;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection {
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.1) !important;
}

.select2-dropdown {
  border-radius: var(--border-radius) !important;
  border: none !important;
  box-shadow: var(--shadow-lg) !important;
}

/* ========== Animation Classes ========== */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.slide-up {
  animation: slideUp 0.5s ease;
}

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

.scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========== Responsive Adjustments ========== */
@media (max-width: 768px) {
  .main-content {
    padding: 16px;
  }
  
  .card-body {
    padding: 16px;
  }
  
  .kpi-value {
    font-size: 1.5rem;
  }
  
  .toast-container {
    right: 10px;
    left: 10px;
  }
  
  /* Fix for page headers and buttons on mobile */
  .d-flex.align-items-center.justify-content-between {
    flex-wrap: wrap !important;
    gap: 12px;
    align-items: flex-start !important;
    overflow: visible !important;
    min-height: auto !important;
  }
  
  .d-flex.align-items-center.justify-content-between h1,
  .d-flex.align-items-center.justify-content-between .h1,
  .d-flex.align-items-center.justify-content-between h2,
  .d-flex.align-items-center.justify-content-between .h2,
  .d-flex.align-items-center.justify-content-between h3,
  .d-flex.align-items-center.justify-content-between .h3,
  .d-flex.align-items-center.justify-content-between h4,
  .d-flex.align-items-center.justify-content-between .h4 {
    flex: 1 1 100%;
    margin-bottom: 0 !important;
    width: 100%;
  }
  
  .d-flex.align-items-center.justify-content-between .btn,
  .d-flex.align-items-center.justify-content-between a.btn {
    flex: 0 0 auto;
    white-space: nowrap;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
  }
  
  /* Ensure navbar brand is visible on mobile */
  #content > .navbar .navbar-brand {
    font-size: 0.75rem !important;
    max-width: calc(100vw - 120px);
  }
  
  #content > .navbar .navbar-brand img {
    height: 30px !important;
  }
  
  #content > .navbar .navbar-brand .fw-bold {
    font-size: 0.7rem !important;
    line-height: 1.2;
  }
  
  #content > .navbar .navbar-brand .small {
    font-size: 0.6rem !important;
    line-height: 1.2;
  }
  
  /* Ensure buttons are always visible */
  .btn-primary,
  .btn-secondary,
  .btn-success,
  .btn-danger,
  .btn-warning,
  .btn-info {
    min-width: auto !important;
    padding: 8px 16px !important;
    font-size: 0.875rem !important;
  }
  
  .btn i {
    font-size: 1rem !important;
  }
  
  /* Fix navbar on mobile */
  #content > .navbar {
    padding: 12px 16px !important;
  }
  
  #content > .navbar .container-fluid {
    padding: 0 !important;
  }
  
  /* Ensure content area doesn't hide buttons */
  #content,
  .container,
  .container-fluid {
    overflow: visible !important;
  }
  
  /* Add padding to prevent button cutoff */
  body {
    padding-bottom: 20px !important;
  }
  
  /* Ensure all page sections have proper spacing */
  .mb-3,
  .mb-4 {
    margin-bottom: 1.5rem !important;
  }
}

/* ========== COMPREHENSIVE RESPONSIVE DESIGN SYSTEM ========== */

/* ========== ULTRA MOBILE (< 360px) ========== */
@media (max-width: 359px) {
  html { font-size: 12px; }
  .main-content { padding: 12px; }
  .card { margin-bottom: 0.75rem; }
  .btn { padding: 6px 10px; font-size: 0.75rem; min-height: 40px; }
  .btn-sm { padding: 4px 8px; font-size: 0.7rem; }
  .form-label { font-size: 0.75rem; }
  .form-control, .form-select { font-size: 0.875rem; padding: 0.4rem 0.5rem; }
  h1 { font-size: 1.3rem !important; }
  h2 { font-size: 1.1rem !important; }
  h3 { font-size: 1rem !important; }
  .table { font-size: 0.75rem; }
  .table thead th { padding: 8px 4px; }
  .table tbody td { padding: 8px 4px; }
  .kpi-value { font-size: 1.4rem; }
}

/* ========== MOBILE (360px - 576px) ========== */
@media (max-width: 576px) {
  /* Responsive Font Sizes */
  html { font-size: 13px; }
  body { font-size: 0.9rem; }
  
  h1, .h1 { font-size: 1.5rem !important; line-height: 1.3; }
  h2, .h2 { font-size: 1.25rem !important; line-height: 1.3; }
  h3, .h3 { font-size: 1.1rem !important; line-height: 1.3; }
  h4, .h4 { font-size: 1rem !important; }
  h5, .h5 { font-size: 0.95rem !important; }
  h6, .h6 { font-size: 0.9rem !important; }
  small, .small { font-size: 0.8rem !important; }
  
  /* Main Content Padding */
  .main-content { 
    padding: 12px 16px !important;
    padding-top: calc(var(--topbar-offset, 90px) + 8px) !important;
  }
  
  /* Card Improvements */
  .card { 
    margin-bottom: 1rem;
    border-radius: 8px;
  }
  .card-body { padding: 12px; }
  .card-header { padding: 12px; font-size: 0.9rem; }
  
  /* Button Styling */
  .btn { 
    padding: 8px 12px;
    font-size: 0.85rem;
    min-height: 40px;
    min-width: 40px;
    border-radius: 6px;
    flex: 1 1 auto;
  }
  .btn-sm { 
    padding: 6px 10px;
    font-size: 0.75rem;
    min-height: 36px;
  }
  .btn-lg { 
    padding: 10px 20px;
    font-size: 0.95rem;
    min-height: 44px;
  }
  
  /* Form Improvements */
  .form-label {
    font-size: 0.85rem;
    margin-bottom: 4px;
    font-weight: 500;
  }
  .form-control, 
  .form-select {
    font-size: 16px; /* Prevents iOS zoom */
    padding: 8px 10px;
    border-radius: 6px;
    height: auto;
    min-height: 40px;
  }
  .form-check { margin-bottom: 8px; }
  .form-check-input { width: 1.2em; height: 1.2em; margin-top: 0.25em; }
  
  /* Table Responsiveness */
  .table { font-size: 0.8rem; }
  .table thead th { 
    padding: 10px 8px;
    font-size: 0.75rem;
  }
  .table tbody td { 
    padding: 10px 8px;
    vertical-align: middle;
  }
  .table-responsive { -webkit-overflow-scrolling: touch; }
  
  /* KPI Cards */
  .kpi-value { font-size: 1.5rem; }
  .kpi-label { font-size: 0.75rem; }
  
  /* Navbar Mobile */
  #content > .navbar {
    padding: 10px 12px !important;
    left: 0 !important;
  }
  #content > .navbar .navbar-brand {
    font-size: 0.7rem;
  }
  #content > .navbar .navbar-brand img {
    height: 28px;
  }
  
  /* Spacing */
  .mb-1 { margin-bottom: 0.5rem !important; }
  .mb-2 { margin-bottom: 0.75rem !important; }
  .mb-3 { margin-bottom: 1rem !important; }
  .mb-4 { margin-bottom: 1.25rem !important; }
  .ms-2 { margin-left: 0.5rem !important; }
  .me-2 { margin-right: 0.5rem !important; }
  .p-2 { padding: 0.75rem !important; }
  .p-3 { padding: 1rem !important; }
  
  /* Row & Column */
  .row { --bs-gutter-x: 0.5rem; --bs-gutter-y: 0.75rem; }
  .col-12 { width: 100% !important; }
  
  /* Badge Sizing */
  .badge { font-size: 0.7rem; padding: 0.35rem 0.5rem; }
  
  /* Modal Improvements */
  .modal-content { border-radius: 12px; }
  .modal-body { padding: 16px; }
  .modal-header { padding: 12px 16px; }
  .modal-footer { padding: 12px 16px; }
  
  /* Ensure buttons fill width in flex containers */
  .d-flex .btn,
  .d-flex a.btn {
    min-width: 80px;
    white-space: nowrap;
  }
  
  /* List Improvements */
  .list-group-item { padding: 10px 12px; font-size: 0.9rem; }
  
  /* Alert Improvements */
  .alert { 
    padding: 12px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  
  /* Dropdown Menu */
  .dropdown-menu { 
    min-width: 180px;
    font-size: 0.9rem;
  }
  .dropdown-item { padding: 8px 16px; }
  
  /* Breadcrumb */
  .breadcrumb { 
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    flex-wrap: wrap;
  }
  
  /* Pagination */
  .pagination { 
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .page-link { 
    padding: 6px 8px;
    font-size: 0.8rem;
    min-height: 32px;
  }
}

/* ========== TABLET (576px - 768px) ========== */
@media (min-width: 577px) and (max-width: 768px) {
  html { font-size: 14px; }
  
  .main-content { padding: 16px 20px; }
  
  h1, .h1 { font-size: 1.75rem; }
  h2, .h2 { font-size: 1.4rem; }
  h3, .h3 { font-size: 1.2rem; }
  
  .btn { 
    padding: 9px 16px;
    font-size: 0.9rem;
    min-height: 40px;
  }
  
  .form-control, .form-select { 
    font-size: 16px;
    padding: 8px 12px;
  }
  
  .table { font-size: 0.85rem; }
  .table thead th { padding: 12px 10px; }
  .table tbody td { padding: 10px; }
  
  .card-body { padding: 16px; }
  
  .kpi-value { font-size: 1.75rem; }
  
  /* Navbar */
  #content > .navbar { padding: 14px 18px; }
  
  /* Two-column layouts work well here */
  .col-md-6 { width: 48%; margin-right: 2%; }
  .col-md-6:nth-child(even) { margin-right: 0; }
}

/* ========== DESKTOP (769px - 1024px) ========== */
@media (min-width: 769px) and (max-width: 1024px) {
  html { font-size: 15px; }
  
  h1, .h1 { font-size: 1.9rem; }
  h2, .h2 { font-size: 1.5rem; }
  h3, .h3 { font-size: 1.3rem; }
  
  .main-content { padding: 20px 24px; }
  
  .btn { 
    padding: 10px 18px;
    font-size: 0.95rem;
    min-height: 38px;
  }
  
  .table { font-size: 0.9rem; }
  .table thead th { padding: 14px 12px; }
  .table tbody td { padding: 12px; }
  
  .card-body { padding: 20px; }
  
  .kpi-value { font-size: 2rem; }
}

/* ========== LARGE DESKTOP (> 1024px) ========== */
@media (min-width: 1025px) {
  html { font-size: 16px; }
  
  .main-content { 
    padding: 24px;
    max-width: 100%;
  }
  
  .btn { 
    padding: 10px 20px;
    min-height: 38px;
  }
  
  .table thead th { padding: 16px 14px; }
  .table tbody td { padding: 14px; }
  
  .card { margin-bottom: 1.5rem; }
  .card-body { padding: 24px; }
  .card-header { padding: 18px 24px; }
  
  .kpi-value { font-size: 2.5rem; }
  
  /* Sidebar remains at full width */
  #content > .navbar { padding: 18px 24px; }
}

/* ========== TOUCH DEVICE OPTIMIZATION ========== */
@media (hover: none) and (pointer: coarse) {
  /* Touch-friendly sizing */
  .btn { 
    min-height: 44px;
    min-width: 44px;
    padding: 12px 16px;
  }
  
  .form-check-input { 
    width: 1.4em;
    height: 1.4em;
    margin-top: 0.2em;
    cursor: pointer;
  }
  
  .form-control,
  .form-select {
    min-height: 44px;
    font-size: 16px;
  }
  
  .btn-sm { 
    min-height: 40px;
    min-width: 40px;
  }
  
  /* Remove hover effects on touch devices */
  .btn:hover { transform: none !important; }
  .card:hover { transform: none !important; }
  .kpi-card:hover { transform: none !important; }
  
  /* Increased padding for touch targets */
  .list-group-item { padding: 14px 12px; }
  .dropdown-item { padding: 12px 16px; }
  
  /* Add active state feedback */
  .btn:active { 
    opacity: 0.9;
    transform: scale(0.98) !important;
  }
  
  /* Prevent double-tap zoom */
  a, button { 
    touch-action: manipulation;
  }
}

/* ========== LANDSCAPE ORIENTATION ========== */
@media (orientation: landscape) and (max-height: 500px) {
  .main-content { padding-top: calc(var(--topbar-offset, 90px) + 4px); }
  .hero-carousel .kenburns-container { height: 250px; }
  .card { margin-bottom: 0.75rem; }
  .mb-4 { margin-bottom: 1rem; }
}

/* ========== HIGH DPI SCREENS ========== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Text rendering optimization */
  body { -webkit-font-smoothing: antialiased; }
  
  /* Thinner borders on high DPI */
  .card, .table { border-width: 0.5px; }
}

/* ========== PRINT STYLES ========== */
@media print {
  .navbar, .sidebar, .app-footer { display: none; }
  .main-content { padding: 0; margin-left: 0; width: 100%; }
  .btn, .btn-group { display: none; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ddd; page-break-inside: avoid; }
}

/* ========== ACCESSIBILITY & RESPONSIVE UTILITIES ========== */

/* Ensure proper contrast on all devices */
@media (prefers-color-scheme: dark) {
  body { background-color: #1a1a1a; color: #e0e0e0; }
  .card { background-color: #2d2d2d; }
}

/* Respect motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .btn, .form-control, .form-select {
    border-width: 2px;
  }
  .card { border: 2px solid #000; }
}

/* ========== SIDEBAR RESPONSIVE ADJUSTMENTS ========== */

/* Tablet: slightly narrower sidebar */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 260px;
  }

  .sidebar { 
    width: var(--sidebar-width);
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(0);
    transition: transform 0.3s ease;
    z-index: 1050;
  }
  
  .sidebar.active {
    transform: translateX(-100%);
    margin-left: 0;
  }

  .sidebar-header { 
    padding: 14px 16px;
  }
  
  .sidebar ul li a {
    padding: 11px 16px;
    font-size: 0.88rem;
  }

  .sidebar ul li a span {
    display: inline;
  }
  
  .sidebar ul li a i {
    margin-right: 12px;
    font-size: 1.15rem;
  }

  .sidebar .menu-section {
    font-size: 0.65rem;
    padding: 16px 16px 6px;
  }

  #content {
    margin-left: 0 !important;
    width: 100%;
  }

  #content.active {
    margin-left: 0;
  }

  /* Overlay behind sidebar on mobile */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    backdrop-filter: blur(2px);
  }

  .sidebar-overlay.show {
    display: block;
  }
}

/* Mobile: full off-canvas sidebar with text visible */
@media (max-width: 576px) {
  :root {
    --sidebar-width: 270px;
  }

  .sidebar {
    width: var(--sidebar-width);
  }
  
  .sidebar-header h3 {
    font-size: 1rem;
  }
  
  .sidebar ul li a {
    padding: 11px 14px;
    font-size: 0.85rem;
  }
  
  .sidebar ul li a span {
    display: inline;
    font-size: 0.85rem;
  }
  
  .sidebar ul li a i {
    margin-right: 10px;
    font-size: 1.1rem;
  }

  .sidebar .menu-section {
    font-size: 0.62rem;
    padding: 14px 14px 6px;
  }

  .sidebar-footer {
    padding: 12px 14px;
  }

  .sidebar .role-badge .badge {
    font-size: 0.6rem;
  }

  .user-profile-sm .avatar {
    width: 30px;
    height: 30px;
    font-size: 0.75rem;
  }

  .user-profile-sm .user-name {
    font-size: 0.8rem;
  }
}

/* ========== DATA TABLE RESPONSIVE IMPROVEMENTS ========== */
@media (max-width: 576px) {
  .dataTables_wrapper { 
    font-size: 0.8rem;
  }
  
  .dataTables_length,
  .dataTables_filter,
  .dataTables_info,
  .dataTables_paginate {
    margin-bottom: 0.5rem;
  }
  
  .table thead { display: none; }
  
  .table tbody tr {
    display: block;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
  }
  
  .table tbody td {
    display: block;
    text-align: right;
    padding-left: 50%;
    position: relative;
  }
  
  .table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 6px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
  }
}

/* ========== FORM RESPONSIVE ========== */
.form-group { margin-bottom: 1rem; }

@media (max-width: 576px) {
  .form-group { margin-bottom: 0.75rem; }
  
  .form-inline .form-group {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .form-inline .form-control {
    width: 100%;
  }
}

/* ========== RESPONSIVE UTILITIES CLASSES ========== */

/* Show/Hide based on breakpoint */
@media (max-width: 576px) {
  .d-sm-none { display: none !important; }
}

@media (min-width: 577px) {
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-block { display: block !important; }
}

/* Text alignment on mobile */
@media (max-width: 576px) {
  .text-sm-center { text-align: center; }
  .text-sm-left { text-align: left; }
  .text-sm-right { text-align: right; }
}

/* Margin utilities - responsive */
@media (max-width: 576px) {
  .mx-auto-sm { margin-left: auto; margin-right: auto; }
  .mt-auto-sm { margin-top: auto; }
  .mb-auto-sm { margin-bottom: auto; }
}

/* ========== Auth Pages ========== */
.auth-card {
  border-radius: 16px;
  overflow: hidden;
}

.auth-logo {
  height: 56px;
  width: auto;
}

/* Pay Tax Cards */
.pay-tax-card {
  border-radius: 12px;
  transition: all var(--transition-speed) var(--transition-smooth);
}

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

.pay-tax-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.pay-tax-icon-primary {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent-color);
}

.pay-tax-icon-success {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
}

/* ========== 2026 UI Refresh ========== */
.app-shell {
  font-family: 'Manrope', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #0f172a;
}

.app-topbar {
  border-bottom: 1px solid rgba(148, 163, 184, 0.25) !important;
}

#content > .navbar .navbar-brand .fw-bold {
  letter-spacing: 0.2px;
}

.home-hero-wrap {
  position: relative;
}

.home-hero-carousel .carousel-control-prev,
.home-hero-carousel .carousel-control-next {
  width: 6%;
}

.home-hero-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
}

.home-hero-panel {
  max-width: 700px;
  border-radius: 20px;
  padding: 32px;
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 64, 175, 0.75) 100%);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.home-hero-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #bfdbfe;
  margin-bottom: 10px;
}

.home-hero-title {
  font-size: clamp(1.5rem, 3.6vw, 3rem);
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.15;
}

.home-hero-text {
  font-size: clamp(0.95rem, 1.35vw, 1.1rem);
  color: rgba(241, 245, 249, 0.95);
  margin-bottom: 20px;
}

.home-secondary-cta {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.home-secondary-cta:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.home-sections {
  margin-top: -42px;
  position: relative;
  z-index: 4;
}

.home-feature-card {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.15);
  transition: all var(--transition-speed) var(--transition-smooth);
}

.home-feature-card:hover {
  border-color: rgba(37, 99, 235, 0.2);
  box-shadow: var(--shadow-md);
}

.home-feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1e3a8a;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.95), rgba(186, 230, 253, 0.95));
  font-size: 1.3rem;
}

.home-tax-banner {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: var(--shadow-md);
}

@media (max-width: 991.98px) {
  .home-hero-content {
    align-items: flex-end;
    padding-bottom: 24px;
  }

  .home-hero-panel {
    padding: 20px;
    max-width: 100%;
  }
}

@media (max-width: 767.98px) {
  .home-hero-carousel .kenburns-container {
    height: 62vh;
    min-height: 360px;
  }

  .home-hero-content {
    position: static;
    margin-top: -86px;
    margin-bottom: 12px;
    padding: 0 16px;
  }

  .home-hero-panel {
    border-radius: 14px;
    padding: 18px;
  }

  .home-hero-title {
    font-size: 1.5rem;
  }

  .home-sections {
    margin-top: 0;
    padding-top: 0.5rem !important;
  }

  .home-tax-banner .btn {
    width: 100%;
  }
}
