/* style.css — polished & responsive, safe for our admin toggling */

/* Theme variables */
:root {
  --accent: #0d6efd;
  /* blue for links/reports */
  --brand: #0b5ed7;
  /* darker brand blue */
  --danger: #dc3545;
  /* logout red */
  --muted: #6c757d;
  --card-bg: #ffffff;
  --page-bg: #f7f9fb;
  --max-width: 1100px;
}

/* Page basics */
html,
body {
  height: 100%;
  background: var(--page-bg);
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  color: #222;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* container used in your markup */
.container-main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

/* Dashboard heading / user info */
#userInfo {
  font-size: 0.95rem;
  color: var(--muted);
}

/* Card */
.card-custom {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 18px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  margin-bottom: 18px;
}

/* Inputs/buttons spacing */
input,
select,
textarea,
button {
  border-radius: 8px;
  font-size: 0.95rem;
}

/* Tables */
.table {
  background: transparent;
}

.table thead th {
  border-bottom: 2px solid rgba(15, 23, 42, 0.06);
  font-weight: 600;
  color: lab(91.32% -13.47 89.68);
  text-align: center !important;
}

.table tbody td {
  vertical-align: middle;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
  padding: 12px 10px;
  text-align: center !important;
}

/* Compact action buttons */
.btn-sm {
  padding: 4px 8px;
  font-size: 0.82rem;
}

/* Hint & messages */
.hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 8px 0 0;
}

.error-msg {
  color: #b00020;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* No-data message */
.no-data {
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 1rem;
}

/* Debug badge (temporary) */
.debug-badge {
  display: inline-block;
  padding: 6px 10px;
  background: #fff;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.85rem;
  color: #333;
  margin-right: 8px;
}

/* Buttons look */
.btn-success {
  background: linear-gradient(180deg, #16a34a, #15803d) !important;
  border: none;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.12);
}

.btn-outline-primary {
  border-radius: 8px;
}

/* Links colors */
a {
  color: var(--accent);
}

/* ============================================
   MODERN NAVBAR - Tremendous-inspired design
   ============================================ */
.navbar-modern {
  background: #fff;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar-modern .container-fluid {
  padding: 0 1.5rem;
}

@media (min-width: 992px) {
  .navbar-modern .container-fluid {
    padding: 0 2.5rem;
  }
}

/* Nav links - clean minimal style */
.navbar-modern .nav-link {
  color: #374151;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.navbar-modern .nav-link:hover {
  color: #1e40af;
  background: rgba(30, 64, 175, 0.04);
}

.navbar-modern .nav-link.active {
  color: #1e40af;
  background: rgba(30, 64, 175, 0.06);
}

/* Dropdown refinements */
.navbar-modern .dropdown-menu {
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 0.5rem;
}

.navbar-modern .dropdown-item {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
}

.navbar-modern .dropdown-item:hover {
  background: rgba(30, 64, 175, 0.04);
}

/* Mobile menu refinements */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  border-radius: 8px;
}

.navbar-toggler:focus {
  box-shadow: none;
  background: rgba(0, 0, 0, 0.04);
}

@media (max-width: 991.98px) {
  .navbar-modern .navbar-collapse {
    background: transparent;
    padding: 0;
    margin-top: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .navbar-modern .nav-link {
    padding: 0.5rem 0.875rem;
    margin: 0;
  }
}

#logoutLink {
  color: var(--danger) !important;
}

/* Ensure .adminOnly is only a marker and not hiding anything by default */
.adminOnly
/* marker only: no display rules here */


/* Accessibility focus */
:focus {
  outline: 3px solid rgba(13, 110, 253, 0.14);
  outline-offset: 2px;
}

/* Small utility */
.text-muted.small {
  font-size: 0.85rem;
  color: var(--muted);
}

.suggestions {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  max-height: 260px;
  overflow: auto;
  z-index: 1000;
}

.suggestions ul {
  list-style: none;
  margin: 0;
  padding: 4px;
}

.suggestions li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 6px;
}

.suggestions li:hover,
.suggestions li.active {
  background: #f3f4f6;
}

.suggestions .name {
  font-weight: 600;
}

.suggestions .no {
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 576px) {
  .card-body h2 {
    font-size: 1.25rem;
  }

  #totalCard {
    font-size: 0.95rem;
  }
}

:root {
  --brand: #0d6efd;
  --muted: #495057;
  --danger: #dc3545;
}

/* Base nav-link look */
.navbar .nav-link {
  color: var(--muted) !important;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Hover/focus for non-danger items */
.navbar .nav-link:not(.text-danger):hover,
.navbar .nav-link:not(.text-danger):focus {
  background-color: rgba(13, 110, 253, 0.08);
  color: var(--brand) !important;
  text-decoration: none;
}

/* Active page highlight */
.navbar .nav-link.active {
  background-color: rgba(13, 110, 253, 0.12);
  color: var(--brand) !important;
}

/* Logout stands out in red */
.navbar .nav-link.text-danger {
  color: var(--danger) !important;
  font-weight: 600;
}

.navbar .nav-link.text-danger:hover,
.navbar .nav-link.text-danger:focus {
  background-color: rgba(220, 53, 69, 0.08);
  color: var(--danger) !important;
  text-decoration: none;
}

/* === Override mobile stacking: keep table layout with horizontal scroll === */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    /* allow side-scroll on mobile */
  }

  .table {
    display: table !important;
    width: 100% !important;
    white-space: nowrap;
    /* no wrapping */
  }

  .table thead {
    display: table-header-group !important;
  }

  .table tbody,
  .table tr,
  .table td {
    padding: 0.5rem;
    /* adjust cell spacing */
    vertical-align: middle;
    /* display: table-row-group !important; */
    width: auto !important;
  }

  .table td:before {
    content: none !important;
    /* disable data-label pseudo */
  }
}

/* Brand aesthetics */
.navbar-brand {
  font-size: 1.1rem;
  letter-spacing: 1px;
  color: var(--brand);
}

.navbar-brand:hover {
  color: var(--accent);
}

/* Center nav items when collapsed */
@media (max-width: 991.98px) {
  #mainNav .navbar-nav {
    align-items: center;
  }

  #mainNav .nav-link {
    padding: 0.5rem 0;
  }
}

/* Collapsed menu container styling (mobile/tablet) - seamless */
@media (max-width: 991.98px) {
  .navbar .navbar-collapse.show {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  /* Clean nav links - no individual borders */
  .navbar .navbar-nav.text-center .nav-link {
    width: 100%;
    border: none;
    border-radius: 0;
    padding: 0.5rem 0.875rem;
    margin: 0;
    background: transparent;
    transition: background 120ms ease, color 120ms ease;
  }

  .navbar .navbar-nav.text-center .nav-link:hover,
  .navbar .navbar-nav.text-center .nav-link:focus {
    background: rgba(0, 0, 0, 0.03);
  }

  /* Logout styling */
  .navbar .navbar-nav.text-center .nav-link.text-danger {
    background: transparent;
  }
}

/* Desktop hover polish without heavy borders */
@media (min-width: 992px) {
  .navbar .navbar-nav .nav-link {
    border: 0;
    background: transparent;
    margin: 0 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 120ms ease, color 120ms ease;
  }

  .navbar .navbar-nav .nav-link:hover,
  .navbar .navbar-nav .nav-link:focus {
    background-color: #f8f9fa;
  }
}

/* Mobile‐only: bordered “card” rows in the collapsed menu */

@media (max-width: 991.98px) {

  /* Seamless integration - full width edge-to-edge */
  #mainNav.collapse.show {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin: 0 -1.25rem;
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
    width: calc(100% + 2.5rem);
  }

  /* Each list-item - COMPACT without borders */
  #mainNav .navbar-nav.text-center>.nav-item {
    width: 100%;
    margin: 0;
    border: none;
    border-radius: 0;
  }

  /* Make the <a> compact with subtle gradient - elegant and gentle */
  #mainNav .navbar-nav.text-center>.nav-item>.nav-link {
    display: block;
    padding: 0.6rem 1.25rem;
    margin: 0;
    color: #374151 !important;
    font-weight: 500;
    font-size: 0.95rem;
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.6) 0%, rgba(237, 233, 254, 0.4) 100%);
    transition: all 0.2s ease;
    position: relative;
  }

  /* Subtle centered separator line - exclude dropdown toggle */
  #mainNav .navbar-nav.text-center>.nav-item>.nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.2) 50%, transparent 100%);
  }

  #mainNav .navbar-nav.text-center>.nav-item:last-child>.nav-link::after {
    display: none;
  }

  /* Alternating subtle tint for visual separation */
  #mainNav .navbar-nav.text-center>.nav-item:nth-child(even)>.nav-link {
    background: linear-gradient(180deg, rgba(237, 233, 254, 0.5) 0%, rgba(240, 253, 250, 0.3) 100%);
  }

  /* Top boundary line above first item */
  #mainNav .navbar-nav.text-center>.nav-item:first-child>.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.25) 50%, transparent 100%);
  }

  /* Hover or focus - gentle highlight */
  #mainNav .navbar-nav.text-center>.nav-item:hover>.nav-link,
  #mainNav .navbar-nav.text-center>.nav-item:focus-within>.nav-link {
    background: linear-gradient(180deg, rgba(199, 210, 254, 0.6) 0%, rgba(196, 181, 253, 0.4) 100%);
    color: #1e3a8a !important;
  }

  /* Logout link styling with bottom boundary */
  #mainNav .navbar-nav.text-center>.nav-item>.nav-link.text-danger {
    background: linear-gradient(180deg, rgba(254, 242, 242, 0.7) 0%, rgba(254, 226, 226, 0.5) 100%);
    color: #dc2626 !important;
  }

  #mainNav .navbar-nav.text-center>.nav-item:last-child>.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.25) 50%, transparent 100%);
    display: block;
  }

  /* Dropdown toggle - add separator line below */
  #mainNav .navbar-nav.text-center>.nav-item.dropdown>.nav-link.dropdown-toggle::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.2) 50%, transparent 100%);
  }

  /* Dropdown toggle arrow indicator - animated */
  #mainNav .navbar-nav.text-center .nav-item.dropdown .dropdown-toggle::after {
    border: none !important;
    content: '▾' !important;
    font-size: 1rem !important;
    margin-left: 0.4rem !important;
    vertical-align: middle !important;
    opacity: 0.8 !important;
    display: inline-block !important;
    transition: transform 0.3s ease !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: none !important;
    color: #4b5563 !important;
  }

  #mainNav .navbar-nav.text-center .nav-item.dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg) !important;
  }

  /* Dropdown menu styling - with smooth animation */
  #mainNav .dropdown-menu {
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(243, 244, 246, 0.95) 100%);
    border: none;
    box-shadow: inset 0 1px 0 rgba(139, 92, 246, 0.08);
    padding: 0;
    margin: 0;
    animation: slideDown 0.25s ease-out;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #mainNav .dropdown-menu .dropdown-item {
    padding: 0.45rem 1.75rem;
    font-size: 0.85rem;
    color: #6b7280;
    background: transparent;
    position: relative;
  }

  /* Lighter, more subtle separator for suboptions */
  #mainNav .dropdown-menu .dropdown-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 25%;
    right: 25%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.08) 50%, transparent 100%);
  }

  #mainNav .dropdown-menu .dropdown-item:last-child::after {
    display: none;
  }

  #mainNav .dropdown-menu .dropdown-item:hover {
    background: linear-gradient(180deg, rgba(199, 210, 254, 0.5) 0%, rgba(196, 181, 253, 0.3) 100%);
    color: #1e3a8a;
  }
}

/* ============================================
   PROFESSIONAL NAVBAR - Premium Design
   ============================================ */

.navbar-modern {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  position: sticky;
  top: 0;
  z-index: 1020;
  padding: 0;
  border-bottom: 1px solid rgba(229, 231, 235, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-modern .container-fluid {
  padding: 0.875rem 1.25rem;
}

@media (min-width: 992px) {
  .navbar-modern .container-fluid {
    padding: 0.875rem 2rem;
  }
}

/* Desktop nav links */
.navbar-modern .nav-link {
  color: #4b5563;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  transition: all 0.15s ease;
}

@media (min-width: 992px) {
  .navbar-modern .nav-link {
    border-radius: 0 !important;
    position: relative;
    background: transparent !important;
    color: #4b5563;
    padding: 0.5rem 0.875rem;
    transition: color 0.2s ease;
  }

  .navbar-modern .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
  }

  .navbar-modern .nav-link:hover {
    color: #111827;
    background: transparent !important;
  }

  .navbar-modern .nav-link:hover::after {
    width: 80%;
  }

  .navbar-modern .nav-link.active {
    color: #2563eb !important;
    background: transparent !important;
    font-weight: 600;
  }

  .navbar-modern .nav-link.active::after {
    width: 80%;
  }
}

/* Dropdown styling */
.navbar-modern .dropdown-menu {
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 0.5rem;
  margin-top: 0.375rem;
}

.navbar-modern .dropdown-item {
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: #4b5563;
}

.navbar-modern .dropdown-item:hover {
  background: #f3f4f6;
  color: #111827;
}

/* Custom hamburger button - hidden on desktop */
.navbar-modern .navbar-toggler {
  border: none;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
  display: none;
  /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: #fff;
  position: relative;
  z-index: 1040;
  /* Below Bootstrap modal (1050) */
  border-radius: 8px;
  transition: background 0.2s ease;
}

/* Show hamburger only on mobile */
@media (max-width: 991.98px) {
  .navbar-modern .navbar-toggler {
    display: flex;
  }
}

.navbar-modern .navbar-toggler:hover {
  background: #f3f4f6;
}

.navbar-modern .navbar-toggler:focus {
  box-shadow: none;
}

/* Hide default icon, use custom bars */
.navbar-modern .navbar-toggler-icon {
  display: none;
}

.navbar-modern .navbar-toggler .bar {
  width: 20px;
  height: 2px;
  background: #374151;
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

/* Animate hamburger to X */
.navbar-modern .navbar-toggler[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-modern .navbar-toggler[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar-modern .navbar-toggler[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   MOBILE MENU - Simple clean dropdown
   ============================================ */

@media (max-width: 991.98px) {

  /* Seamless navbar - full width from start */
  .navbar-modern .navbar-collapse {
    background: transparent;
    padding: 0;
    margin: 0 -1.25rem;
    width: calc(100% + 2.5rem);
  }

  /* Smooth collapse animation - similar to Cash on Hand */
  .navbar-modern .navbar-collapse.collapsing {
    transition: height 0.3s ease-out;
    margin: 0 -1.25rem;
    width: calc(100% + 2.5rem);
  }

  .navbar-modern .navbar-collapse.show {
    transition: height 0.3s ease-out;
    margin: 0 -1.25rem;
    width: calc(100% + 2.5rem);
  }

  .navbar-modern .navbar-nav {
    padding: 0;
  }

  .navbar-modern .nav-item {
    margin: 0;
  }

  /* Compact nav links for mobile */
  .navbar-modern .nav-link {
    padding: 0.5rem 0.875rem;
    font-size: 0.95rem;
    color: #374151;
    border: none !important;
  }

  .navbar-modern .nav-link:hover {
    background: #f9fafb;
    color: #1e40af;
  }

  /* Remove any double border issues */
  .navbar-modern .navbar-nav.text-center .nav-link {
    border: none !important;
    background: transparent;
  }

  /* Dropdown in mobile */
  .navbar-modern .dropdown-menu {
    position: static !important;
    box-shadow: none;
    border: none;
    background: #f9fafb;
    padding: 0;
    margin: 0;
  }

  .navbar-modern .dropdown-item {
    padding: 0.4rem 1.25rem;
    font-size: 0.9rem;
    color: #6b7280;
  }
}

/* Logout styling */
.navbar-modern #logoutLink,
.navbar-modern .nav-link.text-danger {
  color: #dc2626 !important;
}

.navbar-modern #logoutLink:hover,
.navbar-modern .nav-link.text-danger:hover {
  background: #fef2f2 !important;
}

/* Subtle and elegant modals on mobile viewports */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 1.25rem auto !important;
    max-width: 92% !important;
  }
  
  .modal-content {
    border-radius: 16px !important;
    border: none !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  }
  
  .modal-header {
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
  }
  
  .modal-title {
    font-size: 1.1rem !important;
  }
  
  .modal-body {
    padding: 1.25rem !important;
  }
  
  .modal-footer {
    padding: 1rem 1.25rem !important;
    border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
  }
}

/* ============================================
   WELCOME BANNER / PAGE TITLE CARD STYLING
   ============================================ */
.welcome-card {
  background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
  color: #ffffff;
  border: none;
  border-radius: 16px;
  padding: 1.25rem 1.75rem;
  box-shadow: 0 10px 30px rgba(30, 58, 138, 0.15);
  position: relative;
  overflow: hidden;
}

.welcome-card::after {
  content: '🕌';
  position: absolute;
  right: 5%;
  bottom: -5px;
  font-size: 5.5rem;
  opacity: 0.08;
  pointer-events: none;
}

.welcome-title {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.4rem;
}

.welcome-badge {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  display: inline-block;
}

@media (max-width: 768px) {
  .welcome-card {
    padding: 1rem 1.25rem !important;
  }

  .welcome-title {
    font-size: 1.15rem !important;
  }

  .welcome-card::after {
    font-size: 3.5rem !important;
    bottom: -5px !important;
    right: 2% !important;
  }
}

/* ============================================
   PREMIUM CUSTOM SELECT & BOTTOM SHEET DRAWER
   ============================================ */

/* Trigger button replacing the native select */
.premium-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid rgba(30, 58, 138, 0.12);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e3a8a;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 110px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(30, 58, 138, 0.03);
  text-align: left;
}

/* Flex layout override: if it's placed in a flex row, keep it auto-width */
.d-flex .premium-select-trigger,
.d-flex-align-items-center .premium-select-trigger,
.gap-2 .premium-select-trigger {
  width: auto;
}

.premium-select-trigger:hover {
  border-color: rgba(30, 58, 138, 0.25);
  background-color: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.06);
}

.premium-select-trigger:active {
  transform: translateY(0);
}

.premium-select-trigger:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.premium-select-trigger .trigger-caret {
  margin-left: 8px;
  color: #1e3a8a;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.premium-select-trigger:hover .trigger-caret {
  transform: translateY(1px);
}

.premium-select-trigger .trigger-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* Active filter styling for cash cards */
.filter-active-card {
  border-left: 4px solid #f59e0b !important;
  background-color: #fffbeb !important;
  border-color: rgba(245, 158, 11, 0.25) !important;
  transition: all 0.3s ease;
}

.filter-active-card-small {
  border-left: 3px solid #f59e0b !important;
  background-color: #fffbeb !important;
  border-color: rgba(245, 158, 11, 0.2) !important;
  transition: all 0.3s ease;
}


/* Bottom Sheet Container overlay styling */
.premium-bottom-sheet-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2050; /* Above regular bootstrap modals (1050) */
  display: flex;
  align-items: flex-end;
  justify-content: center;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0.25s step-end;
}

.premium-bottom-sheet-container.active {
  visibility: visible;
  pointer-events: auto;
  transition: visibility 0s step-start;
}

/* Transparent backdrop with blur */
.premium-bottom-sheet-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.premium-bottom-sheet-container.active .premium-bottom-sheet-backdrop {
  opacity: 1;
}

/* Content Panel */
.premium-bottom-sheet-content {
  position: relative;
  width: 100%;
  max-width: 480px; /* Standard premium mobile view width */
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -12px 36px rgba(15, 23, 42, 0.15);
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.32, 0.94, 0.6, 1);
  z-index: 1;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

.premium-bottom-sheet-container.active .premium-bottom-sheet-content {
  transform: translateY(0);
}

/* Top indicator bar */
.premium-bottom-sheet-drag-handle {
  width: 36px;
  height: 4px;
  background: rgba(30, 58, 138, 0.15);
  border-radius: 99px;
  margin: 10px auto 4px auto;
  flex-shrink: 0;
}

/* Header styling */
.premium-bottom-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(30, 58, 138, 0.05);
  flex-shrink: 0;
}

.premium-bottom-sheet-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e3a8a;
  letter-spacing: 0.3px;
}

.premium-bottom-sheet-close {
  background: rgba(30, 58, 138, 0.05);
  border: none;
  color: #1e3a8a;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
}

.premium-bottom-sheet-close:hover {
  background: rgba(30, 58, 138, 0.1);
  color: #4c1d95;
}

/* Body / Grids for Months and Years */
.premium-bottom-sheet-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Months: 3-column elegant grid */
.premium-grid-months {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* Years: 1-column list with rounded items */
.premium-grid-years {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Item options */
.premium-option-btn {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 58, 138, 0.08);
  color: #334155;
  border-radius: 12px;
  padding: 12px 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.premium-option-btn:hover {
  background: rgba(30, 58, 138, 0.04);
  border-color: rgba(30, 58, 138, 0.15);
  color: #1e3a8a;
}

.premium-option-btn:active {
  transform: scale(0.96);
}

/* Active option style */
.premium-option-btn.active {
  background: linear-gradient(135deg, #1e3a8a 0%, #4c1d95 100%);
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
}

/* Desktop float mode */
@media (min-width: 577px) {
  .premium-bottom-sheet-container {
    align-items: center; /* Center horizontally & vertically on desktop */
  }
  
  .premium-bottom-sheet-content {
    border-radius: 20px;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.32, 0.94, 0.6, 1), opacity 0.25s ease;
  }
  
  .premium-bottom-sheet-container.active .premium-bottom-sheet-content {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Ensure the Last Updated alert stays on one line and fits mobile screens */
.alert:has(#lastUpdatedAt) {
  font-size: 0.95rem;
}

.alert:has(#lastUpdatedAt) div {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .alert:has(#lastUpdatedAt) {
    font-size: 0.78rem !important;
    padding: 0.5rem 0.75rem !important;
  }
}

/* Prevent wrapping on Hadith quote card sources and optimize mobile fit */
.nudge-source {
  white-space: nowrap !important;
}

@media (max-width: 480px) {
  .islamic-nudge-card {
    padding: 1rem 1rem 1rem 1rem !important;
  }
  .nudge-source {
    font-size: 0.72rem !important;
    padding-right: 0 !important;
  }
}

/* Prevent wrapping on the admin lock warning alert and scale font size on mobile viewports */
.alert[data-non-admin-only] {
  white-space: nowrap !important;
}

@media (max-width: 480px) {
  .alert[data-non-admin-only] {
    font-size: 0.72rem !important;
    padding: 0.5rem 0.75rem !important;
  }
}

/* Prevent wrapping on welcome banner name greetings on narrow viewports */
.nowrap-name {
  white-space: nowrap !important;
}

/* Responsive adjustments to ensure summary card action buttons fit side-by-side on mobile devices */
@media (max-width: 576px) {
  .expenses-link {
    padding: 0.4rem 0.8rem !important;
    font-size: 0.75rem !important;
    gap: 0.3rem !important;
  }
}
