:root {
    --primary: #0F4D28;
    --secondary: #2C5F8A;
    --bg: #FFFFFF;
    --light: #F8FAFC;
    --text: #334155;
    --primary-light: rgb(44, 95, 138, 0.15);
    --lightyellow: #ffdb8b;
    --lightgreen: #d1efdb;
    --lightgreen2: #d1efdbc3;
    --lightgreen3: #d1efdb75;
    --orange: #ff6300;
}
.text-ourblue{
    color:var(--secondary);
}
body {
    background: var(--light);
    color: var(--text);
    font-size: 13px;
    font-family: 'Inter', system-ui, sans-serif;
}
.border-primary{
    border:1px solid var(--primary)!important;
    border-radius:8px;
}

.border-primary-not-top {
    border: 1px solid var(--primary) !important;
    border-radius: 8px;
    border-top:none!important;
}
.bg-primary {
    background: var(--primary) !important;
    color:#fff!important;
}
.bg-primary-light {
    background: var(--primary-light) !important;
}
.bg-secondary{
    background:var(--secondary)!important;
}
.text-secondary{
    color:var(--secondary)!important;
}
.bg-lightyellow{
    background:var(--lightyellow)!important;
    color:#334155!important;
}
.bg-lightgreen {
    background: var(--lightgreen) !important;
}
.bg-lightgreen2 {
    background: var(--lightgreen2) !important;
}
.bg-lightgreen3 {
    background: var(--lightgreen3) !important;
}
.bg-orange{
    background: var(--orange)!important;
    color:#fff!important;
}
/* Buttons */
.btn-primary {
    /*background: var(--primary)!important;
    border-color: var(--primary);
    color:#fff!important;*/
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #115e59 100%);
    color: #fff;
    padding: 0.45rem 1rem 0.45rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    gap: 0.4rem;
    box-shadow: 0 4px 14px rgba(26, 39, 68, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary-rnd {
    /*background: var(--primary)!important;
    border-color: var(--primary);
    color:#fff!important;*/
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #115e59 100%);
    color: #fff;
    padding: 0.45rem 1rem 0.45rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    gap: 0.4rem;
    border-radius:999px;
    box-shadow: 0 4px 14px rgba(26, 39, 68, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary-rnd:hover, .btn-primary:hover {
    /*background: #0d4323;
        border-color: #0d4323;
        color:#fff!important;*/
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(26, 39, 68, 0.18);
    color:#fff!important;
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

    .btn-outline-primary:hover {
        background: rgba(15,77,40,0.08);
        color: var(--primary);
    }

.btn-secondary {
    /*background: var(--secondary);*/
    background: linear-gradient(135deg, #5b4dff 0%, #7c3aed 55%, #5b21b6 100%);
    border-radius: 999px;
    padding: 0.45rem 1rem 0.45rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    gap: 0.4rem;
    box-shadow: 0 4px 14px rgba(26, 39, 68, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .btn-secondary:hover {
        /*background: #0d4323;
        border-color: #0d4323;*/
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(26, 39, 68, 0.18);
    }

.btn-outline-secondary {
    color: var(--secondary);
    border-color: var(--secondary);
}

    .btn-outline-secondary:hover {
        background: rgba(15,77,40,0.08);
        color: var(--secondary);
    }

.btn-xs {
    --bs-btn-padding-y: 0.15rem!important;
    --bs-btn-padding-x: 0.5rem!important;
    --bs-btn-font-size: 0.675rem!important;
    --bs-btn-border-radius: 0.25rem!important;
}

.form-label {
    font-weight: bold;
    font-size: 0.675rem;
}
.form-control {
    font-size: 0.875rem;
}
.form-control::placeholder {
    font-size: 0.875rem;
    opacity: 1; /* Important for Firefox */
}
input[type="date"] {
    font-size: 0.875rem;
}

.flip-horizontal {
    transform: scaleX(-1);
    display: inline-block;
}
/* Sidebar */
    .sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--bg);
    border-right: 1px solid #e5e7eb;
    transition: left 0.25s ease, width 0.2s ease;
}

    .sidebar.collapsed {
        width: 72px;
    }

    .sidebar .brand {
        height: 56px;
        display: flex;
        align-items: center;
        padding: 0 1rem;
        background: var(--primary);
        color: #fff;
        border-bottom: 1px solid #0d4323; /* optional darker line */
    }

.brand-logo {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

    .brand-logo img {
        max-width: 75%;
        max-height: 75%;
    }

/* If you want the text hidden when collapsed */
.sidebar.collapsed .brand span {
    display: none;
}

.sidebar .nav-link {
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1.5rem;
    border-radius: 8px;
    margin: 4px 8px;
    transition: all 0.25s ease;
}

.sidebar .collapse .nav-link {
    padding: 0.05rem 1.5rem;
}
/*.sidebar.collapsed .nav-link {
    padding: 0.65rem 1.5rem;
}*/

        .sidebar .nav-link i {
            color: var(--secondary);
            font-size: larger;
            stroke-width: 20px;
        }
        .sidebar .nav-link:hover,
        .sidebar .nav-link.active {
            background: rgba(15,77,40,0.08);
            color: var(--primary);
        }
    .sidebar .nav-link span {
        transition: opacity 0.2s ease;
        /*opacity: 1;
    transition: max-width 0.25s ease, opacity 0.15s ease;
    overflow: hidden;*/
    }
.sidebar.collapsed .nav-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}
.sidebar.collapsed .nav-link .iconoir-nav-arrow-down {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Topbar */
.topbar {
    height: 56px;
    background: var(--bg);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 1rem;
}

/* Content */
.content-wrapper {
    padding: 1rem 0.2rem 2rem; /*iwc changed from 1rem 1.25rem 2rem*/
}

.card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}



/* Tables */
.table > :not(caption) > * > * {
    padding: 0.75rem 0.5rem;
}
.dataTables_paginate .page-link { /*pagination font-size*/
    font-size: 12px;
    padding: 4px 8px;
}
.table th, .table td {
    font-size: 12px !important;
}
/* Search input */
.dataTables_filter input {
    width: 400px !important; /* increase width */
    font-size: 12px; /* text size */
    padding: 4px 8px;
    margin-left: 0 !important;
    margin-top: 10px;
}

    /* Placeholder text */
    .dataTables_filter input::placeholder {
        font-size: 12px; /* smaller placeholder */
        opacity: 0.7;
    }

/* Mobile behavior */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        z-index: 1040;
        height: 100vh;
        left: -260px; /* hidden off-screen */
        width: 260px;
    }

        .sidebar.show {
            left: 0;
        }
        /* slides in */
        .sidebar.collapsed {
            width: 260px;
        }
    /* keep width on mobile */
    .topbar {
        position: sticky;
        top: 0;
        z-index: 1050;
    }
}

/*dashboard*/

.stat-card {
    position: relative;
    background: #2C5F8A0D; /* muted blue with light opacity */
    border-radius: 12px;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid #e5e7eb;
    color: #334155;
    overflow: hidden;
}

    .stat-card a{
        text-decoration:none;
        color:var(--text)!important;
    }
    .stat-card i {
        font-size: 22px;
    }
    .stat-card h6 {
        font-weight: 600;
    }

.stat-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    min-width: 50px;
    padding: 0.15rem 0.5rem;
    background: #2C5F8A; /* Muted Blue */
    color: #fff;
    border-radius: 999px;
    font-size: 0.8rem;
    text-align: center;
    box-shadow: 0 4px 10px rgba(44,95,138,0.35);
}

    .stat-count-badge span {
        font-weight: 600;
    }


.stat-value {
    /*display: flex;*/
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--light, #F8FAFC);
    border-radius: 6px;
    border-left: 3px solid var(--primary, #0F4D28);
}

.value-label {
    color: var(--text, #334155);
    font-size: 0.875rem;
    font-weight: 500;
}

.value-amount {
    color: var(--primary, #0F4D28);
    font-size: 1.025rem;
    font-weight: 700;
}

/* Add New Contract Section */
.add-contract-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-title {
    color: var(--primary, #0F4D28);
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

    .section-title i {
        font-size: 2rem;
    }

.section-subtitle {
    color: var(--text, #334155);
    font-size: 0.95rem;
    margin: 0;
}

.contract-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.contract-button-wrapper {
    position: relative;
}

.contract-button {
    display: block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

    .contract-button::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s ease;
    }

    .contract-button:hover::before {
        left: 100%;
    }

.button-content {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.supplier-contract-btn{
    background: linear-gradient(135deg, #0F4D28 0%, #1a6b3d 100%);
    box-shadow: 0 4px 15px rgba(15, 77, 40, 0.3);
}

.supplier-contract-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(15, 77, 40, 0.4);
}

.warehouse-contract-btn {
    background: linear-gradient(135deg, #0d6efd 0%, #2C5F8A 100%);
    box-shadow: 0 4px 15px #17458956;
}

    .warehouse-contract-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px #17458945;
    }

.invoice-contract-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px #82191956;
}

    .invoice-contract-btn:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px #8219193a;
    }

.customer-contract-btn {
    background: linear-gradient(135deg, #2C5F8A 0%, #3d7ba8 100%);
    box-shadow: 0 4px 15px rgba(44, 95, 138, 0.3);
}

    .customer-contract-btn :hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(44, 95, 138, 0.4);
    }


#contractTabs .nav-link:not(.active) {
    background: #fff; /* connects tab to content */
    border: 1px solid #dee2e6;
    color:#2C5F8A;
}

.button-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

    .button-icon i {
        font-size: 2rem;
        color: #FFFFFF;
    }

.button-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.button-title {
    color: #FFFFFF;
    font-size: 0.95rem;
    font-weight: 700;
    display: block;
}

.button-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    display: block;
}

.button-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

    .button-arrow i {
        font-size: 1.25rem;
        color: #FFFFFF;
        transition: transform 0.3s ease;
    }

.contract-button:hover .button-arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

    .contract-button:hover .button-arrow i {
        transform: translateX(4px);
    }


/* Collapsible Divider */
.collapsible-divider {
    margin: 2rem 0;
    margin-bottom:0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divider-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-light);
    border: none;
    border-radius:5px;
    margin: 0;
    z-index: 1;
}

.divider-toggle {
    position: relative;
    background: rgb(209, 222, 233);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 2;
}

    .divider-toggle:hover {
        background: var(--muted, #2C5F8A);
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .divider-toggle i {
        color: #FFFFFF;
        font-size: 1.25rem;
        transition: transform 0.3s ease;
    }

    .divider-toggle.collapsed i {
        transform: rotate(180deg);
    }

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    max-height: 1000px;
    opacity: 1;
}

    .collapsible-content.collapsed {
        max-height: 0;
        opacity: 0;
        margin: 0;
    }

@media (max-width: 768px) {
    .contract-buttons-container {
        grid-template-columns: 1fr;
    }

    .add-contract-section {
        padding: 1.5rem;
    }

    .button-content {
        padding: 1.25rem;
    }

    .divider-toggle {
        width: 36px;
        height: 36px;
    }

        .divider-toggle i {
            font-size: 1rem;
        }
}


    /*icon circle*/
.icon-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: var(--light); /* circle color */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .icon-circle i {
        font-size: 16px;
        color: #333;
    }

    /*form dropdown*/
#contractForm .form-select {
    background-color: #FFFFFF !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

    #contractForm .form-select:focus {
        background-color: #FFFFFF !important;
        border-color: #0F4D28;
        box-shadow: 0 0 0 0.2rem rgba(15, 77, 40, 0.25);
    }

    #contractForm .form-select option {
        background-color: #FFFFFF;
        font-size: 0.775rem;
        color:var(--primary);
        padding: 0.5rem;
    }


.form-select {
    font-size: 0.875rem !important;
}

.nav-tabs .nav-link.active {
    background-color: #f8f9fa !important;
}

/*.trucktable tbody tr {
    border:none
}*/
.trucktable thead tr th {
    font-weight: bold;
    font-size: 0.675rem;
}


/*heading*/
.bg-tab {
    display: inline-block;
    width: fit-content;
    white-space: nowrap;
    background: var(--secondary);
    color: #fff;
    padding: 8px 20px 8px 16px;
    font-weight: 600;
    font-size: 14px;
    clip-path: polygon(0 0, 92% 0, 100% 50%, 92% 100%, 0 100%);
    border-top-left-radius: 0.5rem;
    margin-left: -12px;
    margin-bottom: 0;
}


.textsmall{
    font-size:12px;
}

/* action cards quick action links*/
.action-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

    .action-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-color: #cbd5e1;
    }

.action-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1.75rem;
}

    .action-card-icon.bg-primary {
        background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    }

    .action-card-icon.bg-success {
        background: linear-gradient(135deg, #198754 0%, #146c43 100%);
    }

    .action-card-icon.bg-info {
        background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%);
    }

    .action-card-icon.bg-warning {
        background: linear-gradient(135deg, #ffc107 0%, #ffb300 100%);
    }

.action-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.action-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.action-card-description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
    flex: 1;
    line-height: 1.5;
}

.action-card .btn {
    margin-top: auto;
    font-weight: 500;
    border-radius: 6px;
}

#customerReceivablesTable td, customerReceivablesTable th{
    font-size:12px;
}


.summary-card {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 0.75rem;
    padding: 0.25rem 1.5rem;
    border-left: 5px solid #0d6efd;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.summary-card1 {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-left: 5px solid #1d8100;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.summary-item {
    padding: 0.5rem 0;
}

.summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

.summary-value {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.summary-item.highlight .summary-value {
    color: #0d6efd;
    font-size: 1.4rem;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    color: #dc3545;
    cursor: pointer;
}

.select2-container {
    width: 100% !important;
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 38px;
    border: 1px solid #ced4da;
}

.select2-container .select2-selection--single {
    font-size: 0.875rem !important;
}

.select2-container .select2-results__option {
    font-size: 0.875rem !important;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary, #0d6efd);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}


.quill-box {
    min-height: 240px;
    background: #fff;
    border-radius: 8px;
}

    .quill-box .ql-editor {
        min-height: 200px;
        font-size: .9rem;
        line-height: 1.5;
    }

    .quill-box .ql-toolbar {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        border-color: #e6e9ef;
    }

    .quill-box .ql-container {
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        border-color: #e6e9ef;
    }