/* beesoft/css/style.css */
:root {
    /* Core Palette */
    --reptile-green: #24dc84;
    --bubbly-barracuda: #77d1fa;
    --daphne: #0d659c;         
    --hush-a-bye: #5194b4;     
    --mångata: #99bcd1;        
    --pontoon: #0b5b8d;         

    /* Backgrounds */
    --primary-bg: #0a1f33; /* darker base for full-page BG */
    --secondary-bg: #122c46; /* slightly lighter than primary-bg */
    --card-bg: #1a3e5c; /* dark card bg */
    --card-bg-hover: #21506f; /* hover state with brighter contrast */

    /* Accents */
    --accent-primary: var(--reptile-green);
    --accent-secondary: var(--bubbly-barracuda);

    /* Borders */
    --border-color-light: #355e7d; /* more contrast for dark background */
    --border-color-medium: #3b7095;
    --border-color-dark: #4988b3;

    /* Text Colors */
    --text-light: #f8f9fa; /* high contrast white */
    --text-medium: #cfd8dc; /* subtle muted white */
    --text-dark: #e1f0ff; /* bright for dark backgrounds */
    --text-on-card: #ffffff;

    /* Typography */
    --font-family-sans-serif: 'Nunito Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

    /* Borders & Shadows */
    --border-radius-sm: 0.25rem; 
    --border-radius-md: 0.5rem;  
    --border-radius-lg: 0.75rem; 
    --box-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --box-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --box-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.25);
}



body {
    font-family: var(--font-family-sans-serif);
    background-color: var(--primary-bg);
    color: var(--text-light); 
    font-size: 16px; 
    line-height: 1.6;
    /* Core layout flex properties are often in header.php's embedded style or a main layout CSS */
}

a {
    color: var(--accent-secondary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
a:hover {
    color: var(--reptile-green);
    text-decoration: none;
}

/* --- Top Navbar --- */
.top-navbar .navbar-brand strong { 
    color: var(--accent-primary);
}
.top-navbar .navbar-brand .brand-subtext {
    color: var(--text-medium);
    font-size: 0.8em;
}
#sidebarCollapse { /* Specific button to toggle sidebar */
    background-color: var(--accent-primary) !important; /* Force override if needed */
    color: var(--text-dark) !important;
    border: none;
    padding: 0.375rem 0.75rem;
}
#sidebarCollapse:hover { 
    opacity: 0.9; 
}
.top-navbar .navbar-toggler-icon {
    filter: invert(1) grayscale(1) brightness(2); /* Make hamburger icon visible on dark bg */
}
.top-navbar .navbar-nav .nav-link {
    color: var(--text-medium);
    padding: 0.5rem 1rem;
}
.top-navbar .navbar-nav .nav-link:hover,
.top-navbar .navbar-nav .nav-link:focus {
    color: var(--text-light);
}
.top-navbar .dropdown-menu {
    background-color: var(--secondary-bg);
    border: 1px solid var(--pontoon);
    box-shadow: var(--box-shadow-lg);
}
.top-navbar .dropdown-item { 
    color: var(--text-medium); 
}
.top-navbar .dropdown-item:hover,
.top-navbar .dropdown-item:focus {
    background-color: var(--pontoon);
    color: var(--accent-secondary);
}
.btn-outline-info { /* Example: For Recall button */
    color: var(--bubbly-barracuda);
    border-color: var(--bubbly-barracuda);
}
.btn-outline-info:hover {
    background-color: var(--bubbly-barracuda);
    color: var(--text-dark);
}

/* --- Sidebar --- */
#sidebar {
    background: var(--secondary-bg);
    color: var(--text-medium);
    border-right: 1px solid var(--pontoon);
    box-shadow: 3px 0 10px rgba(0,0,0,0.15);
    /* min-width, max-width, transition, position, etc., are likely in main layout styles */
}
#sidebar .sidebar-header {
    padding: 1rem 1.25rem;
    background: var(--pontoon);
    text-align: left;
    border-bottom: 1px solid var(--daphne);
    /* position: sticky, top, z-index likely in main layout styles */
}
#sidebar .sidebar-header .navbar-brand {
    padding: 0;
}
#sidebar .sidebar-header .sidebar-brand-icon i {
    color: var(--reptile-green);
    font-size: 1.5em;
}
#sidebar .sidebar-header .sidebar-brand-text {
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.2em;
}
#sidebar .sidebar-header .sidebar-brand-subtext {
    color: var(--mångata);
    font-size: 0.7em;
    line-height: 1;
    margin-top: -2px;
}
#sidebar ul p.sidebar-section-title {
    color: var(--accent-secondary);
    padding: 12px 20px 5px 20px;
    font-size: 0.8em;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
    opacity: 0.9;
}
#sidebar ul.components {
    padding: 0;
    border-bottom: none;
}
#sidebar ul li a {
    padding: 10px 20px;
    font-size: 0.95rem; 
    display: block;
    color: var(--mångata);
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-left-color 0.2s ease;
}
#sidebar ul li a:hover {
    color: var(--text-light);
    background-color: var(--hush-a-bye);
    border-left-color: var(--accent-primary);
}
#sidebar ul li.active > a,
#sidebar ul li a.has-active-child, /* Parent of an active submenu item */
#sidebar ul li a[aria-expanded="true"] { /* Dropdown toggle when open */
    color: #fff;
    background-color: var(--pontoon);
    border-left-color: var(--reptile-green);
    font-weight: 600;
}
#sidebar ul li.active > a i,
#sidebar ul li a.has-active-child i,
#sidebar ul li a[aria-expanded="true"] i {
    color: var(--reptile-green);
}
#sidebar ul ul { /* Submenu block */
    background-color: rgba(0,0,0,0.15);
    padding-left: 0;
}
#sidebar ul ul a { /* Submenu items */
    font-size: 0.9rem !important;
    padding: 8px 20px 8px calc(20px + 1.28571429em + 0.5rem + 4px) !important; /* Indent past parent icon and border */
    color: var(--mångata);
    border-left: none;
}
#sidebar ul ul a:hover {
    background-color: var(--hush-a-bye);
    color: var(--text-light);
}
#sidebar ul li ul li.active > a { /* Active submenu item */
    color: var(--accent-primary);
    background-color: rgba(0,0,0,0.2);
    font-weight: 500;
}
.sidebar-separator hr {
    border-color: var(--hush-a-bye);
    margin: 1rem 20px;
}
#sidebar ul.CTAs { /* Call to Action buttons */
    padding: 15px 20px;
    background: var(--pontoon);
    border-top: 1px solid var(--daphne);
}
#sidebar ul.CTAs a {
    text-align: center;
    font-size: 0.85em !important;
    display: block;
    border-radius: var(--border-radius-md);
    margin-bottom: 8px;
    font-weight: 600;
    padding: 8px 10px;
    color: var(--text-dark);
    transition: opacity 0.2s ease;
}
#sidebar ul.CTAs a.cta-docs {
    background-color: var(--bubbly-barracuda);
    border: 1px solid var(--bubbly-barracuda);
}
#sidebar ul.CTAs a.cta-support {
    background-color: var(--accent-primary);
    border: 1px solid var(--accent-primary);
}
#sidebar ul.CTAs a:hover {
    opacity: 0.85;
    color: var(--text-dark);
}
#sidebar ul li a .fa-fw { /* Fixed-width icons alignment */
    text-align: center;
}

/* --- Main Content Area & POS Sections --- */
#content { 
    background-color: var(--primary-bg); 
    /* width, padding, transition are likely in main layout styles */
}
.main-page-content-container h1, 
.main-page-content-container h2,
.main-page-content-container h3 {
    color: var(--text-light); 
    margin-bottom: 1.5rem; 
    font-weight: 600;
}
.main-page-content-container h4 { /* Section titles like "Current Order" */
    color: var(--accent-secondary); 
    font-weight: 700;
}
.product-section, .order-summary-panel {
    background-color: rgba(0,0,0,0.08); 
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2), var(--box-shadow-sm);
}
.product-section { 
    max-height: calc(100vh - 95px - 40px); /* Adjust based on navbar height + content padding */
    overflow-y: auto; 
}
.order-summary-panel { 
    max-height: calc(100vh - 50px - 40px); /* Adjust based on header height + content padding */
    display: flex; 
    flex-direction: column;
}

/* --- Product Grid & Cards --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #ccc transparent; /* For Firefox */
}
.product-grid::-webkit-scrollbar { /* For Chrome, Safari, Edge */
    width: 6px;
}
.product-grid::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}
.product-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color-medium);
    border-radius: var(--border-radius-md);
    box-shadow: var(--box-shadow-sm);
    color: var(--text-on-card);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out, border-color 0.2s ease-out;
    display: flex; flex-direction: column;
    overflow: hidden;
    font-size: 0.9rem;
    position: relative;
}
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--accent-primary);
}
.product-card img {
    height: 80px; 
    object-fit: cover;
    background-color: var(--mångata); /* Placeholder bg for image area */
    border-bottom: 1px solid var(--border-color-medium);
}
.product-card .card-body { 
    padding: 0.2rem; /* Reduced padding */
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
}
.product-card .product-sku { 
    font-size: 0.85rem; 
    color: var(--text-on-card); 
    opacity: 0.7; 
    background-color: rgba(0,0,0,0.15); 
    padding: 1px 4px; 
    border-radius: var(--border-radius-sm); 
    display: inline-block; 
    margin-bottom: 0.2rem; 
    font-weight: 500; 
}
.product-card .card-title { 
    font-size: 0.85rem; 
    font-weight: 600; 
    margin-bottom: 0.2rem; 
    color: var(--text-on-card); 
    line-height: 1.2; 
    min-height: 2.4em; /* Allow for two lines of text */
    overflow: hidden; 
    text-overflow: ellipsis; 
    /* display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; /* For multiline ellipsis if needed */
}
.product-card .product-price { 
    font-size: 1rem; 
    font-weight: 700; 
    color: var(--accent-primary); 
    margin-bottom: 0.3rem; 
}
.product-card .product-price small { 
    font-size: 0.7em; 
    color: var(--text-on-card); 
    opacity: 0.8; 
}
.product-card .product-stock-display { 
    font-size: 0.7rem !important; 
    margin-bottom: 0.5rem; 
}
.product-card .low-stock-warning { 
    position: absolute; top: 5px; right: 5px; 
    background-color: #ffc107; /* Bootstrap warning yellow */
    color: #000; 
    padding: 2px 6px; 
    font-size: 0.65em; 
    font-weight: bold; 
    border-radius: var(--border-radius-sm); 
    z-index: 1; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.2); 
}
.product-card .low-stock-warning.bg-danger { /* For out-of-stock */
    background-color: #dc3545 !important; 
    color: white !important; 
}
.btn-add-to-cart {
    background-color: var(--accent-primary); 
    border: 1px solid var(--accent-primary);
    color: var(--text-dark); 
    font-weight: 600;
    padding: 0.3rem 0.5rem; 
    font-size: 0.8em;
    border-radius: var(--border-radius-md);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-add-to-cart:hover, .btn-add-to-cart:focus { 
    background-color: #1fae6d; /* Darker shade of accent-primary */
    border-color: #1da265; 
    color: #fff; 
    transform: translateY(-2px); 
    box-shadow: 0 2px 5px rgba(36,220,132,0.4); 
}
.product-card.is-out-of-stock .btn-add-to-cart { 
    background-color: var(--mångata) !important; 
    border-color: var(--mångata) !important; 
    color: var(--pontoon) !important; 
    cursor: not-allowed; 
    box-shadow: none; 
    transform: none; 
}
.product-card.is-out-of-stock .btn-add-to-cart i { 
    color: var(--pontoon) !important; 
}
.out-of-stock-overlay { 
    position: absolute; top: 0; left: 0; right: 0; bottom: 0; 
    background-color: rgba(40, 40, 40, 0.7); 
    color: var(--text-light); 
    display: flex; align-items: center; justify-content: center; 
    font-weight: 600; 
    border-radius: calc(var(--border-radius-md) - 1px); 
    font-size: 1em; letter-spacing: 0.5px; 
    opacity: 0; 
    transition: opacity 0.3s ease; 
    pointer-events: none; 
}
.product-card.is-out-of-stock .out-of-stock-overlay { 
    opacity: 1; 
    pointer-events: all; 
}

/* --- Order Summary Panel --- */
.order-items-container { 
    flex-grow: 1; 
    overflow-y: auto; 
    margin-bottom: 1rem; 
    padding-right: 5px; /* For scrollbar visibility */
}
.order-item { 
    background-color: var(--card-bg); 
    color: var(--text-on-card); 
    padding: 0.5rem 0.75rem; 
    margin-bottom: 0.5rem; 
    border-radius: var(--border-radius-md); 
    border: 1px solid var(--border-color-medium); 
    box-shadow: var(--box-shadow-sm); 
    transition: background-color 0.2s; 
    display: flex; 
    align-items: center; 
    font-size: 0.9rem; 
}
.order-item:hover { 
    background-color: var(--card-bg-hover); 
}
.order-item .order-item-details { 
    flex-grow: 1; 
    margin-right: 0.5rem; 
    overflow: hidden; 
}
.order-item-name { 
    font-weight: 600; 
    font-size: 0.9em; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    display: block; 
}
.order-item-name small { 
    font-size: 0.8em; 
    opacity: 0.7; 
    display: block; 
}
.order-item-qty-price { 
    font-size: 0.8em; 
    color: var(--text-on-card); 
    opacity: 0.85; 
    white-space: nowrap; 
}
.order-item-qty-price .badge { 
    font-size: 0.9em; 
    vertical-align: middle; 
}
.order-item-total { 
    font-weight: 700; 
    color: var(--accent-primary); 
    font-size: 0.9em; 
    margin-right: 0.5rem; 
    min-width: 60px; /* Ensure consistent width for totals */
    text-align: right; 
}
.order-item-actions { 
    display: flex; 
    align-items: center; 
    white-space: nowrap; 
}
.order-item-actions .btn-sm { 
    background-color: transparent; 
    color: var(--text-on-card); 
    opacity: 0.7; 
    border: 1px solid var(--mångata); 
    padding: 0.2rem 0.4rem; 
    border-radius: var(--border-radius-sm); 
    transition: all 0.2s ease; 
    margin: 0 1px;
}
.order-item-actions .btn-sm:hover { 
    opacity: 1; 
    background-color: rgba(255,255,255,0.1); 
    border-color: var(--accent-secondary); 
    color: var(--accent-secondary); 
}
.order-item-actions .btn-danger-custom { /* Specific styling for remove button */
    background-color: transparent; 
    border: 1px solid #dc3545; /* Bootstrap danger color */
    color: #dc3545; 
}
.order-item-actions .btn-danger-custom:hover { 
    background-color: #dc3545; 
    color: white; 
}

/* Totals Section in Order Summary */
.totals-section { 
    border-top: 2px dashed var(--accent-primary); 
    padding-top: 1rem; 
    margin-top: auto; /* Pushes totals to the bottom if order-summary-panel is flex column */
    font-size: 0.95rem; 
}
.totals-section .row { 
    margin-bottom: 0.6rem; 
}
.totals-section .row .col:first-child { 
    font-weight: 500; 
    color: var(--text-medium); 
}
.totals-section .row .col:last-child { 
    font-weight: 600; 
    color: var(--text-light); 
}
.totals-section .input-group-sm .form-control, /* Updated for BS5 */
.totals-section .input-group-sm .form-select { /* Updated for BS5 */
    background-color: var(--card-bg); 
    color: var(--text-on-card); 
    border-color: var(--border-color-medium); 
    font-size: 0.85rem; 
}
.totals-section .input-group-sm .form-control:focus,
.totals-section .input-group-sm .form-select:focus { 
    border-color: var(--accent-primary); 
    box-shadow: 0 0 0 0.15rem rgba(36,220,132,0.25); 
}
.totals-section .input-group-sm .btn { /* General button in this group */
    font-size: 0.85rem; 
    padding: 0.25rem 0.5rem;
    background-color: var(--accent-secondary); 
    color: var(--text-dark); 
    border: 1px solid var(--accent-secondary);
}
.totals-section .input-group-sm .btn:hover { 
    opacity:0.9; 
}
.totals-section .grand-total { 
    font-size: 1.5rem; 
    font-weight: 700; 
    color: var(--accent-primary); 
}
.btn-checkout { 
    background-color: var(--accent-primary); 
    border-color: var(--accent-primary); 
    color: var(--text-dark); 
    font-weight: 700; 
    border-radius: var(--border-radius-md); 
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; 
}
.btn-checkout:hover { 
    background-color: #1fae6d; 
    border-color: #1da265; 
    color: #fff; 
    transform: translateY(-2px); 
    box-shadow: 0 3px 8px rgba(36,220,132,0.5); 
}
.btn-checkout:disabled { 
    background-color: var(--mångata); 
    border-color: var(--mångata); 
    color: var(--pontoon); 
    opacity: 0.65; 
}

/* --- POS Product Search & Category Filters --- */
.filters-search-bar { 
    background-color: rgba(0,0,0,0.15); 
    padding: 12px 15px; 
    border-radius: var(--border-radius-md); 
    margin-bottom: 1.5rem; 
    box-shadow: var(--box-shadow-sm); 
}
.filters-search-bar .input-group-text { 
    background-color: var(--hush-a-bye); 
    border-color: var(--border-color-medium); 
    color: var(--mångata);
}
.filters-search-bar .form-control { 
    background-color: var(--card-bg); 
    border: 1px solid var(--border-color-medium); 
    color: var(--text-on-card); 
    border-radius: var(--border-radius-sm); 
    font-size: 0.9em; 
}
.filters-search-bar .form-control::placeholder { 
    color: var(--text-on-card); 
    opacity: 0.6; 
}
.filters-search-bar .form-control:focus { 
    border-color: var(--accent-primary); 
    box-shadow: 0 0 0 0.2rem rgba(36,220,132,0.25); 
}
.category-filters .nav-link { 
    color: var(--text-medium); 
    margin: 0 4px 4px 0; 
    border-radius: var(--border-radius-lg); 
    padding: 0.35rem 0.85rem; 
    border: 1px solid var(--border-color-medium); 
    font-size: 0.85em; 
    font-weight: 500; 
    transition: all 0.2s ease; 
}
.category-filters .nav-link.active,
.category-filters .nav-link:hover { 
    background-color: var(--accent-secondary); 
    color: var(--text-dark); 
    border-color: var(--accent-secondary); 
    box-shadow: var(--box-shadow-sm); 
}

/* --- General Modal Styling --- */
.modal-content, .admin-modal-content { /* Consolidated */
    background-color: var(--secondary-bg); 
    color: var(--text-light); 
    border: 1px solid var(--pontoon); 
    border-radius: var(--border-radius-lg); 
    box-shadow: var(--box-shadow-lg); 
}
.modal-header { 
    border-bottom: 1px solid var(--pontoon); 
    padding: 1rem 1.5rem; 
}
.modal-header .modal-title { 
    font-weight: 600; 
}
.modal-header .btn-close { 
    filter: invert(1) grayscale(100%) brightness(150%); 
    opacity: 0.75; 
}
.modal-header .btn-close:hover { 
    opacity: 1; 
}
.modal-body, .admin-modal-content .modal-body { /* Consolidated */
    padding: 1.5rem; 
}
.modal-body .form-label, .admin-modal-content .form-label { /* Consolidated */
    color: var(--text-medium); 
    font-size: 0.9em; 
    font-weight: 500; 
    margin-bottom: 0.3rem; 
}
.modal-body .form-control, 
.modal-body .form-select,
.admin-modal-content .form-control, 
.admin-modal-content .form-select { /* Consolidated */
    background-color: var(--card-bg); 
    border: 1px solid var(--border-color-medium); 
    color: var(--text-on-card); 
    border-radius: var(--border-radius-sm); 
    padding: 0.5rem 0.75rem; 
}
.modal-body .form-control:focus, 
.modal-body .form-select:focus,
.admin-modal-content .form-control:focus, 
.admin-modal-content .form-select:focus { /* Consolidated */
    background-color: var(--card-bg); 
    border-color: var(--accent-primary); 
    color: var(--text-on-card); 
    box-shadow: 0 0 0 0.2rem rgba(36,220,132,0.25); 
}
.modal-body .list-group.payment-options .list-group-item { 
    background-color: var(--card-bg); 
    color: var(--text-on-card); 
    border-color: var(--border-color-medium); 
    margin-bottom: 5px; 
    border-radius: var(--border-radius-sm); 
    font-weight: 500; 
}
.modal-body .list-group.payment-options .list-group-item.active,
.modal-body .list-group.payment-options .list-group-item:hover { 
    background-color: var(--accent-primary); 
    color: var(--text-medium); 
    border-color: var(--accent-primary); 
}
.modal-footer { 
    border-top: 1px solid var(--pontoon); 
    padding: 1rem 1.5rem; 
}
.modal-footer .btn-primary, .btn-save-modal { /* Consolidated */
    background-color: var(--accent-primary); 
    border-color: var(--accent-primary); 
    color: var(--text-medium); 
    font-weight: 600; 
}
.modal-footer .btn-primary:hover, .btn-save-modal:hover { /* Consolidated */
    background-color: #1fae6d; 
    border-color: #1da265; 
    color: #fff; 
}
.modal-footer .btn-secondary { 
    background-color: var(--mångata); 
    border-color: var(--mångata); 
    color: var(--pontoon); 
    font-weight: 500; 
}
.modal-footer .btn-secondary:hover { 
    background-color: var(--hush-a-bye); 
    border-color: var(--hush-a-bye); 
    color: #fff; 
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--pontoon); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: var(--hush-a-bye); border-radius: 10px; border: 1px solid var(--pontoon); }
::-webkit-scrollbar-thumb:hover { background: var(--mångata); }

/* --- Admin Page Specific Styles --- */
.admin-card { /* For cards on admin dashboard/pages */
    background-color: var(--secondary-bg);
    border-color: var(--pontoon);
    color: var(--text-light);
}
.admin-table {
    color: var(--text-light);
    font-size: 0.9rem;
}
.admin-table thead {
    border-bottom: 2px solid var(--pontoon);
}
.admin-table tbody tr {
    border-bottom: 1px solid var(--pontoon);
}
.admin-table th a { 
    color: var(--text-light); 
    text-decoration: none; 
}
.admin-table th a:hover { 
    color: var(--accent-secondary); 
}
.admin-table th i.fa-sort-up, 
.admin-table th i.fa-sort-down { 
    color: var(--accent-primary); 
}
.admin-table tbody tr:hover { 
    background-color: rgba(255, 255, 255, 0.05); 
}
.admin-table-img { 
    width: 40px; height: 40px; 
    object-fit: cover; 
    border-radius: var(--border-radius-sm); 
    border: 1px solid var(--border-color-medium); 
}
.admin-table-img-placeholder { 
    width: 40px; height: 40px; 
    background-color: var(--hush-a-bye); 
    display: flex; align-items: center; justify-content: center; 
    border-radius: var(--border-radius-sm); 
    color: var(--mångata); 
}
.admin-badge-active { 
    background-color: var(--reptile-green) !important; 
    color: var(--text-dark) !important; 
}
.admin-badge-inactive { 
    background-color: var(--mångata) !important; 
    color: var(--pontoon) !important; 
}
.btn-action-edit { 
    color: var(--bubbly-barracuda); 
    border-color: var(--bubbly-barracuda); 
}
.btn-action-edit:hover { 
    background-color: var(--bubbly-barracuda); 
    color: var(--text-dark); 
}
.btn-action-delete { 
    color: #dc3545; 
    border-color: #dc3545; 
}
.btn-action-delete:hover { 
    background-color: #dc3545; 
    color: white; 
}
.btn-add-new { 
    background-color: var(--reptile-green); 
    color: var(--text-dark); 
}
.btn-add-new:hover { 
    background-color: #1fae6d; 
    color: white; 
}
.admin-search-btn { 
    background-color: var(--hush-a-bye); 
    color: var(--text-light); 
    border-color: var(--border-color-medium); 
}
.admin-search-btn:hover { 
    background-color: var(--mångata); 
    color: var(--pontoon); 
}
.admin-link-style { 
    color: var(--accent-secondary); 
    text-decoration: underline; 
}
.admin-link-style:hover { 
    color: var(--reptile-green); 
}
.card .form-control-sm, /* Admin form controls inside cards */
.card .form-select-sm {
    background-color: var(--card-bg);
    color: var(--text-on-card);
    border-color: var(--border-color-medium);
}
.card .form-control-sm:focus, 
.card .form-select-sm:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.2rem rgba(36,220,132,0.25);
}
.form-label { /* General form label styling for admin context */
    color: var(--text-medium);
}
.form-check-label { /* General form check label styling */
    color: var(--text-light);
}
.form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}
.alert-dismissible .btn-close { /* Flash messages close button */
    padding: 0.75rem 1rem;
}

/* GRN Specific */
.grn-search-item:hover {
    background-color: var(--hush-a-bye);
    color: var(--text-light);
}
.price-indicator {
    background-color: transparent !important;
    border: none !important;
    padding-left: 0.5rem !important;
    padding-right: 0.2rem !important;
    color: var(--text-medium);
}
.price-indicator .fa-arrow-up { color: #dc3545; }
.price-indicator .fa-arrow-down { color: var(--reptile-green); }
.price-indicator .fa-equals { color: var(--bubbly-barracuda); }
.price-indicator .fa-info-circle { color: var(--mångata); }
.price-indicator .fa-question-circle { color: var(--text-medium); opacity: 0.6; }
.last-price-info {
    font-size: 0.75em;
    padding-left: 0.25rem;
    color: var(--text-medium) !important;
    opacity: 0.8;
}

/* Add Item Modal - Price Option Cards */
.price-option-card {
    border-width: 2px;
    padding: 0.5rem 0.75rem;
    text-align: left;
    min-width: 120px;
    transition: all 0.2s ease-in-out;
    color: var(--text-medium);
    background-color: var(--card-bg);
    border-color: var(--border-color-medium);
}
.price-option-card:hover {
    border-color: var(--accent-secondary);
    background-color: var(--hush-a-bye);
    color: var(--text-light);
    transform: translateY(-2px);
}
.price-option-card.active {
    background-color: var(--accent-primary) !important;
    color: var(--text-dark) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(36, 220, 132, 0.4);
}
.price-option-card .price-label {
    font-size: 0.8em;
    opacity: 0.9;
    display: block;
    margin-bottom: 0.1rem;
}
.price-option-card .price-value {
    font-size: 1.3em;
    display: block;
}
.price-option-card .price-details {
    font-size: 0.7em;
    opacity: 0.7;
    display: block;
    margin-top: 0.2rem;
}

/* Payment Modal - Quick Cash Buttons */
#quickCashButtonsContainer .btn-outline-light {
    color: var(--text-light);
    border-color: var(--border-color-medium);
    background-color: var(--card-bg);
    margin: 0.2rem !important;
}
#quickCashButtonsContainer .btn-outline-light:hover {
    color: var(--text-dark);
    background-color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

/* Role Permissions Modal Styling */
#rolePermissionsModal .modal-dialog {
    max-height: 90vh;
    margin-top: 5vh; /* Adjusted from 10vh for potentially more content */
    margin-bottom: 5vh;
    display: flex;
    align-items: center;
}
#rolePermissionsModal .modal-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: hidden; /* Modal content itself shouldn't scroll, body will */
}
#rolePermissionsModal .modal-header {
    flex-shrink: 0;
    position: sticky; top: 0; z-index: 10;
    background-color: var(--secondary-bg); /* Match content to prevent transparency issues */
}
#rolePermissionsModal .modal-body {
    flex-grow: 1;
    overflow-y: auto;
    min-height: 200px; /* Ensure body has some height before scrolling */
}
#rolePermissionsModal .modal-footer {
    flex-shrink: 0;
    position: sticky; bottom: 0; z-index: 10;
    background-color: var(--secondary-bg);
}
.permission-module-group { margin-bottom: 1rem; }
.permission-module-group h6 { 
    color: var(--accent-secondary) !important; 
    border-bottom: 1px solid var(--hush-a-bye) !important; 
    padding-bottom: 0.5rem !important; 
    margin-bottom: 0.75rem !important; 
    font-weight: 600; 
}
.permission-module-group .form-check-label.small { font-size: 0.875em; cursor: pointer; }
.permission-module-group .form-check { padding-left: 1.75em; }
.permission-module-group .form-check-input { margin-left: -1.75em; }

/* Admin Dashboard Specifics */
.admin-dashboard-card {
    background-color: var(--card-bg);
    color: var(--text-on-card);
    border: 1px solid var(--border-color-medium);
    transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.admin-dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-md);
}
.admin-dashboard-card .stat-icon i { opacity: 0.7; }
.admin-dashboard-card .stat-label { color: var(--text-medium); font-weight: 500; }
.admin-dashboard-card .stat-value { color: var(--accent-primary); }
.admin-quick-link {
    background-color: var(--hush-a-bye);
    color: var(--text-light);
    border: 1px solid var(--border-color-dark);
    padding: 1rem;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-decoration: none; height: 100%;
    transition: background-color 0.2s ease;
}
.admin-quick-link:hover {
    background-color: var(--pontoon);
    color: var(--accent-secondary);
}
.admin-quick-link .fas { color: var(--accent-secondary); }
.admin-quick-link:hover .fas { color: var(--reptile-green); }

/* Held Sales Modal List Items */
#heldSalesModal .list-group-item {
    background-color: var(--card-bg) !important;
    color: var(--text-on-card) !important;
    border-color: var(--border-color-medium) !important;
    margin-bottom: 0.5rem !important;
    border-radius: var(--border-radius-md) !important;
}
#heldSalesModal .list-group-item:hover {
    background-color: var(--card-bg-hover) !important;
}
#heldSalesModal .list-group-item strong { color: var(--text-light) !important; }
#heldSalesModal .list-group-item small { color: var(--text-mångata) !important; opacity: 0.85 !important; }

/* When modal is open, prevent body scroll (Bootstrap usually handles this) */
body.modal-open {
    overflow: hidden;
}

/* --- Receipt Print Styles --- */
/* style.css - Alternative @media print block if others fail */
#receiptContainerForPrint {
    display: none; /* Hidden on screen */
}

@media print {
    #receiptContainerForPrint {
        display: block !important;
        visibility: visible !important;
        position: static;
        width: 300px;
        margin: 0 auto;
        font-family: Arial, sans-serif;
        background: white; /* Ensure visibility */
        color: black;
    }
    /* Hide all other elements */
    body > *:not(#receiptContainerForPrint),
    #receiptContainerForPrint ~ * {
        display: none !important;
    }
    /* Ensure child elements are visible */
    #receiptContainerForPrint * {
        display: block !important;
        visibility: visible !important;
        color: black !important;
    }
}

.toastify.toast-success {
    background: var(--reptile-green) !important; /* !important if needed to override defaults */
    color: var(--text-dark) !important;
}
.toastify.toast-error {
    background: #dc3545 !important;
    color: var(--text-light) !important;
}
.toastify.toast-warning {
    background: #ffc107 !important;
    color: var(--text-dark) !important;
}
.toastify.toast-info {
    background: var(--bubbly-barracuda) !important;
    color: var(--text-dark) !important;
}
/* Ensure proper border radius if Toastify doesn't pick it up from :root */
.toastify {
    border-radius: var(--border-radius-sm) !important;
    /* You might need to adjust padding or other base Toastify styles here too */
}

#paymentDetailsSection .card-header,
#duesSummaryCard .card-header {
    /* Consider a slightly different background or border for headers */
}

#paymentDetailsSection .form-control-lg,
#paymentDetailsSection .form-select-lg {
    font-size: 1rem; /* Make main input fields a bit larger */
}

#duesSummaryCard p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
#duesSummaryCard h6 {
    font-size: 0.95rem;
    border-bottom: 1px solid var(--border-color-light);
    padding-bottom: 0.3rem;
    margin-bottom: 0.75rem !important; /* Override Bootstrap if needed */
}

#disp_overall_total_due_after_bf_credit {
    /* Already has text-danger, size increased in HTML */
}

fieldset {
    background-color: rgba(var(--bs-emphasis-color-rgb), 0.02); /* Very subtle background */
}
fieldset legend {
    font-size: 0.95rem; /* Smaller legend */
    background-color: var(--card-bg); /* Match card background for legend */
    border-radius: var(--border-radius);
}

#paymentSplitsContainer .payment-split-row {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color-light);
}
#paymentSplitsContainer .payment-split-row:last-child {
    border-bottom: none;
}

#totalAllocatedAmount, #remainingToAllocate {
    font-size: 1.1em;
}

/* Animation (requires Animate.css or similar) */
/* If you don't have Animate.css, remove animate__animated and animate__flash */
.animate__flash {
    animation-duration: 1.5s;
}

/* Ensure select2 dropdowns appear correctly if inside other elements */
.select2-container--bootstrap-5 .select2-dropdown {
    z-index: 1060; /* Higher than Bootstrap modals if necessary */
}
.toastify.on {
    position: fixed !important; /* Force it to float relative to the viewport */
    z-index: 9999 !important;   /* Ensure it appears above all other content, including modals */
    opacity: 1 !important;
    width: auto !important;     /* Let the content define the width, not the full page */
    max-width: 400px;           /* Prevent it from getting too wide on large screens */
    display: inline-block !important; /* Change from block to inline-block */
    pointer-events: auto;
}

/* Styles for top-right positioning */
.toastify-right {
    right: 15px !important;
}
.toastify-top {
    top: 15px !important;
}
/* In /irrms/assets/css/style.css */

/* Styles for the printable receipt content */
.receipt-content {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: #000; /* Ensure text is black for printing */
    background-color: #fff;
}
.receipt-content .header { text-align: center; margin-bottom: 15px; }
.receipt-content h3, .receipt-content p { margin: 2px 0; }
.receipt-content .info-table, .receipt-content .details-table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.receipt-content .info-table td { padding: 2px 0; }
.receipt-content .details-table th, .receipt-content .details-table td { border-bottom: 1px solid #eee; padding: 4px 0; }
.receipt-content .details-table th { text-align: left; }
.receipt-content .text-right { text-align: right; }
.receipt-content .total-row td { border-top: 2px solid #000; border-bottom: 2px solid #000; font-weight: bold; padding: 5px 0; }
.receipt-content .footer { text-align: center; margin-top: 15px; font-size: 10px; }