body {
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
}

.serif {
  font-family: "Playfair Display", serif;
}

/* Sidebar navigation */
.sidebar-link.active {
  background: #fff4e8;
  color: #9a5526;
}

.sidebar-link.active .nav-icon {
  background: #f7e4d2;
  color: #713f24;
}

/* Mobile bottom navigation */
.bottom-nav-link {
  min-height: 48px;
  touch-action: manipulation;
  transition: color 0.15s ease, transform 0.1s ease;
}

.bottom-nav-link:active {
  transform: scale(0.95);
}

.bottom-nav-link.active {
  color: #713f24;
}

.bottom-nav-link.active .bottom-nav-indicator {
  background: #f7e4d2;
  color: #713f24;
  font-weight: 700;
}

/* Dialog backdrops & scrolling */
dialog::backdrop {
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

dialog {
  max-height: 90vh;
  max-height: 90dvh;
}

/* Accessible focus styling */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid #b7794c;
  outline-offset: 2px;
}

/* Safe area support for iOS notches & home indicators */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #bottomNav {
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
  }
}

/* Smooth horizontal table scrollbars */
.custom-scrollbar::-webkit-scrollbar {
  height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: #f5f3f0;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #d6cec7;
  border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #b8aea5;
}

@media print {
  #sidebar,
  #sidebarOverlay,
  header,
  #reportPeriodGroup,
  #exportCsvBtn,
  #printReportBtn,
  .report-view-toggle,
  #reportTableSearch,
  footer,
  #notice {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }

  main {
    padding: 0 !important;
    margin: 0 !important;
  }

  #reportsView {
    display: block !important;
  }

  .shadow-sm,
  .shadow-xl,
  .shadow-2xl {
    box-shadow: none !important;
  }

  article,
  section {
    break-inside: avoid;
    border-color: #ddd !important;
  }
}