* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --dark-bg: #121212; --sidebar-bg: #1A1A1A; --light-bg: #F4F7FA;
    --accent-color: #D4AF37; --text-main: #1C1C1C;
    --text-muted: #6B6B6B; --border-color: #EAEAEA;
    --success: #10B981; --warning: #F59E0B; --danger: #EF4444;
}

/* Səhifə sığortası: Horizontal scroll bloklanır */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body { font-family: 'Poppins', sans-serif; background-color: var(--light-bg); color: var(--text-main); display: flex; min-height: 100vh; }
a { text-decoration: none; color: inherit; }
button { font-family: 'Poppins', sans-serif; cursor: pointer; outline: none; transition: 0.3s; }

/* ========================================= */
/* MAIN CONTENT & HEADER                    */
/* ========================================= */
.main-content { 
    flex: 1; 
    margin-left: 280px; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh;
    width: calc(100% - 280px);
}

.top-header { 
    background: #fff; 
    padding: 20px 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    border-bottom: 1px solid var(--border-color); 
    position: sticky; 
    top: 0; 
    z-index: 50; 
}

.search-bar { display: flex; align-items: center; background: var(--light-bg); padding: 10px 20px; border-radius: 8px; width: 350px; gap: 10px; }
.search-bar input { border: none; background: transparent; font-family: 'Poppins', sans-serif; font-size: 14px; width: 100%; outline: none; }

.dashboard-container { padding: 40px; width: 100%; }

/* ========================================= */
/* REZERVASIYALAR LAYOUT                    */
/* ========================================= */
.page-header-flex { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 25px; gap: 15px; }
.page-title { font-size: 26px; font-weight: 700; }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 5px; }

.btn-outline { background: #fff; color: var(--text-main); border: 1px solid var(--border-color); padding: 10px 20px; border-radius: 8px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn-outline:hover { border-color: var(--accent-color); color: var(--accent-color); }

/* Filter Tabları - Mobildə sürüşən etdik */
.filter-tabs { 
    display: flex; 
    gap: 10px; 
    margin-bottom: 25px; 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 10px; 
    overflow-x: auto; 
    scrollbar-width: none; 
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab { background: none; border: none; font-size: 13px; font-weight: 500; color: var(--text-muted); padding: 8px 16px; border-radius: 20px; white-space: nowrap; }
.filter-tab.active { background: var(--dark-bg); color: #fff; }

/* Cədvəl Sığortası */
.table-section { background: #fff; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: 0 10px 30px rgba(0,0,0,0.02); overflow: hidden; width: 100%; }
.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 950px; }
th { text-align: left; padding: 18px 25px; font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; background: var(--light-bg); border-bottom: 1px solid var(--border-color); }
td { padding: 18px 25px; font-size: 14px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }

.order-id { font-weight: 700; color: var(--accent-color); }
.status-badge { padding: 6px 12px; border-radius: 30px; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.status-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.status-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.status-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

/* ========================================= */
/* MODAL RESPONSİVLİK                       */
/* ========================================= */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 1000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: 0.3s; padding: 15px; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-content { background: #fff; width: 100%; max-width: 700px; border-radius: 20px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; }
.modal-body { padding: 25px; overflow-y: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; margin-bottom: 25px; }

/* ========================================= */
/* 📱 MEDIA QUERIES                         */
/* ========================================= */

@media (max-width: 1200px) {
    .main-content { margin-left: 0; width: 100%; }
    .top-header { padding: 15px 25px; }
}

@media (max-width: 768px) {
    .top-header { flex-wrap: wrap; padding: 10px 15px; gap: 10px; }
    .search-bar { order: 3; width: 100%; display: flex !important; }
    
    .dashboard-container { padding: 20px 15px; }
    .page-header-flex { flex-direction: column; align-items: flex-start; }
    .btn-outline { width: 100%; justify-content: center; }
    
    .detail-grid { grid-template-columns: 1fr; gap: 20px; }
    .modal-header { padding: 15px 20px; }
    .modal-title { font-size: 15px; flex-wrap: wrap; }
    
    .modal-footer { flex-direction: column; padding: 15px 20px; }
    .modal-footer button { width: 100%; }
}

@media (max-width: 480px) {
    .page-title { font-size: 20px; }
    .receipt-total { font-size: 16px; }
}


/* ========================================= */
/* ⚡️ DÜYMƏ DİZAYNLARINI MƏCBURİ BƏRPA ET    */
/* ========================================= */

/* Hesabat Çıxart (Btn Outline) */
.btn-outline {
    background-color: #ffffff !important;
    color: #1c1c1c !important;
    border: 1px solid #eaeaea !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.btn-outline:hover {
    border-color: #D4AF37 !important;
    color: #D4AF37 !important;
    background-color: #fff !important;
}

/* Bax Düyməsi (Btn View) */
.btn-view {
    background-color: #F4F7FA !important;
    color: #1c1c1c !important;
    border: 1px solid #eaeaea !important;
    padding: 8px 14px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.btn-view:hover {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
    border-color: #1a1a1a !important;
}

/* Modal daxilindəki əməliyyat düymələri */
.btn-action-cancel {
    background-color: #ffffff !important;
    color: #EF4444 !important;
    border: 1px solid #EF4444 !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.btn-action-approve {
    background-color: #1A1A1A !important;
    color: #ffffff !important;
    border: none !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

/* Mobildə düymələrin düzülüşü */
@media (max-width: 768px) {
    .page-header-flex .btn-outline {
        width: 100% !important;
        justify-content: center !important;
        margin-top: 10px !important;
    }

    .modal-footer {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .modal-footer button {
        width: 100% !important;
    }
}