/* --- GENEL AYARLAR --- */
body { margin: 0; padding: 0; }

/* LOGIN STYLE */
.lpc-login-wrap { background: #f0f2f5 !important; min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.lpc-login-box { background: #fff !important; padding: 40px; border-radius: 12px; box-shadow: 0 15px 30px rgba(0,0,0,0.1); width: 100%; max-width: 380px; text-align: center; }
.lpc-login-box input { width: 100%; padding: 15px; margin-bottom: 15px; border: 1px solid #ddd !important; background-color: #fff !important; color: #333 !important; font-size: 16px; box-sizing: border-box; }
.lpc-login-box button { width: 100%; padding: 15px; background: #2c3e50 !important; color: white !important; border: none; cursor: pointer; font-weight: bold; font-size: 16px; }

/* ANA KONTEYNER */
.lpc-app { 
    max-width: 1000px; 
    margin: 20px auto; 
    background: #f4f6f9; 
    border-radius: 10px; 
    padding: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important; 
    color: #333 !important; 
    position: relative; 
    padding-bottom: 30px; 
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* HEADER */
.lpc-header { background: #2c3e50; color: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; }
.lpc-header span { font-size: 18px; font-weight: bold; }
.lpc-header * { color: white !important; text-decoration: none; }

/* NAVİGASYON */
.lpc-nav { display: flex; background: white; border-bottom: 1px solid #ddd; }
.lpc-nav button { 
    flex: 1; 
    padding: 15px; 
    border: none; 
    background: none; 
    font-weight: bold; 
    cursor: pointer; 
    color: #777; 
    font-size: 14px; 
    transition: all 0.3s;
}
.lpc-nav button:hover { background: #f9f9f9; color: #333; }
.lpc-nav button.active { color: #3788d8 !important; border-bottom: 3px solid #3788d8; background: #fff; }

/* İÇERİK ALANLARI */
.lpc-tab { display: none; padding: 20px; background: white; min-height: 400px; }
.lpc-tab.show { display: block; animation: fadeIn 0.3s; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

/* --- DASHBOARD GRID SİSTEMİ --- */
.lpc-dash-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-bottom: 30px; }
.lpc-dash-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; }

.lpc-card { 
    background: #fff; 
    padding: 20px; 
    border: 1px solid #eee; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    height: 100%; 
    box-sizing: border-box; 
    border-radius: 8px;
    overflow: hidden;
}
.lpc-card h3 { margin-top: 0; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; color: #555; font-size: 16px; text-transform: uppercase; letter-spacing: 0.5px; }

/* TABLOLAR VE SIRALAMA */
table.wp-list-table { width: 100%; border-collapse: collapse; }
table.wp-list-table th { text-align: left; background: #f8f9fa; padding: 12px; border-bottom: 2px solid #eee; color: #555; font-weight: 600; }
table.wp-list-table td { padding: 12px; border-bottom: 1px solid #eee; color: #444; vertical-align: middle; }
table.wp-list-table tr:hover { background-color: #fafafa; }

th.sortable { cursor: pointer; position: relative; padding-right: 20px; user-select: none; }
th.sortable:hover { background-color: #f0f0f0; color: #333; }
th.sortable::after { content: '↕'; position: absolute; right: 5px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: 0.5; }
th.sortable.asc::after { content: '▲'; opacity: 1; color: #3788d8; }
th.sortable.desc::after { content: '▼'; opacity: 1; color: #3788d8; }

/* --- ÖZEL BUTONLAR --- */
button.lpc-btn-detail, .lpc-btn-detail {
    background-color: #2271b1 !important;
    color: #ffffff !important; 
    border: 1px solid #2271b1 !important;
    padding: 8px 15px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none !important;
    line-height: normal !important;
    white-space: nowrap;
}
button.lpc-btn-detail:hover, .lpc-btn-detail:hover {
    background-color: #135e96 !important;
    border-color: #135e96 !important;
    color: #fff !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.lpc-mark-paid { 
    background-color: #27ae60 !important; color: #ffffff !important; border: none !important; font-weight: bold !important; padding: 6px 12px !important; border-radius: 4px !important; box-shadow: 0 2px 4px rgba(0,0,0,0.15); transition: all 0.2s ease; cursor: pointer; font-size: 12px !important;
}
.lpc-mark-paid:hover { background-color: #219150 !important; transform: translateY(-1px); }
.lpc-mark-paid:disabled { background-color: #ccc !important; cursor: wait; transform: none; box-shadow: none; }

.wp-list-table .button-small { background: #34495e !important; color: #fff !important; border: none !important; padding: 6px 12px !important; border-radius: 4px !important; font-size: 12px !important; text-decoration: none; display: inline-block; }
.wp-list-table .button-small:hover { background: #2c3e50 !important; }

/* FORMLAR */
.form-section-title { background: #f8f9fa; padding: 12px; border-left: 5px solid #3788d8; margin: 25px 0 15px 0; font-weight: bold; color: #2c3e50; font-size: 15px; text-transform: uppercase; }
.form-row, .lpc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
#lpc-frontend-form input:not([type="checkbox"]), #lpc-frontend-form select, #lpc-frontend-form textarea, .lpc-section input, .lpc-section select, .lpc-section textarea { width: 100%; padding: 12px; margin-bottom: 15px; border: 1px solid #ddd; border-radius: 5px; box-sizing: border-box; background: #fff !important; color: #333 !important; font-size: 14px; }
#lpc-frontend-form label, .lpc-section label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; color: #555; }

.total-display, #total_price { font-size: 1.8em !important; font-weight: bold; color: #27ae60 !important; text-align: center; background: #e8f5e9 !important; border: 2px solid #27ae60 !important; padding: 15px !important; border-radius: 8px; margin-top: 10px; }

.save-btn, .button-primary { width: 100%; padding: 15px; background: #27ae60; color: white !important; border: none; font-size: 16px; font-weight: bold; cursor: pointer; border-radius: 5px; transition: background 0.2s; }
.save-btn:hover { background: #219150; }
.btn-blocked { background-color: #d63031 !important; cursor: not-allowed !important; }

.payment-row { display: grid; grid-template-columns: 2fr 1fr 1fr 40px; gap: 10px; margin-bottom: 10px; align-items: center; }
.lpc-checkbox-list { max-height: 400px; overflow-y: auto; border: 1px solid #ddd; padding: 10px; background: #fafafa; margin-bottom: 15px; border-radius: 5px; }
.extra-wrapper { 
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    transition: all 0.2s;
}
.extra-wrapper:hover { border-color: #3788d8; }
.extra-header { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.extra-label { display: flex; align-items: center; gap: 10px; font-weight: 500; width: 100%; cursor: pointer; }
.extra-qty-wrapper { display: flex; align-items: center; gap: 5px; background: #f0f0f1; padding: 2px 8px; border-radius: 4px; border: 1px solid #ddd; }
.extra-note-area { margin-top: 10px; display: none; }
.extra-note-input { width: 100% !important; margin-bottom: 0 !important; font-size: 13px !important; border-color: #ddd !important; }

.lpc-tooltip { position: absolute; background: white; border: 1px solid #ccc; padding: 10px; z-index: 9999; border-radius: 5px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); display: none; font-size: 13px; pointer-events: none; line-height: 1.4; min-width: 200px; color: #333; }
.lpc-footer { text-align: center; padding: 15px; font-size: 12px; color: #888; border-top: 1px solid #eee; background: #fafafa; border-radius: 0 0 10px 10px; margin-top: 20px; }
.lpc-page-btn { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; font-weight: bold; transition: all 0.2s; margin: 0 2px; }
.lpc-page-btn:hover { background-color: #3788d8 !important; color: white; }

/* --- POPUP (MODAL) STİLLERİ --- */
.lpc-modal {
    display: none; 
    position: fixed; 
    z-index: 2147483647 !important; 
    left: 0;
    top: 0;
    width: 100vw !important; 
    height: 100vh !important; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.7) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.lpc-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    animation: lpcSlideDown 0.3s ease-out;
}

@keyframes lpcSlideDown {
    from { opacity: 0; transform: translateY(-60%); }
    to { opacity: 1; transform: translateY(-50%); }
}

.lpc-modal-header {
    padding: 15px 20px;
    background: #2c3e50;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 8px 8px 0 0;
}

.lpc-modal-header h3 {
    margin: 0 !important;
    color: white !important;
    font-size: 18px;
    font-weight: bold;
}

.lpc-close-modal {
    color: #ddd;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    transition: color 0.2s;
}

.lpc-close-modal:hover { color: #fff; }

#lpc_payment_modal_body table th {
    background-color: #f1f2f6;
    color: #333;
    font-weight: 600;
}
#lpc_payment_modal_body table td { padding: 12px; }

/* ÖDEME MERKEZİ BADGE */
.lpc-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    display: inline-block;
}
.lpc-badge.paid { background-color: #dff0d8; color: #3c763d; border: 1px solid #d6e9c6; }
.lpc-badge.pending { background-color: #fcf8e3; color: #8a6d3b; border: 1px solid #faebcc; }

/* --- FILTRE BAR VE BUTON STİLİ (GENEL) --- */
.lpc-filter-bar { 
    background:#fff; 
    padding:15px 20px; 
    border:1px solid #c3c4c7; 
    border-radius:5px; 
    margin-bottom:20px; 
    box-shadow:0 1px 2px rgba(0,0,0,0.05); 
}

/* YENİ EKLENEN SINIFLAR (INLINE YERİNE) */
.lpc-filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.lpc-dashboard-filter {
    margin-bottom: 20px; 
    padding: 15px; 
    background: #eee; 
    border-radius: 5px; 
    display: flex; 
    gap: 10px; 
    align-items: center;
}

.lpc-filter-label { 
    font-weight:600; 
    color:#2c3e50; 
    margin-right:5px; 
}

.lpc-filter-bar select, .lpc-dashboard-filter select { 
    height:36px; 
    line-height:36px; 
    min-width:130px; 
    font-size:14px; 
    border-color:#8c8f94; 
}

.lpc-filter-bar button, .lpc-dashboard-filter button { 
    height:36px !important; 
    line-height:34px !important; 
    padding:0 20px !important; 
    width: auto !important;
    margin-top: 0 !important;
}

/* --- MOBİL UYUMLULUK DÜZELTMELERİ (KESİN ÇÖZÜM) --- */
@media screen and (max-width: 900px) { 
    
    /* 1. Ana Konteyner Padding */
    .lpc-app { width: 96% !important; margin: 10px auto !important; padding-bottom: 20px; }
    
    /* 2. Login Kutusu */
    .lpc-login-box { width: 92% !important; padding: 20px !important; }

    /* 3. Modal */
    .lpc-modal-content { width: 95%; margin-top: 15%; transform: none; top: 0; animation: none; }

    /* 4. DASHBOARD GRID: Alt Alta */
    .lpc-dash-grid-3, 
    .lpc-dash-grid-2 { 
        grid-template-columns: 1fr !important; 
        gap: 15px !important; 
        display: grid !important;
    }

    /* 5. DASHBOARD FILTRE (SATISCI): Alt Alta */
    .lpc-dashboard-filter {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        display: flex !important;
        height: auto !important;
        flex-wrap: wrap !important;
    }
    
    /* 6. ADMIN FILTRE: Alt Alta */
    .lpc-filter-form { 
        flex-direction: column !important; 
        align-items: stretch !important; 
    }
    
    .lpc-dashboard-filter select, .lpc-dashboard-filter button,
    .lpc-filter-form select, .lpc-filter-form button {
        width: 100% !important;
        margin-bottom: 5px !important;
    }

    /* 7. Tabloların Taşmasını Engelle */
    .lpc-card {
        overflow-x: auto !important;
        padding: 15px !important;
    }
    
    /* 8. Büyük Rakamları Küçült */
    .lpc-card div[style*="font-size:36px"] {
        font-size: 24px !important;
        word-wrap: break-word; 
    }
    
    /* 9. Form Satırları */
    .form-row, .lpc-row {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    
    /* 10. Ödeme Planı */
    .payment-row {
        grid-template-columns: 1fr !important;
        gap: 5px !important;
        padding: 10px;
    }
    .payment-row input, .payment-row button { margin-bottom: 5px !important; width: 100%; }
    
    /* 11. Nav Butonları */
    .lpc-nav button {
        padding: 10px 5px !important;
        font-size: 12px !important;
    }
}