/* ============================================================
   AI Oneri Paneli — KCConnect Akilli Siparis
   Global CSS — wwwroot/css/ altinda yuklenir
   ============================================================ */

.ai-oneri-konteyner {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    color: #1F2937;
    padding: 4px 0;
}

/* === YUKLENIYOR === */
.ai-yukleniyor {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    gap: 12px;
    color: #6B7280;
}
.yukleniyor-noktalar { display: flex; gap: 6px; }
.yukleniyor-noktalar span {
    width: 8px; height: 8px; border-radius: 50%;
    background: #534AB7;
    animation: aioneri-pulse 1.2s ease-in-out infinite;
}
.yukleniyor-noktalar span:nth-child(2) { animation-delay: 0.2s; }
.yukleniyor-noktalar span:nth-child(3) { animation-delay: 0.4s; }
@keyframes aioneri-pulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* === STAT KARTLARI === */
.stat-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #E5E7EB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 16px;
}
.stat-kart {
    background: #fff;
    padding: 16px 20px;
}
.stat-etiket {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.5px; color: #6B7280;
    font-weight: 500; margin-bottom: 6px;
}
.stat-deger {
    font-size: 28px;
    font-family: 'DM Mono', 'Fira Code', 'Consolas', monospace;
    font-weight: 700; line-height: 1.1; color: #1F2937;
}
.stat-deger.kritik { color: #ef4444; }
.stat-deger.dusuk { color: #f59e0b; }
.stat-alt { font-size: 12px; color: #9CA3AF; margin-top: 4px; }

/* === BAĞLAM KARTLARI === */
.baglam-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #E5E7EB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
}
.baglam-kart {
    background: #fff; padding: 16px 18px;
    position: relative; min-height: 100px;
}
.baglam-efekt {
    position: absolute; top: 10px; right: 10px;
    font-size: 10px; font-weight: 600;
    padding: 3px 10px; border-radius: 99px; white-space: nowrap;
}
.efekt-yukari { background: #DCFCE7; color: #166534; }
.efekt-asagi { background: #FEE2E2; color: #991B1B; }
.efekt-orta { background: #FEF3C7; color: #92400E; }
.baglam-baslik {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.5px; color: #9CA3AF;
    font-weight: 600; margin-bottom: 6px; margin-top: 4px;
}
.baglam-deger { font-size: 14px; font-weight: 600; color: #1F2937; margin-bottom: 6px; }
.baglam-alt { font-size: 12px; color: #6B7280; line-height: 1.4; }

/* === ÜRÜN EKLE BAŞLIK === */
.urun-ekle-baslik {
    text-align: center; font-size: 12px; font-weight: 600;
    letter-spacing: 1px; color: #9CA3AF;
    padding: 10px 0 14px 0; text-transform: uppercase;
}

/* === ARAMA SATIRI === */
.arama-satiri { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.arama-wrap { flex: 1; position: relative; }
.arama-ikon {
    position: absolute; left: 10px; top: 50%;
    transform: translateY(-50%); font-size: 14px;
    z-index: 1; pointer-events: none; opacity: 0.5;
}
.arama-input input {
    height: 38px; padding-left: 32px !important;
    font-size: 13px; border-radius: 8px; border: 1px solid #E5E7EB;
}
.btn-temizle {
    height: 36px; border: 1px solid #E5E7EB !important;
    background: #fff !important; border-radius: 8px !important;
    padding: 0 16px !important; font-size: 13px; color: #6B7280; cursor: pointer;
}
.btn-tumunu {
    height: 36px; background: #DCFCE7 !important;
    border: 1px solid #86EFAC !important; color: #166534 !important;
    border-radius: 8px !important; padding: 0 16px !important;
    font-size: 13px; font-weight: 500; cursor: pointer;
}

/* === CHİP === */
.chip-satiri { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
    border: 1px solid #E5E7EB; font-size: 12px;
    padding: 5px 14px; border-radius: 99px; cursor: pointer;
    user-select: none; transition: all 0.15s ease;
    color: #6B7280; background: #fff;
}
.chip:hover { border-color: #86EFAC; color: #166534; background: #F0FDF4; }
.chip-aktif {
    background: #DCFCE7; border-color: #86EFAC;
    color: #166534; font-weight: 600;
}

/* === ÖNERİ TABLO === */
.oneri-tablo-kart {
    background: #fff; border: 1px solid #E5E7EB;
    border-radius: 10px; overflow: hidden;
}
.oneri-tablo-baslik {
    display: flex; justify-content: space-between;
    align-items: center; padding: 14px 18px;
    border-bottom: 1px solid #F3F4F6;
}
.oneri-tablo-baslik-sol {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: #1F2937;
}
.ai-ikon-kucuk { color: #534AB7; font-size: 16px; }
.alt-yazi { font-size: 12px; color: #9CA3AF; }

/* DxGrid override */
.oneri-grid { border: none !important; }
.oneri-grid .dxbl-grid-header-row th {
    background: #F9FAFB; font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.4px; color: #9CA3AF; font-weight: 600;
    padding: 10px 12px; border-bottom: 1px solid #F3F4F6;
}
.oneri-grid .dxbl-grid-table td {
    padding: 10px 12px; vertical-align: middle;
    border-bottom: 1px solid #F3F4F6;
}
.oneri-grid .dxbl-grid-table tr:hover td { background: #FAFAFA; }

/* === ÜRÜN === */
.urun-hucre { display: flex; align-items: flex-start; gap: 10px; }
.urun-bilgi { display: flex; flex-direction: column; }
.urun-adi { font-size: 13px; font-weight: 600; color: #1F2937; }
.urun-kod { font-size: 11px; color: #9CA3AF; font-family: 'DM Mono', monospace; }

/* === FAKTÖRLER === */
.faktor-satiri { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.faktor-etiketi {
    font-size: 10px; font-weight: 600; padding: 2px 8px;
    border-radius: 99px; white-space: nowrap;
}
.faktor-day { background: #EFF6FF; color: #1D4ED8; }
.faktor-season { background: #F0FDFA; color: #0F766E; }
.faktor-fire { background: #FEE2E2; color: #991B1B; }
.faktor-delivery { background: #FEF3C7; color: #92400E; }

/* === KATEGORİ === */
.kategori-pill {
    font-size: 11px; padding: 3px 10px; border-radius: 99px;
    background: #F3F4F6; border: 1px solid #E5E7EB; color: #4B5563;
    white-space: nowrap;
}

/* === STOK === */
.stok-hucre { display: flex; align-items: center; gap: 8px; }
.stok-bar-bg {
    width: 60px; height: 6px; background: #F3F4F6;
    border-radius: 3px; overflow: hidden; flex-shrink: 0;
}
.stok-bar-dolgu { height: 6px; border-radius: 3px; transition: width 0.3s ease; }
.stok-sayi {
    font-size: 13px; font-family: 'DM Mono', monospace;
    font-weight: 500; color: #1F2937;
}

/* === SATIŞ === */
.satis-deger {
    font-weight: 600; font-family: 'DM Mono', monospace;
    font-size: 13px; color: #1F2937;
}
.birim-kucuk { font-size: 11px; color: #9CA3AF; margin-left: 3px; }

/* === MİKTAR === */
.miktar-hucre { display: flex; align-items: center; gap: 4px; }
.miktar-input { width: 70px; }
.miktar-input input {
    font-size: 13px; font-family: 'DM Mono', monospace;
    text-align: center; padding: 4px 6px; border-radius: 6px;
    border: 1px solid #E5E7EB; height: 32px;
}

/* === SEVİYE === */
.seviye-hucre { display: flex; flex-direction: column; gap: 4px; }
.durum-rozet {
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 99px; display: inline-block; width: fit-content;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.durum-kritik { background: #FEE2E2; color: #DC2626; }
.durum-dusuk { background: #FEF3C7; color: #D97706; }
.durum-normal { background: #DCFCE7; color: #16A34A; }
.gerekce-metin { font-size: 11px; color: #6B7280; max-width: 160px; line-height: 1.3; }

/* === EKLE BUTONU === */
.btn-ekle {
    height: 32px; font-size: 12px; font-weight: 500;
    border: 1px solid #E5E7EB !important; border-radius: 8px !important;
    background: #fff !important; color: #374151 !important;
    cursor: pointer; padding: 0 14px !important; transition: all 0.15s ease;
}
.btn-ekle:hover {
    background: #F0FDF4 !important; border-color: #86EFAC !important;
    color: #166534 !important;
}
.btn-eklendi {
    background: #DCFCE7 !important; border-color: #86EFAC !important;
    color: #166534 !important; cursor: default;
}
