﻿html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

label {
    margin-bottom: 0 !important;
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.custom-modal-width {
    max-width: 500px; /* Adjust the width as needed */
}

.receipt {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.item {
    border-bottom: 1px solid #ddd;
    padding: 10px 0;
}

    .item:last-child {
        border-bottom: none;
    }


@page {
    /*   size: 2.8in 11in;*/
    margin-top: 0cm;
    margin-left: 0cm;
    margin-right: 0cm;
    size: auto;
    margin: 0mm;
}

/* Remove padding and margin from the Select2 container */
.select2-container {
    margin: 0 !important;
    padding: 0 !important;
}

/* Optional: Reduce spacing inside the Select2 dropdown */
.select2-selection {
    min-height: 1.5rem; /* Adjust this value if needed */
    padding: 0 !important;
    margin: 0 !important;
}
/* Remove extra spacing between form controls */
.form-control {
    margin-bottom: 0 !important;
}

/* Remove border-radius from the select control inside Select2 */
.select2-container .select2-selection--single {
    border-radius: 0 !important;
}

/* Remove border-radius from the actual form control */
.form-control {
    border-radius: 0 !important;
}

/*.small-image img {
    width: 16px;
    height: 8px;
}*/


.btn-custom-small {
    font-size: 12px;
    padding: 4px 8px;
}


.alert-sm {
    font-size: 0.875rem; /* Smaller text */
    padding: 0.5rem 0.75rem; /* Less padding */
    border-radius: 0.25rem; /* Optional: slightly rounded */
}


#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it is above all other elements */
}

#loader {
    width: 3rem;
    height: 3rem;
}

.btn-default {
    border-radius: 0;
}


.btn {
    border-radius: 0; /* Removes the corner radius */
}

.select2-container {
    z-index: 500 !important; /* Higher than Bootstrap modal */
}

.offcanvas {
    background-color: #ffffff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease-in-out;
    margin: 20px;
}

    .offcanvas:hover {
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3);
        transform: translateY(-5px);
    }


hr {
    margin-top: 1rem;
    margin-bottom: 1rem;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}



/* Full-page overlay */
#dashboardloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0); /* Semi-transparent dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Ensure it appears above all other elements */
    pointer-events: none; /* Allows interaction with elements underneath */
}

/* Centering only the spinner */
.loader-container {
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto; /* Makes spinner clickable if needed */
    background: none; /* Removes any background */
    position: relative; /* Ensures it doesn’t take full screen */
}

/* Adjust spinner size */
.spinner-border {
    width: 4rem; /* Larger size */
    height: 4rem;
    border-width: 0.4rem;
}

.custom-spinner {
    border-top-color: #0c768a !important;
}


@keyframes typing {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

.custom-spinner {
    display: flex;
    gap: 30px; /* Increase space between dots */
}

    .custom-spinner div {
        width: 40px; /* Increased size */
        height: 40px; /* Increased size */
        background-color: #0c768a;
        border-radius: 50%;
        animation: typing 1.5s infinite ease-in-out;
    }

        .custom-spinner div:nth-child(1) {
            animation-delay: 0s;
        }

        .custom-spinner div:nth-child(2) {
            animation-delay: 0.2s;
        }

        .custom-spinner div:nth-child(3) {
            animation-delay: 0.4s;
        }



.user-name-text {
    display: inline-block;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

input[readonly] {
    background-color: #e9ecef !important; /* Bootstrap's disabled bg */
    color: #6c757d; /* muted text */
    cursor: not-allowed; /* show it's not editable */
}


/* generic numeric alignment; strong specificity so DataTables won't override */
/*.table th.numeric,
.table td.numeric {
    text-align: right !important;*/ /* use !important only if overridden by other rules */
    /*vertical-align: middle;
}*/


/* Scrollable dropdown area */
.menu-scroll {
    max-height: 400px; /* Adjust height here */
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

    /* Optional: nicer scrollbars */
    .menu-scroll::-webkit-scrollbar {
        width: 8px;
    }

    .menu-scroll::-webkit-scrollbar-thumb {
        background: #b5b5b5;
        border-radius: 10px;
    }

        .menu-scroll::-webkit-scrollbar-thumb:hover {
            background: #888;
        }
/* ── Sidebar Initials Avatar ── */
.sidebar-avatar-initials {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0c768a 0%, #095a6a 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ── Profile Page ── */
.profile-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

.profile-header-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.profile-cover {
    height: 120px;
    background: linear-gradient(135deg, #0c768a 0%, #064e5c 100%);
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    margin-top: -48px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 0 1.5rem;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0c768a 0%, #095a6a 100%);
    color: #fff;
    font-size: 32px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

[data-bs-theme="dark"] .profile-avatar {
    border-color: #212529;
}

.profile-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.profile-info-row i {
    width: 18px;
    color: #0c768a;
    font-size: 14px;
    text-align: center;
    flex-shrink: 0;
}

.profile-info-row span {
    color: #495057;
}

[data-bs-theme="dark"] .profile-info-row span {
    color: #d1d5db;
}

.profile-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

.profile-edit-card {
    border: none;
    border-radius: 12px;
}

.profile-edit-card .card-header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: transparent;
    padding: 1rem 1.5rem;
}

[data-bs-theme="dark"] .profile-edit-card .card-header {
    border-bottom-color: rgba(255,255,255,0.08);
}

.profile-edit-card .card-body {
    padding: 1.25rem 1.5rem;
}

.profile-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

[data-bs-theme="dark"] .profile-section-title {
    color: #9ca3af;
    border-bottom-color: rgba(255,255,255,0.08);
}

/* ── Header Info Bar ── */
.header-info-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 8px;
    min-width: 0;
    overflow: hidden;
}

.header-info-primary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 4px;
    line-height: 1.3;
}

.header-company-name {
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.header-branch-name {
    font-size: 0.78rem;
    font-weight: 500;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

.header-info-sep {
    opacity: 0.35;
    font-weight: 400;
    font-size: 0.75rem;
}

.header-info-secondary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin-top: 1px;
}

.header-till-info {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    opacity: 0.75;
    white-space: nowrap;
}

.header-till-info i {
    font-size: 11px;
    opacity: 0.7;
}

.header-badge {
    font-size: 0.6rem;
    padding: 1px 6px;
    font-weight: 500;
    vertical-align: middle;
    border-radius: 3px;
    line-height: 1.4;
}

.header-alert-item {
    font-size: 0.65rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.header-alert-warning {
    color: #e2a000;
}

.header-alert-warning i {
    font-size: 11px;
}

@media (max-width: 767.98px) {
    .header-info-bar {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .header-company-name {
        max-width: 140px;
        font-size: 0.78rem;
    }

    .header-branch-name {
        max-width: 100px;
        font-size: 0.72rem;
    }
}

@media (min-width: 992px) {
    .header-company-name {
        max-width: 280px;
        font-size: 0.85rem;
    }

    .header-branch-name {
        max-width: 200px;
    }
}

@media (min-width: 1200px) {
    .header-company-name {
        max-width: 360px;
    }

    .header-branch-name {
        max-width: 260px;
    }
}

/* Dark mode for header info bar */
[data-bs-theme="dark"] .header-company-name,
[data-bs-theme="dark"] .header-branch-name {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .header-till-info {
    color: #9ca3af;
}

[data-bs-theme="dark"] .header-alert-warning {
    color: #fbbf24;
}

/* ── Sidebar Initials Avatar ── */
.sidebar-avatar-initials {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0c768a 0%, #095a6a 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

/* ── Profile Page ── */
.profile-wrapper {
    max-width: 960px;
    margin: 0 auto;
}

.profile-header-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.profile-cover {
    height: 120px;
    background: linear-gradient(135deg, #0c768a 0%, #064e5c 100%);
    position: relative;
}

.profile-avatar-wrapper {
    position: relative;
    margin-top: -48px;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 0 1.5rem;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0c768a 0%, #095a6a 100%);
    color: #fff;
    font-size: 32px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #fff;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

[data-bs-theme="dark"] .profile-avatar {
    border-color: #212529;
}

.profile-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

.profile-info-row i {
    width: 18px;
    color: #0c768a;
    font-size: 14px;
    text-align: center;
    flex-shrink: 0;
}

.profile-info-row span {
    color: #495057;
}

[data-bs-theme="dark"] .profile-info-row span {
    color: #d5dbdb;
}

.profile-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
}

.profile-edit-card {
    border: none;
    border-radius: 12px;
}

.profile-edit-card .card-header {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: transparent;
    padding: 1rem 1.5rem;
}

[data-bs-theme="dark"] .profile-edit-card .card-header {
    border-bottom-color: rgba(255,255,255,0.08);
}

.profile-edit-card .card-body {
    padding: 1.25rem 1.5rem;
}

.profile-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

[data-bs-theme="dark"] .profile-section-title {
    color: #9ca3af;
    border-bottom-color: rgba(255,255,255,0.08);
}

/* ── Dark Mode Overrides ── */
[data-bs-theme="dark"] body,
body.dark-mode {
    background-color: #1a1d21;
    color: #d1d5db;
}

[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .cc,
[data-bs-theme="dark"] .pd-cc {
    background-color: #212529 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #d1d5db;
}

[data-bs-theme="dark"] .sd-filter-panel,
[data-bs-theme="dark"] .pd-filter-panel {
    background-color: #212529 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="dark"] .sd-filter-input,
[data-bs-theme="dark"] .pd-filter-input {
    background-color: #2c3034 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #d1d5db !important;
}

/* KPI cards - sales dashboard */
[data-bs-theme="dark"] .kc-teal  { background: #162d31; }
[data-bs-theme="dark"] .kc-blue  { background: #1a2a3d; }
[data-bs-theme="dark"] .kc-orange { background: #2d1f18; }
[data-bs-theme="dark"] .kc-green { background: #17302a; }

/* KPI cards - purchase dashboard */
[data-bs-theme="dark"] .pd-kc-blue   { background: #1a2a3d; }
[data-bs-theme="dark"] .pd-kc-green  { background: #17302a; }
[data-bs-theme="dark"] .pd-kc-orange { background: #2d1f18; }
[data-bs-theme="dark"] .pd-kc-teal   { background: #162d31; }
[data-bs-theme="dark"] .pd-kc-amber  { background: #2a2210; }
[data-bs-theme="dark"] .pd-kc-purple { background: #221f3a; }

[data-bs-theme="dark"] .kc-detail b,
[data-bs-theme="dark"] .pd-sn,
[data-bs-theme="dark"] .pd-sa,
[data-bs-theme="dark"] .pd-stval {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .kc-lbl,
[data-bs-theme="dark"] .kc-detail,
[data-bs-theme="dark"] .pd-kl,
[data-bs-theme="dark"] .pd-kd,
[data-bs-theme="dark"] .pd-cs,
[data-bs-theme="dark"] .cc-s,
[data-bs-theme="dark"] .lgnd,
[data-bs-theme="dark"] .pd-lgnd,
[data-bs-theme="dark"] .pd-stlbl,
[data-bs-theme="dark"] .pd-stsub,
[data-bs-theme="dark"] .pd-srk {
    color: #9ca3af;
}

[data-bs-theme="dark"] .sd-title,
[data-bs-theme="dark"] .sd-sub,
[data-bs-theme="dark"] .cc-t,
[data-bs-theme="dark"] .pd-title,
[data-bs-theme="dark"] .pd-ct {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .pd-sub {
    color: #9ca3af;
}

[data-bs-theme="dark"] .pd-stc {
    background: #2c3034;
}

[data-bs-theme="dark"] .pd-dvd,
[data-bs-theme="dark"] .sd-divider {
    background: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .pd-sbw,
[data-bs-theme="dark"] .rbar-wrap {
    background: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .sd-filter-toggle,
[data-bs-theme="dark"] .pd-filter-toggle {
    border-color: rgba(255, 255, 255, 0.15);
    color: #9ca3af;
}

[data-bs-theme="dark"] .sd-filter-toggle:hover,
[data-bs-theme="dark"] .pd-filter-toggle:hover {
    background: #2c3034;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .table {
    color: #d1d5db;
}

[data-bs-theme="dark"] input[readonly] {
    background-color: #2c3034 !important;
    color: #9ca3af;
}

[data-bs-theme="dark"] .offcanvas {
    background-color: #212529;
}

[data-bs-theme="dark"] .receipt {
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single,
[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple {
    background-color: #2c3034;
    border-color: rgba(255, 255, 255, 0.12);
    color: #d1d5db;
}

[data-bs-theme="dark"] .select2-dropdown {
    background-color: #2c3034;
    border-color: rgba(255, 255, 255, 0.12);
    color: #d1d5db;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0c768a;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #d1d5db;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    color: #d1d5db;
}

[data-bs-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #9ca3af;
}

[data-bs-theme="dark"] .select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #343a40;
    border-color: rgba(255, 255, 255, 0.12);
    color: #d1d5db;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option {
    color: #d1d5db;
}

[data-bs-theme="dark"] .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #343a40;
    color: #e5e7eb;
}

/* Year chart header */
[data-bs-theme="dark"] .cc-year-value {
    color: #e5e7eb;
}

[data-bs-theme="dark"] .cc-year-label {
    color: #9ca3af;
}

/* Reps list */
[data-bs-theme="dark"] .rname,
[data-bs-theme="dark"] .ramt {
    color: #e5e7eb;
}

/* Dark mode toggle button icon transition */
#darkModeToggle i {
    transition: transform 0.3s ease;
}

#darkModeToggle:hover i {
    transform: rotate(20deg);
}

/* ── Farming Dashboard Dark Mode ── */
[data-bs-theme="dark"] .fd-cc {
    background-color: #212529 !important;
    border-color: rgba(255,255,255,0.08) !important;
}
[data-bs-theme="dark"] .fd-title,
[data-bs-theme="dark"] .fd-ct,
[data-bs-theme="dark"] .fd-tbl td,
[data-bs-theme="dark"] .fd-tl-title,
[data-bs-theme="dark"] .fd-sn,
[data-bs-theme="dark"] .fd-sa,
[data-bs-theme="dark"] .fd-ls-name,
[data-bs-theme="dark"] .fd-crop-name {
    color: #e5e7eb !important;
}
[data-bs-theme="dark"] .fd-sub,
[data-bs-theme="dark"] .fd-cs,
[data-bs-theme="dark"] .fd-kl,
[data-bs-theme="dark"] .fd-kd,
[data-bs-theme="dark"] .fd-tl-meta,
[data-bs-theme="dark"] .fd-srk,
[data-bs-theme="dark"] .fd-tbl th,
[data-bs-theme="dark"] .fd-empty {
    color: #9ca3af !important;
}
[data-bs-theme="dark"] .fd-kc-green  { background: #17302a; }
[data-bs-theme="dark"] .fd-kc-blue   { background: #1a2a3d; }
[data-bs-theme="dark"] .fd-kc-teal   { background: #162d31; }
[data-bs-theme="dark"] .fd-kc-orange { background: #2d1f18; }
[data-bs-theme="dark"] .fd-tbl th,
[data-bs-theme="dark"] .fd-dvd {
    border-color: rgba(255,255,255,0.08) !important;
    background: transparent;
}
[data-bs-theme="dark"] .fd-tbl td { border-color: rgba(255,255,255,0.05) !important; }
[data-bs-theme="dark"] .fd-tbl tr:hover td { background: rgba(255,255,255,0.03) !important; }
[data-bs-theme="dark"] .fd-sbw,
[data-bs-theme="dark"] .fd-ls-barwrap { background: rgba(255,255,255,0.1); }
[data-bs-theme="dark"] .fd-tl li { border-color: rgba(255,255,255,0.05); }

/* Submenu item icons — keep them compact */
#side-menu .sub-menu li a small i.fa {
    font-size: 0.75em;
}
