body {
    background: #f5f7fa;
}

.card {
    border-radius: 10px;
}

/* ---- Excel grid ---- */
.grid-wrap {
    max-height: 78vh;
    overflow: auto;
    border: 1px solid #ccc;
    background: #fff;
}

.excel-grid {
    border-collapse: collapse;
}

    .excel-grid th, .excel-grid td {
        white-space: nowrap;
        font-size: 12.5px;
        padding: 1px 4px;
        vertical-align: middle;
    }

    .excel-grid thead th {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #1e3a5f;
        color: #fff;
        text-align: center;
        font-size: 11.5px;
        padding: 6px 4px;
        border-color: #33507a;
    }

    .excel-grid tbody tr:nth-child(even) {
        background: #f6f8fb;
    }

    .excel-grid tbody tr:hover {
        background: #eef3fa;
    }

    .excel-grid tfoot td {
        position: sticky;
        bottom: 0;
        background: #e9edf3;
        z-index: 10;
        font-size: 12.5px;
    }

    /* İlk iki kolon sabit */
    .excel-grid .col-sno {
        position: sticky;
        left: 0;
        background: #f0f2f5;
        z-index: 6;
        text-align: center;
        min-width: 40px;
    }

    .excel-grid .col-ilac {
        position: sticky;
        left: 40px;
        background: #fff;
        z-index: 6;
        min-width: 220px;
        border-right: 2px solid #adb5bd;
    }

    .excel-grid thead .col-sno, .excel-grid thead .col-ilac {
        z-index: 12;
        background: #1e3a5f;
    }

    .excel-grid tbody tr:nth-child(even) .col-ilac {
        background: #f6f8fb;
    }

/* Hücre içi inputlar - Excel hissi */
.hucre {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 12.5px;
    padding: 2px 3px;
}

    .hucre:focus {
        outline: 2px solid #1e3a5f;
        background: #fff;
        border-radius: 2px;
    }

.hucre-sayi {
    text-align: right;
    width: 70px;
}

.col-ilac .hucre-metin {
    width: 100%;
    font-weight: 600;
}

.col-aciklama .hucre-metin {
    width: 180px;
}

.birim {
    width: 55px;
    border: none;
    background: transparent;
    font-size: 12.5px;
}

input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Fiyat hücreleri */
.fiyat-td {
    cursor: pointer;
    text-align: right;
    min-width: 75px;
    position: relative;
}

    .fiyat-td:hover {
        outline: 2px solid #6c8ebf;
        outline-offset: -2px;
    }

.fiyat-info {
    font-size: 9px;
    color: #6c8ebf;
    position: absolute;
    top: 1px;
    right: 1px;
}

.fiyat-eniyi {
    background: #d1e7dd !important;
    font-weight: 700;
}

.fiyat-hedefustu .fiyat-deger {
    color: #dc3545;
}

.yeni-fiyat {
    animation: yeniFiyatYanip 3s;
}

@keyframes yeniFiyatYanip {
    0% {
        background: #fff3cd;
    }

    50% {
        background: #ffe69c;
    }

    100% {
        background: inherit;
    }
}

/* Hesaplanan kolonlar */
.hucre-hesap {
    text-align: right;
}

.col-eniyi, .col-tutar {
    background: #eaf6ef;
    font-weight: 600;
}

.col-kazanan {
    background: #eaf6ef;
    text-align: center;
    font-size: 11.5px;
}

.col-hedef {
    background: #fff8e6;
}

.col-satarih, .col-safiyat {
    text-align: right;
    color: #555;
}

.kz-kar {
    color: #198754;
    font-weight: 700;
}

.kz-zarar {
    color: #dc3545;
    font-weight: 700;
}

.kaydedildi {
    background: #d1e7dd !important;
    transition: background .3s;
}

/* Teklife çıkmayan (seçilmemiş) satırlar soluk */
.col-sec {
    text-align: center;
    min-width: 32px;
    position: sticky;
    left: 0;
    background: #f0f2f5;
    z-index: 6;
}

.excel-grid thead .col-sec {
    z-index: 12;
    background: #1e3a5f;
}

.excel-grid .col-sno {
    left: 32px;
}

.excel-grid .col-ilac {
    left: 72px;
}

tr.secilmemis td:not(.col-sec) {
    opacity: 0.45;
}

/* Sıralanabilir başlıklar */
.excel-grid thead th.siralanir {
    cursor: pointer;
    user-select: none;
    padding-top: 10px;
    padding-bottom: 10px;
}

    .excel-grid thead th.siralanir:hover {
        background: #2c4d7c;
    }

.sira-ok {
    font-size: 11px;
    color: #ffd966;
    display: inline-block;
    margin-left: 2px;
}

/* Pazarlık kazancı kolonu */
.col-pazarlik {
    background: #fdf3e7;
    text-align: right;
}

/* Hücre içi hızlı fiyat girişi */
.fiyat-inline {
    width: 100%;
    border: none;
    outline: 2px solid #1e3a5f;
    border-radius: 2px;
    background: #fff;
    text-align: right;
    font-size: 12.5px;
    padding: 1px 3px;
}

    .fiyat-inline::-webkit-inner-spin-button {
        -webkit-appearance: none;
    }

/* Excel secili hucre cercevesi */
.fiyat-td.hucre-secili {
    outline: 2px solid #1a73e8;
    outline-offset: -2px;
}

/* Firma sürükle-bırak */
.firma-drag {
    cursor: grab;
}

    .firma-drag:active {
        cursor: grabbing;
    }

    .firma-drag.drag-over {
        outline: 2px dashed #ffd966;
        outline-offset: -2px;
        background: #2c4d7c !important;
    }

/* Kolon seçimi (yapıştırma için) */
.kolon-secili {
    background: #2c4d7c !important;
    outline: 2px solid #ffd966;
    outline-offset: -2px;
}

.kolon-secili-td {
    background: #e8f0fe !important;
}
