/* ============================================================================
   STD-TABLE — site-geneli standart tablo bileseni
   ----------------------------------------------------------------------------
   .vt-table zaten site.css'te kapsamli sekilde tanimli (siyah header, sticky
   kolonlar, zebra, hover...). Bu dosya .vt-table'in ETRAFINI standartlastirir:
   - Filter row (arama + select'ler)
   - Sortable header (ok ikonu, asc/desc state)
   - Bulk selection bar (alt sticky bar)
   - Pagination footer
   - Table card wrapper (border + radius + shadow)
   ============================================================================ */

/* ===== KART WRAPPER ===== */
.std-table-card {
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    overflow: hidden;          /* radius taşmasin */
    display: flex;
    flex-direction: column;
}

/* ===== TOOLBAR (arama + filtreler + yeni kayit + bulk actions ust) ===== */
.std-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eef2f7;
    background: #fafbfd;
    flex-wrap: wrap;
}
.std-table-toolbar .std-table-search {
    flex: 1 1 280px;
    max-width: 480px;
    min-width: 0;
}
.std-table-toolbar .std-table-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.std-table-toolbar .std-table-filters .form-select { max-width: 180px; }
.std-table-toolbar .std-table-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-left: auto;
}

/* ===== TABLE COUNT BADGE ===== */
.std-table-count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
}

/* ===== SORTABLE HEADER ===== */
.vt-table thead th.vt-sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 22px !important;
    transition: background .12s;
}
.vt-table thead th.vt-sortable:hover {
    background: #334155;
}
.vt-table thead th.vt-sortable::after {
    content: "\f0dc";          /* fa-sort */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
}
.vt-table thead th.vt-sortable.is-sort-asc::after {
    content: "\f0de";          /* fa-sort-up */
    color: #93c5fd;
}
.vt-table thead th.vt-sortable.is-sort-desc::after {
    content: "\f0dd";          /* fa-sort-down */
    color: #93c5fd;
}

/* ===== BULK SELECTION BAR (alt sticky) ===== */
.std-table-bulkbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    background: #eff6ff;
    border-top: 1px solid #c7dbfb;
    flex-wrap: wrap;
    animation: std-bulk-in .15s ease-out;
}
@keyframes std-bulk-in {
    from { transform: translateY(-3px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.std-table-bulkbar.is-empty { display: none !important; }
.std-table-bulkbar-count { font-weight: 700; color: #1d4ed8; font-size: 0.9rem; }
.std-table-bulkbar-count i { margin-right: 0.4rem; }
.std-table-bulkbar-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.std-table-bulkbar .btn-link {
    text-decoration: none;
    color: #2563eb;
    font-size: 0.82rem;
}
.std-table-bulkbar .btn-link:hover { text-decoration: underline; }

/* ===== PAGINATION FOOTER ===== */
.std-table-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: #fafbfd;
    border-top: 1px solid #eef2f7;
    font-size: 0.85rem;
    color: #64748b;
    flex-wrap: wrap;
}
.std-table-pagination .pagination { margin: 0; }
.std-table-pagination .form-select { max-width: 110px; }
.std-table-pagination .pagination .page-link {
    color: #2563eb;
    border-color: #e6ebf2;
}
.std-table-pagination .pagination .page-item.active .page-link {
    background: #2563eb;
    border-color: #2563eb;
}

/* ===== EMPTY STATE ===== */
.std-table-empty {
    padding: 2.5rem 1rem;
    text-align: center;
    color: #94a3b8;
}
.std-table-empty i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: #cbd5e1;
}

/* ===== LOADING STATE ===== */
.std-table-loading {
    padding: 2rem;
    text-align: center;
    color: #64748b;
}
.std-table-loading i { margin-right: 0.5rem; color: #2563eb; }

/* ===== ROW STATUS BADGES (eski olanlar ile uyumlu) ===== */
.std-badge {
    display: inline-block;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
}
.std-badge--ok       { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.std-badge--warn     { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.std-badge--danger   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.std-badge--info     { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.std-badge--mute     { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }
.std-badge--gray     { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

/* ===== ROW SELECT CHECKBOX ===== */
.vt-table .vt-col-select {
    width: 36px !important;
    text-align: center;
    padding: 6px 4px !important;
}
.vt-table .vt-col-select .form-check-input { margin: 0; cursor: pointer; }

/* ===== ACTION DROPDOWN (cogs btn) standardize ===== */
.vt-table .vt-cogs-btn {
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

/* ===== RESPONSIVE — kucuk ekranlarda toolbar 1 sutuna ===== */
@media (max-width: 767.98px) {
    .std-table-toolbar { flex-direction: column; align-items: stretch; }
    .std-table-toolbar .std-table-actions { margin-left: 0; justify-content: flex-end; }
    .std-table-bulkbar { flex-direction: column; align-items: stretch; }
}
