@import url("../vendor/fonts/inter/inter.css");

:root {
  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --success-green: #16a34a;
  --warning-orange: #ea580c;
  --error-red: #dc2626;
  --info-blue: #0ea5e9;
  --premium-purple: #9333ea;

  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --bg-light: #f3f4f6;
  --bg-white: #ffffff;

  --card-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --card-shadow-hover:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

body {
  font-family:
    "Inter",
    -apple-system,
    system-ui,
    sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.5;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  color: var(--text-dark);
}

.text-muted {
  color: var(--text-muted) !important;
}

/* Premium Cards */
.card-premium {
  background: var(--bg-white);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card-premium:hover {
  box-shadow: var(--card-shadow-hover);
}

/* Custom Buttons */
.btn-brand {
  background-color: var(--primary-blue);
  color: white;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.2rem;
  font-weight: 600;
  border: none;
  transition: all 0.2s;
}

.btn-brand:hover {
  background-color: var(--primary-blue-hover);
  color: white;
  transform: translateY(-1px);
}

.btn-brand:active {
  transform: translateY(0);
}

/* Premium Action Buttons */
.btn-premium-light {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-light:hover {
    background: #f8fafc;
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.btn-premium-dark {
    background: #1e293b;
    color: #ffffff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-dark:hover {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.btn-premium-dark:active {
    transform: translateY(0);
}

.btn-premium-success {
    background: #10b981;
    color: #ffffff;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-success:hover {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.25);
    transform: translateY(-2px);
}

.btn-premium-success:active {
    transform: translateY(0);
}


.text-brand {
  color: var(--primary-blue) !important;
}

/* Metric Cards */
.metric-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.metric-card .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

/* Transitions & Utilities */
.transition-transform {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.x-small {
  font-size: 0.75rem;
}

[role="button"] {
  cursor: pointer;
}

/* Collapsible Section Header Rotate */
[data-bs-toggle="collapse"]:not(.collapsed) .fa-chevron-right {
  transform: rotate(90deg);
}
.metric-card .icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.metric-card .value {
  font-size: 1.75rem;
  font-weight: 700;
}

.metric-card .change {
  font-size: 0.875rem;
  font-weight: 500;
}

.metric-card .change.up {
  color: var(--success-green);
}
.metric-card .change.down {
  color: var(--error-red);
}

/* Status Badges */
.badge-status {
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-unverified {
  background-color: #fff7ed;
  color: var(--warning-orange);
  border: 1px solid #ffedd5;
}

.badge-verified {
  background-color: #f0fdf4;
  color: var(--success-green);
  border: 1px solid #dcfce7;
}

/* Growth Badges */
.badge-growth {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
}

.badge-growth.positive {
  background-color: #f0fdf4;
  color: var(--success-green);
}

.badge-growth.negative {
  background-color: #fef2f2;
  color: var(--error-red);
}

/* Excel-like Tables */
.table-excel {
  width: 100%;
  border-collapse: collapse;
  background: white;
  font-size: 0.85rem;
}

.table-excel thead th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  text-align: left;
}

.table-excel tbody td {
  border: 1px solid #e2e8f0;
  padding: 6px 10px;
  color: #1e293b;
}

.table-excel tbody tr:hover {
  background-color: #f1f5f9;
}

/* Main Layout */
.main-wrapper {
  width: 100%;
  padding: 1.5rem;
  max-width: 100%;
}

/* Navbar Modern Style (Restored) */
.navbar-modern .dropdown-toggle::after {
  display: none !important;
}

.navbar-modern {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.4rem 1rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    0 2px 4px -2px rgba(0, 0, 0, 0.025);
  transition: all 0.3s ease;
  border-radius: 9999px;
  margin: 1rem 1.5rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-modern .navbar-brand {
  font-weight: 700;
  color: var(--primary-blue) !important;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.navbar-modern .nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  padding: 0.35rem 0.75rem !important;
  border-radius: 9999px;
  transition: all 0.2s;
  font-size: 0.85rem;
}

.navbar-modern .nav-link:hover {
  color: var(--primary-blue) !important;
  background-color: #eff6ff;
}

.navbar-modern .nav-link.active {
  color: var(--primary-blue) !important;
  background-color: #eff6ff;
  font-weight: 600;
}

/* ========== MOBILE NAVBAR IMPROVEMENTS ========== */

/* Mobile Layout: Logo on left, Hamburger + Bell + Avatar on right */
@media (max-width: 991.98px) {
  .navbar-modern .container-fluid {
    position: relative;
  }
  
  /* Hamburger button styling */
  .navbar-modern .navbar-toggler {
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.8);
  }
  
  .navbar-modern .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
  }
  
  /* Collapsed navbar menu - Professional mobile styling */
  .navbar-modern .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    max-height: 80vh;
    overflow-y: auto;
    z-index: 1000;
  }
  
  .navbar-modern .navbar-collapse.show,
  .navbar-modern .navbar-collapse.collapsing {
    padding: 0.75rem 0;
  }
  
  /* Menu items in collapsed state */
  .navbar-modern .navbar-collapse .navbar-nav {
    width: 100%;
  }
  
  .navbar-modern .navbar-collapse .nav-item {
    width: 100%;
    border-left: 3px solid transparent;
    transition: all 0.2s;
  }
  
  .navbar-modern .navbar-collapse .nav-link {
    padding: 0.75rem 1.25rem !important;
    margin: 0 !important;
    border-radius: 0 !important;
    font-size: 0.95rem;
    color: var(--text-dark) !important;
    display: flex;
    align-items: center;
    min-height: 48px; /* Good touch target */
  }
  
  .navbar-modern .navbar-collapse .nav-link:hover {
    background-color: #f8fafc;
    color: var(--primary-blue) !important;
  }
  
  .navbar-modern .navbar-collapse .nav-link.active {
    background-color: #eff6ff;
    border-left-color: var(--primary-blue);
    font-weight: 600;
  }
  
  /* Dropdown in mobile menu */
  .navbar-modern .navbar-collapse .dropdown-menu {
    position: static !important;
    transform: none !important;
    border: none;
    box-shadow: none;
    padding: 0;
    background-color: #f8fafc;
    border-radius: 0;
    margin: 0;
  }
  
  .navbar-modern .navbar-collapse .dropdown-item {
    padding: 0.65rem 1.25rem 0.65rem 2.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
  }
  
  .navbar-modern .navbar-collapse .dropdown-header {
    padding-left: 2.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  
  .navbar-modern .navbar-collapse .dropdown-divider {
    margin: 0.5rem 1.25rem;
  }
  
  /* Show dropdown on mobile when parent is clicked */
  .navbar-modern .navbar-collapse .dropdown-toggle::after {
    float: right;
    margin-top: 0.4rem;
  }
}

/* Notification Dropdown - Mobile Improvements */
@media (max-width: 767.98px) {
  .notification-dropdown {
    position: fixed !important;
    top: 70px !important;
    left: 1rem !important;
    right: 1rem !important;
    width: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    max-width: 400px !important;
    max-height: 70vh !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1) !important;
  }
  
  .notification-dropdown.show {
    animation: slideInMobile 0.3s ease-out;
  }
  
  @keyframes slideInMobile {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Mobile Menu Backdrop */
@media (max-width: 991.98px) {
  /* Create backdrop when mobile menu is open */
  .navbar-collapse.show::before,
  .navbar-collapse.collapsing::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    animation: fadeIn 0.3s ease-out;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
  
  /* Smooth scrolling for long menus */
  .navbar-collapse {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
  }
}

/* Dropdown on Hover */
.navbar-modern .nav-item.dropdown:hover .dropdown-menu {
  display: block;
  margin-top: 0; /* Remove gap that could cause flicker */
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.navbar-modern .dropdown-menu {
  transition: all 0.2s ease-in-out;
  display: block;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.navbar-modern .dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Navbar Legacy Style (Deprioritized) */
.navbar-legacy {
  background-color: #1e293b;
  padding: 0 1rem;
  height: 56px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar-legacy .navbar-brand {
  color: white !important;
  font-weight: 600;
  font-size: 1.1rem;
  margin-right: 2rem;
  text-decoration: none;
}

.navbar-legacy .nav-link {
  color: #cbd5e1 !important; /* light gray */
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem !important;
  border-radius: 4px;
  margin-right: 0.25rem;
  text-decoration: none;
  transition: all 0.15s;
}

.navbar-legacy .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white !important;
}

.navbar-legacy .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
  color: white !important;
  font-weight: 600;
}

/* User Profile in Nav */
.user-profile-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: #f9fafb;
  border: 1px solid #f3f4f6;
  font-size: 0.8rem;
}

/* Search Bar in Detail */
.search-container-modern {
  position: relative;
  max-width: 400px;
}

.search-container-modern input {
  padding-left: 2.5rem;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
}

.search-container-modern i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast-premium {
  min-width: 300px;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  background: white;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideInRight 0.3s ease-out forwards;
  border-left: 4px solid var(--primary-blue);
}

.toast-premium.success {
  background-color: #f0fdf4;
  border-left-color: var(--success-green);
  color: #166534;
}

.toast-premium.error {
  background-color: #fef2f2;
  border-left-color: var(--error-red);
  color: #991b1b;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Skeleton Loading Screens */
.skeleton {
  background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  border-radius: 4px;
}

.skeleton-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.x-small {
  font-size: 0.65rem;
  padding: 2px 8px;
}

/* Reconciliation Styles */
.summary-box-premium {
  background-color: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.summary-item-card {
  background: var(--bg-white);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 12px;
  height: 100%;
}

.summary-item-card .label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.025em;
  margin-bottom: 4px;
}

.summary-item-card .value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-dark);
}

.summary-item-card.highlight {
  border-left: 4px solid var(--primary-blue);
}

/* Notification UI */
.notification-dropdown {
  width: 320px !important;
  max-width: 90vw !important; /* Prevent overflow on mobile */
  right: 0 !important;
  left: auto !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--card-shadow-hover) !important;
  border: none !important;
  margin-top: 0.5rem !important;
  z-index: 1050;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 0.65rem;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  background-color: var(--error-red);
  color: white;
  border: 2px solid white; /* Contrast border */
  font-weight: 700;
  line-height: 1;
  min-width: 18px;
  text-align: center;
  z-index: 10;
}

/* ========== NOTIFICATION DROPDOWN MODAL ========== */

/* Notification Dropdown Base Styles */
.notification-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 380px;
  max-height: 500px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 1050;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.notification-dropdown.show {
  display: block;
  animation: dropdownFadeIn 0.3s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Notification Header */
.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(to bottom, #ffffff, #f9fafb);
}

.notification-header h6 {
  color: var(--text-dark);
  font-size: 0.95rem;
}

/* Close Button */
.notification-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.375rem 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
}

.notification-close-btn:hover {
  background-color: #f3f4f6;
  color: var(--text-dark);
}

.notification-close-btn:active {
  transform: scale(0.95);
}

/* Notification Actions */
.notification-actions {
  padding: 0.75rem 1.25rem;
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  text-align: right;
}

.notification-actions a {
  text-decoration: none;
  font-size: 0.8rem;
}

.notification-actions a:hover {
  text-decoration: underline;
}

/* Notification List */
.notification-list {
  max-height: 320px;
  overflow-y: auto;
}

/* Custom Scrollbar */
.notification-list::-webkit-scrollbar {
  width: 6px;
}

.notification-list::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.notification-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Notification Item */
.notification-item {
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: background-color 0.2s;
  border-left: 3px solid transparent;
}

.notification-item:hover {
  background-color: #f8fafc;
}

.notification-item.unread {
  background-color: #eff6ff;
  border-left-color: var(--primary-blue);
}

/* Premium Checkboxes for Confirmation */
.custom-checkbox-premium .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 0.25rem;
  border: 2px solid #cbd5e1;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.custom-checkbox-premium .form-check-input:checked {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

.custom-checkbox-premium .form-check-label {
  cursor: pointer;
}

.notification-item.unread:hover {
  background-color: #dbeafe;
}

/* Notification Footer */
.notification-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e5e7eb;
  text-align: center;
  background-color: #f9fafb;
}

.notification-footer a {
  text-decoration: none;
  font-size: 0.85rem;
}

.notification-footer a:hover {
  text-decoration: underline;
}

/* Backdrop */
.notification-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 999; /* Below sticky navbar (1020) but above content */
  display: none;
}

.notification-backdrop.show {
  display: block;
  animation: backdropFadeIn 0.3s ease-out;
}

@keyframes backdropFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== RESPONSIVE DESIGN ========== */

/* Tablet and below (< 992px) */
@media (max-width: 991.98px) {
  .navbar-modern {
    margin: 0.75rem 1rem 1.5rem;
    border-radius: 16px;
  }
  
  .navbar-modern .navbar-brand img {
    height: 30px !important;
  }
  
  .navbar-modern .nav-link {
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
  }
  
  .main-wrapper {
    padding: 1rem;
  }
  
  /* Stack buttons vertically on tablet */
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Mobile (< 768px) */
@media (max-width: 767.98px) {
  .navbar-modern {
    margin: 0.5rem;
    padding: 0.5rem;
    border-radius: 12px;
  }
  
  .navbar-modern .navbar-brand img {
    height: 28px !important;
  }
  
  .navbar-modern .navbar-collapse {
    margin-top: 0.5rem;
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    padding: 0.5rem;
  }
  
  .main-wrapper {
    padding: 0.75rem;
  }
  
  /* Make cards stack better on mobile */
  .card-premium {
    margin-bottom: 1rem;
  }
  
  /* Adjust metric cards for mobile */
  .metric-card .value {
    font-size: 1.5rem;
  }
  
  /* Make tables horizontally scrollable */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Notification dropdown full width on small screens */
  .notification-dropdown {
    width: calc(100vw - 2rem) !important;
    max-width: 100% !important;
    left: 1rem !important;
    right: 1rem !important;
  }
  
  /* Page headers stack on mobile */
  .d-flex.justify-content-between {
    flex-direction: column !important;
    gap: 1rem;
  }
  
  .d-flex.justify-content-between > div {
    width: 100%;
  }
  
  /* Toast notifications smaller on mobile */
  .toast-premium {
    min-width: auto;
    width: calc(100vw - 3rem);
    margin: 0 auto;
  }
  
  #toast-container {
    left: 1.5rem;
    right: 1.5rem;
    top: 1rem;
  }
}

/* Small mobile (< 576px) */
@media (max-width: 575.98px) {
  .navbar-modern .navbar-brand img {
    height: 24px !important;
  }
  
  h1, .h1 {
    font-size: 1.5rem;
  }
  
  h3, .h3 {
    font-size: 1.25rem;
  }
  
  /* Smaller buttons on very small screens */
  .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
  
  .btn-brand {
    padding: 0.5rem 1rem;
  }
  
  /* Adjust form controls */
  .form-control, .form-select {
    font-size: 0.875rem;
  }
  
  /* Modal adjustments */
  .modal-dialog {
    margin: 0.5rem;
  }
  
  .modal-content {
    border-radius: 12px;
  }
}

/* Landscape mobile specific fixes */
@media (max-height: 600px) and (orientation: landscape) {
  .navbar-modern {
    margin: 0.25rem 0.5rem;
    padding: 0.25rem 0.75rem;
  }
  
  .main-wrapper {
    padding: 0.5rem;
  }
  
  .modal-dialog-scrollable .modal-body {
    max-height: 60vh;
  }
}

/* Large screens (> 1400px) - Optional enhancement */
@media (min-width: 1400px) {
  .main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
  }
  
  .navbar-modern {
    margin-left: auto;
    margin-right: auto;
    max-width: 1400px;
  }
}

.smaller {
  font-size: 0.75rem;
}

.custom-check .form-check-input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  cursor: pointer;
  border-color: #d1d5db;
}

.custom-check .form-check-input:checked {
  background-color: var(--success-green);
  border-color: var(--success-green);
}

.custom-check .form-check-label {
  padding-left: 0.5rem;
  cursor: pointer;
  user-select: none;
  color: var(--text-dark);
}

/* Verification Steps in Modal */
.verification-steps {
  position: relative;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
  flex: 1;
}

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f3f4f6;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  margin-bottom: 0.5rem;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.step-item.active .step-icon {
  background-color: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.3);
}

.step-item.active .step-label {
  color: var(--primary-blue);
}

.step-item.completed .step-icon {
  background-color: var(--success-green);
  color: white;
  border-color: var(--success-green);
}

.step-line {
  flex: 1;
  height: 2px;
  background-color: #e5e7eb;
  margin-top: 15px;
  z-index: 1;
}

.step-item.completed + .step-line {
  background-color: var(--success-green);
}

/* Modern Notification Sidebar (Offcanvas) */
.offcanvas-notifications {
    width: 400px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: -10px 10px 30px rgba(0, 0, 0, 0.05) !important;
    /* Floating style for desktop */
    border-radius: 16px !important;
    margin: 80px 16px 16px auto !important; /* Top, Right, Bottom, Left (auto to stay right) */
    height: calc(100vh - 96px) !important;
    overflow: hidden !important;
}

@media (max-width: 575.98px) {
    .offcanvas-notifications {
        width: 100% !important;
        margin: 0 !important;
        border-radius: 0 !important;
        height: 100vh !important;
    }
}

.notification-header {
    padding: 1.5rem;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-body {
    padding: 0;
    overflow-y: auto;
}

.notification-section-title {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.02);
}

.notification-item-premium {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    display: flex;
    gap: 1rem;
    text-decoration: none !important;
}

.notification-item-premium:hover {
    background: rgba(37, 99, 235, 0.03);
}

.notification-item-premium.unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 1rem;
    bottom: 1rem;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--primary-blue);
}

.notification-icon-box {
 width: 40px;
 height: 40px;
 border-radius: 12px;
 display: flex;
 align-items: center;
 justify-content: center;
 flex-shrink: 0;
 font-size: 1.1rem;
}

.notification-content {
 flex: 1;
}

.notification-time {
 font-size: 0.7rem;
 color: var(--text-muted);
 margin-bottom: 0.25rem;
}

.notification-title {
 font-size: 0.9rem;
 font-weight: 700;
 color: var(--text-dark);
 margin-bottom: 0.2rem;
}

.notification-desc {
 font-size: 0.85rem;
 color: var(--text-muted);
 line-height: 1.4;
}

/* Icons by Type */
.bg-notification-info { background: rgba(14, 165, 233, 0.1); color: #0ea5e9; }
.bg-notification-success { background: rgba(22, 163, 74, 0.1); color: #16a34a; }
.bg-notification-warning { background: rgba(234, 88, 12, 0.1); color: #ea580c; }
.bg-notification-error { background: rgba(220, 38, 38, 0.1); color: #dc2626; }


/* Expandable Text & Read More */
.text-expandable {
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

.text-expandable.expanded {
    max-width: 100%;
    white-space: normal;
    display: block;
}

.btn-read-more {
    padding: 0;
    font-size: 0.75rem;
    color: var(--primary-blue);
    text-decoration: none;
    border: none;
    background: none;
    margin-left: 5px;
    font-weight: 600;
}

.btn-read-more:hover {
    text-decoration: underline;
    color: var(--primary-blue-hover);
}

.note-content {
    line-height: 1.6;
}

.note-content.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Grouped Debt Table Styling */
.debt-main-row {
    background-color: rgba(37, 99, 235, 0.03) !important;
    border-top: 2px solid rgba(0, 0, 0, 0.05) !important;
}

.deduction-sub-row td {
    border-bottom: none !important;
    background-color: transparent !important;
    font-size: 0.85rem;
}

.deduction-sub-row:hover {
    background-color: rgba(22, 163, 74, 0.02) !important;
}

.deduction-sub-row .fa-level-up-alt {
    color: var(--success-green);
    margin-right: 10px;
}

/* ========== MOBILE RESPONSIVE STACKED TABLE ========== */
@media (max-width: 767.98px) {
  .table-responsive-mobile table, 
  .table-responsive-mobile thead, 
  .table-responsive-mobile tbody, 
  .table-responsive-mobile th, 
  .table-responsive-mobile td, 
  .table-responsive-mobile tr { 
    display: block !important; 
    width: 100% !important;
  }
  
  .table-responsive-mobile thead {
    display: none !important; /* Hide headers */
  }
  
  .table-responsive-mobile tr {
    margin-bottom: 1.25rem !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: var(--radius-md) !important;
    background: #ffffff !important;
    padding: 1.25rem !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  }
  
  .table-responsive-mobile td {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border: none !important;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05) !important;
    padding: 0.65rem 0 !important;
    text-align: right !important;
    font-size: 0.85rem !important;
    background: transparent !important;
  }

  .table-responsive-mobile td:last-child {
    border-bottom: none !important;
    padding-top: 0.85rem !important;
    margin-top: 0.5rem !important;
    justify-content: center !important;
    text-align: center !important;
  }
  
  .table-responsive-mobile td::before {
    content: attr(data-label);
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin-right: 1.5rem;
    text-align: left;
    flex-shrink: 0;
  }
  
  .table-responsive-mobile td:last-child::before {
    display: none !important; /* No label for actions */
  }
}


