/*
Template Name: Velzon - Admin & Dashboard Template
Author: Themesbrand
Website: https://themesbrand.com/
Contact: support@themesbrand.com
File: Custom Css File
*/

/* ─── Marka Rengi: Kurumsal Yeşil ─── */
:root,
[data-bs-theme="light"] {
    --vz-primary:               #1a7a4a;
    --vz-primary-rgb:           26, 122, 74;
    --vz-primary-text-emphasis: #0d3d25;
    --vz-primary-bg-subtle:     #d1f0e0;
    --vz-primary-border-subtle: #a3e0c2;
    --vz-link-color:            #1a7a4a;
    --vz-link-hover-color:      #146040;
}

[data-bs-theme="dark"] {
    --vz-primary:               #4ade95;
    --vz-primary-rgb:           74, 222, 149;
    --vz-primary-text-emphasis: #a3f0cb;
    --vz-primary-bg-subtle:     #0d3d25;
    --vz-primary-border-subtle: #1a7a4a;
    --vz-link-color:            #4ade95;
    --vz-link-hover-color:      #6ee7b0;
}

/* ─── Buton Hover / Active Durumları ─── */
.btn-primary {
    --bs-btn-bg:                    #1a7a4a;
    --bs-btn-border-color:          #1a7a4a;
    --bs-btn-hover-bg:              #146040;
    --bs-btn-hover-border-color:    #115438;
    --bs-btn-active-bg:             #115438;
    --bs-btn-active-border-color:   #0e4830;
    --bs-btn-focus-shadow-rgb:      26, 122, 74;
    --bs-btn-disabled-bg:           #1a7a4a;
    --bs-btn-disabled-border-color: #1a7a4a;
}

.btn-outline-primary {
    --bs-btn-color:               #1a7a4a;
    --bs-btn-border-color:        #1a7a4a;
    --bs-btn-hover-color:         #fff;
    --bs-btn-hover-bg:            #1a7a4a;
    --bs-btn-hover-border-color:  #1a7a4a;
    --bs-btn-active-color:        #fff;
    --bs-btn-active-bg:           #146040;
    --bs-btn-active-border-color: #146040;
    --bs-btn-focus-shadow-rgb:    26, 122, 74;
}

.btn-soft-primary {
    color: #1a7a4a;
    background-color: rgba(26, 122, 74, 0.10);
    border-color: transparent;
}
.btn-soft-primary:hover,
.btn-soft-primary:focus,
.btn-soft-primary:active {
    color: #fff;
    background-color: #1a7a4a;
    border-color: #1a7a4a;
}

.btn-ghost-primary {
    color: #1a7a4a;
}
.btn-ghost-primary:hover,
.btn-ghost-primary:focus {
    color: #1a7a4a;
    background-color: rgba(26, 122, 74, 0.10);
}

/* ─── Auth Sayfası Arka Planı ─── */
.auth-one-bg {
    background-color: #1a7a4a;
}
.auth-one-bg .bg-overlay {
    background: linear-gradient(to bottom, #1a7a4a, #0d3d25);
    opacity: 0.9;
}

.badge {
    height: fit-content;
}

/* ─── Mobil Öncelikli Düzenlemeler ─── */

/* Servis form kalem satırları */
.item-row:last-child {
    border-bottom: none !important;
}

/* Status filtre butonları mobil scroll */
#status-filters {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
#status-filters::-webkit-scrollbar {
    display: none;
}

/* Card animasyonu */
.card-animate {
    transition: transform 0.15s ease;
}
.card-animate:hover {
    transform: translateY(-2px);
}

/* Mobil: Daha kompakt card'lar */
@media (max-width: 575.98px) {
    .page-content {
        padding: 10px 0;
    }
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    .card-body {
        padding: 0.75rem;
    }
    .card-header {
        padding: 0.6rem 0.75rem;
    }
    .card-footer {
        padding: 0.6rem 0.75rem;
    }
    /* Accordion kompaktlık */
    .accordion-body {
        padding: 0.75rem;
    }
    /* Form butonları tam genişlik */
    .btn-lg {
        padding: 0.6rem 1rem;
        font-size: 1rem;
    }
}

/* Tablet: Orta padding */
@media (min-width: 576px) and (max-width: 991.98px) {
    .page-content {
        padding: 15px 0;
    }
}

/* ─── Active Menu Highlight ─── */
.navbar-nav .nav-link.menu-link.active,
.navbar-nav .nav-link.menu-link:hover,
.navbar-nav .nav-link.menu-link:focus {
    color: var(--vz-primary) !important;
    font-weight: 500;
}
.navbar-nav .nav-link.menu-link.active i:first-child,
.navbar-nav .nav-link.menu-link:hover i:first-child,
.navbar-nav .nav-link.menu-link:focus i:first-child {
    color: var(--vz-primary) !important;
}
[data-layout="horizontal"] .navbar-nav .nav-link.menu-link.active {
    border-bottom: 2px solid var(--vz-primary);
}

/* ─── Mobile Bottom Navigation ─── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--vz-topbar-bg);
    border-top: 1px solid var(--vz-border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    background-color: #fff;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: var(--vz-body-color);
    font-size: 11px;
    padding: 8px 4px;
    transition: color 0.2s ease;
    position: relative;
}

.bottom-nav-item i {
    font-size: 22px;
    margin-bottom: 2px;
}

.bottom-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64px;
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--vz-primary);
}

.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 3px;
    background: var(--vz-primary);
    border-radius: 0 0 4px 4px;
}

/* Ortadaki "Yeni" butonu */
.bottom-nav-add {
    position: relative;
}

.bottom-nav-add .add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--vz-primary), var(--vz-primary-rgb, 26, 122, 74));
    background: var(--vz-primary);
    border-radius: 50%;
    margin-top: -28px;
    box-shadow: 0 4px 12px rgba(var(--vz-primary-rgb), 0.4);
    box-shadow: 0 4px 12px rgba(26, 122, 74, 0.4);
}

.bottom-nav-add .add-btn i {
    font-size: 28px;
    color: #fff;
    margin-bottom: 0;
}

.bottom-nav-add:hover .add-btn,
.bottom-nav-add.active .add-btn {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(26, 122, 74, 0.5);
}

.bottom-nav-add span:last-child {
    margin-top: 2px;
}

/* ─── Servis Formu Kalem Satırları - Responsive ─── */
/* Mobilde isim alanı tam genişlik (2. satıra adet/fiyat/toplam geçer) */
@media (max-width: 767.98px) {
    .item-name-col {
        width: 100% !important;
        flex: 0 0 100% !important;
        order: -1;
    }
    .item-qty-col,
    .item-price-col,
    .item-total-col {
        flex-shrink: 0;
    }
}

/* Masaüstünde tek satır - wrap olmasın */
@media (min-width: 768px) {
    .item-row .d-flex.flex-wrap {
        flex-wrap: nowrap !important;
    }
}

/* Sayfa içeriği alt boşluğu - mobilde bottom nav'ı kapatmasın */
@media (max-width: 991.98px) {
    .main-content {
        padding-bottom: 72px;
    }

    /* Modal'ların bottom nav'ın üzerinde kalmasını sağla */
    .modal {
        z-index: 1055;
    }
    .modal-backdrop {
        z-index: 1054;
    }
}

/* ─── Mobil Wizard (Servis Formu) ─── */

/* Wizard Progress Dots */
.wizard-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: default;
}
.wizard-dot .dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #dee2e6;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wizard-dot.active .dot {
    background: var(--vz-primary);
    box-shadow: 0 0 0 4px rgba(26, 122, 74, 0.15);
}
.wizard-dot.completed .dot {
    background: var(--vz-primary);
    cursor: pointer;
}
.wizard-dot.completed .dot::after {
    content: '\eb7b'; /* ri-check-line */
    font-family: 'remixicon';
    font-size: 10px;
    color: #fff;
}
.wizard-dot small {
    font-size: 11px;
    color: #adb5bd;
    font-weight: 500;
}
.wizard-dot.active small,
.wizard-dot.completed small {
    color: var(--vz-primary);
    font-weight: 600;
}
.wizard-line {
    flex: 1;
    height: 2px;
    background: #dee2e6;
    margin-bottom: 20px;
    transition: background 0.3s ease;
}
.wizard-line.completed {
    background: var(--vz-primary);
}

/* Wizard Header & Footer - varsayılan gizli */
#mobile-wizard-header,
#mobile-wizard-footer {
    display: none !important;
}

/* Wizard Footer - Sticky Bottom Bar (base stiller, display ayrı yönetilir) */
#mobile-wizard-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--vz-border-color);
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 1060;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}
#mobile-wizard-footer .btn {
    min-width: 110px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: 600;
}
.wizard-footer-total {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
}
.wizard-footer-total strong {
    font-size: 1.1rem;
}

/* Mobilde wizard aktifken */
@media (max-width: 767.98px) {
    body.wizard-active .bottom-nav {
        display: none !important;
    }
    body.wizard-active .main-content {
        padding-bottom: 80px;
    }
    /* Wizard header ve footer göster */
    body.wizard-active #mobile-wizard-header {
        display: block !important;
    }
    body.wizard-active #mobile-wizard-footer {
        display: flex !important;
    }
    /* Wizard adımları: sadece aktif olan görünür */
    body.wizard-active .wizard-step {
        display: none !important;
    }
    body.wizard-active .wizard-step.active {
        display: block !important;
    }

    /* Mobil Kalem Kartları */
    .item-row {
        padding: 12px !important;
        margin: 6px 0;
        border: 1px solid var(--vz-border-color) !important;
        border-radius: 10px;
        background: var(--vz-card-bg);
    }
    .item-row:last-child {
        border-bottom: 1px solid var(--vz-border-color) !important;
    }
    .item-row .badge {
        font-size: 11px;
    }
    .item-row .item-total {
        font-size: 1rem;
        font-weight: 700;
    }
    .item-row .remove-item {
        position: absolute;
        top: 4px;
        right: 4px;
    }
    .item-row > .d-flex {
        position: relative;
    }
}

/* Masaüstünde wizard step'ler her zaman görünür */
@media (min-width: 768px) {
    .wizard-step {
        display: block !important;
    }
}

/* ─── Bottom Sheet (Kalem Ekleme) ─── */
#addItemSheet {
    border-radius: 16px 16px 0 0 !important;
}
#addItemSheet .offcanvas-header {
    padding: 12px 16px 4px;
    min-height: auto;
}
#addItemSheet .form-control-lg {
    font-size: 1rem;
    padding: 0.75rem 1rem;
}
#addItemSheet .sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: #dee2e6;
    border-radius: 2px;
}

/* Bottom sheet stok arama sonuçları */
#sheet-stock-results {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#sheet-stock-results .list-group-item {
    padding: 10px 12px;
    font-size: 0.9rem;
}

[data-bs-theme="dark"] #mobile-wizard-footer {
    background: var(--vz-card-bg);
}
