/* sidebar.css - KOMPLE GÜNCEL VERSİYON */


/* ========================================
   SIDEBAR STİLLERİ
======================================== */


/* Sidebar Ana Container */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--darker-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease;
}


/* Scrollbar Styling */
.sidebar::-webkit-scrollbar {
    width: 6px;
}


.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}


.sidebar::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    opacity: 0.5;
}


.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
    opacity: 1;
}


/* Sidebar Header */
.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--dark-bg);
    display: flex;
    align-items: center;
}

.sidebar-close-btn {
    display: none;
}


.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
}


.sidebar-logo i {
    color: var(--primary-color);
    font-size: 1.8rem;
}


/* Sidebar Profile */
.sidebar-profile {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--dark-bg);
}


.sidebar-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 2rem;
    margin: 0 auto 12px;
    box-shadow: 0 4px 20px var(--primary-light);
    transition: all 0.3s ease;
}


.sidebar-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px var(--primary-color);
}


.sidebar-username {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 4px;
}


.sidebar-role {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 12px;
    display: inline-block;
}


.sidebar-role.role-admin {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    border: 1px solid var(--primary-color);
}


/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    padding: 1rem 0.5rem;
    overflow-y: auto;
    background: var(--darker-bg);
}


.sidebar-item {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.2rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
    position: relative;
}


.sidebar-item i {
    margin-right: 12px;
    font-size: 1.2rem;
    min-width: 24px;
    text-align: center;
}


.sidebar-item:hover {
    background: var(--primary-light);
    color: var(--text-primary);
    border-left-color: var(--primary-color);
    transform: translateX(3px);
}


.sidebar-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.1);
}


.sidebar-item.active::before {
    content: '';
    position: absolute;
    right: 10px;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--primary-color);
}


/* ✅ Admin Menü Kontrolü */
.admin-only {
    display: none !important;
}


body.is-admin .admin-only {
    display: flex !important;
}


/* ============================================
   DEPO BÖLÜMÜ - YENİ DÜZELTMELER
   ============================================ */

.sidebar-warehouse {
    margin-top: auto;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.warehouse-info-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.875rem;
    transition: all 0.3s ease;
}

.warehouse-info-box:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px var(--primary-light);
}

.warehouse-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.625rem;
    font-weight: 600;
}

.warehouse-label i {
    font-size: 0.875rem;
}

.warehouse-display {
    margin-bottom: 0.75rem;
}

.warehouse-name {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    flex-wrap: wrap;
}

.warehouse-name i {
    flex-shrink: 0;
}

.warehouse-name span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.warehouse-name small {
    font-weight: 400;
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 0.5rem;
}

/* ÇİZGİYİ GİZLE */
.warehouse-code {
    display: none !important;
}

.btn-change-warehouse {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-change-warehouse:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px var(--primary-light);
}

.btn-change-warehouse:active {
    transform: translateY(0);
}

.btn-change-warehouse i {
    font-size: 0.875rem;
}


/* ============================================
   BİLDİRİM BELL WIDGET
   ============================================ */

.sidebar-notif {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
    background: var(--dark-bg);
}

.notif-bell-btn {
    position: relative;
    background: var(--primary-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    width: 100%;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    padding: 0 1rem;
}

.notif-bell-btn::after {
    content: 'Bildirimler';
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.notif-bell-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.notif-bell-btn:hover::after {
    color: #fff;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--darker-bg);
    animation: badgePop 0.25s ease;
    z-index: 5;
}

@keyframes badgePop {
    0%   { transform: scale(0.5); }
    70%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Dropdown panel */
.notif-dropdown {
    display: none;           /* varsayılan kapalı — JS ile toggle edilir */
    position: fixed;
    width: 340px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 9999;           /* tablonun sticky header'ının üstünde */
    overflow: hidden;
    min-height: 120px;
}

.notif-dropdown.notif-dropdown--open {
    display: block;
    animation: notifSlideIn 0.2s ease;
}

@keyframes notifSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    background: var(--darker-bg);
}

.notif-mark-all-btn {
    background: none;
    border: none;
    font-size: 0.75rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.notif-mark-all-btn:hover {
    text-decoration: underline;
    opacity: 0.85;
}

/* Bildirim listesi */
.notif-dropdown-list {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
}

.notif-dropdown-list::-webkit-scrollbar {
    width: 4px;
}

.notif-dropdown-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

/* Tek bildirim satırı */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.15s ease;
    position: relative;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--primary-light);
}

.notif-item--unread {
    background: rgba(102, 126, 234, 0.07);
    border-left: 3px solid var(--primary-color);
}

.notif-item--unread .notif-title {
    color: var(--text-primary);
    font-weight: 600;
}

.notif-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
    width: 22px;
    text-align: center;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-message {
    font-size: 0.77rem;
    color: var(--text-secondary);
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.notif-time {
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-top: 4px;
    opacity: 0.65;
}

.notif-close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.8rem;
    transition: color 0.15s;
    flex-shrink: 0;
    margin-top: 1px;
    border-radius: 4px;
}

.notif-close-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Boş durum */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 2.5rem 1rem;
    text-align: center;
}

.notif-empty-icon {
    font-size: 2.2rem;
    color: var(--text-secondary);
    opacity: 0.35;
}

.notif-empty-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.7;
}

.notif-empty-subtitle {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.5;
}

/* Açık tema uyumu */
[data-theme="light"] .notif-dropdown {
    background: #ffffff;
    border-color: #dee2e6;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .notif-item--unread {
    background: rgba(102, 126, 234, 0.06);
}

[data-theme="light"] .notif-dropdown-header {
    background: #f8f9fa;
    border-color: #dee2e6;
}


/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--dark-bg);
    position: sticky;
    bottom: 0;
}


.sidebar-logout {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: #ff6b6b;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


.sidebar-logout i {
    font-size: 1.1rem;
}


.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}


.sidebar-logout:active {
    transform: translateY(0);
}


/* Main Wrapper */
.main-wrapper {
    margin-left: 280px;
    min-height: 100vh;
    background: var(--dark-bg);
    padding: 0;
    transition: margin-left 0.3s ease;
}


/* ============================================
   TABLO STİLLERİ - TEMA UYUMLU
   ============================================ */


/* Tablo Container */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}


.card-body {
    padding: 0;
    background-color: var(--card-bg);
}


/* Tablo */
.table {
    color: var(--text-primary);
    margin-bottom: 0;
    background-color: transparent;
}


/* Tablo Başlığı (thead) */
.table thead.table-dark {
    background-color: var(--darker-bg);
    border-bottom: 2px solid var(--border-color);
}


.table thead.table-dark th {
    background-color: var(--darker-bg);
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    padding: 1rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
}


/* Tablo Gövdesi (tbody) */
.table tbody {
    background-color: var(--card-bg);
}


.table tbody tr {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}


/* Hover Efekti */
.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.08);
    transform: scale(1.001);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* Tablo Hücreleri */
.table td {
    background-color: transparent;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    padding: 1rem;
    font-size: 0.95rem;
}


/* Zebra Çizgiler (Striped) */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 255, 255, 0.02);
}


.table-striped tbody tr:nth-of-type(odd):hover {
    background-color: rgba(102, 126, 234, 0.08);
}


/* Sıra Numarası */
.table td:first-child {
    font-weight: 600;
    color: var(--text-secondary);
}


/* Ürün Adı - Beyaz ve Kalın */
.table td:nth-child(2) strong,
.table td strong {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
}


/* Kategori Badge'leri */
.table .badge {
    padding: 0.5rem 0.8rem;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.85rem;
}


.badge.bg-secondary {
    background-color: rgba(107, 114, 128, 0.8) !important;
    color: #ffffff;
}


.badge.bg-primary {
    background-color: var(--primary-color) !important;
    color: #ffffff;
}


.badge.bg-danger {
    background-color: #ef4444 !important;
    color: #ffffff;
}


.badge.bg-success {
    background-color: #22c55e !important;
    color: #ffffff;
}


.badge.bg-warning {
    background-color: #f59e0b !important;
    color: #ffffff;
}


.badge.bg-info {
    background-color: #3b82f6 !important;
    color: #ffffff;
}


.badge.bg-dark {
    background-color: var(--darker-bg) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color);
}


/* Fiyat Hücreleri - Beyaz */
.table td:nth-child(6),
.table td:nth-child(7) {
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
}


/* Kar Marjı - Özel Stil */
.table td:nth-child(8) .badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
}


/* Durum Badge'leri */
.table td .badge i {
    margin-right: 0.3rem;
}


/* Aksiyon Butonları */
.table td button {
    margin-right: 0.3rem;
}


.table td .btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}


/* Responsive Tablo */
.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    isolation: isolate;
}


.table-responsive::-webkit-scrollbar {
    height: 8px;
}


.table-responsive::-webkit-scrollbar-track {
    background: var(--darker-bg);
    border-radius: 10px;
}


.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}


.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--primary-hover);
}


/* Boş Tablo Mesajı */
.table tbody td[colspan] {
    background-color: var(--card-bg);
    color: var(--text-secondary);
    text-align: center;
    padding: 3rem;
}


.table tbody td[colspan] i {
    color: var(--text-secondary);
    opacity: 0.5;
}


.table tbody td[colspan] p {
    color: var(--text-secondary);
    margin-top: 1rem;
}


/* Loading State */
.table tbody .spinner-border {
    color: var(--primary-color);
}


/* ============================================
   ÖZEL RENKLENDİRMELER - PARLAK KIRMIZI
   ============================================ */


/* Kritik Stok - PARLAK Kırmızı Vurgu */
.table tbody tr.critical-stock {
    background-color: rgba(239, 68, 68, 0.15) !important;
    border-left: 4px solid #ef4444;
    box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.1);
}


.table tbody tr.critical-stock:hover {
    background-color: rgba(239, 68, 68, 0.25) !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}


/* Kritik stok badge'i daha parlak */
.table tbody tr.critical-stock .badge {
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}


/* Düşük Stok - Turuncu Vurgu */
.table tbody tr.low-stock {
    background-color: rgba(245, 158, 11, 0.08);
    border-left: 3px solid #f59e0b;
}


.table tbody tr.low-stock:hover {
    background-color: rgba(245, 158, 11, 0.15);
}


/* Normal Stok */
.table tbody tr.normal-stock {
    border-left: 3px solid transparent;
}


/* Sıra Numarası Badge Stili */
.table td:first-child .badge {
    background-color: var(--darker-bg);
    color: var(--text-secondary);
    padding: 0.4rem 0.6rem;
    font-weight: 500;
}


/* ============================================
   AÇIK TEMA İÇİN AYARLAMALAR
   ============================================ */


[data-theme="light"] .table {
    color: var(--text-primary);
}


[data-theme="light"] .table thead.table-dark {
    background-color: #f8f9fa;
}


[data-theme="light"] .table thead.table-dark th {
    background-color: #f8f9fa;
    color: var(--text-primary);
    border-bottom-color: #dee2e6;
}


[data-theme="light"] .table tbody tr {
    background-color: #ffffff;
    border-bottom-color: #dee2e6;
}


[data-theme="light"] .table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}


[data-theme="light"] .table-striped tbody tr:nth-of-type(odd) {
    background-color: #f8f9fa;
}


[data-theme="light"] .table td strong {
    color: #1a1d29;
}


[data-theme="light"] .table td:nth-child(6),
[data-theme="light"] .table td:nth-child(7) {
    color: #1a1d29;
}


/* ============================================
   STATS CARD STİLLERİ
   ============================================ */


.stats-card {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 12px;
    transition: all 0.3s ease;
}


.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-color);
}


.stats-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}


.stats-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}


/* ============================================
   MOBİL ÜST BAR & HAMBURGER (masaüstünde gizli)
   ============================================ */

.mobile-topbar {
    display: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* ============================================
   RESPONSIVE AYARLAMALAR
   ============================================ */

/* ── Tablet / Mobil (<992px) ── */
@media (max-width: 991.98px) {

    /* Üst bar görünür */
    .mobile-topbar {
        display: flex;
        position: fixed;
        top: 0; left: 0; right: 0;
        /* Eski iOS Safari (pre-11.2) */
        padding-top: constant(safe-area-inset-top);
        height: calc(56px + constant(safe-area-inset-top));
        /* Modern tarayıcılar */
        padding-top: env(safe-area-inset-top, 0px);
        height: calc(56px + env(safe-area-inset-top, 0px));
        background: var(--darker-bg);
        border-bottom: 1px solid var(--border-color);
        align-items: center;
        padding-left: 1rem;
        padding-right: 1rem;
        gap: 0.75rem;
        z-index: 1002;
    }

    .mobile-page-title {
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hamburger butonu */
    .hamburger-btn {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        background: var(--primary-light);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        padding: 8px;
        transition: background 0.2s;
    }

    .hamburger-btn:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
    }

    .hamburger-btn:hover span {
        background: #fff;
    }

    .hamburger-btn span {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    /* X animasyonu */
    .hamburger-btn.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger-btn.is-active span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .hamburger-btn.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Sidebar — varsayılan gizli, soldan slide-in + safe area */
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
        padding-top: constant(safe-area-inset-top);
        padding-top: env(safe-area-inset-top, 0px);
    }

    /* Sidebar açıkken */
    .sidebar.sidebar--open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
        z-index: 1050;
    }

    /* Overlay aktif */
    .sidebar-overlay.is-visible {
        display: block;
        animation: fadeIn 0.2s ease;
    }

    /* Main wrapper — sol margin sıfır + üst bar boşluğu */
    .main-wrapper {
        margin-left: 0;
        padding-top: calc(56px + constant(safe-area-inset-top));
        padding-top: calc(56px + env(safe-area-inset-top, 0px));
    }

    /* Sidebar kapatma butonu */
    .sidebar-close-btn {
        display: flex;
        margin-left: auto;
        background: transparent;
        border: 1px solid var(--border-color);
        color: var(--text-secondary);
        width: 32px;
        height: 32px;
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s;
        flex-shrink: 0;
    }

    .sidebar-close-btn:hover {
        background: rgba(239, 68, 68, 0.15);
        border-color: #ef4444;
        color: #ef4444;
    }

    /* Sidebar header mobilde padding azalt */
    .sidebar-header {
        padding: 1rem 1rem;
    }

    /* Mobil minimal profil */
    .sidebar-profile {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 0.75rem 1rem;
        text-align: left;
    }

    .sidebar-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        flex-shrink: 0;
        margin: 0;
    }

    .sidebar-username {
        font-size: 0.9rem;
        margin-bottom: 2px;
    }

    .sidebar-role {
        font-size: 0.72rem;
        padding: 2px 8px;
    }

    /* Tablo küçük ekran ayarları */
    .table {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.5rem;
    }

    .table td strong {
        font-size: 0.9rem;
    }

    .badge {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }

    .table td .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }
}

/* ── Küçük Mobil (<576px) ── */
@media (max-width: 575.98px) {

    .sidebar {
        width: 100vw;  /* tam genişlik */
    }

    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.4rem;
        white-space: nowrap;
    }
}


/* ============================================
   ANİMASYONLAR
   ============================================ */


@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.sidebar-item {
    animation: slideIn 0.3s ease forwards;
}


.table tbody tr {
    animation: fadeIn 0.3s ease;
}


/* Animasyon Gecikmeleri */
.sidebar-item:nth-child(1) { animation-delay: 0.05s; }
.sidebar-item:nth-child(2) { animation-delay: 0.1s; }
.sidebar-item:nth-child(3) { animation-delay: 0.15s; }
.sidebar-item:nth-child(4) { animation-delay: 0.2s; }
.sidebar-item:nth-child(5) { animation-delay: 0.25s; }


/* Satır bazlı animasyon gecikmesi */
.table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.table tbody tr:nth-child(2) { animation-delay: 0.1s; }
.table tbody tr:nth-child(3) { animation-delay: 0.15s; }
.table tbody tr:nth-child(4) { animation-delay: 0.2s; }
.table tbody tr:nth-child(5) { animation-delay: 0.25s; }


/* ============================================
   DURUMA GÖRE RENKLENDİRME
   ============================================ */


/* JavaScript ile eklenecek class'lar için */
.table tbody tr.low-stock td:first-child::before {
    content: '⚠️';
    margin-right: 0.5rem;
}


.table tbody tr.out-of-stock {
    opacity: 0.6;
}


.table tbody tr.out-of-stock td {
    text-decoration: line-through;
    color: var(--text-secondary);
}


/* ============================================
   TEMA GEÇİŞLERİ
   ============================================ */


.sidebar,
.sidebar-header,
.sidebar-profile,
.sidebar-menu,
.sidebar-footer,
.sidebar-item,
.table,
.card {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}


/* Print Stili */
@media print {
    .sidebar {
        display: none;
    }
    
    .main-wrapper {
        margin-left: 0;
    }
}
