/* The sidebar menu */
.sidenav {
    height: 100%; /* Full-height: remove this if you want "auto" height */
    width: 160px; /* Set the width of the sidebar */
    position: fixed; /* Fixed Sidebar (stay in place on scroll) */
    z-index: 1;
    top: 0; /* Stay at the top */
    left: 0;
    background-color: white; /* Black */
    overflow-x: hidden; /* Disable horizontal scroll */
    padding-top: 10px;
    border-right: 1px solid #ddd;
    /* border-style: solid; */
    /* border-width: 1px; */
  }

/* Sidebar divider line */
.sidebar-divider {
    height: 1px;
    background-color: #e9ecef;
    margin: 4px 12px;
    border: none;
}
  
  /* The navigation menu links */
  .sidenav a {
    padding: 3px 8px 3px 14px;
    text-decoration: none;
    font-size: 12.5px;
    color: #818181;
    display: block;
    font-family: Arial, sans-serif;
    line-height: 1.2;
  }
  
  /* When you mouse over the navigation links, change their color */
  .sidenav a:hover {
    color: #f1f1f1;
    background-color: #555;
  }
  
  /* Gear icon styling */
  .sidebar-gear {
    position: absolute;
    bottom: 12px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .sidebar-gear a {
    color: #818181;
    font-size: 16px;
    padding: 8px;
    text-decoration: none;
  }
  
  .sidebar-gear a:hover {
    color: #555;
  }

  .sidebar-logout-btn {
    background: none;
    border: none;
    color: #818181;
    font-size: 16px;
    padding: 8px;
    cursor: pointer;
    text-decoration: none;
  }

  .sidebar-logout-btn:hover {
    color: #555;
  }

  /* Collapsible sidebar sections */
  .sidebar-section {
    display: block;
  }
  
  .sidebar-section-header {
    padding: 4px 8px 4px 14px;
    text-decoration: none;
    font-size: 12.5px;
    color: #818181;
    display: block;
    font-family: Arial, sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.2;
  }
  
  .sidebar-section-header:hover {
    color: #f1f1f1;
    background-color: #555;
  }
  
  .sidebar-section-header i {
    margin-right: 8px;
    font-size: 12px;
    transition: transform 0.3s ease;
  }
  
  .sidebar-section-content {
    display: none !important;
    padding-left: 12px;
    background-color: #f8f9fa;
    border-left: 2px solid #e9ecef;
    margin-left: 12px;
  }
  
  .sidebar-section-content.show {
    display: block !important;
  }
  
  .sidebar-section-content a {
    padding: 2px 6px 2px 12px;
    font-size: 12.5px;
    color: #666;
    line-height: 1.2;
  }
  
  .sidebar-section-content a:hover {
    color: #333;
    background-color: #e9ecef;
  }
  
  .sidebar-section-header.expanded i {
    transform: rotate(90deg);
  }
  
  /* Style page content */
  .main {
    margin-left: 160px; /* Same as the width of the sidebar */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
    color: black;
    font-size: 13px;
    padding: 0px 10px;
    position: relative;
    z-index: 1;
  }
  
  .settings {
    /* margin-left: 160px; Same as the width of the sidebar */
    /* margin-left: 0.35cm; */
    /* background-position: left 0.35cm; */
    padding: 1px 1px;
    color: black;
  }
  
  /* On smaller screens, where height is less than 450px, change the style of the sidebar (less padding and a smaller font size) */
  @media screen and (max-height: 450px) {
    .sidenav {
      padding-top: 15px;
    }
    .sidenav a {
      font-size: 18px;
    }
  }
  
/* Additional styles for DataTables and other components */
.dataTables_wrapper {
    margin-top: 20px;
}
.dataTables_filter {
    margin-bottom: 15px;
}
.dataTables_filter input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.table {
    width: 100% !important;
    font-size: 12pt;
}
.table th, .table td {
    padding: 4px 8px;
    text-align: left;
    line-height: 1.2;
}
.table th {
    background-color: #f2f2f2;
    cursor: pointer;
    font-weight: bold;
}
.table tr:nth-child(even) {
    background-color: #f9f9f9;
}
.table tr:hover {
    background-color: #f5f5f5;
}
.dt-buttons {
    margin-top: 10px;
}
.dt-button {
    padding: 5px 10px;
    margin-right: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f8f9fa;
    cursor: pointer;
}
.dt-button:hover {
    background-color: #e9ecef;
}

/* Bootstrap-like styles for cards and modals */
.card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}
.card-header {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}
/* Subtle blue header for sections that need emphasis */
.card-header-blue {
    background-color: #e9f2ff !important;
}
.card-body {
    padding: 15px;
}

/* Button styles */
.btn {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
    font-size: 14px;
    line-height: 1.42857143;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    background-color: #fff;
    color: #333;
    border-color: #ccc;
}
.btn:hover {
    text-decoration: none;
}

/* Solid button styles */
.btn-primary {
    background-color: #007bff !important;
    color: #fff !important;
    border-color: #007bff !important;
}
.btn-primary:hover {
    background-color: #0056b3 !important;
    color: #fff !important;
    border-color: #004085 !important;
}
.btn-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
}
.btn-danger:hover {
    background-color: #bd2130 !important;
    color: #fff !important;
    border-color: #b21f2d !important;
}
.btn-secondary {
    background-color: #6c757d !important;
    color: #fff !important;
    border-color: #6c757d !important;
}
.btn-secondary:hover {
    background-color: #545b62 !important;
    color: #fff !important;
    border-color: #4e555b !important;
}
.btn-success {
    background-color: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
}
.btn-success:hover {
    background-color: #218838 !important;
    color: #fff !important;
    border-color: #1e7e34 !important;
}
.btn-warning {
    background-color: #ffc107 !important;
    color: #212529 !important;
    border-color: #ffc107 !important;
}
.btn-warning:hover {
    background-color: #d39e00 !important;
    color: #212529 !important;
    border-color: #c69500 !important;
}
.btn-info {
    background-color: #17a2b8 !important;
    color: #fff !important;
    border-color: #17a2b8 !important;
}
.btn-info:hover {
    background-color: #138496 !important;
    color: #fff !important;
    border-color: #117a8b !important;
}

/* Outline button styles */
.btn-outline-primary {
    background-color: transparent;
    color: #007bff;
    border-color: #007bff;
}
.btn-outline-primary:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}
.btn-outline-secondary {
    background-color: transparent;
    color: #6c757d;
    border-color: #6c757d;
}
.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
    border-color: #6c757d;
}
.btn-outline-success {
    background-color: transparent;
    color: #28a745;
    border-color: #28a745;
}
.btn-outline-success:hover {
    background-color: #28a745;
    color: #fff;
    border-color: #28a745;
}
.btn-outline-danger {
    background-color: transparent;
    color: #dc3545;
    border-color: #dc3545;
}
.btn-outline-danger:hover {
    background-color: #dc3545;
    color: #fff;
    border-color: #dc3545;
}
.btn-outline-warning {
    background-color: transparent;
    color: #ffc107;
    border-color: #ffc107;
}
.btn-outline-warning:hover {
    background-color: #ffc107;
    color: #212529;
    border-color: #ffc107;
}

/* Button sizes */
.btn-sm {
    padding: 3px 8px;
    font-size: 12px;
}
.btn-group {
    display: inline-flex;
}
.btn-group .btn {
    margin-right: 2px;
}
.btn-group .btn:last-child {
    margin-right: 0;
}

/* Extra small button for compact per-row actions */
.btn-xxs {
    padding: 0 3px;
    font-size: 9px;
    line-height: 1.1;
    border-radius: 2px;
}


/* Compact process actions area */
.process-actions-compact { padding: 8px 10px; }
.process-actions-compact .btn { margin: 0 3px; }

/* Modal styles */
/* Custom modal styles for non-Bootstrap modals (admin users page) */
.modal:not(.fade) {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}
.modal:not(.fade).show {
    display: block;
}
.modal:not(.fade) .modal-dialog {
    margin: 50px auto;
    max-width: 500px;
}
.modal:not(.fade) .modal-content {
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.modal:not(.fade) .modal-header {
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal:not(.fade) .modal-body {
    padding: 15px;
}
.modal:not(.fade) .modal-footer {
    padding: 15px;
    border-top: 1px solid #ddd;
    text-align: right;
}
.modal:not(.fade) .btn-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}
.modal:not(.fade) .btn-close:hover {
    color: #333;
}

/* Form styles */
.form-control {
    width: 100%;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
}
.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-check {
    margin-bottom: 10px;
}
.form-check-input {
    margin-right: 8px;
}
.form-text {
    font-size: 12px;
    color: #6c757d;
}

/* Alert styles */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert-dismissible .btn-close {
    position: absolute;
    top: 12px;
    right: 15px;
}

/* Badge styles */
.badge {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 12px;
    display: inline-block;
    font-weight: bold;
}
.badge-danger {
    background-color: #dc3545;
    color: black;
}
.badge-success {
    background-color: #28a745;
    color: black;
}
.badge-warning {
    background-color: #ffc107;
    color: black;
}
.badge-info {
    background-color: #17a2b8;
    color: black;
}

/* Simple move-out status styling */
.move-out-status {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    color: black;
    display: inline-block;
}
.move-out-status.moved-out {
    background-color: #ffcccb;
    border: 1px solid #dc3545;
}
.move-out-status.active {
    background-color: #d4edda;
    border: 1px solid #28a745;
}
.bg-info { background-color: #17a2b8 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-success { background-color: #28a745 !important; }
.bg-warning { background-color: #ffc107 !important; color: #212529 !important; }
.ms-1 { margin-left: 4px; }

/* Utility classes */
.mb-3 {
    margin-bottom: 15px;
}
.mb-4 {
    margin-bottom: 20px;
}
.h3 {
    font-size: 18pt;
    margin-bottom: 15px;
}
.text-gray-800 {
    color: #333;
}
.text-primary {
    color: #007bff;
}
.font-weight-bold {
    font-weight: bold;
}
.m-0 {
    margin: 0;
}
.py-3 {
    padding-top: 15px;
    padding-bottom: 15px;
}
.table-responsive {
    overflow-x: auto;
}
.table-bordered {
    border: 1px solid #ddd;
}
.table-sm th, .table-sm td {
    padding: 2px 4px;
}

/* Smaller, more compact form controls for rent sheet */
.table-sm .form-control-sm {
    padding: 0 2px !important;
    font-size: 12px !important;
    margin-bottom: 0 !important;
    line-height: 1.1;
    height: 18px;
}

/* Specifically target charge amount and charge type inputs */
.charge-amount-input, .charge-type-input {
    font-size: 12px !important;
    padding: 0 2px !important;
}

/* Charges table interactions */
.charge-date-input, .charge-tenant-input, .charge-amount-input, .charge-type-input, .charge-month-input {
    transition: all 0.3s ease;
}

.charge-date-input:hover, .charge-tenant-input:hover, .charge-amount-input:hover, .charge-type-input:hover, .charge-month-input:hover {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

.notes-display {
    transition: all 0.3s ease;
}

.notes-display:hover {
    background-color: #f8f9fa !important;
    border: 1px solid #dee2e6 !important;
}

.table th, .table td {
    padding: 8px 12px;
    text-align: left;
    vertical-align: middle;
}

.table td a {
    color: #007bff;
    text-decoration: none;
}

.table td a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Style the select2 dropdown to match Bootstrap */
.select2-container--default .select2-selection--single {
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* Ultra-compact cell input for spreadsheet-like density */
.cell-input {
    border: none !important;
    background: transparent !important;
    height: 18px !important;
    padding: 0 2px !important;
}

.cell-input:focus {
    outline: none !important;
    border: 1px solid #007bff !important;
    background: #fff !important;
}

/* Dropdown styles for Payments menu */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    padding: 8px 16px;
    text-decoration: none;
    display: block;
    color: #333;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown-content a.active {
    background-color: #e7e7e7;
}

/* Additional layout utilities */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -15px;
    margin-right: -15px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding-left: 15px;
    padding-right: 15px;
}

.col-md-3 { flex: 0 0 25%; max-width: 25%; padding-left: 15px; padding-right: 15px; }
.col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding-left: 15px; padding-right: 15px; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding-left: 15px; padding-right: 15px; }
.col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; padding-left: 15px; padding-right: 15px; }

.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.text-center { text-align: center; }
.w-100 { width: 100%; }

.h1, h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
.h5, h5 { font-size: 1.25rem; margin-bottom: 0.5rem; }

.border-danger { border-color: #dc3545 !important; }
.text-white { color: #fff !important; }

/* ===== DATATABLES STYLING ===== */
.dataTables_wrapper .dataTables_length select {
    padding: 2px 5px;
    margin: 0 5px;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 2px 5px;
    margin-left: 5px;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 8px;
}

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

.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 2px 8px;
    margin: 0 2px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f5f5f5;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* ===== BOOTSTRAP-LIKE COMPONENTS ===== */
.card {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
}

.card-header {
    padding: 10px 15px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
}

.card-body {
    padding: 15px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th,
.table td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.table-striped tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.table-responsive {
    overflow-x: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.w-100 {
    width: 100%;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* ===== BUTTON STYLES ===== */
/* REMOVED DUPLICATES - All button styles consolidated at lines 230-295 */

.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.btn-group-sm .btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
}

.btn-group .btn:not(:first-child) {
    margin-left: -1px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-group .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* ===== DUPLICATE MODAL STYLES REMOVED ===== */
/* These styles are now handled by the first modal section and Bootstrap */

/* ===== FORM ELEMENTS ===== */
.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #007bff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group {
    margin-bottom: 15px;
}

.form-check {
    margin-bottom: 10px;
}

.form-check-input {
    margin-right: 8px;
}

.form-check-label {
    margin-bottom: 0;
    font-weight: normal;
}

.form-text {
    font-size: 12px;
    color: #6c757d;
}

/* ===== ALERT STYLES ===== */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeaa7;
}
.alert-dismissible .btn-close {
    position: absolute;
    top: 12px;
    right: 15px;
}

/* ===== BADGE STYLES ===== */
.badge {
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 12px;
    color: white;
}
.bg-info { background-color: #17a2b8 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-success { background-color: #28a745 !important; }
.bg-warning { background-color: #ffc107 !important; color: #212529 !important; }

/* ===== LOGIN PAGE STYLES ===== */
.login-body {
    background-color: #f5f5f5;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

.login-header {
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 20px;
    text-align: center;
}

.login-header h2 {
    margin: 0 0 5px 0;
    font-family: Garamond, serif;
    font-size: 24px;
    color: #333;
}

.login-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.login-form {
    padding: 20px;
}

.btn-login {
    width: 100%;
    margin-top: 10px;
}
  
/* ===== CENTRALIZED COMPONENT SYSTEM ===== */
/* This section standardizes common UI patterns across all templates */

/* === PAGE HEADERS === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.page-title {
    font-size: 16px;
    margin-bottom: 0;
    color: #333;
    font-weight: 600;
}

/* === SEARCH CONTROLS === */
.search-container input {
    font-size: 12px;
    padding: 4px 8px;
    height: 28px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    width: 200px;
}

.search-container input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.1rem rgba(0, 123, 255, 0.25);
    outline: none;
}

/* === FILTER CONTROLS === */
.filter-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 10px;
    border-left: 1px solid #dee2e6;
    margin-left: 10px;
}

.filter-controls .form-check {
    margin-bottom: 0;
}

.filter-controls .form-check-label {
    font-size: 12px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
}

.filter-controls .form-check-input:checked {
    background-color: #007bff;
    border-color: #007bff;
}

/* === EXPORT DROPDOWN === */
.export-dropdown .btn {
    font-size: 12px;
    padding: 2px 6px;
    height: 26px;
}

.export-dropdown .dropdown-menu {
    font-size: 12px;
    min-width: 100px;
}

.export-dropdown .dropdown-item {
    padding: 3px 6px;
}

.export-dropdown .dropdown-item i {
    width: 12px;
    margin-right: 4px;
}

/* === QUICK LINKS SECTION === */
.quick-links {
    padding: 10px 0;
    border-top: 1px solid #dee2e6;
    margin-top: 15px;
}

.quick-links strong {
    color: #495057;
    margin-right: 10px;
}

.quick-links .btn {
    margin: 2px 3px;
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.quick-links .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quick-links .fas {
    font-size: 0.75rem;
    margin-right: 5px;
}

/* === COMPACT TABLES === */
.table-compact {
    font-size: 12px;
}

.table-compact th,
.table-compact td {
    padding: 0 4px;
    font-size: 13px;
    vertical-align: middle;
    white-space: nowrap;
}

.table-compact th {
    font-size: 12px;
    font-weight: 600;
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 2px 4px;
}

.table-compact td {
    padding: 0 4px;
    border-bottom: 1px solid #dee2e6;
}

/* Checkbox columns */
.table-compact .text-center {
    text-align: center;
    width: 50px;
}

.table-compact .checkbox-input {
    transform: scale(1.0);
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.table-compact .checkbox-input:hover {
    opacity: 0.8;
}

/* === PROCESS ACTIONS === */
.process-actions {
    text-align: center;
    padding: 15px 0;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    margin: 20px 0;
}

.process-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    margin: 0 5px;
}

.process-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.process-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === INLINE EDITING SYSTEM === */
.editable-field {
    border: 1px solid #dee2e6;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.3s ease;
    background-color: #fff;
}

.editable-field:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.1rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.editable-field:hover {
    background-color: #f8f9fa;
    border-color: #ced4da;
}

/* Field states */
.editable-field.updating,
.field-updating {
    border-color: #ffc107;
    background-color: #fff3cd;
}

.editable-field.field-success,
.field-success {
    border-color: #28a745;
    background-color: #d4edda;
}

.editable-field.field-error,
.field-error {
    border-color: #dc3545;
    background-color: #f8d7da;
}

/* === STATUS BADGES === */
.status-badge {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
}

.status-completed {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-pending {
    background-color: #f0f7ff; /* subtle blue background */
    color: #0d6efd; /* primary blue text */
    border: 1px solid #cfe2ff; /* light blue border */
}

.status-active {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-default {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

/* === ACTION BUTTONS === */
.action-buttons .btn-sm {
    font-size: 12px;
    padding: 2px 6px;
    height: 26px;
    margin: 0 1px;
}

/* === NOTES INPUT === */
.notes-input {
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    padding: 2px 4px;
    font-size: 12px;
    width: 175px;
    height: 28px;
    border-radius: 3px;
}

.notes-input.saving {
    border-color: #ffc107;
    background-color: #fff3cd;
}

.notes-input.saved {
    border-color: #28a745;
    background-color: #d4edda;
}

.notes-input.error {
    border-color: #dc3545;
    background-color: #f8d7da;
}

/* === CONTACT INFO === */
.contact-info {
    text-align: left;
    font-size: 11px;
    line-height: 1.2;
    padding: 2px;
}

.contact-info .primary-contact {
    margin-bottom: 1px;
}

.contact-info .primary-phone {
    font-weight: bold;
    color: #007bff;
    font-size: 11px;
}

.contact-info .alt-contact {
    margin-bottom: 0;
    padding-left: 2px;
    color: #666;
}

.contact-info .phone-link {
    color: #007bff;
    text-decoration: none;
    font-size: 12px;
    display: inline-block;
    margin: 1px 0;
}

.contact-info .phone-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* === STANDARD CARD STYLING === */
.standard-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
}
.wnote-sidebar {
    width: 280px;
    max-width: 100%;
}
.wnote-layout {
    display: grid;
    grid-template-columns: 0 1fr;
    gap: 12px;
}
.wnote-layout .wnote-sidebar { grid-column: 1; }
.wnote-layout .wnote-content { grid-column: 2; }

/* Sidebar open state via class */
.sidebar-open.wnote-layout { grid-template-columns: 280px 1fr; }
.wnote-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-radius: 4px;
}
.wnote-list-item:hover { background-color: #f8f9fa; }

/* Mobile-friendly adjustments for work notes */
@media (max-width: 576px) {
  .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .standard-card .card-body { padding: 10px; }
  .wnote-mobile-toggle { display: inline-block; }
  .wnote-layout { grid-template-columns: 1fr; }
  #wnoteSidebar { display: none !important; }
}

/* Mobile mode class */
body.wnote-mobile .wnote-layout { grid-template-columns: 1fr; }
body.wnote-mobile #wnoteSidebar { display: none !important; }
}

.standard-card .card-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

.standard-card .card-body {
    padding: 15px;
}

/* === UTILITY CLASSES === */
.flex-center {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

.text-subtle {
    color: #6c757d;
    font-size: 0.875rem;
}

.border-subtle {
    border: 1px solid #dee2e6 !important;
}

.bg-subtle {
    background-color: #f8f9fa !important;
}

/* Additional utility classes for common patterns */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.d-inline-block {
    display: inline-block;
}

.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 1rem; }

.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }

.mt-3 { margin-top: 1rem; }

.text-center { text-align: center; }
.text-end { text-align: right; }

/* Form control improvements */
.form-check {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.form-check-input {
    margin-right: 0.5rem;
}

.form-check-label {
    cursor: pointer;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* === RESPONSIVE DATATABLE ADJUSTMENTS === */
.dataTables-standard .dataTables_wrapper .dataTables_length,
.dataTables-standard .dataTables_wrapper .dataTables_filter,
.dataTables-standard .dataTables_wrapper .dataTables_info,
.dataTables-standard .dataTables_wrapper .dataTables_processing,
.dataTables-standard .dataTables_wrapper .dataTables_paginate {
    font-size: 12px;
}

.dataTables-standard .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.25rem 0.5rem;
    font-size: 11px;
}

/* ===== NOTICE LETTER PRINT STYLES ===== */
@page { size: letter; margin: 1in; }
@media print {
  .sidenav,
  .sidebar-divider,
  .dropdown,
  .dropdown-content,
  .page-header,
  .process-actions,
  .card-header { display: none !important; }
  .main { margin: 0 !important; padding: 0 !important; width: auto !important; }
  .card { border: none !important; box-shadow: none !important; }
  .card-body { padding: 0 !important; }
  .page-break { page-break-after: always; }
  .letter-container { width: auto !important; padding: 0 !important; border: none !important; page-break-inside: avoid; }
  .letter-container + .letter-container { page-break-before: always; }
  .final-page-break { page-break-after: always; height: 0; }
}

.letter-container {
  width: 8.5in;
  max-width: 100%;
  margin: 0 auto 24px auto;
  padding: 1in;
  background: white;
  border: 1px solid #e5e5e5;
}

.letter-header { margin-bottom: 24px; }
.letter-meta { font-size: 12px; color: #666; }
.signature-img { height: 46px; display: block; margin-top: 8px; }
.letter-body { font-size: 12px; line-height: 1.5; color: #333; }
.letter-address-lines { line-height: 1.1; }
.letter-subject { margin-top: 8px; margin-bottom: 8px; }
.letter-body p { margin: 8px 0; }
.letter-footer { font-style: italic; }
.letter-address { margin: 16px 0; white-space: pre-line; }
.letter-date { margin-top: 8px; margin-bottom: 24px; }
.page-break { height: 1px; margin: 16px 0; }

/* Letterhead */
.letter-head { font-size: 12px; color: #333; }
.letter-head .org-line { margin: 0; padding: 0; }
.letter-separator { border: 0; border-top: 1px solid #000; width: 100%; margin: 8px 0 16px 0; }

/* External link styling for clickable report links */
.external-link {
    color: #0d6efd;
    text-decoration: underline;
}
.external-link:hover {
    color: #0a58ca;
}

/* Work Orders Tag Filter Styles */
.tag-filter-bar {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.tag-filter-checkbox {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #dee2e6;
    background-color: #fff;
    font-size: 12px;
    user-select: none;
}

.tag-filter-checkbox:hover {
    border-color: #007bff;
    background-color: #f0f7ff;
}

.tag-filter-checkbox.active {
    border-color: #007bff;
    background-color: #e7f1ff;
}

.tag-filter-checkbox input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
}

.tag-filter-checkbox .tag-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
    border: 1px solid rgba(0,0,0,0.1);
}

.tag-filter-checkbox .tag-name {
    font-weight: 500;
}

/* Sync status indicator */
#sync-status {
    font-size: 11px;
}
#sync-status.syncing {
    color: #ffc107;
}
#sync-status.synced {
    color: #28a745;
}
#sync-status.error {
    color: #dc3545;
}

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #6c757d;
    font-size: 10px;
    padding: 8px 4px;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.mobile-bottom-nav .mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}

.mobile-bottom-nav .mobile-nav-item span {
    font-weight: 500;
}

.mobile-bottom-nav .mobile-nav-item:hover,
.mobile-bottom-nav .mobile-nav-item:focus {
    color: #007bff;
    text-decoration: none;
}

.mobile-bottom-nav .mobile-nav-item.active {
    color: #007bff;
}

.mobile-bottom-nav .mobile-nav-item.active i {
    color: #007bff;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-menu-overlay.show {
    display: block;
}

/* ===== MOBILE RESPONSIVE STYLES ===== */
@media screen and (max-width: 767px) {
    /* Hide desktop sidebar on mobile */
    .sidenav {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        width: 280px;
        box-shadow: none;
    }
    
    /* Show sidebar when mobile menu is open */
    .sidenav.mobile-open {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    
    /* Remove main content margin on mobile */
    .main {
        margin-left: 0 !important;
        padding-bottom: 70px; /* Space for bottom nav */
    }
    
    .main.collapsed {
        margin-left: 0 !important;
    }
    
    /* Show bottom navigation on mobile */
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Adjust sidebar gear position for mobile overlay */
    .sidenav .sidebar-gear {
        position: relative;
        bottom: auto;
        left: auto;
        padding: 12px 16px;
        border-top: 1px solid #dee2e6;
        margin-top: 20px;
    }
    
    /* Hide desktop sidebar toggle on mobile */
    .sidebar-toggle {
        display: none !important;
    }
    
    /* Add close button styling for mobile sidebar */
    .mobile-close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        background: none;
        border: none;
        font-size: 24px;
        color: #6c757d;
        cursor: pointer;
        padding: 5px 10px;
        z-index: 10;
    }
    
    .mobile-close-btn:hover {
        color: #333;
    }
    
    /* ===== TOUCH-FRIENDLY SIZING ===== */
    /* Minimum 44x44px touch targets (Apple recommendation) */
    
    /* Buttons - larger tap targets */
    .btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .btn-sm {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .btn-xxs {
        min-height: 36px;
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Form controls - 16px font prevents iOS zoom on focus */
    .form-control {
        min-height: 44px;
        font-size: 16px !important;
        padding: 10px 12px;
    }
    
    .form-control-sm {
        min-height: 40px;
        font-size: 16px !important;
    }
    
    select.form-control,
    select.form-select {
        min-height: 44px;
        font-size: 16px !important;
    }
    
    /* Table cells - more padding for easier tapping */
    .table td, .table th {
        padding: 12px 8px;
        font-size: 13px;
    }
    
    .table-compact td, .table-compact th {
        padding: 10px 6px;
        font-size: 12px;
    }
    
    /* Checkboxes and radio buttons */
    input[type="checkbox"],
    input[type="radio"] {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
    
    .form-check {
        padding: 8px 0;
    }
    
    .form-check-input {
        width: 20px;
        height: 20px;
    }
    
    /* Links in tables - easier to tap */
    .table td a {
        display: inline-block;
        padding: 4px 0;
    }
    
    /* Dropdown menus */
    .dropdown-content a {
        padding: 12px 16px;
        min-height: 44px;
    }
    
    /* Action buttons in tables */
    .action-buttons .btn-sm {
        min-height: 40px;
        min-width: 40px;
        padding: 8px 10px;
    }
    
    /* Page header adjustments */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    /* Search input on mobile */
    .search-container input {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }
    
    /* Card padding on mobile */
    .card-body {
        padding: 12px;
    }
    
    .card-header {
        padding: 12px;
    }
    
    /* ===== RESPONSIVE TABLES ===== */
    /* Enhanced horizontal scroll with visual cues */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin: 0 -12px;
        padding: 0 12px;
    }
    
    .table-responsive::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(255,255,255,0.9));
        pointer-events: none;
    }
    
    /* Card view for mobile tables */
    .table-mobile-cards {
        display: block;
    }
    
    .table-mobile-cards thead {
        display: none;
    }
    
    .table-mobile-cards tbody {
        display: block;
    }
    
    .table-mobile-cards tr {
        display: block;
        background: #fff;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 12px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }
    
    .table-mobile-cards td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .table-mobile-cards td:last-child {
        border-bottom: none;
    }
    
    .table-mobile-cards td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #495057;
        flex-shrink: 0;
        margin-right: 10px;
    }
    
    /* Card header row (first cell stands out) */
    .table-mobile-cards td:first-child {
        font-weight: 600;
        font-size: 14px;
        color: #007bff;
        border-bottom: 2px solid #dee2e6;
        padding-bottom: 10px;
        margin-bottom: 4px;
    }
    
    .table-mobile-cards td:first-child::before {
        display: none;
    }
    
    /* Hide DataTables controls that don't work well on mobile */
    .dataTables_wrapper .dataTables_length {
        display: none;
    }
    
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
        margin-bottom: 10px;
    }
    
    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        margin-left: 0;
        min-height: 44px;
        font-size: 16px;
    }
    
    .dataTables_wrapper .dataTables_info {
        float: none;
        text-align: center;
        padding: 10px 0;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        float: none;
        text-align: center;
        padding: 10px 0;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        min-width: 40px;
        min-height: 40px;
        padding: 8px 12px;
        margin: 2px;
    }
    
    /* Filter controls stack on mobile */
    .filter-controls {
        flex-direction: column;
        align-items: flex-start;
        border-left: none;
        margin-left: 0;
        padding: 10px 0;
        gap: 8px;
    }
}

/* ===== ASSET 3P VERIFICATION INDICATOR ===== */
.asset-3p-indicator {
    display: block;
    font-size: 9px;
    color: #0c5460;
    font-weight: bold;
    padding: 1px 3px;
    background-color: #d1ecf1;
    border-radius: 2px;
    border: 1px solid #17a2b8;
    margin-top: 2px;
}

