/* Premium Light Mode Stylesheet for Dtdeco - Warm Cream Theme */

/* Replace Logo for Light Mode (uses dark text variant logo(1).png) */
html.light-mode header.row img,
html.light-mode .header .header-logo,
html.light-mode .header img.header-logo,
html.light-mode img[alt="DTdeco Logo"],
html.light-mode img[src*="logo.png"] {
    content: url("../../images/logo_light_mode_cropped.png") !important;
    mix-blend-mode: normal !important;
}


/* Root html/body variables or classes override */
html.light-mode body,
html.light-mode body.bg-black,
html.light-mode .contain,
html.light-mode .fixedSection,
html.light-mode #container {
    background-color: #f3eae1 !important;
    background-image: none !important;
    color: #1a1a1a !important;
}


/* Sidebar Light Mode styles */
html.light-mode .sidebar {
    background: #faf6f0 !important;
    border-right: 1px solid #dfd6ca !important;
}

html.light-mode .sidebar button,
html.light-mode .sidebar #sidebar_button {
    background: transparent !important;
    color: #4a4a4a !important;
    border-left: 4px solid transparent !important;
}

html.light-mode .sidebar button:hover,
html.light-mode .sidebar #sidebar_button:hover {
    background: rgba(16, 185, 129, 0.08) !important;
    border-left: 4px solid #10b981 !important;
    color: #059669 !important;
}

html.light-mode .sidebar button:hover i,
html.light-mode .sidebar #sidebar_button:hover i {
    color: #10b981 !important;
}

html.light-mode .sidebar h3 {
    color: #1a1a1a !important;
}

html.light-mode .sidebar i {
    color: #6a6a6a;
}

html.light-mode .sidebar .fixed-bottom button,
html.light-mode .sidebar .fixed-bottom #sidebar_button {
    background: rgba(239, 68, 68, 0.08) !important;
    border: 1px solid rgba(239, 68, 68, 0.2) !important;
    color: #dc3545 !important;
}

html.light-mode .sidebar .fixed-bottom button:hover,
html.light-mode .sidebar .fixed-bottom #sidebar_button:hover {
    background: #dc3545 !important;
    color: #ffffff !important;
}

/* Mobile top header override */
html.light-mode .header {
    background-color: #faf6f0 !important;
    background: #faf6f0 !important;
    border-bottom: 1px solid #dfd6ca !important;
}

html.light-mode .mobile-toggle-btn {
    color: #1a1a1a !important;
}

/* Typography styles */
html.light-mode h1,
html.light-mode h2,
html.light-mode h3,
html.light-mode h4,
html.light-mode h5,
html.light-mode h6,
html.light-mode .h1,
html.light-mode .h2,
html.light-mode .h3,
html.light-mode .h4,
html.light-mode .h5,
html.light-mode .h6 {
    color: #1a1a1a !important;
}

html.light-mode hr {
    border-top: 1px solid #dfd6ca !important;
}

html.light-mode p {
    color: #4a4a4a !important;
}

/* Table and Glass container elements */
html.light-mode .table-responsive,
html.light-mode .glass,
html.light-mode #price_column,
html.light-mode #product_area {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

/* POS Header Bar */
html.light-mode header.row {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode header.row table td {
    color: #4a4a4a !important;
}

/* Totale Generale Box */
html.light-mode .header_price {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02) !important;
    color: #1a1a1a !important;
}

html.light-mode .header_price h5 {
    color: #4a4a4a !important;
}

html.light-mode .header_price h1 {
    color: #059669 !important;
}

/* Tables and Grid cells */
html.light-mode .table,
html.light-mode .table-striped {
    color: #1a1a1a !important;
}

html.light-mode .table thead th,
html.light-mode .table thead td,
html.light-mode .column-text,
html.light-mode .table-striped thead th,
html.light-mode .table-striped thead td {
    background-color: #eee5da !important;
    color: #1a1a1a !important;
    border-bottom: 1px solid #dfd6ca !important;
}

html.light-mode header.row table td {
    color: #4a4a4a !important;
}

html.light-mode .table tbody tr,
html.light-mode .table-striped tbody tr {
    background-color: #ffffff !important;
    border-bottom: 1px solid #dfd6ca !important;
}

html.light-mode .table-striped tbody tr:nth-of-type(odd) {
    background-color: #faf6f0 !important;
}

html.light-mode .table td,
html.light-mode .table th,
html.light-mode .table-striped td,
html.light-mode .table-striped th {
    border-color: #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .table tbody tr:hover,
html.light-mode .table-striped tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.04) !important;
}

/* Datatable header and sorting overrides */
html.light-mode table.dataTable thead th,
html.light-mode table.dataTable thead td,
html.light-mode table.dataTable thead .sorting,
html.light-mode table.dataTable thead .sorting_asc,
html.light-mode table.dataTable thead .sorting_desc,
html.light-mode table.dataTable thead .sorting_disabled {
    background-color: #eee5da !important;
    color: #1a1a1a !important;
    border-bottom: 1px solid #dfd6ca !important;
    border-color: #dfd6ca !important;
}

html.light-mode table.dataTable thead .sorting:before,
html.light-mode table.dataTable thead .sorting:after,
html.light-mode table.dataTable thead .sorting_asc:before,
html.light-mode table.dataTable thead .sorting_asc:after,
html.light-mode table.dataTable thead .sorting_desc:before,
html.light-mode table.dataTable thead .sorting_desc:after {
    color: #1a1a1a !important;
    opacity: 0.6 !important;
}

html.light-mode table.dataTable thead .sorting_asc:before,
html.light-mode table.dataTable thead .sorting_desc:after {
    opacity: 1 !important;
}

html.light-mode .dt-buttons .btn,
html.light-mode .dt-buttons .dt-button {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .dt-buttons .btn:hover,
html.light-mode .dt-buttons .dt-button:hover {
    background: #059669 !important;
    color: #ffffff !important;
    border-color: #059669 !important;
}

/* DataTable elements overrides */
html.light-mode .dataTables_wrapper {
    color: #1a1a1a !important;
}

html.light-mode .dataTables_wrapper .dataTables_length label,
html.light-mode .dataTables_wrapper .dataTables_filter label,
html.light-mode .dataTables_wrapper .dataTables_info,
html.light-mode .dataTables_info,
html.light-mode .dataTables_paginate {
    color: #4a4a4a !important;
}

html.light-mode .dataTables_length select,
html.light-mode .dataTables_filter input {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .page-link {
    background-color: #ffffff !important;
    border-color: #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode .page-item.active .page-link {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

html.light-mode .page-item.disabled .page-link {
    background-color: #faf6f0 !important;
    border-color: #dfd6ca !important;
    color: #9a9a9a !important;
}

/* Modals Override */
html.light-mode .modal-content {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
}

html.light-mode .modal-header {
    background-color: #faf6f0 !important;
    border-bottom: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .modal-header .close {
    color: #6a6a6a !important;
}

html.light-mode .modal-header .close:hover {
    color: #1a1a1a !important;
}

/* Invoice modal: bg-success header — keep X button white and visible */
html.light-mode #generateInvoiceModal .modal-header.bg-success .close,
html.light-mode #generateInvoiceModal .modal-header.bg-success .close span {
    color: #ffffff !important;
    opacity: 0.9 !important;
    text-shadow: none !important;
}

html.light-mode #generateInvoiceModal .modal-header.bg-success .close:hover,
html.light-mode #generateInvoiceModal .modal-header.bg-success .close:hover span {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Invoice modal: Annuler button — override the dark glass style from style.css */
html.light-mode #generateInvoiceModal .modal-footer .btn-secondary {
    background: #f1f5f9 !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
    box-shadow: none !important;
    transform: none !important;
}

html.light-mode #generateInvoiceModal .modal-footer .btn-secondary:hover {
    background: #eee5da !important;
    border-color: #c9bfb4 !important;
    color: #1a1a1a !important;
    transform: none !important;
}

html.light-mode .modal-body,
html.light-mode .modal-footer {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode .modal-footer {
    border-top: 1px solid #dfd6ca !important;
}

/* Input Fields and Select Dropdowns overrides */
html.light-mode .form-control,
html.light-mode select,
html.light-mode input,
html.light-mode textarea,
html.light-mode #search,
html.light-mode #qtProduit,
html.light-mode #priceProduit {
    background-color: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .form-control::placeholder,
html.light-mode input::placeholder,
html.light-mode textarea::placeholder {
    color: #9a9a9a !important;
}

html.light-mode .form-control:focus,
html.light-mode select:focus,
html.light-mode input:focus,
html.light-mode textarea:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

/* client search dropdown */
html.light-mode .wrapper .search_box {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode .wrapper .search_box .dropdown {
    border-right: 1px solid #dfd6ca !important;
    color: #059669 !important;
}

html.light-mode .wrapper .search_box .dropdown .default_option {
    color: #059669 !important;
}

html.light-mode .wrapper .search_box .dropdown ul {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06) !important;
}

html.light-mode .wrapper .search_box .dropdown ul li {
    color: #4a4a4a !important;
}

html.light-mode .wrapper .search_box .dropdown ul li:hover {
    background: #10b981 !important;
    color: #ffffff !important;
}

html.light-mode .wrapper .search_box .search_field .input {
    color: #1a1a1a !important;
}

/* POS Action elements */
html.light-mode #product_area .input-group.header-fix {
    background: #faf6f0 !important;
    border-bottom: 1px solid #dfd6ca !important;
}

html.light-mode #product_area .input-group-text {
    background: #eee5da !important;
    border: 1px solid #dfd6ca !important;
    color: #059669 !important;
}

/* Payer button in light mode */
html.light-mode .Enter,
html.light-mode button[name='enter'] {
    background: #faf6f0 !important;
    border: 1px solid #059669 !important;
    color: #059669 !important;
    box-shadow: none !important;
}

html.light-mode .Enter:hover,
html.light-mode button[name='enter']:hover {
    background: #059669 !important;
    color: #ffffff !important;
}

/* Remise field background in light mode */
html.light-mode #table_buttons .discount,
html.light-mode #table_buttons select.discount,
html.light-mode #table_buttons input.discount {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
}

/* Annuler / Déconnexion button in light mode */
html.light-mode .cancel,
html.light-mode button.cancel,
html.light-mode .logout,
html.light-mode button.logout,
html.light-mode #footer .logout,
html.light-mode #footer_emp .logout {
    background: #fff5f5 !important;
    border: 1px solid #dc3545 !important;
    color: #dc3545 !important;
    box-shadow: none !important;
}

html.light-mode .cancel:hover,
html.light-mode button.cancel:hover,
html.light-mode .logout:hover,
html.light-mode button.logout:hover,
html.light-mode #footer .logout:hover,
html.light-mode #footer_emp .logout:hover {
    background: #dc3545 !important;
    color: #ffffff !important;
    border-color: #dc3545 !important;
}

/* Footer Section */
html.light-mode #footer,
html.light-mode #footer_emp {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}


html.light-mode #footer #buttons:not(.logout):not(.cancel),
html.light-mode #footer_emp #buttons:not(.logout):not(.cancel),
html.light-mode #footer .btn:not(.logout):not(.cancel),
html.light-mode #footer_emp .btn:not(.logout):not(.cancel) {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode #footer #buttons:not(.logout):not(.cancel):hover,
html.light-mode #footer_emp #buttons:not(.logout):not(.cancel):hover,
html.light-mode #footer .btn:not(.logout):not(.cancel):hover,
html.light-mode #footer_emp .btn:not(.logout):not(.cancel):hover {
    background: rgba(16, 185, 129, 0.08) !important;
    border-color: #10b981 !important;
    color: #059669 !important;
}

/* Badge and specific texts override */
html.light-mode .badge-info,
html.light-mode .badge-secondary {
    background-color: #eee5da !important;
    color: #4a4a4a !important;
    border: 1px solid #dfd6ca !important;
}

html.light-mode .badge-danger {
    background-color: rgba(220, 53, 69, 0.08) !important;
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.2) !important;
}

html.light-mode .badge-success {
    background-color: rgba(16, 185, 129, 0.08) !important;
    color: #059669 !important;
    border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

/* Mobile top menu toggle buttons */
html.light-mode .mobile-menu-toggle {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

/* Floating Theme Toggle Button style */
.global-theme-toggle {
    position: fixed;
    right: 2rem;
    bottom: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #10b981 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-size: 1.25rem;
    z-index: 100005 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.global-theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45) !important;
}

.global-theme-toggle:active {
    transform: scale(0.95);
}

/* Light mode overrides for the toggle button itself */
html.light-mode .global-theme-toggle {
    background: rgba(250, 246, 240, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: #f59e0b !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

/* POS Table Header Overrides (Sticky Headers in main dashboard) */
html.light-mode #price_column table thead th,
html.light-mode #price_column table thead td,
html.light-mode #product_area table thead tr:nth-child(2) th,
html.light-mode #product_area table thead tr:nth-child(2) td,
html.light-mode #product_area table thead tr.text-center th,
html.light-mode #product_area table thead tr.text-center td {
    background: #eee5da !important;
    color: #1a1a1a !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05) !important;
    border-bottom: 1px solid #dfd6ca !important;
}

/* Sticky search row in POS Catalog */
html.light-mode #product_area .input-group.header-fix,
html.light-mode #product_area .header-fix {
    background: #faf6f0 !important;
    border-bottom: 1px solid #dfd6ca !important;
}

/* Remise (Discount) Input & Dropdown select overrides */
html.light-mode #discount.form-control,
html.light-mode input.form-control.discount {
    background: transparent !important;
    border: none !important;
    color: #1a1a1a !important;
}

html.light-mode #discount.form-control::placeholder,
html.light-mode input.form-control.discount::placeholder {
    color: #9a9a9a !important;
}

html.light-mode select#discount.custom-select,
html.light-mode select.discount,
html.light-mode #table_buttons select#discount {
    background-color: #faf6f0 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='4' height='5' viewBox='0 0 4 5'%3e%3cpath fill='%23059669' d='M2 0L0 2h4zm0 5L0 3h4z'/%3e%3c/svg%3e") !important;
    border: 1px solid #dfd6ca !important;
    color: #059669 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode select#discount.custom-select:focus,
html.light-mode select#discount.custom-select:hover,
html.light-mode select.discount:hover {
    border-color: #059669 !important;
    box-shadow: 0 4px 20px rgba(5, 150, 105, 0.15) !important;
}

html.light-mode select#discount option {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

/* POS Search Tab overrides (right table) */
html.light-mode #product_area .input-group {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode #product_area .input-group:focus-within,
html.light-mode #product_area .input-group:hover {
    border-color: #dfd6ca !important; /* Remove green contour on hover/focus */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

html.light-mode #product_area .input-group-prepend,
html.light-mode #product_area .input-group-prepend .input-group-text,
html.light-mode #product_area .input-group-text {
    background: #ffffff !important; /* White background behind loop icon */
    color: #059669 !important; /* Green search icon */
    border: none !important;
}

html.light-mode #product_area #search.form-control {
    background: #ffffff !important;
    border: none !important;
    color: #1a1a1a !important;
}

html.light-mode #product_area #search.form-control::placeholder {
    color: #9a9a9a !important;
}

/* POS Table overrides for fetched products and cart products */
html.light-mode #table1,
html.light-mode #table2,
html.light-mode #table1 td,
html.light-mode #table1 th,
html.light-mode #table2 td,
html.light-mode #table2 th,
html.light-mode #table1 tr,
html.light-mode #table2 tr,
html.light-mode #products tr,
html.light-mode #products td,
html.light-mode #tableData tr,
html.light-mode #tableData td {
    color: #1a1a1a !important; /* Dark text for fetched products */
}

/* Ensure alternating row colors are clean white and warm cream-beige */
html.light-mode #table1 tbody tr,
html.light-mode #table2 tbody tr {
    background-color: #ffffff !important;
}

html.light-mode #table1.table-striped tbody tr:nth-of-type(odd),
html.light-mode #table2.table-striped tbody tr:nth-of-type(odd) {
    background-color: #faf6f0 !important;
}

html.light-mode #table1 tbody tr:hover,
html.light-mode #table2 tbody tr:hover {
    background-color: rgba(16, 185, 129, 0.04) !important;
}

/* Remise Totale input group wrapper overrides in light mode */
html.light-mode #table_buttons .input-group {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode #table_buttons .input-group-prepend .input-group-text {
    background: #eee5da !important;
    color: #059669 !important;
    border: none !important;
}

html.light-mode #table_buttons input.discount {
    background: transparent !important;
    color: #1a1a1a !important;
    border: none !important;
}

/* Ventes Filter Card overrides in light mode */
html.light-mode .filter-card {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    color: #1a1a1a !important;
}

/* Datepicker calendar dropdown overrides for light mode */
html.light-mode .datepicker,
html.light-mode .datepicker-dropdown {
    background-color: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

html.light-mode .datepicker table tr td.day:hover,
html.light-mode .datepicker table tr td.focused {
    background: #eee5da !important;
    color: #1a1a1a !important;
}

html.light-mode .datepicker table tr td.active,
html.light-mode .datepicker table tr td.active:hover {
    background: #059669 !important;
    color: #ffffff !important;
}

/* Mobile Sales Table (Admin version) overrides for light mode */
html.light-mode .filter-card ~ .table-responsive #sales_table tbody tr {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(1),
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(1) {
    color: #0284c7 !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(7),
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(7) {
    color: #64748b !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(3),
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(3) {
    color: #1a1a1a !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(3)::before,
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(3)::before {
    color: #64748b !important;
}


html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(5),
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(5) {
    color: #059669 !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(5)::before,
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(5)::before {
    color: #64748b !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(4),
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(4) {
    color: #1a1a1a !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(4)::before,
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(4)::before {
    color: #64748b !important;
}

/* Mobile Sales Table (Employee version) overrides for light mode */
html.light-mode .sales-list-table tbody tr,
html.light-mode #sales_table.sales-list-table tbody tr {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html.light-mode #sales_table.sales-list-table tbody td:nth-child(1) {
    color: #0284c7 !important;
}

html.light-mode #sales_table.sales-list-table tbody td:nth-child(4) {
    color: #64748b !important;
}

html.light-mode #sales_table.sales-list-table tbody td:nth-child(2) {
    color: #1a1a1a !important;
}

html.light-mode #sales_table.sales-list-table tbody td:nth-child(3) {
    color: #1a1a1a !important;
}

html.light-mode #sales_table.sales-list-table tbody td:nth-child(3)::before {
    color: #64748b !important;
}

/* Page Selector select dropdown options */
html.light-mode select option,
html.light-mode .dataTables_length select option {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

/* Mobile Caissier text overrides in light mode */
html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(2),
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(2) {
    color: #4a4a4a !important;
}

html.light-mode .filter-card ~ .table-responsive #sales_table tbody td:nth-child(2)::before,
html.light-mode .table-card #sales_table:has(th:nth-child(7)) tbody td:nth-child(2)::before {
    color: #64748b !important;
}

/* Lower table total value text visibility in light mode */
html.light-mode #Total,
html.light-mode #Total tr,
html.light-mode #Total td,
html.light-mode #Total th {
    color: #1a1a1a !important;
}

/* Highly specific overrides to beat later-loaded style.css rules */
html.light-mode .glass table,
html.light-mode .glass .table-striped,
html.light-mode .glass #sales_table,
html.light-mode .glass #sales_table td,
html.light-mode .glass #sales_table th,
html.light-mode .glass #Total,
html.light-mode .glass #Total td,
html.light-mode .glass #Total th {
    color: #1a1a1a !important;
}

html.light-mode .glass #sales_table tbody tr,
html.light-mode .glass table tbody tr {
    background-color: #ffffff !important;
}

html.light-mode .glass #sales_table.table-striped tbody tr:nth-of-type(odd),
html.light-mode .glass table.table-striped tbody tr:nth-of-type(odd) {
    background-color: #faf6f0 !important;
}

/* Lower tables totals stats card override for light mode */
html.light-mode #Total,
html.light-mode #Capital,
html.light-mode .glass #Total,
html.light-mode .glass #Capital {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode #Total tr,
html.light-mode #Capital tr,
html.light-mode .glass #Total tr,
html.light-mode .glass #Capital tr {
    background: transparent !important;
    background-color: transparent !important;
}

html.light-mode #Total tr.align-middle {
    background-color: #faf6f0 !important;
}

html.light-mode #Total tr th,
html.light-mode #Total tr td,
html.light-mode #Capital tr th,
html.light-mode #Capital tr td,
html.light-mode .glass #Total tr th,
html.light-mode .glass #Total tr td,
html.light-mode .glass #Capital tr th,
html.light-mode .glass #Capital tr td {
    color: #1a1a1a !important;
}

html.light-mode #Total tr th:nth-child(2),
html.light-mode #Capital tr th:nth-child(2),
html.light-mode .glass #Total tr th:nth-child(2),
html.light-mode .glass #Capital tr th:nth-child(2) {
    color: #1a1a1a !important;
}

html.light-mode #Total tr th:nth-child(3),
html.light-mode #Capital tr th:nth-child(3),
html.light-mode .glass #Total tr th:nth-child(3),
html.light-mode .glass #Capital tr th:nth-child(3) {
    color: #059669 !important; /* Green for profits */
}

html.light-mode #Total tr th::before,
html.light-mode #Capital tr th::before,
html.light-mode .glass #Total tr th::before,
html.light-mode .glass #Capital tr th::before {
    color: #64748b !important;
}

/* Pagination Specificity Fix */
html.light-mode .page-item .page-link {
    background-color: #ffffff !important;
    border-color: #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode .page-item.active .page-link {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

html.light-mode .page-item.disabled .page-link {
    background-color: #faf6f0 !important;
    border-color: #dfd6ca !important;
    color: #9a9a9a !important;
}

/* Highly specific Page Selector (DataTables length select & filter search input) on mobile */
html.light-mode .dataTables_wrapper .dataTables_length select,
html.light-mode .dataTables_wrapper .dataTables_filter input {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .dataTables_wrapper .dataTables_length select option {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

/* Highly specific Pagination buttons on mobile */
html.light-mode .dataTables_wrapper .dataTables_paginate .pagination .page-item .page-link {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode .dataTables_wrapper .dataTables_paginate .pagination .page-item.active .page-link {
    background: #10b981 !important;
    border-color: #10b981 !important;
    color: #ffffff !important;
}

html.light-mode .dataTables_wrapper .dataTables_paginate .pagination .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #eee5da !important;
    border-color: #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .dataTables_wrapper .dataTables_paginate .pagination .page-item.disabled .page-link {
    background: #faf6f0 !important;
    border-color: #dfd6ca !important;
    color: #9a9a9a !important;
    opacity: 0.7 !important;
}

/* Highly specific Light Mode overrides for Receipt Details */
/* Must beat responsive.css rule: .fixedSection .glass... span.badge:not(.badge-success) { background: #0f172a } */
html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.flex-wrap span.badge:not(.badge-success) {
    background: #faf6f0 !important;
    border-color: #dfd6ca !important;
    color: #1a1a1a !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.flex-wrap span.badge:not(.badge-success) i {
    color: #059669 !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.flex-wrap span.badge:not(.badge-success) .fa-user-tie {
    color: #059669 !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.flex-wrap span.badge:not(.badge-success) .fa-user-circle {
    color: #3b82f6 !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.flex-wrap span.badge:not(.badge-success) .fa-calendar-alt {
    color: #64748b !important;
}

html.light-mode .fixedSection .glass span.badge-success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0 !important;
}

/* Mobile card list container tr/td overrides */
html.light-mode #sales_table.reciept-details-table tbody tr {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

html.light-mode #sales_table.reciept-details-table tbody td.barcode {
    color: #4a4a4a !important;
}

html.light-mode #sales_table.reciept-details-table tbody td:nth-child(3) {
    color: #059669 !important;
}

html.light-mode #sales_table.reciept-details-table tbody td.sellPrice {
    color: #1a1a1a !important;
}

html.light-mode #sales_table.reciept-details-table tbody td.sellPrice span {
    color: #1a1a1a !important;
}

html.light-mode #sales_table.reciept-details-table tbody td.sellPrice::before,
html.light-mode #sales_table.reciept-details-table tbody td.buyPrice::before,
html.light-mode #sales_table.reciept-details-table tbody td.qty::before {
    color: #64748b !important;
}

html.light-mode #sales_table.reciept-details-table tbody td.buyPrice {
    color: #64748b !important;
}

html.light-mode #sales_table.reciept-details-table tbody td.buyPrice span {
    color: #64748b !important;
}

html.light-mode #sales_table.reciept-details-table tbody td.qty,
html.light-mode #sales_table.reciept-details-table tbody td.qty span,
html.light-mode #sales_table.reciept-details-table tbody td.qty .badge {
    color: #0284c7 !important;
}

html.light-mode .btn-outline-secondary {
    border-color: #dfd6ca !important;
    color: #4a4a4a !important;
    background: #ffffff !important;
}

html.light-mode .btn-outline-secondary:hover {
    background-color: #eee5da !important;
    color: #1a1a1a !important;
}

/* Highly specific mobile top cards backgrounds in light mode */
html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.flex-wrap,
html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.justify-content-between {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.justify-content-between a.Editer {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.justify-content-between a.Editer:hover {
    background: #eee5da !important;
    color: #1a1a1a !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.justify-content-between button.btn-outline-success {
    border-color: #10b981 !important;
    color: #059669 !important;
    background: transparent !important;
}

html.light-mode .fixedSection .glass.p-3.mb-3.d-flex.justify-content-between button.btn-outline-success:hover {
    background: rgba(16, 185, 129, 0.05) !important;
}

/* -------------------------------------------------------
   DATE FILTER — light mode overrides
   Beats style.css: .filter-card .input-group-prepend .input-group-text { background:#0f172a }
   ------------------------------------------------------- */
html.light-mode .filter-card .input-group-prepend .input-group-text {
    background: #ffffff !important;
    border: none !important;
    border-right: none !important;
    color: #059669 !important;
    padding-right: 0.35rem !important;
}

html.light-mode .filter-card .form-control {
    background: #ffffff !important;
    border: none !important;
    border-left: none !important;
    color: #1a1a1a !important;
}

html.light-mode .filter-card .form-control::placeholder {
    color: #9a9a9a !important;
}

/* Wrap the outer group in a single unified border */
html.light-mode .filter-card .input-group {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

html.light-mode .filter-card .input-group:focus-within {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* -------------------------------------------------------
   RETOUR (BACK) BUTTON — light mode override
   Beats style.css dark glass treatment of .btn-secondary
   ------------------------------------------------------- */
html.light-mode .fixedSection a.btn.btn-secondary,
html.light-mode .fixedSection a.btn-secondary,
html.light-mode .fixedSection button.btn-secondary {
    background: #f1f5f9 !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06) !important;
    transform: none !important;
}

html.light-mode .fixedSection a.btn.btn-secondary:hover,
html.light-mode .fixedSection a.btn-secondary:hover,
html.light-mode .fixedSection button.btn-secondary:hover {
    background: #eee5da !important;
    border-color: #c9bfb4 !important;
    color: #1a1a1a !important;
    transform: none !important;
}

html.light-mode .fixedSection a.btn.btn-secondary i,
html.light-mode .fixedSection a.btn-secondary i {
    color: #4a4a4a !important;
}

html.light-mode .fixedSection a.btn.btn-secondary:hover i,
html.light-mode .fixedSection a.btn-secondary:hover i {
    color: #1a1a1a !important;
    transform: translateX(-3px) !important;
}


/* =======================================================
   FACTURES OFFICIELLES PAGE — light mode overrides
   ======================================================= */

/* Date filter inputs (uses #input-daterange, no .filter-card wrapper) */
html.light-mode #input-daterange .input-group-prepend .input-group-text {
    background: #ffffff !important;
    border: none !important;
    color: #059669 !important;
}

html.light-mode #input-daterange .form-control {
    background: #ffffff !important;
    border: none !important;
    color: #1a1a1a !important;
}

html.light-mode #input-daterange .form-control::placeholder {
    color: #9a9a9a !important;
}

html.light-mode #input-daterange .input-group {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    transition: border-color 0.2s ease !important;
}

html.light-mode #input-daterange .input-group:focus-within {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}

/* Invoices table — thead */
html.light-mode #invoices_table thead.thead-dark th,
html.light-mode #invoices_table thead tr th {
    background: #eee5da !important;
    color: #1a1a1a !important;
    border-bottom: 2px solid #dfd6ca !important;
    border-color: #dfd6ca !important;
}

/* Invoices table — rows */
html.light-mode #invoices_table tbody tr {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode #invoices_table tbody tr:nth-child(even) {
    background: #faf6f0 !important;
}

html.light-mode #invoices_table tbody tr:hover {
    background: #eee5da !important;
}

html.light-mode #invoices_table tbody td {
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

/* Invoice number strong.text-success */
html.light-mode #invoices_table tbody td strong.text-success {
    color: #059669 !important;
}

/* N° Vente link */
html.light-mode #invoices_table tbody td a {
    color: #0284c7 !important;
    text-decoration: none !important;
}

html.light-mode #invoices_table tbody td a:hover {
    color: #059669 !important;
    text-decoration: underline !important;
}

/* Total TTC strong */
html.light-mode #invoices_table tbody td strong {
    color: #1a1a1a !important;
    font-weight: 700 !important;
}

/* "Généré par" badge-info */
html.light-mode #invoices_table .badge.badge-info {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

/* PDF button — keep green */
html.light-mode #invoices_table .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: #ffffff !important;
}

/* Delete button — keep red */
html.light-mode #invoices_table .btn-danger {
    background: #ef4444 !important;
    border: none !important;
    color: #ffffff !important;
}


/* =======================================================
   STOCK PAGE (products.php) — light mode overrides
   ======================================================= */
html.light-mode #product_table thead tr th {
    background: #eee5da !important;
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

html.light-mode #product_table tbody tr {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode #product_table tbody tr:nth-child(even) {
    background: #faf6f0 !important;
}

html.light-mode #product_table tbody tr:hover {
    background: #eee5da !important;
}

html.light-mode #product_table tbody td {
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

/* Barcode and product name use class="text-dark" which gets overridden globally */
html.light-mode #product_table tbody td strong.text-dark,
html.light-mode #product_table tbody td .text-dark {
    color: #1a1a1a !important;
}

/* Buy price uses class="text-muted" */
html.light-mode #product_table tbody td span.text-muted {
    color: #64748b !important;
}

/* Sell price uses class="text-success" */
html.light-mode #product_table tbody td span.text-success {
    color: #059669 !important;
}

html.light-mode #product_table .btn-info {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: none !important;
}

html.light-mode #product_table .btn-warning {
    background: #fef3c7 !important;
    color: #92400e !important;
    border: none !important;
}

html.light-mode #product_table .btn-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: none !important;
}

html.light-mode #Capital td,
html.light-mode #Capital th {
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
    background: #ffffff !important;
}

html.light-mode .dt-buttons .dt-button {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #ffffff !important;
    border: none !important;
}


/* =======================================================
   MODIFY PRODUCT PAGE (update_products.php)
   ======================================================= */
html.light-mode .form-card {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

html.light-mode .form-page-header {
    border-bottom-color: #dfd6ca !important;
}

html.light-mode .form-page-header h1 {
    color: #1a1a1a !important;
}

html.light-mode .form-group-row label {
    color: #64748b !important;
}

html.light-mode .form-photo-box img {
    border-color: #dfd6ca !important;
    background: #faf6f0 !important;
}

html.light-mode .form-actions {
    border-top-color: #dfd6ca !important;
}

html.light-mode .form-card .input-group-prepend .input-group-text {
    background: #ffffff !important;
    border: none !important;
    color: #059669 !important;
}

html.light-mode .form-card .form-control {
    border: none !important;
    background: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode .form-card .input-group {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

html.light-mode .form-card .input-group:focus-within {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1) !important;
}


/* =======================================================
   VIEW PRODUCT MODAL (#dataModal)
   ======================================================= */
html.light-mode #dataModal .modal-content {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
}

html.light-mode #dataModal #Contact_Details {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode #dataModal h4.font-weight-bold {
    color: #1a1a1a !important;
}

html.light-mode #dataModal .badge-dark {
    background: #eee5da !important;
    border-color: #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode #dataModal .p-2.rounded {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
}

html.light-mode #dataModal .pb-2 {
    border-bottom-color: #dfd6ca !important;
}

html.light-mode #dataModal .badge-info {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}

html.light-mode #dataModal .modal-footer .btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    color: #ffffff !important;
}


/* =======================================================
   CLIENTS PAGE (customer.php) — light mode overrides
   ======================================================= */

/* Desktop table */
html.light-mode #customer_table thead tr th {
    background: #eee5da !important;
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

html.light-mode #customer_table tbody tr {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode #customer_table tbody tr:nth-child(even) {
    background: #faf6f0 !important;
}

html.light-mode #customer_table tbody tr:hover {
    background: #eee5da !important;
}

html.light-mode #customer_table tbody td {
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

/* Customer ID link */
html.light-mode #customer_table tbody td a {
    color: #059669 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

html.light-mode #customer_table tbody td a:hover {
    color: #047857 !important;
    text-decoration: underline !important;
}

/* Action buttons */
html.light-mode #customer_table .btn-info {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: none !important;
}

html.light-mode #customer_table .btn-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border: none !important;
}

html.light-mode #customer_table .btn-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: none !important;
}

/* View Customer Modal (#dataModal shared with products) */
html.light-mode #dataModal #Contact_Details * {
    color: #1a1a1a !important;
}


/* =======================================================
   VIEW CUSTOMER MODAL — override inline dark styles
   (view_customer.php uses inline style="background:#0f172a")
   ======================================================= */
html.light-mode #dataModal .p-3 {
    background: #ffffff !important;
}

/* Header separator */
html.light-mode #dataModal [style*="border-bottom: 1px solid #334155"] {
    border-bottom: 1px solid #dfd6ca !important;
}

/* Customer name */
html.light-mode #dataModal .text-white,
html.light-mode #dataModal h4.text-white {
    color: #1a1a1a !important;
}

/* ID badge & phone badge with inline bg:#0f172a */
html.light-mode #dataModal [style*="background:#0f172a"],
html.light-mode #dataModal [style*="background: #0f172a"] {
    background: #eee5da !important;
    border-color: #dfd6ca !important;
    color: #4a4a4a !important;
}

/* Image wrapper */
html.light-mode #dataModal [style*="background:#0f172a"][class*="p-2"],
html.light-mode #dataModal .p-2.rounded.d-inline-block {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
}

/* Label color: color:#94a3b8 inline */
html.light-mode #dataModal [style*="color:#94a3b8"] {
    color: #64748b !important;
}

/* Address text */
html.light-mode #dataModal td.text-white {
    color: #1a1a1a !important;
}


/* =======================================================
   USERS PAGE (user/user.php)
   ======================================================= */
html.light-mode #user_table thead tr th {
    background: #eee5da !important;
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

html.light-mode #user_table tbody tr {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode #user_table tbody tr:nth-child(even) {
    background: #faf6f0 !important;
}

html.light-mode #user_table tbody tr:hover {
    background: #eee5da !important;
}

html.light-mode #user_table tbody td {
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

html.light-mode #user_table .btn-info {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: none !important;
}

html.light-mode #user_table .btn-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border: none !important;
}

html.light-mode #user_table .btn-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: none !important;
}


/* =======================================================
   SUPPLIERS PAGE (supplier/supplier.php)
   ======================================================= */
html.light-mode #supplier_table thead tr th {
    background: #eee5da !important;
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

html.light-mode #supplier_table tbody tr {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode #supplier_table tbody tr:nth-child(even) {
    background: #faf6f0 !important;
}

html.light-mode #supplier_table tbody tr:hover {
    background: #eee5da !important;
}

html.light-mode #supplier_table tbody td {
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

/* Supplier company name link */
html.light-mode #supplier_table tbody td a {
    color: #059669 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

html.light-mode #supplier_table .btn-info {
    background: #dbeafe !important;
    color: #1e40af !important;
    border: none !important;
}

html.light-mode #supplier_table .btn-success {
    background: #d1fae5 !important;
    color: #065f46 !important;
    border: none !important;
}

html.light-mode #supplier_table .btn-danger {
    background: #fee2e2 !important;
    color: #991b1b !important;
    border: none !important;
}

/* =======================================================
   MODIFY PAGES & FORM BUTTONS (update_*, etc.)
   ======================================================= */
/* Form Actions (Save / Update Buttons) */
html.light-mode .form-actions button.btn-success,
html.light-mode .form-actions #user,
html.light-mode .form-actions input[type="submit"] {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border-color: #059669 !important;
    color: #ffffff !important;
}

html.light-mode .form-actions button.btn-success:hover,
html.light-mode .form-actions #user:hover,
html.light-mode .form-actions input[type="submit"]:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    border-color: #047857 !important;
}

/* Form Actions (Cancel / Danger Buttons) */
html.light-mode .form-actions a.btn-danger,
html.light-mode .form-actions button.btn-danger {
    background: #ffffff !important;
    border: 1px solid #ef4444 !important;
    color: #ef4444 !important;
}

html.light-mode .form-actions a.btn-danger:hover,
html.light-mode .form-actions button.btn-danger:hover {
    background: #fee2e2 !important;
    color: #dc2626 !important;
}

/* Retour / Back Buttons (btn-secondary globally) */
html.light-mode .btn-secondary,
html.light-mode .btn-outline-secondary,
html.light-mode a.btn-secondary,
html.light-mode a.btn-outline-secondary,
html.light-mode button.btn-secondary,
html.light-mode .btn-sm.btn-secondary,
html.light-mode .btn-secondary.btn-sm {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02) !important;
}

html.light-mode .btn-secondary:hover,
html.light-mode .btn-outline-secondary:hover,
html.light-mode a.btn-secondary:hover,
html.light-mode a.btn-outline-secondary:hover,
html.light-mode button.btn-secondary:hover {
    background: #faf6f0 !important;
    color: #1a1a1a !important;
    border-color: #10b981 !important;
}

html.light-mode .btn-secondary i,
html.light-mode .btn-outline-secondary i,
html.light-mode a.btn-secondary i,
html.light-mode a.btn-outline-secondary i {
    color: #10b981 !important;
}

/* Modal default buttons */
html.light-mode .modal-footer .btn-secondary,
html.light-mode .modal .btn-secondary {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode .modal-footer .btn-secondary:hover,
html.light-mode .modal .btn-secondary:hover {
    background: #faf6f0 !important;
    color: #1a1a1a !important;
    border-color: #10b981 !important;
}

/* =======================================================
   FILE INPUTS (Changer Photo)
   ======================================================= */
html.light-mode input[type="file"].form-control,
html.light-mode input[type="file"].form-control-sm,
html.light-mode input[type="file"] {
    background-color: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    color: #4a4a4a !important;
}

html.light-mode input[type="file"]::file-selector-button,
html.light-mode input[type="file"]::-webkit-file-upload-button {
    background: #faf6f0 !important;
    color: #1a1a1a !important;
    border: 1px solid #dfd6ca !important;
    font-weight: 600 !important;
}

html.light-mode input[type="file"]::file-selector-button:hover,
html.light-mode input[type="file"]::-webkit-file-upload-button:hover {
    background: #eee5da !important;
    color: #059669 !important;
    border-color: #059669 !important;
}


/* =======================================================
   ADD SUPPLIER MODAL (#addSupplierModal)
   ======================================================= */
html.light-mode #addSupplierModal .modal-content {
    background: #ffffff !important;
    border-color: #dfd6ca !important;
}

html.light-mode #addSupplierModal .modal-title,
html.light-mode #addSupplierModal .close,
html.light-mode #addSupplierModal .text-white,
html.light-mode #addSupplierModal label.text-white {
    color: #1a1a1a !important;
}

/* Image wrapper inline dashed border */
html.light-mode #addSupplierModal div[style*="dashed rgba(255,255,255"] {
    border: 1px dashed #9ca3af !important;
    background: #faf6f0 !important;
}

html.light-mode #addSupplierModal input[type="file"].text-white {
    color: #4a4a4a !important;
}

/* Input group icons (logos) */
html.light-mode #addSupplierModal .input-group-prepend .input-group-text {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    border-right: none !important;
    color: #059669 !important;
}

html.light-mode #addSupplierModal .input-group .form-control {
    background: #ffffff !important;
    border: 1px solid #dfd6ca !important;
    border-left: none !important;
    color: #1a1a1a !important;
}

/* =======================================================
   DELIVERY PAGE (Entrée de Stock)
   ======================================================= */
/* Header Card */
html.light-mode .page-header-card {
    background: #faf6f0 !important;
    border: 1px solid #dfd6ca !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

html.light-mode .page-header-card h1,
html.light-mode .page-header-card .text-light {
    color: #1a1a1a !important;
}

/* Delivery Table */
html.light-mode #delivery_table thead th {
    background-color: #eee5da !important;
    color: #1a1a1a !important;
    border-bottom: 1px solid #dfd6ca !important;
}

html.light-mode #delivery_table tbody tr {
    background-color: #ffffff !important;
    color: #1a1a1a !important;
}

html.light-mode #delivery_table tbody tr:nth-child(even) {
    background-color: #faf6f0 !important;
}

html.light-mode #delivery_table tbody tr:hover {
    background-color: #eee5da !important;
}

html.light-mode #delivery_table tbody td {
    color: #1a1a1a !important;
    border-color: #dfd6ca !important;
}

/* Links inside table (like transaction IDs) */
html.light-mode #delivery_table tbody td a {
    color: #059669 !important;
    font-weight: 600 !important;
}

/* =======================================================
   PROFILE PAGE (user/profile.php)
   ======================================================= */
/* Inline dark badges */
html.light-mode .form-card [style*="background:#0f172a"] {
    background: #faf6f0 !important;
    border-color: #dfd6ca !important;
}

html.light-mode .form-card [style*="color:#cbd5e1"],
html.light-mode .form-card [style*="color:#94a3b8"] {
    color: #4a4a4a !important;
}

/* Name */
html.light-mode .form-card h3.text-white {
    color: #1a1a1a !important;
}

/* Modifier Mon Profil Button */
html.light-mode .form-actions a[href*="update_profile.php"],
html.light-mode .form-actions a.btn-info {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
    color: #ffffff !important;
}

html.light-mode .form-actions a[href*="update_profile.php"]:hover,
html.light-mode .form-actions a.btn-info:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%) !important;
}











