:root {
  --bs-primary: #F28C38;
  --bs-primary-rgb: 242, 140, 56;
  --bs-secondary: #6C757D;
  --bs-secondary-rgb: 108, 117, 125;
  --bs-success: #2ECC71;
  --bs-success-rgb: 46, 204, 113;
  --bs-danger: #DC3545;
  --bs-danger-rgb: 220, 53, 69;
  --bs-warning: #FFC107;
  --bs-warning-rgb: 255, 193, 7;
  --bs-info: #17A2B8;
  --bs-info-rgb: 23, 162, 184;
  --bs-light: #F8F9FA;
  --bs-light-rgb: 248, 249, 250;
  --bs-dark: #343A40;
  --bs-dark-rgb: 52, 58, 64;
  --bs-body-bg: #FFFFFF;
  --bs-body-bg-rgb: 255, 255, 255;
  --bs-body-color: #212529;
  --bs-body-color-rgb: 33, 37, 41;

  /* Adjust link color to match primary */
  --bs-link-color: #F28C38;
  --bs-link-hover-color: #D97A30; /* Slightly darker orange for hover */
}

/* =============================================================================
   READ-ONLY FORM FIELD STYLING
   ============================================================================= */

/* Read-only form controls - greyed out appearance */
.form-control-readonly,
.form-control[readonly],
.form-control[disabled],
.form-select[readonly],
.form-select[disabled] {
  /* Inherit Bootstrap form-control sizing and spacing */
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border: 1px solid;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  
  /* Custom readonly appearance */
  background-color: #f8f9fa !important;  /* Light grey background */
  color: #6c757d !important;            /* Muted text color */
  border-color: #dee2e6 !important;     /* Light grey border */
  cursor: not-allowed !important;       /* Show not-allowed cursor */
  opacity: 0.7 !important;              /* Slightly transparent */
}

/* Focus state for read-only fields (remove blue outline) */
.form-control-readonly:focus,
.form-control[readonly]:focus,
.form-control[disabled]:focus,
.form-select[readonly]:focus,
.form-select[disabled]:focus {
  background-color: #f8f9fa !important;
  color: #6c757d !important;
  border-color: #dee2e6 !important;
  box-shadow: none !important;          /* Remove focus shadow */
  outline: none !important;             /* Remove outline */
}

/* Ensure placeholder text is also muted for read-only fields */
.form-control-readonly::placeholder,
.form-control[readonly]::placeholder,
.form-control[disabled]::placeholder {
  color: #adb5bd !important;
  opacity: 1 !important;
}

/* =============================================================================
   BUTTON STYLING SYSTEM
   ============================================================================= */

/* 
 * Button categorization and usage guidelines:
 *
 * PRIMARY ACTIONS (.btn-primary):
 * - Save/Submit forms: "Save Venue", "Update Product", "Submit Order"
 * - Create new items: "Add Product", "Create Venue", "Register"
 * - Confirm important actions: "Yes, Delete", "Confirm Order"
 * - Login/Authentication: "Log In", "Reset Password"
 * USE: Most important action on the page, should be visually prominent
 *
 * SECONDARY ACTIONS (.btn-outline-primary):
 * - Navigation: "Back", "Back to List", "Cancel" (non-destructive)
 * - Alternative actions: "Filter", "Search", "Add Ingredient"
 * - Edit actions: "Edit Venue", "Update Settings"
 * USE: Supporting actions, less prominent than primary but still important
 *
 * NEUTRAL ACTIONS (.btn-secondary, .btn-outline-secondary):
 * - Modal controls: "Close", "Cancel" (in modals)
 * - Utility actions: "Export", "Print", "Download"
 * - Secondary navigation: Use sparingly, only when primary colors don't fit
 * USE: Neutral actions that don't need thematic prominence
 *
 * DESTRUCTIVE ACTIONS (.btn-danger, .btn-outline-danger):
 * - Delete actions: "Delete Product", "Remove Item"
 * - Irreversible actions: "Clear All", "Reset Data"
 * USE: Only for destructive actions that require user attention
 * NOTE: Consider using .btn-primary for confirmation pages to maintain theme
 */

/* Ensure crispy-forms buttons use the primary color */
.btn-primary, .btn-outline-primary:hover {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--bs-link-hover-color); /* Slightly darker orange */
  border-color: var(--bs-link-hover-color);
  color: #FFFFFF;
}

.btn-primary:active,
.btn-primary:focus,
.btn-primary:active:focus {
  background-color: var(--bs-link-hover-color); /* Same as hover for consistency */
  border-color: var(--bs-link-hover-color);
  color: #FFFFFF;
  box-shadow: 0 0 0 0.2rem rgba(242, 140, 56, 0.5); /* Orange focus ring */
}

.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
  background-color: var(--bs-primary);
  color: #FFFFFF;
}

.btn-outline-primary:active,
.btn-outline-primary:focus,
.btn-outline-primary:active:focus {
  background-color: var(--bs-link-hover-color);
  border-color: var(--bs-link-hover-color);
  color: #FFFFFF;
  box-shadow: 0 0 0 0.2rem rgba(242, 140, 56, 0.5);
}

/* Adjust badge colors for consistency */
.badge.bg-success {
  background-color: var(--bs-success) !important;
}

.badge.bg-warning {
  background-color: var(--bs-warning) !important;
}

.badge.bg-purple {
  background-color: #6f42c1 !important;
  color: #fff !important;
}

/* Ensure table hover and striped rows complement the palette */
.table-hover tbody tr:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(var(--bs-light-rgb), 0.5);
}

/* List group hover effects to match table styling */
.list-group-item:not(.active):hover {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  cursor: pointer;
}

/* Adjust alert colors */
.alert-primary {
  background-color: rgba(var(--bs-primary-rgb), 0.2);
  border-color: var(--bs-primary);
  color: var(--bs-dark);
}

/* Navigation and card styling for enhanced visual hierarchy */
.navbar {
  background-color: var(--bs-primary) !important; /* Primary orange background */
  border-bottom: 2px solid var(--bs-link-hover-color); /* Darker orange border */
}

.navbar-brand,
.navbar-nav .nav-link {
  color: #FFFFFF !important; /* White text for contrast on orange background */
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: #FFE5CC !important; /* Light orange hover color for better contrast */
}

.navbar-brand:hover,
.navbar-brand:focus {
  color: #FFE5CC !important; /* Light orange hover color for better contrast */
}

/* Navbar toggler styling for orange background */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Dropdown menu styling for orange navbar */
.navbar .dropdown-menu {
  background-color: #FFFFFF;
  border: 1px solid var(--bs-link-hover-color);
}

.navbar .dropdown-item {
  color: var(--bs-dark) !important;
}

.navbar .dropdown-item:hover {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-primary) !important;
}

/* Nested dropdown submenu styling */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
  display: none;
}

.dropdown-submenu:hover .dropdown-menu {
  display: block;
}

.dropdown-submenu .dropdown-toggle::after {
  transform: rotate(-90deg);
  margin-left: 0.5rem;
}

.dropdown-submenu:hover .dropdown-toggle::after {
  transform: rotate(0deg);
}

.card {
  background-color: rgba(var(--bs-primary-rgb), 0.05);
}

.card-header {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Add hover effect for text-primary links */
a.text-primary:hover,
.text-primary:hover {
  color: var(--bs-link-hover-color) !important;
}

/* Shared class for all clickable links in the application */
.clickable-link {
  color: var(--bs-primary) !important;
  text-decoration: none !important;
}

.clickable-link:hover {
  color: var(--bs-link-hover-color) !important;
  text-decoration: none !important;
}

/* =============================================================================
   PAGINATION STYLES
   ============================================================================= */

/* Override Bootstrap pagination colors to match custom theme */
.pagination .page-link {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.pagination .page-link:hover {
  color: var(--bs-link-hover-color);
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  border-color: var(--bs-link-hover-color);
}

.pagination .page-item.active .page-link {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: #FFFFFF;
}

.pagination .page-item.active .page-link:hover {
  background-color: var(--bs-link-hover-color);
  border-color: var(--bs-link-hover-color);
  color: #FFFFFF;
}

/* Disabled pagination buttons */
.pagination .page-item.disabled .page-link {
  color: #6c757d;
  pointer-events: none;
  background-color: #f8f9fa;
  border-color: #dee2e6;
  opacity: 0.65;
}

/* Page jump dropdown styling */
.pagination-page-select {
  width: auto;
}

.pagination-page-select-label {
  margin-bottom: 0;
  margin-right: 0.5rem;
  color: #6c757d;
}

/* =============================================================================
   LEGAL DOCUMENT STYLING (Reusable)
   ============================================================================= */

/* Legal document content wrapper */
.legal-document {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--bs-body-color);
}

.legal-document p {
  margin-bottom: 1rem;
}

.legal-document a {
  color: var(--bs-primary);
}

.legal-document a:hover {
  color: var(--bs-link-hover-color);
}

/* Section headings for legal documents */
.section-heading {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--bs-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(242, 140, 56, 0.2);
}

.section-number {
  display: inline-block;
  min-width: 2rem;
  color: var(--bs-primary);
}

/* Table of contents styling */
.toc-list .list-group-item {
  border: none;
  padding: 0.75rem 0;
  background: transparent;
  transition: padding-left 0.2s ease;
}

.toc-list .list-group-item:hover {
  padding-left: 0.5rem;
  background-color: rgba(242, 140, 56, 0.05);
}

.toc-list a {
  color: var(--bs-body-color);
  font-weight: 500;
}

.toc-list a:hover {
  color: var(--bs-primary);
}

/* Data tables in legal documents */
.data-table table th {
  font-weight: 600;
  font-size: 0.9rem;
}

.data-table table td {
  font-size: 0.9rem;
}

/* Smooth scrolling for legal document anchors */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
}

/* Custom table styling for salary modals */
.table-custom-primary {
  background-color: rgba(var(--bs-primary-rgb), 0.1);
  color: var(--bs-dark);
}

.table-custom-primary strong {
  color: var(--bs-primary);
}

/* Table header styling - secondary grey background for all tables */
.table thead,
.table thead th {
  background-color: var(--bs-secondary) !important;
  border-color: var(--bs-secondary) !important;
  color: #ffffff !important;
}

/* Table footer styling - secondary grey background for all tables */
.table tfoot,
.table tfoot th {
  background-color: var(--bs-secondary) !important;
  border-color: var(--bs-secondary) !important;
  color: #ffffff !important;
}

/* Table column width classes */
.col-width-40 { width: 40%; }
.col-width-30 { width: 30%; }

/* =============================================================================
   TAKINGS FORM TABLE STYLING
   ============================================================================= */

/* Takings table specific styling */
.takings-table {
  max-width: 100%;
  margin-bottom: 0;
}

.takings-table td,
.takings-table th {
  min-width: 100px;
  padding: 0.375rem 0.25rem;
  vertical-align: middle;
}

.takings-table th:first-child {
  min-width: 100px;
  text-align: left;
}

.takings-table tbody td {
  padding: 0.25rem;
}

.takings-table tbody td input.form-control {
  text-align: right;
  border: 1px solid var(--bs-border-color);
  background-color: var(--bs-body-bg);
  box-shadow: none;
  width: 100%;
  padding: 0.25rem 0.375rem;
  font-size: 0.875rem;
  border-radius: 0.25rem;
}

.takings-table tbody td input.form-control:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
  background-color: var(--bs-body-bg);
}

.takings-table tfoot th {
  text-align: right;
  font-weight: 600;
}

.takings-table tfoot th:first-child {
  text-align: left;
}

.takings-table td.total-sales {
  text-align: right;
  font-weight: 600;
  background-color: rgba(var(--bs-light-rgb), 0.5);
}

/* Hide number input spinners for cleaner appearance */
.takings-table input[type="number"]::-webkit-outer-spin-button,
.takings-table input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.takings-table input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Modal header styling for custom theme */
.modal-header-custom {
  background-color: var(--bs-primary);
  color: #FFFFFF;
  border-bottom: 1px solid rgba(var(--bs-primary-rgb), 0.2);
}

/* Modal header with primary orange color */
.modal-header-primary {
    background-color: var(--bs-primary) !important;
    color: white !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-header-primary .modal-title {
    color: white !important;
    font-weight: 600;
}

.modal-header-primary .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Enhanced modal styling for pricing forms */
.modal-dialog-scrollable .modal-body {
  max-height: 70vh; /* Limit height for better UX */
}

/* Improve card spacing in modals */
.modal .card {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border: 1px solid rgba(0, 0, 0, 0.125);
}

.modal .card-header {
  padding: 0.75rem 1rem;
  font-weight: 600;
}

.modal .card-body {
  padding: 1rem;
}

/* Better form spacing in modals */
.modal .form-row-equal {
  margin-bottom: 1rem;
}

.modal .form-row-equal > * {
  margin-bottom: 0; /* Remove individual margins when in row */
}

/* Ensure modal footer buttons are properly styled */
.modal .form-actions {
  border-top: 1px solid var(--bs-border-color);
  margin-top: 1.5rem;
  padding-top: 1rem;
}

/* Shared styling for navbar and footer */
.navbar,
footer {
  background-color: var(--bs-primary) !important; /* Primary orange background */
  border-top: 2px solid var(--bs-link-hover-color); /* Darker orange border for footer */
}

.navbar-brand,
.navbar-nav .nav-link,
footer,
footer * {
  color: #FFFFFF !important; /* White text for contrast on orange background */
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-brand:hover,
.navbar-brand:focus {
  color: #FFE5CC !important; /* Light orange hover color for better contrast */
}

/* Footer specific styling */
footer {
  margin-top: auto; /* Sticky footer */
  border-top: 3px solid var(--bs-link-hover-color); /* Slightly thicker border for footer */
}

footer p {
  color: #FFFFFF !important;
  font-weight: 500;
}

/* Custom active state for list-group items to match orange theme */
.list-group-item.active {
  background-color: rgba(var(--bs-primary-rgb), 0.15);
  border-color: var(--bs-primary);
  color: var(--bs-body-color);
}

.list-group-item.active a {
  color: var(--bs-body-color) !important;
}

/* Custom active state for sidebar navigation - darker/bolder without background fill */
.sidebar-nav-link.active {
  background: rgba(56, 163, 242, 0.1) !important;
  color: var(--bs-secondary) !important;
  font-weight: bold !important;
}

.sidebar-nav-link.active i {
  color: var(--bs-secondary) !important;
}

/* Better card styling for venue cards */
.card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
  transition: all 0.2s ease-in-out;
}

.card:hover {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  border-radius: 0.5rem 0.5rem 0 0 !important;
  padding: 1rem 1.25rem;
}

.card-footer {
  background-color: #f8f9fa;
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 0.5rem 0.5rem !important;
  padding: 1rem 1.25rem;
}

/* Sidebar navigation styling improvements */
.sidebar-nav {
  margin: 0;
}

.sidebar-nav .nav-link {
  padding: 0.75rem 1rem !important;
  margin-bottom: 0.25rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
}

.sidebar-nav .nav-link:hover {
  background-color: rgba(13, 110, 253, 0.1) !important;
  transform: translateX(2px);
}

/* Right sidebar card styling */
.right-sidebar .card {
  border: none;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  border-radius: 0.5rem;
}

.right-sidebar .card-header {
  background-color: #f8f9fa;
  border-bottom: 1px solid #e9ecef;
  border-radius: 0.5rem 0.5rem 0 0 !important;
}

/* Sticky footer setup */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
  padding-bottom: 2.5rem; /* Add appropriate space above footer to match navbar spacing */
}

/* ===== ADMIN INTERFACE STYLING ===== */

.admin-interface {
  /* Use same color variables as main interface */
  --admin-primary: #F28C38; /* Same orange as main interface */
  --admin-secondary: #38a3f2; /* Blue */
  --admin-dark: #343a40;
  --admin-light: #f8f9fa;
  --admin-success: #2ECC71;
  --admin-danger: #dc3545;
  --admin-warning: #ffc107;
  --admin-info: #17a2b8;
}

/* Header styling - matches main interface navbar */
#header {
  background: var(--bs-primary) !important;
  color: white;
  padding: 10px 20px;
  margin: 0;
  border-bottom: none !important;
}

#branding h1,
#branding h1 a:link,
#branding h1 a:visited {
  color: white !important;
  text-decoration: none;
}

#branding h1 a:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* User tools styling */
#user-tools {
  color: white;
}

#user-tools a {
  color: white !important;
  text-decoration: none;
}

#user-tools a:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

#user-tools button {
  background: transparent !important;
  border: none !important;
  color: white !important;
  cursor: pointer;
}

#user-tools button:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Navigation sidebar styling */
#nav-sidebar {
  background: var(--bs-light) !important;
  border-right: 1px solid #ddd !important;
}

#nav-sidebar .module h2,
#nav-sidebar .module h3 {
  background: var(--bs-primary) !important;
  color: white !important;
  padding: 8px 16px !important;
  margin: 0 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border: none !important;
  font-weight: 600 !important;
}

#nav-sidebar .module a:link,
#nav-sidebar .module a:visited,
#nav-sidebar .module a {
  color: var(--bs-dark) !important;
  padding: 8px 16px !important;
  display: block !important;
  text-decoration: none !important;
  border: none !important;
  font-weight: normal !important;
}

#nav-sidebar .module a:hover,
#nav-sidebar .module a:focus {
  background: var(--bs-secondary) !important;
  color: white !important;
  text-decoration: none !important;
}

/* Current app/model highlighting */
#nav-sidebar .current-app .module h2,
#nav-sidebar .current-model {
  background: var(--bs-secondary) !important;
  color: white !important;
}

#nav-sidebar .current-model a,
#nav-sidebar .current-model a:link,
#nav-sidebar .current-model a:visited {
  background: rgba(56, 163, 242, 0.1) !important;
  color: var(--bs-secondary) !important;
  font-weight: bold !important;
}

#nav-sidebar .current-model a:hover,
#nav-sidebar .current-model a:focus {
  background: var(--bs-secondary) !important;
  color: white !important;
}

/* Additional Django admin sidebar selectors */
#nav-sidebar .module h3,
#nav-sidebar .module caption,
#nav-sidebar .module .section {
  background: var(--bs-primary) !important;
  color: white !important;
  padding: 8px 16px !important;
  margin: 0 !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border: none !important;
  font-weight: 600 !important;
}

/* All sidebar links - comprehensive targeting */
#nav-sidebar a,
#nav-sidebar a:link,
#nav-sidebar a:visited,
#nav-sidebar .module a,
#nav-sidebar .module a:link,
#nav-sidebar .module a:visited {
  color: var(--bs-dark) !important;
  padding: 8px 16px !important;
  display: block !important;
  text-decoration: none !important;
  border: none !important;
  font-weight: normal !important;
  background: transparent !important;
}

/* All sidebar hover states */
#nav-sidebar a:hover,
#nav-sidebar a:focus,
#nav-sidebar .module a:hover,
#nav-sidebar .module a:focus {
  background: var(--bs-secondary) !important;
  color: white !important;
  text-decoration: none !important;
}

/* Django admin specific sidebar classes */
#nav-sidebar .app-label,
#nav-sidebar .model-label {
  color: var(--bs-dark) !important;
  padding: 8px 16px !important;
  display: block !important;
  text-decoration: none !important;
  border: none !important;
  background: transparent !important;
}

#nav-sidebar .app-label:hover,
#nav-sidebar .model-label:hover,
#nav-sidebar .app-label:focus,
#nav-sidebar .model-label:focus {
  background: var(--bs-secondary) !important;
  color: white !important;
  text-decoration: none !important;
}

/* Content area styling */
#content-main {
  background: white !important;
}

/* Button styling - matches main interface buttons */
.button, input[type="submit"], input[type="button"], .submit-row input,
button[type="submit"], .default {
  background: var(--bs-primary) !important;
  color: white !important;
  border: 1px solid var(--bs-primary) !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  cursor: pointer !important;
}

/* Override button styling for dropdown items */
button.dropdown-item {
  background: transparent !important;
  color: #374151 !important;
  border: none !important;
  padding: 0.375rem 1rem !important;
  border-radius: 0 !important;
  font-weight: 400 !important;
  text-align: left !important;
  width: 100% !important;
}

.button:hover, input[type="submit"]:hover, input[type="button"]:hover,
.submit-row input:hover, button[type="submit"]:hover, .default:hover {
  background: var(--bs-link-hover-color) !important;
  border-color: var(--bs-link-hover-color) !important;
  color: white !important;
}

/* Override hover state for dropdown buttons */
button.dropdown-item:hover {
  background: #f8f9fa !important;
  color: var(--bs-primary) !important;
}

/* Module headers */
.module h2 {
  background: var(--bs-primary) !important;
  color: white !important;
  padding: 10px 15px !important;
  margin: 0 0 20px 0 !important;
  font-size: 14px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border: none !important;
}

/* Table styling */
.results table thead th {
  background: var(--bs-primary) !important;
  color: white !important;
  padding: 10px !important;
  font-weight: 600 !important;
  border: none !important;
}

.results table tbody tr:nth-child(even) {
  background: #f8f9fa !important;
}

.results table tbody tr:hover {
  background: rgba(242, 140, 56, 0.1) !important;
}

.results table td,
.results table th {
  border: 1px solid #dee2e6 !important;
}

/* Links in tables */
.results table a {
  color: var(--bs-primary) !important;
  text-decoration: none !important;
}

.results table a:hover {
  color: var(--bs-link-hover-color) !important;
  text-decoration: underline !important;
}

/* Footer - matches main interface footer */
#footer {
  background: var(--bs-primary) !important;
  color: white !important;
  text-align: center !important;
  padding: 10px !important;
  margin-top: 20px !important;
  border-top: none !important;
}

/* Breadcrumbs */
.breadcrumbs, #breadcrumbs, .breadcrumb {
  background: var(--bs-light) !important;
  padding: 10px 15px !important;
  border-bottom: 1px solid #ddd !important;
}

.breadcrumbs a, #breadcrumbs a, .breadcrumb a {
  color: var(--bs-primary) !important;
  text-decoration: none !important;
}

.breadcrumbs a:hover, #breadcrumbs a:hover, .breadcrumb a:hover {
  color: var(--bs-link-hover-color) !important;
}

/* Form styling */
.form-row {
  border-bottom: 1px solid #eee !important;
  padding: 15px 0 !important;
}

.form-row label {
  font-weight: 600 !important;
  color: var(--bs-dark) !important;
}

.form-row input,
.form-row select,
.form-row textarea {
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  padding: 6px 12px !important;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: var(--bs-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(242, 140, 56, 0.25) !important;
}

/* Messages */
.messagelist {
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  margin: 10px 0 !important;
}

/* Login form specific styling */
.admin-login-form {
  max-width: 400px;
  margin: 50px auto;
  padding: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-login-form h1 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--bs-primary);
}

.admin-login-form .admin-form-row {
  margin-bottom: 20px;
}

.admin-login-form .admin-button {
  width: 100%;
  padding: 12px;
  font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #nav-sidebar {
    position: static !important;
    width: 100% !important;
    border-right: none !important;
    border-bottom: 1px solid #ddd !important;
  }

  #content-main {
    margin-left: 0 !important;
  }
}

/* ======== UNIFIED LAYOUT SYSTEM ======== */

/* Legacy sidebar layout support for existing templates */
.sidebar-layout {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
    width: 100%;
    padding: 1.5rem 2rem 1rem 2rem; /* Padding moved from container-fluid */
}

.sidebar-layout .app-sidebar {
    flex: 0 0 auto;
    width: 220px;
    min-width: 220px;
    max-width: 280px;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

/* Main content area - flexible layout */
.sidebar-layout .main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  gap: 2rem;
}

/* Main content section - flexible */
.main-content-section {
  flex: 1;
  min-width: 0;
  padding: 0.5rem;
}

/* Right sidebar - fixed width for actions */
.main-content .right-sidebar {
  flex: 0 0 auto;
  width: 280px;
  min-width: 280px;
  max-width: 320px;
  padding: 1rem;
}

/* Standardized layout container and widths for all content types */
.layout-container-centered {
    /* For standalone content that doesn't need sidebars */
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 1.5rem 2rem 1rem 2rem; /* Restore essential padding */
}

.layout-narrow {
    /* Narrow content: login forms, simple calculators, basic displays */
    width: 100%;
    max-width: 400px;
}

.layout-medium {
    /* Medium content: pricing calculators, venue details, user profiles */
    width: 100%;
    max-width: 600px;
}

.layout-wide {
    /* Wide content: complex forms, detailed views, dashboards */
    width: 100%;
    max-width: 800px;
}

.layout-full {
    /* Full width content: lists, tables, reports, dashboard-style layouts */
    width: 100%;
    max-width: 1200px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .layout-container-centered {
        padding: 1.25rem 1rem; /* Reduced padding on tablets */
    }
    
    .sidebar-layout {
        flex-direction: column;
        padding: 1.25rem 1rem; /* Reduced padding on tablets */
        gap: 1.5rem;
    }
    
    .sidebar-layout .app-sidebar {
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 1rem;
    }
    
    .sidebar-layout .main-content {
        flex-direction: column;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .layout-narrow,
    .layout-medium,
    .layout-wide,
    .layout-full {
        max-width: none;
        width: 100%;
    }
    
    .layout-container-centered {
        justify-content: stretch;
        padding: 1rem 0.75rem; /* Reduced padding on mobile */
    }
    
    .sidebar-layout {
        padding: 1rem 0.75rem; /* Reduced padding on mobile */
        gap: 1rem;
    }
    
    .sidebar-layout .app-sidebar {
        padding: 0.75rem;
    }
    
    .main-content-section {
        padding: 0.25rem;
    }
    
    .main-content .right-sidebar {
        width: 100%;
        min-width: auto;
        max-width: none;
        padding: 0.75rem;
    }
}

/* Form layout helpers */
.form-row-equal {
    /* For forms with equal-width columns */
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row-equal > * {
    flex: 1;
    min-width: 250px;
}

.form-actions {
    /* Standardized form button container */
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.form-actions.left {
    justify-content: flex-start;
}

.form-actions.right {
    justify-content: flex-end;
}

/* ======== PRICING CALCULATOR STYLES ======== */
.results-hidden {
    display: none;
}

/* Ingredient row styling */
.ingredient-row {
    padding-bottom: 0.25rem;
    margin-bottom: 0.25rem;
}

.ingredient-row:last-child {
    border-bottom: none;
}

/* Enhanced form focus styling */
.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(242, 140, 56, 0.25);
}

/* ======== COMPREHENSIVE PRINT STYLES FOR PRICING CALCULATOR ======== */
@media print {
    @page {
        size: A4;
        margin: 0.8cm;
    }

    body {
        font-family: Arial, sans-serif;
        font-size: 10pt;
        line-height: 1.3;
        color: #000;
        background: #fff !important;
    }

    /* Hide navigation and non-essential elements */
    .navbar,
    .sidebar,
    .no-print,
    .btn,
    button,
    .form-actions,
    .d-flex.justify-content-between,
    .d-flex.flex-wrap {
        display: none !important;
    }

    /* Layout container adjustments - match original exactly */
    .layout-container-centered,
    .layout-wide,
    .container-fluid,
    .container {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .form-container-centered {
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .form-content-medium,
    .form-content-wide {
        max-width: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Main content area */
    main {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Enhanced card styling for print - exactly like original */
    .card {
        border: 2px solid #000 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin-bottom: 10px !important;
        page-break-inside: avoid;
        background: #fff !important;
    }

    .card.bg-light {
        background: #fff !important;
    }

    .card-header {
        background-color: #f8f9fa !important;
        border-bottom: 1px solid #000 !important;
        padding: 10px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .card-body {
        padding: 15px !important;
    }

    .card-title {
        font-size: 14pt !important;
        font-weight: bold !important;
        margin: 0 !important;
        color: #000 !important;
    }

    /* Form styling - match original exactly */
    .form-control,
    input[type="text"],
    input[type="number"],
    select,
    .textinput,
    .numberinput,
    .form-select {
        border: 1px solid #000 !important;
        border-radius: 0 !important;
        padding: 8px !important;
        font-size: 11pt !important;
        background: #fff !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .form-label,
    label {
        font-size: 10pt !important;
        font-weight: bold !important;
        color: #000 !important;
        margin-bottom: 5px !important;
        display: block !important;
    }

    /* Input group styling */
    .input-group {
        display: flex !important;
        width: 100% !important;
    }

    .input-group-text {
        background: #f8f9fa !important;
        border: 1px solid #000 !important;
        border-right: none !important;
        padding: 8px !important;
        font-size: 11pt !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .input-group .form-control {
        border-left: none !important;
        flex: 1 !important;
    }

    /* Form layout adjustments - match original exactly */
    .row {
        display: block !important;
        clear: both;
        margin: 0 !important;
        margin-bottom: 15px !important;
    }

    .col-6,
    .col-md-6 {
        display: inline-block !important;
        width: 48% !important;
        margin-right: 2% !important;
        vertical-align: top;
        float: none !important;
        padding: 0 !important;
    }

    .col-6:last-child,
    .col-md-6:last-child {
        margin-right: 0 !important;
    }

    .col-3,
    .col-md-3 {
        display: inline-block !important;
        width: 31% !important;
        margin-right: 1.5% !important;
        vertical-align: top;
        float: none !important;
        padding: 0 !important;
    }

    .col-3:last-child,
    .col-md-3:last-child {
        margin-right: 0 !important;
    }

    .col-md-4 {
        display: inline-block !important;
        width: 30% !important;
        margin: 0 1% !important;
        vertical-align: top;
        page-break-inside: avoid;
        padding: 0 !important;
    }

    .col-md-8,
    .col-lg-6 {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mb-3 {
        margin-bottom: 15px !important;
        page-break-inside: avoid;
    }

    /* Print header styling - exactly like original */
    .print-header {
        display: block !important;
        text-align: center;
        border-bottom: 2px solid #000;
        padding-bottom: 10px;
        margin-bottom: 20px;
        page-break-after: avoid;
    }

    .print-header h1 {
        font-size: 18pt !important;
        margin: 0 !important;
        color: #000 !important;
    }

    .print-header p {
        font-size: 11pt !important;
        margin: 5px 0 0 0 !important;
        color: #000 !important;
    }

    .print-header hr {
        border: 1px solid #000 !important;
        margin: 10px 0 !important;
    }

    /* Inline calculation display styling */
    .bg-light {
        background-color: #e9ecef !important;
        border: 1px solid #000 !important;
        padding: 8px !important;
        margin: 10px 0 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .bg-light .col-md-6 {
        width: 50% !important;
        padding: 0 5px !important;
        font-weight: bold !important;
        font-size: 10pt !important;
    }

    /* Results section styling - exactly like original */
    .results-section,
    #results-card,
    #results-card.results-hidden {
        display: block !important;
        page-break-before: avoid;
        page-break-inside: avoid;
        border: 2px solid #000 !important;
        visibility: visible !important;
        background: #fff !important;
        margin-top: 8px !important;
    }

    .results-section .card-header,
    #results-card .card-header {
        background-color: #e9ecef !important;
        text-align: center;
        font-size: 12pt !important;
        font-weight: bold !important;
        border-bottom: 1px solid #000 !important;
        padding: 8px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .results-section .row,
    #results-card .row {
        display: block !important;
        text-align: center;
        margin: 0 !important;
    }

    .results-section .col-md-4,
    #results-card .col-md-4 {
        display: inline-block !important;
        width: 30% !important;
        margin: 0 1% !important;
        vertical-align: top;
        page-break-inside: avoid;
    }

    .results-section .border,
    #results-card .border {
        border: 1px solid #000 !important;
        padding: 8px !important;
        margin-bottom: 5px;
        background: #fff !important;
    }

    .results-section .text-muted,
    #results-card .text-muted {
        font-size: 9pt !important;
        color: #666 !important;
        margin-bottom: 4px !important;
    }

    .results-section h4,
    #results-card h4 {
        font-size: 12pt !important;
        font-weight: bold !important;
        margin: 3px 0 !important;
    }

    .results-section .text-primary,
    #results-card .text-primary {
        color: #0066cc !important;
    }

    .results-section .text-success,
    #results-card .text-success {
        color: #28a745 !important;
    }

    .results-section .text-info,
    #results-card .text-info {
        color: #17a2b8 !important;
    }

    /* Crispy forms specific styling - match original exactly */
    .crispy-form .form-group,
    .fieldWrapper,
    .form-group,
    #div_id_name,
    #div_id_product_type,
    #div_id_gross_profit_margin,
    #div_id_cost_price,
    #div_id_sales_price {
        display: block !important;
        margin-bottom: 15px !important;
        page-break-inside: avoid;
        visibility: visible !important;
    }

    .control-label,
    .requiredField {
        display: block !important;
        font-weight: bold !important;
        margin-bottom: 5px !important;
        color: #000 !important;
        font-size: 10pt !important;
    }

    .asteriskField {
        color: #000 !important;
    }

    /* Composite calculator specific print improvements */
    .ingredients-section {
        page-break-inside: avoid;
        margin-bottom: 25px !important;
        clear: both !important;
        overflow: hidden !important;
    }

    .ingredients-section::after {
        content: "";
        display: table;
        clear: both;
    }

    .ingredient-header {
        border-bottom: 2px solid #000 !important;
        font-weight: bold !important;
        padding-bottom: 8px !important;
        margin-bottom: 15px !important;
        display: block !important;
        clear: both !important;
    }

    .ingredient-header .row {
        margin: 0 !important;
        display: block !important;
    }

    .ingredient-header .col-6,
    .ingredient-header .col-3 {
        display: inline-block !important;
        padding: 3px 5px !important;
        border-right: 1px solid #000 !important;
        vertical-align: top;
    }

    .ingredient-header .col-6 {
        width: 48% !important;
    }

    .ingredient-header .col-3 {
        width: 24% !important;
    }

    .ingredient-header .col-3:last-child {
        border-right: none !important;
        width: 26% !important;
    }

    /* Enhanced ingredient row styling for print */
    .ingredient-row {
        margin-bottom: 12px !important;
        page-break-inside: avoid;
        border-bottom: 1px solid #000 !important;
        padding-bottom: 8px !important;
        display: block !important;
        clear: both !important;
        overflow: hidden !important;
    }

    .ingredient-row:last-child {
        border-bottom: none !important;
        margin-bottom: 20px !important;
    }

    .ingredient-row .row {
        display: block !important;
        clear: both !important;
        overflow: hidden !important;
        margin: 0 !important;
    }

    .ingredient-row .d-flex {
        display: block !important;
        clear: both !important;
        overflow: hidden !important;
    }

    .ingredient-row .col-md-6 {
        display: inline-block !important;
        width: 50% !important;
        vertical-align: top !important;
        padding-right: 2% !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .ingredient-row .col-md-3 {
        display: inline-block !important;
        width: 30% !important;
        vertical-align: top !important;
        padding-right: 2% !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    .ingredient-row .col-md-3:last-child {
        width: 18% !important;
        padding-right: 0 !important;
    }

    /* Ensure ingredients section has proper spacing */
    .ingredients-section {
        page-break-inside: avoid;
        margin-bottom: 25px !important;
        clear: both !important;
        overflow: hidden !important;
    }

    .ingredients-section::after {
        content: "";
        display: table;
        clear: both;
    }

    .calculation-summary {
        border: 2px solid #000 !important;
        background-color: #f8f9fa !important;
        margin-top: 25px !important;
        padding: 15px !important;
        page-break-inside: avoid;
        clear: both !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .calculation-summary::before {
        content: "";
        display: table;
        clear: both;
    }

    .calculation-summary .row {
        margin: 0 !important;
        display: block !important;
    }

    .calculation-summary .col-md-6 {
        display: inline-block !important;
        width: 48% !important;
        margin-right: 2% !important;
        vertical-align: top;
    }

    .calculation-summary .col-md-6:last-child {
        margin-right: 0 !important;
    }

    .calculation-summary .text-end {
        text-align: right !important;
    }

    .calculation-summary strong {
        font-size: 11pt !important;
        font-weight: bold !important;
    }

    /* Form row equal spacing for print */
    .form-row-equal {
        display: block !important;
        margin-bottom: 15px !important;
        clear: both;
    }

    .form-row-equal > div {
        display: inline-block !important;
        vertical-align: top;
        margin-right: 1.5% !important;
    }

    .form-row-equal .col-md-6 {
        width: 60% !important;
    }

    .form-row-equal .col-md-3 {
        width: 18.5% !important;
    }

    .form-row-equal .col-md-3:last-child {
        margin-right: 0 !important;
    }

    /* Ensure all form elements and containers are visible */
    .card-body,
    .mb-3,
    .form-group,
    .fieldWrapper {
        display: block !important;
        visibility: visible !important;
    }

    /* Table styling if present */
    table {
        border-collapse: collapse !important;
        width: 100% !important;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 4px !important;
        font-size: 9pt !important;
        text-align: left !important;
    }

    th {
        background-color: #f8f9fa !important;
        font-weight: bold !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ensure proper display overrides */
    .d-none {
        display: none !important;
    }

    .d-print-block {
        display: block !important;
    }

    /* Override Bootstrap display utilities for print */
    .row.justify-content-center {
        justify-content: flex-start !important;
    }

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

    .mt-4 {
        margin-top: 8px !important;
    }

    /* Ensure specific elements are properly displayed */
    #quick-price-form,
    #quick-composite-form {
        display: block !important;
        visibility: visible !important;
    }
}
/* Ingredient management styling */
.ingredient-price-col {
    min-width: 140px;
}

.ingredient-action-col {
    min-width: 80px;
}

/* Stock order form styling */
.stock-input-wrapper input,
.order-input-wrapper input {
    max-width: 100px;
}

.filter-button-wrapper {
    flex: 0 0 auto;
}

/* Full-width layout container */
.layout-container-fluid {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Print styles for reports */
@media print {
    .btn, .card-header.bg-success, .alert, .no-print {
        display: none !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    .form-actions {
        display: none !important;
    }
}

/* Custom Badge Variants */

/* Brand-specific badges */
.badge-brand-primary {
    background-color: var(--bs-primary);
    color: white;
}

.badge-brand-accent {
    background-color: var(--bs-link-hover-color);
    color: white;
}

/* Status badges */
.badge-status-available {
    background-color: var(--bs-success);
    color: white;
}

.badge-status-limited {
    background-color: var(--bs-warning);
    color: var(--bs-dark);
}

.badge-status-unavailable {
    background-color: var(--bs-danger);
    color: white;
}

.badge-status-pending {
    background-color: var(--bs-info);
    color: white;
}

/* Supplier hierarchy badges */
.badge-supplier-main {
    background-color: var(--bs-primary);
    color: white;
    border: 2px solid var(--bs-link-hover-color);
}

.badge-supplier-alt1 {
    background-color: var(--bs-info);
    color: white;
}

.badge-supplier-alt2 {
    background-color: var(--bs-secondary);
    color: white;
}

.badge-supplier-ordered {
    background-color: rgba(var(--bs-success-rgb), 0.9);
    color: white;
    border: 1px solid var(--bs-success);
    animation: badge-pulse 2s infinite;
}

/* Category badges */
.badge-category {
    background-color: rgba(var(--bs-secondary-rgb), 0.1);
    color: var(--bs-secondary);
    border: 1px solid var(--bs-secondary);
}

.badge-category-food {
    background-color: rgba(var(--bs-success-rgb), 0.1);
    color: var(--bs-success);
    border: 1px solid var(--bs-success);
}

.badge-category-beverage {
    background-color: rgba(var(--bs-info-rgb), 0.1);
    color: var(--bs-info);
    border: 1px solid var(--bs-info);
}

.badge-category-cleaning {
    background-color: rgba(var(--bs-warning-rgb), 0.1);
    color: var(--bs-warning);
    border: 1px solid var(--bs-warning);
}

/* Priority badges */
.badge-priority-high {
    background-color: var(--bs-danger);
    color: white;
    animation: pulse 2s infinite;
}

.badge-priority-medium {
    background-color: var(--bs-warning);
    color: var(--bs-dark);
}

.badge-priority-low {
    background-color: var(--bs-light);
    color: var(--bs-dark);
    border: 1px solid var(--bs-secondary);
}

/* Counter badges */
.badge-counter {
    background-color: var(--bs-secondary);
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
}

.badge-counter-success {
    background-color: var(--bs-success);
    color: white;
    font-weight: bold;
}

.badge-counter-warning {
    background-color: var(--bs-warning);
    color: var(--bs-dark);
    font-weight: bold;
}

/* Size variants */
.badge-sm {
    font-size: 0.7em;
    padding: 0.2em 0.4em;
}

.badge-lg {
    font-size: 0.9em;
    padding: 0.4em 0.6em;
}

/* Animation for urgent badges */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* =============================================================================
   SIDEBAR NAVIGATION COMPONENT - MINIMAL & ELEGANT
   ============================================================================= */

.sidebar-nav {
    border-right: 1px solid #e5e7eb;
    padding-right: 1rem;
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 0 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 0.5rem;
}

.sidebar-title {
    color: #374151;
    font-weight: 600;
    margin: 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

.sidebar-title i {
    color: #6b7280;
    font-size: 1rem;
}

.sidebar-menu {
    padding: 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    color: #6b7280;
    text-decoration: none;
    border-radius: 0;
    margin-bottom: 0;
    transition: color 0.15s ease;
    font-weight: 500;
    font-size: 1rem;
    border-left: 3px solid transparent;
    padding-left: 0.75rem;
}

.sidebar-link:hover {
    color: #374151;
    text-decoration: none;
}

.sidebar-link.active {
    color: #1f2937;
    border-left-color: #3b82f6;
    font-weight: 600;
}

.sidebar-link i {
    width: 1.25rem;
    margin-right: 0.75rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 0;
}

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

.sidebar-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: #9ca3af;
    margin-left: auto;
}

.sidebar-toggle[aria-expanded="true"] .sidebar-arrow {
    transform: rotate(90deg);
}

.sidebar-submenu {
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    padding: 0.375rem 0 0.375rem 2rem;
    color: #9ca3af;
    text-decoration: none;
    margin-bottom: 0;
    transition: color 0.15s ease;
    font-size: 0.95rem;
    font-weight: 400;
}

.sidebar-sublink:hover {
    color: #6b7280;
    text-decoration: none;
}

.sidebar-sublink i {
    width: 1rem;
    margin-right: 0.75rem;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar-nav {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        height: auto;
        margin-bottom: 1rem;
        padding-right: 0;
    }
}

/* =================================
   DROPDOWN MENU FIXES
   ================================= */

.dropdown-menu {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.375rem;
    padding: 0.5rem 0;
    min-width: 10rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    color: #374151 !important;
    background-color: transparent;
    border: none;
    display: flex;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #1f2937 !important;
}

.dropdown-item.text-danger {
    color: #dc3545 !important;
}

.dropdown-item.text-danger:hover {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}

/* =================================
   STAFF CARD ENHANCEMENTS
   ================================= */

.staff-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.staff-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.staff-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem;
}

.staff-card .card-body {
    padding: 1rem;
}

.staff-card .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

.staff-card .x-small {
    font-size: 0.7rem;
}

.staff-card .fw-bold {
    font-weight: 600;
}

/* =================================
   EMERGENCY CONTACT CARD ENHANCEMENTS
   ================================= */

.emergency-contact-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.emergency-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #d1d5db;
}

.emergency-contact-card .card-header {
    background-color: #ffc107 !important; /* Bootstrap warning yellow */
    border-bottom: 1px solid #ffb700;
    padding: 1rem;
}

.emergency-contact-card .card-header .card-title {
    color: #212529; /* Dark text for contrast on yellow background */
    font-weight: 600;
}

.emergency-contact-card .card-body {
    padding: 1rem;
}

.emergency-contact-card .badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
}

.emergency-contact-card .contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.emergency-contact-card .contact-item i {
    flex-shrink: 0;
    margin-top: 0.1rem;
    font-size: 0.9rem;
}

.emergency-contact-card .contact-item a {
    color: inherit;
    font-weight: 500;
}

.emergency-contact-card .contact-item a:hover {
    color: var(--bs-primary);
    text-decoration: underline !important;
}

.emergency-contact-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Emergency contact specific spacing and typography */
.emergency-contact-card .card-text.small {
    font-size: 0.875rem;
    line-height: 1.4;
}

.emergency-contact-card .fw-medium {
    font-weight: 500;
}

/* =============================================================================
   TOGGLE SLIDER COMPONENT
   ============================================================================= */

.toggle-slider {
    width: 3rem !important;
    height: 1.5rem !important;
    background-color: #dee2e6 !important;
    border: none !important;
    border-radius: 0.75rem !important;
    position: relative !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: none !important;
}

.toggle-slider:checked {
    background-color: #dc3545 !important; /* Red for unavailable */
    background-image: none !important;
}

.toggle-slider:not(:checked) {
    background-color: #198754 !important; /* Green for available */
    background-image: none !important;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background-color: white;
    top: 0.125rem;
    left: 0.125rem;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-slider:checked::before {
    transform: translateX(1.5rem);
}

.toggle-slider:focus {
    box-shadow: 0 0 0 0.2rem rgba(242, 140, 56, 0.25) !important;
    border: none !important;
    outline: none !important;
}

/* Form switch container styling */
.form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0;
}

.form-check.form-switch .form-check-label {
    margin-left: 0 !important;
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
}

/* Dynamic label text based on toggle state */
.toggle-slider:not(:checked) + .form-check-label::after {
    content: "Available";
    color: #198754;
}

.toggle-slider:checked + .form-check-label::after {
    content: "Unavailable for work";
    color: #dc3545;
}

/* Toggle field description */
.toggle-field-wrapper {
    margin-bottom: 1rem;
}

.toggle-field-wrapper .field-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 400;
}

/* =============================================================================
   CASH COUNT STYLING
   ============================================================================= */

.decimal-field {
    text-align: right;
    font-weight: 500;
}

.variance-amount {
    font-weight: 700;
    font-size: 1.1em;
}

.variance-positive {
    color: var(--bs-success) !important;
}

.variance-negative {
    color: var(--bs-danger) !important;
}

.variance-zero {
    color: var(--bs-secondary) !important;
}

.cash-summary-card {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border: none;
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
}

.cash-count-total-display {
    background: rgba(var(--bs-primary-rgb), 0.1);
    border: 2px solid var(--bs-primary);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.expected-cash-display {
    background: rgba(var(--bs-info-rgb), 0.1);
    border: 2px solid var(--bs-info);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

.variance-display {
    background: rgba(var(--bs-secondary-rgb), 0.1);
    border: 2px solid var(--bs-secondary);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
}

/* =============================================================================
   FORMSET TABLE STYLING
   ============================================================================= */

/* Formset row styling for better visual distinction */
.formset-row.new-row {
    background-color: #f8f9fa;
}

.formset-row.existing-row:hover {
    background-color: #f5f5f5;
}

/* =============================================================================
   VARIANCE DISPLAY STYLING
   ============================================================================= */

/* Style variance display table cells to look like plain text, not inputs */
.variance-display,
.till-variance-display {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    font-weight: normal !important;
}

/* Ensure variance displays don't look like form inputs on focus */
.variance-display:focus,
.till-variance-display:focus {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

/* =============================================================================
   CLICKABLE LINK STYLING
   ============================================================================= */

/* Submission date links in list views */
.submission-date-link {
    color: var(--bs-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.submission-date-link:hover {
    color: var(--bs-primary-rgb);
    text-decoration: underline;
    opacity: 0.8;
}

.submission-date-link:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Week commencing date links in list views */
.week-commencing-link {
    color: var(--bs-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.week-commencing-link:hover {
    color: var(--bs-primary-rgb);
    text-decoration: underline;
    opacity: 0.8;
}

.week-commencing-link:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Sortable table headers */
.sortable-header {
    font-weight: 600;
    transition: color 0.2s ease;
    color: rgba(255, 255, 255, 0.9) !important; /* Slightly off-white (10% grey) */
    text-decoration: none;
}

.sortable-header:hover {
    color: rgba(255, 255, 255, 1) !important; /* Pure white on hover */
    text-decoration: none;
}

.sortable-header.active {
    color: rgba(255, 255, 255, 1) !important; /* Pure white for active */
    font-weight: 700;
}

/* =============================================================================
   HOVER EFFECTS
   ============================================================================= */

/* Hover lift effect for cards */
.hover-lift {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* =============================================================================
   STAR RATING SYSTEM
   ============================================================================= */

/* Star rating radio buttons - Hide default radio input */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 0.25rem;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    cursor: pointer;
    font-size: 1.75rem;
    color: #ddd;
    transition: color 0.2s ease;
    margin: 0;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input[type="radio"]:checked ~ label {
    color: #FFD700;
}

/* Display stars for viewing (not form input) */
.rating-display {
    display: inline-flex;
    gap: 0.125rem;
}

.rating-display i {
    color: #FFD700;
    font-size: 1.1rem;
}

.rating-display i.bi-star {
    color: #ddd;
}

/* Rating card styling */
.rating-card {
    background: linear-gradient(135deg, #fff8e7 0%, #ffffff 100%);
    border-left: 4px solid #FFD700;
}

.rating-card .card-title {
    color: #DAA520;
    font-weight: 600;
}

/* Small rating display in tables */
.rating-small {
    font-size: 0.9rem;
    white-space: nowrap;
}

.rating-small i {
    font-size: 0.85rem;
}





