/* 🔥 Modern Table with Borders */
.modern-table {
    font-size: 13px;
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
}

/* Header */
.modern-table thead th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 10px 12px !important;
    border: 1px solid #e5e7eb !important;
    text-transform: uppercase;
    font-size: 12px;
}

/* Body cells */
.modern-table tbody td {
    padding: 9px 12px !important;
    border: 1px solid #e5e7eb !important;
    vertical-align: middle;
}

/* Fix DataTables phantom sizing row header alignment */
.dataTables_scrollBody .modern-table thead th,
.dataTables_scrollBody .modern-table thead td,
.dataTables_scrollBody table thead th,
.dataTables_scrollBody table thead td {
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    height: 0 !important;
    line-height: 0 !important;
    white-space: nowrap;
}

.dataTables_scrollBody .modern-table thead tr {
    height: 0 !important;
}

/* Row background */
.modern-table tbody tr {
    background: #ffffff;
    transition: all 0.2s ease-in-out;
}

/* 🔥 Hover effect (clean highlight) */
.modern-table tbody tr:hover {
    background: #f1f5f9;
}

/* Zebra */
.modern-table tbody tr:nth-child(even) {
    background: #fcfcfd;
}

/* Strong hover border highlight */
.modern-table tbody tr:hover td {
    border-color: #cbd5f5 !important;
}

/* Action buttons */
.modern-table .btn {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #f1f5f9 !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 6px;
    padding: 4px 10px !important;
    margin: 0 2px;
    font-size: 12px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #22c55e !important;
    color: #fff !important;
    border-color: #22c55e !important;
}

/* Search + length */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 12px;
}

/* Info */
.dataTables_wrapper .dataTables_info {
    font-size: 12px;
    color: #6b7280;
}

/* Toolbar spacing */
.dataTables_wrapper .row.mb-2 {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

/* Center export button spacing */
.dt-buttons {
    display: inline-flex;
    gap: 6px;
}

/* Search align fix */
.dataTables_filter {
    margin-bottom: 0 !important;
}

/* Keep select2 contained inside flex wrappers */
.select-with-btn .select2-container {
    width: 100% !important;
    min-width: 0 !important;
}

.select-with-btn .select2-selection--single {
    border-radius: 4px 0 0 4px !important;
}

.select-addon-btn {
    height: 39px !important;
    width: 39px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 0 4px 4px 0 !important;
    font-size: 14px;
}

.select2-container .select2-selection--single {
    height: 39px !important;
    padding: 6px 12px;
}

.select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 25px;
}

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

.select2-container--open .select2-dropdown {
    top: -23px !important; /* use integer px */
}

/* Improve Select2 option visibility across the project */
.select2-container--default .select2-dropdown {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

.select2-container--default .select2-results__option {
    color: #212529;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[aria-selected="false"] {
    background-color: #e9f2ff !important;
    color: #0a58ca !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

/* Improve action dropdown item visibility across the project */
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: #e9f2ff !important;
    color: #0a58ca !important;
}

.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

    /* Tab base style */
    #userTab .nav-link {
        color: #6c757d;
        border: none;
        border-bottom: 2px solid transparent;
        background: transparent;
        padding: 10px 15px;
        transition: 0.2s ease;
    }

    /* Hover */
    #userTab .nav-link:hover {
        color: #0d6efd;
        background-color: #f8f9fa;
    }

    /* Active tab */
    #userTab .nav-link.active {
        color: #0d6efd;
        font-weight: 600;
        border-bottom: 3px solid #0d6efd;
        background-color: #f8f9fa;
    }

    .highlight-label {
        background-color: yellow;
        animation: blink 0.5s linear 2; /* 1s duration, 2 times */
    }

    @keyframes blink {
        0%, 50%, 100% {
            background-color: rgb(121, 121, 17);
        }
        12.5%, 62.5%, 87.5% {
            background-color: transparent;
        }
    }

        .format-card {
        background: #eef1f7;
        border-radius: 8px;
        padding: 20px;
        cursor: pointer;
        position: relative;
        transition: 0.3s;
        border: 2px solid transparent;
    }

    .format-card:hover {
        border-color: #6c7ae0;
    }

    .format-card.active {
        border-color: #6c7ae0;
        background: #e4e8ff;
    }

    .format-card .check-icon {
        position: absolute;
        top: 10px;
        right: 10px;
        color: #6c7ae0;
        display: none;
    }

    .format-card.active .check-icon {
        display: block;
    }

    #preview_format {
        font-weight: 500;
        color: #555;
        margin-top: 10px;
    }

        .invoice-card {
        border-radius: 12px;
        transition: 0.3s;
        cursor: pointer;
        border: 1px solid #eee;
        position: relative;
    }

    .invoice-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.1);
        border-color: #6c7ae0;
    }

    .invoice-icon {
        font-size: 40px;
        color: #6c7ae0;
        margin-bottom: 10px;
    }

    .default-badge {
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 12px;
    }

    .location-badge {
        background: #f1f3f7;
        border-radius: 20px;
        padding: 4px 10px;
        font-size: 12px;
        margin: 2px;
        display: inline-block;
    }


    .ui-menu {
    background-color: #fff;           /* white background */
    border: 1px solid #dee2e6;        /* light gray border */
    border-radius: 8px;               /* rounded corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); /* subtle shadow */
    max-height: 300px;                /* max height for scroll */
    overflow-y: auto;                 /* scroll if content exceeds */
    padding: 0;                        /* remove default padding */
    margin: 0;                         /* remove default margin */
    max-width: 980px !important;            /* adjust width if needed */
    z-index: 9999;                     /* on top */
}

.ui-menu li.ui-menu-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ui-menu .ui-menu-item-wrapper {
    padding: 10px 15px;               /* spacing inside each option */
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #f1f3f7; /* optional separator */
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
}

/* Dark tooltip + popover theme */
.tooltip {
    --bs-tooltip-bg: #111827;
    --bs-tooltip-color: #f9fafb;
    --bs-tooltip-opacity: 1;
}

.tooltip .tooltip-inner {
    background-color: #111827 !important;
    color: #f9fafb !important;
    border: 1px solid #374151;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
    font-size: 12px;
    padding: 8px 10px;
}

.popover {
    --bs-popover-bg: #111827;
    --bs-popover-border-color: #374151;
    --bs-popover-header-bg: #1f2937;
    --bs-popover-header-color: #f9fafb;
    --bs-popover-body-color: #f3f4f6;
    --bs-popover-max-width: 280px;
    border-radius: 10px;
    background-color: #111827 !important;
    border: 1px solid #374151 !important;
    opacity: 1 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.22);
}

.bs-popover-top > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after,
.bs-popover-end > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after,
.bs-popover-bottom > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after,
.bs-popover-start > .popover-arrow::after,
.bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after {
    border-color: #111827 !important;
}

.popover .popover-header {
    color: #f9fafb !important;
    font-weight: 600;
    border-bottom: 1px solid #374151;
}

.popover .popover-body {
    color: #f3f4f6 !important;
    font-size: 12px;
    line-height: 1.5;
}

.hover-q,
.fa-info-circle[data-bs-toggle="popover"],
.fa-info-circle[data-toggle="tooltip"] {
    color: #0d6efd;
    cursor: pointer;
}

.ui-menu .ui-menu-item-wrapper:last-child {
    border-bottom: none; /* remove border for last item */
}

.ui-menu .ui-menu-item-wrapper:hover {
    background-color: #e4e8ff;         /* hover background */
    color: #1e40af;                     /* hover text color */
}

.ui-menu .ui-menu-item-wrapper:active {
    background-color: #cdd4ff;         /* active click color */
}

.ui-menu .ui-menu-item-wrapper i {
    margin-right: 8px;                  /* icon spacing if you want icons */
    color: #6c7ae0;
}

.tap-top i {
    font-size: 24px;
    display: inline-block;
    animation: upDown 1.2s infinite;
}

@keyframes upDown {
    0%   { transform: translateY(0); }
    50%  { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

.mb-21{
    margin-bottom: 21px !important;
}
/* 🔥 Datatables Processing Indicator Fix */
.dataTables_wrapper .dataTables_processing {
    position: absolute;
    top: 50% !important;
    left: 50% !important;
    width: 200px;
    margin-left: -100px;
    margin-top: -26px;
    text-align: center;
    padding: 10px 15px;
    font-weight: 600;
    color: #4f46e5;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 9999 !important;
    backdrop-filter: blur(6px);
    border: 1px solid #e5e7eb;
    display: none;
}

/* Show the spinner when processing */
.dataTables_wrapper .dataTables_processing::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #4f46e5;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: dt-spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes dt-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Sidebar Menu Enhancements --- */

/* Parent Menu Items */
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list {
    padding: 0 2px;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-link {
    border-radius: 10px !important;
    margin-bottom: 3px;
    padding: 8px 6px !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-link:hover {
    background-color: rgba(108, 122, 224, 0.12) !important;
    border-color: rgba(108, 122, 224, 0.2);
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-link.active {
    background: linear-gradient(90deg, #6c7ae0 0%, #8e99ee 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(108, 122, 224, 0.3);
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-link.active i,
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-link.active span {
    color: #ffffff !important;
}

/* Sub-menu Styling */
.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-submenu {
    padding: 2px 0 2px 8px !important;
    margin: 2px 0;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-submenu li {
    padding: 0 1px;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-submenu li a {
    border-radius: 8px !important;
    margin-bottom: 2px;
    padding: 6px 6px !important;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-submenu li a:hover {
    background-color: rgba(108, 122, 224, 0.08) !important;
    padding-left: 10px !important;
}

.sidebar-wrapper .sidebar-main .sidebar-links .sidebar-list .sidebar-submenu li a.active {
background: linear-gradient(90deg, #6c7ae0 0%, #8e99ee 100%) !important;
    color: #ffffff !important;
    font-weight: 600;
}

/* --- End Sidebar Menu Enhancements --- */


    .form-control {
    border: 1px solid #dfe3e8;
    padding: 10px 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.15rem rgba(13,110,253,.15);
}

.card {
    background: #fff;
}

.table td,
.table th {
    vertical-align: middle;
}

.select2-container .select2-selection--single {
    height: 46px !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    padding-left: 0 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    right: 10px;
}

.form-control {
    height: 46px;
    border-radius: 12px;
}


.supplier-card{
    display:flex;
    align-items:center;
    gap:24px;
    padding:28px;
    border-radius:18px;
    background:linear-gradient(135deg,#ffffff,#f8fbff);
    border:1px solid #dbeafe;
    color:#334155;
    box-shadow:0 8px 24px rgba(15,23,42,0.08);
    max-width:700px;
}

.supplier-left{
    flex:0 0 120px;
}

.brand-logo{
    width:110px;
    height:110px;
    object-fit:contain;
    background:#eff6ff;
    border-radius:16px;
    padding:12px;
    border:1px solid #dbeafe;
}

.supplier-right h3{
    margin:0 0 10px;
    font-size:30px;
    font-weight:700;
    color:#1e3a8a;
}

.supplier-right .company{
    color:#64748b;
    font-size:20px;
    margin-bottom:12px;
    font-weight:600;
}

.supplier-right p{
    margin:8px 0;
    font-size:18px;
    line-height:1.6;
    color:#475569;
}

.supplier-right p strong{
    font-size:18px;
    color:#0f172a;
}


.modal.modal-xl .modal-dialog {
    max-width: 80% !important;
    width: 80% !important;
}
