/* ====================================================================
 * 🛡️ SAAS.CSS - TRANSFER EXTENSION STYLES (v6.0 - PREMIUM)
 * ==================================================================== */

/* KPI Kartları */
.kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.kpi-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* Transfer Tablo Satırları */
.transfer-row {
    transition: background-color 0.15s ease;
}

.transfer-row:hover {
    background-color: #f8faff !important;
}

.time-badge {
    background: #eff6ff;
    color: #2563eb;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
}

/* Scheduler Styles */
.scheduler-table td { 
    position: relative; 
    min-width: 150px; 
}

.appointment-card {
    border-radius: 8px;
    border-left: 4px solid rgba(0,0,0,0.3) !important;
    padding: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s ease-in-out;
    font-size: 11px;
}

.appointment-card:hover {
    z-index: 100 !important;
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12) !important;
    height: auto !important;
    min-height: 80px;
}

.appointment-card .app-detail {
    display: none;
}

.appointment-card:hover .app-detail {
    display: block;
    margin-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 4px;
}

/* Modal ve Tablo Sütun Optimizasyonları */
.table {
    width: 100% !important;
    margin-bottom: 0;
}

.table th, .table td {
    vertical-align: middle;
}

/* ====================================================================
 * 📱 MOBİL LİSTELER: Son TD / TH Sabit (Sticky), Gerisi Kayar Düzen
 * ==================================================================== */
@media (max-width: 768px) {
    .scheduler-table th { 
        min-width: 120px !important; 
        font-size: 10px; 
    }
    
    .appointment-card { 
        padding: 4px; 
        font-size: 10px; 
    }
    
    .name-label { 
        white-space: nowrap; 
        overflow: hidden; 
        text-overflow: ellipsis; 
    }
    
    .transfer-row td {
        padding: 12px 10px !important;
    }

    /* Mobilde yatay kaydırma ve sabit sağ işlem kolonu */
    .table-responsive {
        position: relative;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive table {
        min-width: 580px;
    }

    /* Son sütun (İşlem / Butonlar) sabit sağda kalır */
    .table-responsive table th:last-child,
    .table-responsive table td:last-child {
        position: sticky !important;
        right: 0 !important;
        background-color: #ffffff !important;
        z-index: 10 !important;
        box-shadow: -6px 0 10px rgba(0, 0, 0, 0.05);
        text-align: right !important;
        white-space: nowrap;
    }

    .table-responsive table thead th:last-child {
        background-color: #f8fafc !important;
        z-index: 11 !important;
    }

    .table-responsive table tbody tr:hover td:last-child,
    .table-responsive table tbody tr.table-light td:last-child {
        background-color: #f8faff !important;
    }
}

/* ====================================================================
 * 🔧 ROTA TABLOSU VE ROL BAZLI TABLO HÜCRESİ DÜZELTMELERİ
 * ==================================================================== */
table th.admin-only,
table td.admin-only,
table th.master-only,
table td.master-only,
table th.staff-only,
table td.staff-only,
table th.crm-only,
table td.crm-only {
    display: table-cell !important;
    vertical-align: middle;
}

body[data-user-role="firm"] table th.admin-only,
body[data-user-role="firm"] table td.admin-only,
body[data-user-role="customer"] table th.admin-only,
body[data-user-role="customer"] table td.admin-only {
    display: none !important;
}

#modalTransferAgencyDetail .table thead.table-dark th {
    background-color: #212529 !important;
    color: #ffffff !important;
    vertical-align: middle;
    border-color: #373b3e !important;
}

/* Acente Güzergah Arama Dropdown */
#routeSourceAgencyDropdown .list-group-item {
    cursor: pointer;
    transition: background-color 0.15s ease;
}
#routeSourceAgencyDropdown .list-group-item:hover {
    background-color: #f1f5f9;
}