
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  background-color: #f8f7f2;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 0;
  box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.05), 0 2px 10px 0 rgba(0, 0, 0, 0.05);
  height: 100vh;
}

.sidebar .nav-link {
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  margin: 0.2rem 0.5rem;
  transition: all 0.2s ease-in-out;
}

.sidebar .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile sidebar */
@media (max-width: 767.98px) {
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 70%;
    max-width: 250px;
    z-index: 1030;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
}

/* Main content adjustments */
.col-md-9.ms-sm-auto.col-lg-10 {
  padding-top: 1rem;
}

/* Container adjustments */
.container-fluid {
  padding-left: 0;
  padding-right: 0;
}

/* Existing styles */
.container { max-width: 1024px; }

.navbar-brand { font-weight: 700; letter-spacing: 0.2px; }

.table-responsive { margin-top: 8px; }
:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.55);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: 12px;
  top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #ffffff;
  color: #0d6efd;
  border: 1px solid rgba(13, 110, 253, 0.25);
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 120ms ease;
  z-index: 1030;
}
.skip-link:focus {
  transform: translateY(0);
}
.btn { border-radius: 12px; }
.card { 
  border-radius: 16px; 
  background-color: #ffffff;
  border-color: #bbdefb;
}

.card-hover {
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.card-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
}

/* Scrollbar Styling */
/* For WebKit browsers (Chrome, Safari) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #888 #f1f1f1;
}

/* Ensure all modal content has scrollbars when needed */
.modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1.25rem;
}

/* Improve modal styling */
.modal-dialog {
  max-width: 95%;
  margin: 1.75rem auto;
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 500px;
  }
  
  .modal-dialog.modal-lg {
    max-width: 800px;
  }
}

/* Ensure content areas have scrollbars when needed */
.card-body {
  overflow: auto;
}

/* Ensure main content area has scrollbars */
main {
  overflow: auto;
  height: 100%;
}

/* Ensure tables have horizontal scrollbars when needed */
.table-responsive {
  overflow-x: auto;
  max-height: 70vh;
  overflow-y: auto;
}

/* Style for dropdown menus with scrollbars */
.dropdown-menu {
  max-height: 300px;
  overflow-y: auto;
}

/* Style for select dropdowns */
select.form-select {
  overflow-y: auto;
}

/* Style for long form content */
.form-control {
  overflow: auto;
}

/* Ensure list groups have scrollbars when needed */
.list-group {
  max-height: 70vh;
  overflow-y: auto;
}

/* ========================================
   GLOBAL PRINT STYLES FOR ALL PAGES
   ======================================== */
@media print {
  /* Set print orientation to portrait */
  @page {
    size: portrait;
    margin: 0.5in;
  }
  
  /* CRITICAL: Hide sidebar and all navigation */
  .sidebar,
  .sidebar-content,
  div.sidebar,
  div.col-md-3,
  div.col-lg-2,
  .col-md-3.col-lg-2,
  [class*="sidebar"],
  #sidebar,
  body > .container-fluid > .row > .col-md-3,
  body > .container-fluid > .row > .col-lg-2 {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
  }
  
  /* Hide all buttons and navigation elements */
  .btn, button, a.btn, button.btn,
  .navbar, footer, .nav, .nav-item, .nav-link, ul.nav,
  .breadcrumb, .pagination, .modal, .dropdown, .tooltip,
  .alert-dismissible, .no-print, .d-md-none, .alert, .skip-link {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Hide header and navigation elements */
  header, nav, .header, .navigation, .menu {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Make main content full width for print */
  .col-md-9, .ms-sm-auto, .col-lg-10, .px-md-4,
  div.col-md-9, div.ms-sm-auto, div.col-lg-10,
  body > .container-fluid > .row > div:not(.sidebar):not(.col-md-3):not(.col-lg-2) {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px !important;
    flex: 0 0 100% !important;
    margin-left: 0 !important;
  }
  
  /* Reset body and container for print */
  body {
    padding: 0 !important;
    margin: 0 !important;
    font-size: 12pt;
    line-height: 1.4;
    background: white !important;
    color: black !important;
  }
  
  /* Make container full width for print */
  .container, .container-fluid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  /* Reset row layout for print */
  .row {
    display: block !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  /* Force the main content column to be full width */
  body > .container-fluid > .row {
    display: block !important;
  }
  
  /* Card styling for print */
  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
    margin: 0 0 20px 0 !important;
    page-break-inside: avoid;
    background: white !important;
  }
  
  .card-body {
    padding: 15px !important;
  }
  
  .card-header {
    background: white !important;
    border-bottom: 1px solid #000 !important;
  }
  
  /* Text styling for print */
  h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
    page-break-after: avoid;
  }
  
  /* Table styling for print */
  .table {
    font-size: 11pt;
    width: 100%;
    border-collapse: collapse;
  }
  
  .table th, .table td {
    border: 1px solid #000 !important;
    padding: 8px;
    color: #000 !important;
  }
  
  /* Print-friendly colors */
  .text-muted, .text-secondary, .text-success {
    color: #000 !important;
  }
  
  /* Hide any background colors */
  * {
    background: transparent !important;
  }
  
  /* Hide Tax Calculation sections from all prints */
  .tax-calculation, .card.mb-3, [class*="tax"] {
    display: none !important;
    visibility: hidden !important;
  }
  
  /* Show print-only elements */
  .print-only {
    display: block !important;
  }
  
  /* Handle rental agreement print header */
  .print-header {
    display: block !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #000 !important;
  }
  
  .print-header h2 {
    margin: 0 0 10px 0 !important;
    font-size: 18pt !important;
    font-weight: bold !important;
    color: #000 !important;
  }
  
  .print-header p {
    margin: 5px 0 !important;
    font-size: 12pt !important;
    color: #000 !important;
  }
  
  /* Handle parking receipt print header */
  .print-only {
    display: block !important;
    margin-bottom: 20px !important;
  }
  
  .print-only div {
    text-align: center !important;
    margin-bottom: 15px !important;
    padding-bottom: 15px !important;
    border-bottom: 2px solid #000 !important;
  }
  
  .print-only h1 {
    margin: 0 0 5px 0 !important;
    font-size: 18pt !important;
    font-weight: bold !important;
    color: #000 !important;
  }
  
  .print-only p {
    margin: 0 !important;
    font-size: 12pt !important;
    color: #000 !important;
  }
  
  /* Avoid page breaks inside important elements */
  .row, .col-md-6, .col-md-12, .col-12 {
    page-break-inside: avoid;
  }
}
