/* Tema Uyarlaması: Anasayfadaki Canlı Turuncu (#ff4500) ve Uyumlu Canlı Tonlar */
:root,
[data-color-theme="Orange_Theme"]:root,
[data-color-theme="Orange_Theme"] {
    --bs-primary: #ff4500;
    --bs-primary-rgb: 255, 69, 0;
    --bs-light-primary: rgba(255, 69, 0, 0.12);
    --bs-primary-bg-subtle: rgba(255, 69, 0, 0.12);

    --bs-secondary: #ff4500;
    --bs-secondary-rgb: 255, 69, 0;
    --bs-light-secondary: rgba(255, 69, 0, 0.12);
    --bs-secondary-bg-subtle: rgba(255, 69, 0, 0.12);

    --bs-success: #10b981;
    --bs-success-rgb: 16, 185, 129;
    --bs-light-success: rgba(16, 185, 129, 0.14);
    --bs-success-bg-subtle: rgba(16, 185, 129, 0.14);

    --bs-danger: #ef4444;
    --bs-danger-rgb: 239, 68, 68;
    --bs-light-danger: rgba(239, 68, 68, 0.14);
    --bs-danger-bg-subtle: rgba(239, 68, 68, 0.14);

    --bs-warning: #f59e0b;
    --bs-warning-rgb: 245, 158, 11;
    --bs-light-warning: rgba(245, 158, 11, 0.14);
    --bs-warning-bg-subtle: rgba(245, 158, 11, 0.14);

    --bs-info: #0ea5e9;
    --bs-info-rgb: 14, 165, 233;
    --bs-light-info: rgba(14, 165, 233, 0.14);
    --bs-info-bg-subtle: rgba(14, 165, 233, 0.14);
}

[data-color-theme="Orange_Theme"]:root .btn-primary,
[data-color-theme="Orange_Theme"] .btn-primary {
    --bs-btn-bg: #ff4500;
    --bs-btn-border-color: #ff4500;
    --bs-btn-hover-bg: #e03d00;
    --bs-btn-hover-border-color: #e03d00;
    --bs-btn-active-bg: #cc3700;
    --bs-btn-active-border-color: #cc3700;
}

[data-color-theme="Orange_Theme"] .btn-secondary {
    --bs-btn-bg: #ff4500;
    --bs-btn-border-color: #ff4500;
    --bs-btn-hover-bg: #e03d00;
    --bs-btn-hover-border-color: #e03d00;
}

/* Canlı Renk Yardımcı Sınıfları */
.text-primary, .text-hover-primary:hover { color: #ff4500 !important; }
.bg-primary { background-color: #ff4500 !important; }
.border-primary { border-color: #ff4500 !important; }
.bg-primary-subtle { background-color: rgba(255, 69, 0, 0.12) !important; color: #ff4500 !important; }

.text-success, .text-hover-success:hover { color: #10b981 !important; }
.bg-success { background-color: #10b981 !important; }
.border-success { border-color: #10b981 !important; }
.bg-success-subtle { background-color: rgba(16, 185, 129, 0.14) !important; color: #10b981 !important; }

.text-danger, .text-hover-danger:hover { color: #ef4444 !important; }
.bg-danger { background-color: #ef4444 !important; }
.border-danger { border-color: #ef4444 !important; }
.bg-danger-subtle { background-color: rgba(239, 68, 68, 0.14) !important; color: #ef4444 !important; }

.text-warning, .text-hover-warning:hover { color: #f59e0b !important; }
.bg-warning { background-color: #f59e0b !important; }
.border-warning { border-color: #f59e0b !important; }
.bg-warning-subtle { background-color: rgba(245, 158, 11, 0.14) !important; color: #d97706 !important; }

.text-info, .text-hover-info:hover { color: #0ea5e9 !important; }
.bg-info { background-color: #0ea5e9 !important; }
.border-info { border-color: #0ea5e9 !important; }
.bg-info-subtle { background-color: rgba(14, 165, 233, 0.14) !important; color: #0ea5e9 !important; }

/* Koyu Mod (Dark Theme) Canlı Renk Ayarlamaları */
[data-bs-theme="dark"] .text-primary { color: #ff5722 !important; }
[data-bs-theme="dark"] .bg-primary-subtle { background-color: rgba(255, 69, 0, 0.22) !important; color: #ff6b3d !important; }
[data-bs-theme="dark"] .text-success { color: #34d399 !important; }
[data-bs-theme="dark"] .bg-success-subtle { background-color: rgba(16, 185, 129, 0.22) !important; color: #34d399 !important; }
[data-bs-theme="dark"] .text-danger { color: #f87171 !important; }
[data-bs-theme="dark"] .bg-danger-subtle { background-color: rgba(239, 68, 68, 0.22) !important; color: #f87171 !important; }
[data-bs-theme="dark"] .text-warning { color: #fbbf24 !important; }
[data-bs-theme="dark"] .bg-warning-subtle { background-color: rgba(245, 158, 11, 0.22) !important; color: #fbbf24 !important; }
[data-bs-theme="dark"] .text-info { color: #38bdf8 !important; }
[data-bs-theme="dark"] .bg-info-subtle { background-color: rgba(14, 165, 233, 0.22) !important; color: #38bdf8 !important; }

/* Listeleme sayfalarındaki ve tablolardaki sil butonlarını canlı kırmızı yap */
.btn.datatable-delete-button,
.btn.item-remove-btn {
    background-color: #ef4444 !important;
    border-color: #ef4444 !important;
    color: #fff !important;
}
.btn.datatable-delete-button:hover,
.btn.datatable-delete-button:focus,
.btn.item-remove-btn:hover,
.btn.item-remove-btn:focus {
    background-color: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}
.btn.datatable-delete-button i,
.btn.item-remove-btn i {
    color: #fff !important;
}

/* bootstrap-select (bp-select-picker) butonuna diğer inputlar gibi kenarlık ekle */
.bootstrap-select > .dropdown-toggle.btn-light,
.bootstrap-select > button.btn.dropdown-toggle {
    border: 1px solid var(--bs-border-color) !important;
    background-color: var(--bs-body-bg) !important;
}
.bootstrap-select > .dropdown-toggle.btn-light:focus,
.bootstrap-select > button.btn.dropdown-toggle:focus,
.bootstrap-select.show > .dropdown-toggle {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15) !important;
}

/* General Styles */
.simplebar-content-wrapper .simplebar-content {
    padding:0 10px!important;
}
.left-sidebar a.logo-img img {
    max-width: 225px;
    max-height: 60px;
}
header.topbar a.logo-img img, #mobilenavbar .offcanvas-header img {
    max-width: 180px;
    max-height: 45px;
}
select {
    cursor: pointer;
}
select[disabled],
input[disabled],
button[disabled] {
    pointer-events: initial !important;
    cursor: not-allowed !important;
}

/* DataTable Styles */
.table-responsive {
    padding-bottom: 10px;
}
div[id^="datatable-list"] {
    font-size: 13px;
}
div[id^="datatable-list"] .table-responsive {
    padding-bottom: 0;
}
div[id^="datatable-list"] thead {
    font-size: 12px;
}
div[id^="datatable-list"] .dataTables_filter {
    margin-bottom: 0 !important;
    text-align: left !important;
}
div[id^="datatable-list"] .dataTables_filter label {
    width: 100% !important;
}
div[id^="datatable-list"] .dataTables_filter input[type="search"],
.dataTables_filter input[type="search"] {
    width: 100% !important;
    border: 2px solid #f3ab98 !important;
    border-radius: 7px !important;
    padding: 6px 12px !important;
    background-color: #fff !important;
    color: #333 !important;
    transition: all 0.2s ease-in-out;
}
div[id^="datatable-list"] .dataTables_filter input[type="search"]:focus,
.dataTables_filter input[type="search"]:focus {
    border-color: #fa896b !important;
    outline: none !important;
}
[data-bs-theme="dark"] div[id^="datatable-list"] .dataTables_filter input[type="search"],
[data-bs-theme="dark"] .dataTables_filter input[type="search"] {
    border: 2px solid #f3ab98 !important;
    background-color: #2a3447 !important;
    color: #fff !important;
}
div[id^="datatable-list"] .dt-buttons {
    float: right;
}
.dt-buttons .dt_button {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}
.dataTables_info {
    padding-top: 0 !important;
    font-size: 12px;
}
.dataTables_paginate .paginate_button {
    font-size: 12px;
    padding: 3px 7px;
    margin: 0 2px;
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover > * {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), 0.075) !important;
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-secondary > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-secondary:nth-of-type(2n+1) > * {
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#005fb46b);
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-secondary > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-secondary:nth-of-type(2n+1) > * {
    --bs-table-bg-state: initial;
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#0188FF6B) !important;
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-success > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-success:nth-of-type(2n+1) > * {
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#1c4c3275);
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-success > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-success:nth-of-type(2n+1) > *  {
    --bs-table-bg-state: initial;
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#119A5075) !important;

}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-danger > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-danger:nth-of-type(2n+1) > * {
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#591c1c5e);
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-danger > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-danger:nth-of-type(2n+1) > * {
    --bs-table-bg-state: initial;
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#BC07075E) !important;
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-warning > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr.dt-row-warning:nth-of-type(2n+1) > * {
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#59311C5E);
}
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-warning > *,
[data-bs-theme="dark"] table.dataTable.table-hover > tbody > tr:hover.dt-row-warning:nth-of-type(2n+1) > * {
    --bs-table-bg-state: initial;
    box-shadow: inset 0 0 0 9999px var(--bs-table-bg-state,#BF45075E) !important;
}
.dataTables_processing {
    background:var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding-top: 10px !important;
}
input:focus-visible, button:focus-visible, button:focus {
    outline: none !important;
}

[data-bs-theme="dark"] .dropdown-item.active,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:hover,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:active,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder:focus,
[data-bs-theme="dark"] .bootstrap-select .no-results,
[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle.bs-placeholder {
    background-color: #333f55;
    color: #7c8fac;
}

[data-bs-theme="dark"] .bootstrap-select > .dropdown-toggle {
    background: #465670;
    color: #fff;
    border: none;
}

.bp-select-picker.form-select-sm > .btn.dropdown-toggle {
    padding: 5px 8px;
    border: 1px solid #333f55;
    background-color: transparent;
}
.bp-select-picker.form-select-sm > .btn.dropdown-toggle:hover,
.bp-select-picker.form-select-sm > .btn.dropdown-toggle:focus {
    background-color: transparent;
    border: var(--bs-border-width) solid #dfe5ef;
}

.bp-date-picker {
    max-width: 120px !important;
}

/* Modal içinde açılan select2 ve daterangepicker açılır alanları modalın üstünde görünsün */
.select2-container {
    z-index: 1060;
}
.select2-container--open {
    z-index: 1065 !important;
}
.select2-dropdown {
    z-index: 1065 !important;
}
.daterangepicker {
    z-index: 1066 !important;
}

/* select2 tek seçim kutusunu Bootstrap form-control ile uyumlu hale getir ve ok'u sağa hizala */
.select2-container--default .select2-selection--single {
    height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    background-color: var(--bs-body-bg);
    display: flex;
    align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    padding-right: 20px;
    line-height: 1.5;
    color: var(--bs-body-color);
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    top: 0;
    right: 8px;
}
.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #ff4500 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .select2-container--default .select2-selection--single {
    background-color: #465670;
    border-color: #465670;
    color: #fff;
}
[data-bs-theme="dark"] .select2-dropdown {
    background-color: #2a3447;
    border-color: #465670;
    color: #fff;
}
[data-bs-theme="dark"] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #ff4500 !important;
    color: #fff !important;
}
[data-bs-theme="dark"] .select2-search--dropdown .select2-search__field {
    background-color: #2a3447;
    border-color: #465670;
    color: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    display: none;
}

/* Select2 Form-control-sm & Form-select-sm Uyumu (Teslimat / Dağıtım / Firma Tabloları) */
.form-select-sm + .select2-container .select2-selection--single,
.form-control-sm + .select2-container .select2-selection--single,
.select2-container--sm .select2-selection--single,
.table .select2-container .select2-selection--single,
.table td .select2-container .select2-selection--single {
    min-height: calc(1.5em + 0.5rem + 2px) !important;
    height: calc(1.5em + 0.5rem + 2px) !important;
    padding: 0.25rem 0.5rem !important;
    font-size: .77rem !important;
    border-radius: var(--bs-border-radius-sm, 4px) !important;
}

.form-select-sm + .select2-container .select2-selection--single .select2-selection__rendered,
.form-control-sm + .select2-container .select2-selection--single .select2-selection__rendered,
.select2-container--sm .select2-selection--single .select2-selection__rendered,
.table .select2-container .select2-selection--single .select2-selection__rendered,
.table td .select2-container .select2-selection--single .select2-selection__rendered {
    font-size: .77rem !important;
    line-height: 3.5 !important;
    padding-left: 0 !important;
    padding-right: 18px !important;
}

.form-select-sm + .select2-container .select2-selection--single .select2-selection__arrow,
.form-control-sm + .select2-container .select2-selection--single .select2-selection__arrow,
.select2-container--sm .select2-selection--single .select2-selection__arrow,
.table .select2-container .select2-selection--single .select2-selection__arrow,
.table td .select2-container .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
    top: 0 !important;
    right: 6px !important;
}

.select2-dropdown--sm,
.select2-dropdown--sm .select2-results__option,
.select2-dropdown--sm .select2-search__field {
    font-size: .77rem !important;
}

.nav-icon-hover-bg {
    width: 30px;
    height: 30px;
}



/* Deliveries Page Start */
.distribution-card {
    cursor: pointer;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.distribution-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}
/* Duruma göre üst şerit rengi */
.distribution-card .distribution-card-header {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .45rem;
    padding: .7rem .75rem;
    color: #fff;
    border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}
.distribution-card.is-pending .distribution-card-header {
    background: linear-gradient(135deg, #f87171, #dc2626);
}
.distribution-card.is-delivered .distribution-card-header {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}
.distribution-card.is-closed .distribution-card-header {
    background: linear-gradient(135deg, #34d399, #059669);
}
/* Faz 12: "Paylaşıldı" — kapatılmış yeşilinden belirgin biçimde koyu */
.distribution-card.is-shared .distribution-card-header {
    background: linear-gradient(135deg, #15803d, #14532d);
}
/* Firma adı alanı: başlıkta kalan tüm genişliği alır, kısaltmaz, gerekirse 2 satıra sarar */
.dist-company {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .15rem;
    min-width: 0;
    flex: 1 1 auto;
}
.dist-company-name {
    width: 100%;
    font-weight: 700;
    font-size: .95rem;
    line-height: 1.2;
    color: #fff;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dist-count-badge {
    flex-shrink: 0;
    font-size: .62rem;
    font-weight: 600;
    padding: .1rem .42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
    white-space: nowrap;
    line-height: 1.35;
}
/* Faz 11: kart sıra numarası rozeti (Faz 12: sadeleşti, mağaza ikonu kaldırıldı) */
.dist-seq {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 .28rem;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle, rgba(255, 69, 0, 0.12));
    color: var(--bs-primary, #ff4500);
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85);
}
.distribution-card-header .dist-seq {
    background: #fff;
    margin-top: 1px;
}
/* Faz 11: sürükleme tutamacı */
.dist-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.18);
    cursor: grab;
    flex-shrink: 0;
    font-size: 1rem;
    touch-action: none;
}
.dist-drag-handle:hover { background: rgba(255, 255, 255, 0.32); color: #fff; }
.dist-drag-handle:active { cursor: grabbing; }
.gu-mirror .distribution-card { transform: rotate(1.5deg); box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22); }
.gu-transit { opacity: .35; }
/* Faz 11: teslimat tarihi dağıtım tarihinden farklıysa gösterilen satır */
.dist-delivery-date {
    display: flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem 0 .35rem;
    font-size: .72rem;
    font-weight: 600;
    color: #2563eb;
    border-bottom: 1px dashed #e5e7eb;
}
/* Dağıtımı ekleyen kişi / partner satırı (yalnız yetkili rollerde çizilir) */
.dist-authorship {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem 1rem .1rem;
    background: #fff;
    font-size: .72rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dist-authorship i {
    font-size: .85rem;
    flex-shrink: 0;
}
[data-bs-theme="dark"] .dist-authorship {
    background: var(--bs-body-bg);
}

/* Step flow */
.distribution-card-steps {
    padding: .75rem .6rem .35rem;
    background: #fff;
}
.dist-stepflow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}
/* Faz 12: 4 adım dar kartta (col-md-3) taşmasın diye adımlar eşit paylaşır */
.dist-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 0 1 auto;
    width: 46px;
    min-width: 0;
}
.dist-step-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: .85rem;
    background: #e5e7eb;
    color: #9ca3af;
    border: 2px solid #e5e7eb;
    transition: all .2s ease;
    flex-shrink: 0;
}
.dist-step-label {
    margin-top: .25rem;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.15;
    color: #9ca3af;
    word-break: break-word;
}
.dist-step.done .dist-step-dot {
    background: #22c55e;
    border-color: #22c55e;
    color: #fff;
}
.dist-step.done .dist-step-label { color: #16a34a; }
.dist-step.active .dist-step-dot {
    background: #fff;
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
}
.dist-step.active .dist-step-label {
    color: var(--bs-primary);
    font-weight: 700;
}
.dist-step-line {
    flex: 1 1 auto;
    min-width: 4px;
    height: 2px;
    margin-top: 12px;
    background: #e5e7eb;
    border-radius: 2px;
}
.dist-step-line.done { background: #22c55e; }
/* Body */
.distribution-card-body {
    overflow-y: auto;
    padding: .6rem 1rem;
    background: #fff;
}
.dist-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .5rem .1rem;
    border-bottom: 1px dashed #e5e7eb;
}
.dist-item-row:last-child { border-bottom: none; }
.dist-item-name {
    font-weight: 600;
    font-size: .85rem;
    color: #374151;
}
.dist-item-qty {
    flex-shrink: 0;
    font-weight: 700;
    font-size: .85rem;
    color: var(--bs-primary);
    white-space: nowrap;
}

/* Teslim edilmiş kartta kalemin birim fiyatı (miktarın yanında) */
.dist-item-qty .dist-item-price {
    font-weight: 600;
    color: var(--bs-body-color);
    opacity: .75;
}

/* Teslim edilmiş kartın alt kısmı: teslimatın toplam tutarı (Yazdır düğmesinin üstünde) */
.dist-card-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem 1rem;
    border-top: 1px solid var(--bs-border-color);
    font-size: .85rem;
}
.dist-card-total span {
    color: var(--bs-secondary-color);
}
.dist-card-total strong {
    font-size: 1rem;
    color: var(--bs-body-color);
    font-variant-numeric: tabular-nums;
}
.dist-item-qty small { color: #9ca3af; font-weight: 500; }
.distribution-card-footer {
    border-top: 1px solid #f1f1f4;
    background: #fafafa;
}
.distribution-add-card {
    cursor: pointer;
    border: 2px dashed var(--bs-primary);
    border-radius: 16px;
    background-color: transparent;
    transition: transform 0.25s, box-shadow 0.25s, background-color 0.25s;
}
.distribution-add-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    background-color: rgba(255, 69, 0, 0.08) !important;
}
/* İlerleme (progress) kartı */
.delivery-progress-card {
    border: none;
    border-radius: 16px;
    padding: .85rem 1.1rem;
    background: linear-gradient(135deg, #ffffff, #f7f8fc);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.delivery-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .55rem;
}
.delivery-progress-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 700;
    font-size: .9rem;
    color: #374151;
}
.delivery-progress-pct {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--bs-primary);
}
.delivery-progress-track {
    position: relative;
    display: flex;
    height: 16px;
    border-radius: 999px;
    background: #eceef3;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}
/* Track arkaplan görsel efekti: kayan çizgili doku + hafif parlama */
.delivery-progress-track::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.55) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0.55) 75%,
        transparent 75%,
        transparent
    );
    background-size: 22px 22px;
    opacity: .5;
    animation: delivery-track-stripes 1.4s linear infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes delivery-track-stripes {
    from { background-position: 0 0; }
    to { background-position: 22px 0; }
}
.delivery-progress-seg {
    position: relative;
    height: 100%;
    transition: width .5s ease;
    overflow: hidden;
    z-index: 1;
}
/* Segmentler üzerinde kayan parlama (shimmer) efekti */
.delivery-progress-seg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        transparent 20%,
        rgba(255, 255, 255, 0.45) 50%,
        transparent 80%
    );
    transform: translateX(-100%);
    animation: delivery-seg-shimmer 2.2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes delivery-seg-shimmer {
    0% { transform: translateX(-100%); }
    60%, 100% { transform: translateX(100%); }
}
.delivery-progress-seg.delivered {
    background: linear-gradient(135deg, #38bdf8, #2563eb);
}
.delivery-progress-seg.closed {
    background: linear-gradient(135deg, #34d399, #059669);
}
.delivery-progress-seg.shared {
    background: linear-gradient(135deg, #15803d, #14532d);
}
.delivery-progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: .55rem;
    font-size: .72rem;
    font-weight: 600;
    color: #6b7280;
}
.delivery-progress-legend .dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: .35rem;
    vertical-align: middle;
}
.delivery-progress-legend .dot.delivered { background: #2563eb; }
.delivery-progress-legend .dot.closed { background: #059669; }
.delivery-progress-legend .dot.shared { background: #15803d; }
.delivery-progress-legend .dot.pending { background: #cbd0d9; }
/* Faz 12: ilerleme kartının içindeki compact toplam şeridi (Alış · Teslimat · Tahsilat) */
.delivery-progress-totals {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin-top: .5rem;
    padding-top: .45rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
}
.delivery-progress-totals .dpt-item {
    flex: 1 1 110px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .05rem;
    padding: .1rem .5rem;
    border-left: 1px solid rgba(0, 0, 0, .08);
    text-align: center;
}
.delivery-progress-totals .dpt-item:first-child {
    border-left: none;
}
.delivery-progress-totals .dpt-label {
    font-size: .64rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #6b7280;
    line-height: 1.2;
}
.delivery-progress-totals .dpt-value {
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    color: #374151;
}
.delivery-progress-totals .dpt-value.purchase { color: #4f46e5; }
.delivery-progress-totals .dpt-value.delivery { color: #059669; }
.delivery-progress-totals .dpt-value.collected { color: #2563eb; }
@media (max-width: 575.98px) {
    .delivery-progress-totals .dpt-item {
        flex: 1 1 100%;
        flex-direction: row;
        justify-content: space-between;
        border-left: none;
        border-top: 1px dashed rgba(0, 0, 0, .06);
        padding: .2rem .1rem;
    }
    .delivery-progress-totals .dpt-item:first-child { border-top: none; }
}
/* Deliveries Page End */

/* iOS Style Mobile Bottom Navigation */
@media (min-width: 1200px) {
    .ios-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 1199.98px) {
    body {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .ios-bottom-nav {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1040;
        background: rgba(255, 255, 255, 0.88);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        backdrop-filter: blur(20px) saturate(180%);
        border-top: 0.5px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 -3px 16px rgba(0, 0, 0, 0.06);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        user-select: none;
    }

    [data-bs-theme="dark"] .ios-bottom-nav {
        background: rgba(32, 41, 56, 0.9);
        border-top: 0.5px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -4px 22px rgba(0, 0, 0, 0.35);
    }

    .ios-bottom-nav-inner {
        display: flex;
        align-items: center;
        justify-content: space-around;
        height: 60px;
        max-width: 600px;
        margin: 0 auto;
        padding: 0 4px;
        position: relative;
    }

    .ios-nav-item {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
        text-decoration: none;
        color: #8e8e93;
        transition: color 0.15s ease, transform 0.15s ease;
        position: relative;
        -webkit-tap-highlight-color: transparent;
        padding: 4px 2px;
    }

    .ios-nav-icon-wrapper {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 26px;
    }

    .ios-nav-icon {
        font-size: 22px;
        line-height: 1;
        transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease;
    }

    .ios-nav-label {
        font-size: 10.5px;
        font-weight: 500;
        line-height: 1.2;
        letter-spacing: -0.2px;
        margin-top: 2px;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        transition: color 0.15s ease, font-weight 0.15s ease;
    }

    .ios-nav-item:hover,
    .ios-nav-item:focus {
        color: var(--bs-primary, #ff4500);
    }

    .ios-nav-item:active {
        transform: scale(0.92);
    }

    .ios-nav-item.active {
        color: var(--bs-primary, #ff4500);
    }

    .ios-nav-item.active .ios-nav-icon {
        transform: translateY(-1px) scale(1.08);
        color: var(--bs-primary, #ff4500);
    }

    .ios-nav-item.active .ios-nav-label {
        font-weight: 700;
        color: var(--bs-primary, #ff4500);
    }

    /* iOS Center Prominent Action (Teslimat) */
    .ios-nav-center {
        overflow: visible;
        padding-bottom: 2px;
    }

    .ios-center-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--bs-primary, #ff4500), #ff6b3d);
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: -20px;
        margin-bottom: 2px;
        box-shadow: 0 4px 14px rgba(255, 69, 0, 0.4), 0 2px 6px rgba(0, 0, 0, 0.1);
        border: 3px solid #ffffff;
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    }

    [data-bs-theme="dark"] .ios-center-btn {
        border-color: #202938;
        box-shadow: 0 4px 16px rgba(255, 69, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.4);
    }

    .ios-center-icon {
        font-size: 24px;
        color: #ffffff !important;
        line-height: 1;
    }

    .ios-nav-center:hover .ios-center-btn {
        transform: translateY(-2px);
    }

    .ios-nav-center:active .ios-center-btn {
        transform: scale(0.92);
    }

    .ios-nav-center.active .ios-center-btn {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(255, 69, 0, 0.6), 0 0 0 2px rgba(255, 69, 0, 0.3);
    }

    .ios-nav-center.active .ios-nav-label {
        color: var(--bs-primary, #ff4500);
        font-weight: 700;
    }
}

.items-solid-border {
    border: 1px solid var(--bs-border-color) !important;
}

.bootstrap-select:not([class*="col-"]):not([class*="form-control"]):not(.input-group-btn) {
    width: auto !important;
    min-width: 150px;
}

.form-select {
    padding-right: 25px;
    background-position: right 5px center;
}

/* Dağıtım Stok Toplamları — dar kartta 4 kolon (Ürün | Kap | Kg | Fiyat) sığsın */
.dist-totals-table {
    font-size: 0.8125rem;
}

.dist-totals-table td,
.dist-totals-table th {
    padding-left: 0.375rem;
    padding-right: 0.375rem;
    white-space: nowrap;
}

.dist-totals-table td:first-child {
    white-space: normal;
}

.dist-totals-table tfoot .badge {
    font-size: 1rem !important;
}
