/* assets/emanet-liste.css */

/* Genel Sayfa Başlığı */
.page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
    gap: 15px;
}
.page-title { font-size: 1.6rem; color: #1e293b; margin: 0; }
.page-subtitle { color: #64748b; margin: 5px 0 0 0; font-size: 0.9rem; }

.btn-group-header {
    display: flex;
    gap: 10px;
}

.btn-new {
    background: #3b82f6; color: white;
    padding: 12px 20px; border-radius: 8px;
    text-decoration: none; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
    transition: 0.2s;
    font-size: 0.95rem;
}
.btn-new:hover { background: #2563eb; transform: translateY(-2px); }

.btn-orange {
    background: #f97316;
}
.btn-orange:hover { background: #ea580c; }

/* --------------------------------------------------
   GÖSTERİŞLİ ÜRÜN KARTLARI (Product Summary Bar)
   --------------------------------------------------
*/
.product-summary-bar {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px;
    margin-bottom: 35px;
    scrollbar-width: thin;
    
    /* Arkaplanı temizledik ki kartlar patlasın, istersen hafif gri yapabilirsin */
    background: transparent; 
    align-items: center;
}

/* KARTLARIN GENEL YAPISI */
.summary-chip {
    padding: 25px 30px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    min-width: 220px; /* Kartlar daha geniş */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.summary-chip:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.chip-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.chip-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.chip-value {
    font-size: 2.4rem; /* Rakamlar DEVASA */
    font-weight: 800;
    line-height: 1;
    margin-bottom: 5px;
}

.chip-unit {
    font-size: 0.95rem;
    font-weight: 600;
    align-self: flex-end;
    opacity: 0.8;
}

/* --- 1. KART: SARI / SİYAH (LİDER) --- */
.summary-chip.rank-1 {
    /* Parlak Sarı Arkaplan */
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #1e293b; /* Koyu Lacivert/Siyah Yazı */
    border: 1px solid #fcd34d;
    box-shadow: 0 15px 30px rgba(234, 179, 8, 0.4); /* Sarı Gölge */
}
.rank-1 .chip-title { color: #451a03; /* Koyu Kahve Başlık */ }
.rank-1 .crown-icon { font-size: 1.2rem; color: #451a03; }

/* --- 2. KART: KIRMIZI / BEYAZ (DİKKAT) --- */
.summary-chip.rank-2 {
    /* Canlı Kırmızı Arkaplan */
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff; /* Beyaz Yazı */
    border: 1px solid #f87171;
    box-shadow: 0 15px 30px rgba(220, 38, 38, 0.4); /* Kırmızı Gölge */
}
.rank-2 .chip-title { color: #fee2e2; }

/* --- 3. KART ve SONRASI (STANDART / MAVİ) --- */
.summary-chip.rank-3, .summary-chip.rank-4, .summary-chip.rank-5 {
    background: white;
    color: #1e293b;
    border: 1px solid #e2e8f0;
}
.summary-chip.rank-3 .chip-title { color: #64748b; }
.summary-chip.rank-3 .chip-value { color: #3b82f6; } /* Değeri Mavi Yap */

/* Boş Durum */
.empty-chip {
    min-width: 200px;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    box-shadow: none;
}

/* Scrollbar */
.product-summary-bar::-webkit-scrollbar { height: 8px; }
.product-summary-bar::-webkit-scrollbar-track { background: transparent; }
.product-summary-bar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.product-summary-bar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }


/* --- Filtre Alanı --- */
.advanced-filter-box {
    background: white; padding: 20px;
    border-radius: 12px; margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #f1f5f9;
}
.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    align-items: end;
}
.form-group { margin-bottom: 0; }
.form-group label { display: block; font-size: 0.8rem; color: #64748b; margin-bottom: 5px; font-weight: 600; }
.form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #334155;
    background: #f8fafc;
}
.form-control:focus { outline: none; border-color: #3b82f6; background: white; }

.btn-filter-submit {
    background: #3b82f6; color: white; border: none; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; height: 38px; width: 100%;
}
.btn-filter-reset {
    background: #f1f5f9; color: #64748b; border: 1px solid #cbd5e1; padding: 10px 20px; border-radius: 6px; cursor: pointer; font-weight: 600; height: 38px; width: 100%; text-align: center; text-decoration: none; display: inline-block; line-height: 18px;
}
.btn-filter-submit:hover { background: #2563eb; }
.btn-filter-reset:hover { background: #e2e8f0; }

/* Tablo Tasarımı */
.table-responsive {
    background: white; border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    overflow-x: auto;
    border-top: 4px solid #3b82f6;
}

.custom-table { width: 100%; border-collapse: collapse; min-width: 800px; }
.custom-table thead { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.custom-table th {
    padding: 15px; text-align: left; font-size: 0.8rem;
    font-weight: 700; color: #64748b; text-transform: uppercase;
}
.custom-table td {
    padding: 15px; border-bottom: 1px solid #f1f5f9;
    vertical-align: middle; color: #334155; font-size: 0.95rem;
}
.custom-table tr:hover { background: #f8fafc; }

/* Tablo İçerikleri */
.cari-link {
    text-decoration: none; color: inherit; display: block;
}
.cari-link:hover .cari-name { color: #3b82f6; text-decoration: underline; }

.cari-name { font-weight: 700; color: #1e293b; font-size: 1rem; }
.cari-sub { font-size: 0.9rem; color: #64748b; margin-top: 3px; }
.badge-baba {
    display: inline-block; background: #f0f9ff; color: #0369a1; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; margin-top: 2px;
}

.text-small { font-size: 0.85rem; }
.text-muted { color: #94a3b8; }
.font-bold { font-weight: 700; }
.text-red { color: #dc2626; }
.text-green { color: #059669; }
.text-gray { color: #6b7280; }
.big-text { font-size: 1.1rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* Stok Badge'leri */
.stok-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.badge-stok {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #dcfce7;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.badge-stok strong { font-weight: 700; }

/* Pasif (Biten) Stoklar */
.badge-stok.zero-stock {
    opacity: 0.6;
    background: #f8fafc;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
}

/* Detay Butonu */
.btn-detail {
    background: #eff6ff;
    color: #3b82f6;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.2s;
    display: inline-block;
}
.btn-detail:hover {
    background: #3b82f6;
    color: white;
}

/* Pasif Satırlar */
tr.row-passive td { background-color: #f8fafc; color: #94a3b8; }
tr.row-passive .cari-name { color: #64748b; }
tr.row-passive .badge-stok { background-color: #f1f5f9; color: #cbd5e1; border: 1px dashed #cbd5e1; }
tr.row-passive .btn-detail { background-color: #e2e8f0; color: #64748b; }
tr.row-passive .btn-detail:hover { background-color: #cbd5e1; }

.no-data { text-align: center; padding: 40px; color: #94a3b8; font-style: italic; }