/* ========================================================= */
/* 1. Tá»”NG THá»‚ & RESET (DÃ™NG CHUNG)                          */
/* ========================================================= */
.page-wrapper {
    padding: 15px;
    font-family: var(--theme-font);
    background-color: #fff;
}

    /* Ã‰p font Times New Roman vÃ  size 13px cho táº¥t cáº£ cÃ¡c tháº» con bÃªn trong */
    .page-wrapper * {
        font-family: var(--theme-font);
        font-size: 14px;
    }

    /* Khá»­ lá»—i hiá»ƒn thá»‹ font Icon cá»§a DevExpress */
    .page-wrapper [class*="dx-icon"] {
        font-family: var(--theme-font);
    }

.main-title {
    color: var(--theme-color);
    font-size: 18px !important;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.header-blue {
    color: #333;
    font-weight: bold;
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 20px;
    font-size: 17px;
    letter-spacing: 0.5px;
}
/* ========================================================= */
/* CSS CHO CÃC ÄÆ¯á»œNG LINK (TÃŠN Bá»†NH NHÃ‚N, CHI TIáº¾T...)       */
/* ========================================================= */
.blue-link,
.blue-link:link {
    color: var(--theme-color) !important;
    text-decoration: none !important;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: bold !important; /* NÃªn in Ä‘áº­m tÃªn bá»‡nh nhÃ¢n Ä‘á»ƒ dá»… click */
}

    /* Khi ngÆ°á»i dÃ¹ng click (Active) hoáº·c Ä‘Ã£ tá»«ng click (Visited) -> Ã‰p khÃ´ng cho Ä‘á»•i thÃ nh mÃ u tráº¯ng */
    .blue-link:visited,
    .blue-link:focus {
        color: var(--theme-color) !important;
    }

    /* Khi rÃª chuá»™t hoáº·c Ä‘ang nháº¥n giá»¯ chuá»™t */
    .blue-link:hover,
    .blue-link:active {
        color: #dc3545 !important; /* Chuyá»ƒn sang mÃ u Ä‘á» ná»•i báº­t khi rÃª chuá»™t vÃ o */
        text-decoration: underline !important; /* Hiá»‡n láº¡i gáº¡ch chÃ¢n khi hover */
    }

/* Class tiá»‡n Ã­ch Ä‘á»ƒ chá»§ Ä‘á»™ng báº­t chá»¯ Ä‘áº­m khi cáº§n */
.fw-bold {
    font-weight: bold !important;
}

/* ========================================================= */
/* THANH CÃ”NG Cá»¤ NHá»Ž Gá»ŒN (Tiáº¿t kiá»‡m chiá»u cao mÃ n hÃ¬nh)      */
/* ========================================================= */
.buttons-zone {
    display: flex;
    flex-wrap: wrap; /* Tá»± Ä‘á»™ng rá»›t dÃ²ng náº¿u mÃ n hÃ¬nh nhá» */
    gap: 8px; /* Khoáº£ng cÃ¡ch giá»¯a cÃ¡c nÃºt vá»«a pháº£i */
    padding: 8px 12px; /* Thu nhá» lá» cá»§a khung xÃ¡m */
    background: #f8f9fa; /* Ná»n xÃ¡m nháº¡t tinh táº¿ */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin: 10px 0 15px 0; /* Ã‰p sÃ¡t láº¡i vá»›i cÃ¡c khu vá»±c xung quanh */
}

/* ========================================================= */
/* NÃšT Báº¤M CHUNG TOÃ€N Há»† THá»NG (Gá»n, bo cong, khÃ´ng Ä‘áº­m)     */
/* ========================================================= */
.btn-theme {
    display: inline-block;
    background-color: #f8f9fa !important;
    border: 1px solid #ced4da !important;
    color: #495057 !important;
    padding: 6px 12px !important;
    border-radius: 15px !important;
    /* CÃ¡c thuá»™c tÃ­nh má»›i thÃªm vÃ o Ä‘á»ƒ lÃ m Ä‘áº¹p */
    font-weight: normal !important; /* Gá»¡ bá» chá»¯ in Ä‘áº­m */
    font-size: 13px !important; /* Cá»¡ chá»¯ thanh thoÃ¡t hÆ¡n */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    text-decoration: none !important;
    line-height: normal;
}

    .btn-theme:hover {
    background-color: #e2e6ea !important;
    border-color: #dae0e5 !important;
    color: #212529 !important; 
        box-shadow: 0 4px 6px rgba(0,0,0,0.15) !important;
    }

    /* --- QUAN TRá»ŒNG: Ã‰P LÃ•I DEVEXPRESS --- */
    /* Triá»‡t tiÃªu background xÃ¡m cá»§a tháº» div bÃªn trong ASPxButton */
    .btn-theme .dxb, .btn-outline .dxb,
    .btn-theme .dxbButtonSys, .btn-outline .dxbButtonSys,
    .btn-theme td.dxb, .btn-outline td.dxb {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        color: inherit !important;
        font-weight: normal !important;
        font-size: 13px !important;
    }
/* ========================================================= */
/* KHUNG TÃ€I CHÃNH Äá»˜C Láº¬P (Ã‰p 4 cá»™t PC, Responsive Mobile)  */
/* ========================================================= */
/* ========================================================= */
/* KHUNG TÃ€I CHÃNH Äá»˜C Láº¬P                                   */
/* ========================================================= */
.financial-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    background-color: #fffde7;
    border: 1px dashed #cddc39;
    border-radius: 5px;
    padding: 15px;
    /* 2 lá»‡nh quan trá»ng Ä‘á»ƒ khÃ´ng bá»‹ trÃ n lá» */
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px; /* CÃ¢n Ä‘á»‘i khoáº£ng cÃ¡ch vá»›i hÃ ng LÃ½ do khÃ¡m phÃ­a trÃªn */
}

/* CÃ¡c pháº§n CSS cÃ²n láº¡i (.fin-box-item, @media...) báº¡n cá»© giá»¯ nguyÃªn nhÆ° cÅ© nhÃ© */

.fin-box-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .fin-box-item label {
        font-weight: bold;
        color: #555;
        text-transform: uppercase;
        font-size: 11px;
    }

/* --- RESPONSIVE: Tá»° Äá»˜NG Báºº Cá»˜T TRÃŠN MÃ€N HÃŒNH NHá»Ž --- */

/* MÃ n hÃ¬nh Tablet hoáº·c PC cá»­a sá»• nhá» (dÆ°á»›i 800px) */
@media (max-width: 800px) {
    .financial-box {
        grid-template-columns: repeat(2, 1fr); /* Co vá» 2 cá»™t ngang */
    }
}

/* MÃ n hÃ¬nh Äiá»‡n thoáº¡i (dÆ°á»›i 500px) */
@media (max-width: 500px) {
    .financial-box {
        grid-template-columns: 1fr; /* Tá»± Ä‘á»™ng xáº¿p dá»c 1 cá»™t Ä‘á»ƒ dá»… xem trÃªn mobile */
    }
}
/* ========================================================= */
/* 3. KHU Vá»°C NHáº¬P LIá»†U CHUNG (FORM ZONE)                    */
/* ========================================================= */
.input-row-zone {
    background: #f8f9fa;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

/* ========================================================= */
/* 4. Äá»ŠNH Dáº NG RIÃŠNG TRANG KHÃM Bá»†NH (KhamBenh.aspx)        */
/* ========================================================= */
.transparent-input input {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    font-weight: bold;
    color: #333;
    padding-left: 0 !important;
}

.large-money-input input {
    background-color: transparent !important;
    border: none !important;
    color: red !important;
    font-weight: bold !important;
    font-size: 15px !important;
    text-align: right;
}

.flex-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    align-items: stretch;
}

/* Layout Cá»™t (Mobile máº·c Ä‘á»‹nh lÃ  100%) */
.patient-info-col, .history-col, .flex-col-left, .flex-col-right {
    width: 100%;
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
}

/* DÃ²ng nháº­p cháº©n Ä‘oÃ¡n & Ä‘iá»u trá»‹ */
.input-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

    .input-item label {
        font-weight: bold;
        color: #333;
    }

    .input-item.expand {
        flex: 1;
        min-width: 200px;
    }

/* TÃ i chÃ­nh Footer */
.fin-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #fffde7;
    padding: 15px;
    border: 1px solid #cddc39;
    margin-top: 10px;
}

.fin-item {
    flex: 1 1 15%;
    min-width: 130px;
    display: flex;
    flex-direction: column;
}

    .fin-item span {
        font-size: 12px;
        color: #555;
        font-weight: bold;
        text-transform: uppercase;
        margin-bottom: 3px;
    }

    .fin-item b {
        font-size: 15px !important;
    }

/* ========================================================= */
/* 5. Äá»ŠNH Dáº NG RIÃŠNG TRANG TÃŒM KIáº¾M (Default.aspx)          */
/* ========================================================= */
.search-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    align-items: flex-end;
    width: 100%;
}

.search-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
    min-width: 0;
}

    /* THAY Äá»”I: Chá»¯ nhÃ£n máº·c Ä‘á»‹nh lÃ  THANH Máº¢NH (Normal) */
    .search-item label {
        color: #333;
        font-weight: normal;
        white-space: nowrap;
    }

/* Trong file nks.css */
.search-status-box {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Tá»± Ä‘á»™ng Ä‘áº©y nÃºt Ä‘áº§u lÃªn trÃªn cÃ¹ng, nÃºt sau xuá»‘ng dÆ°á»›i cÃ¹ng */
    height: 62px; /* Chiá»u cao tá»•ng vá»«a khÃ­t báº±ng (Chá»¯ NgÃ y khÃ¡m + Khoáº£ng cÃ¡ch + Ã” TextBox) */
    margin-bottom: 2px; /* Tinh chá»‰nh Ä‘á»ƒ nÃºt "ÄÃ£ khÃ¡m" náº±m vá»«a váº·n vá»›i Ä‘Æ°á»ng chÃ¢n chá»¯ trong TextBox */
    white-space: nowrap;
}

    /* Äáº£m báº£o chá»¯ cá»§a Radio khÃ´ng bá»‹ in Ä‘áº­m */
    .search-status-box label, .search-status-box table {
        font-weight: normal !important;
    }
.search-combined-box {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: nowrap;
}

/* ========================================================= */
/* 6. RESPONSIVE (TÆ¯Æ NG THÃCH ÄIá»†N THOáº I & TABLET)           */
/* ========================================================= */
@media (max-width: 1024px) {
    .search-container {
        flex-wrap: wrap;
    }

    .search-item {
        flex: 1 1 30%;
        min-width: 150px;
    }

        .search-item.large-item {
            flex: 1 1 40%;
        }
}

@media (min-width: 900px) {
    .patient-info-col {
        flex: 1;
        min-width: 600px;
    }

    .history-col {
        flex: 0 0 280px;
        width: 280px;
    }

    .flex-col-left {
        flex: 0 0 180px;
        max-width: 180px;
    }

    /* PC: Cá»™t pháº£i chiáº¿m pháº§n cÃ²n láº¡i (75%) */
    .flex-col-right {
        flex: 1;
        min-width: 0; /* Ráº¥t quan trá»ng: NgÄƒn GridView bÃªn trong phÃ¬nh to phÃ¡ vá»¡ cáº¥u trÃºc */
    }
}

@media (max-width: 600px) {
    .input-item {
        width: 100%;
        justify-content: space-between;
    }

        .input-item.expand {
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }

            .input-item.expand label {
                width: 100%;
            }

    .search-item {
        flex: 1 1 100%;
    }

        .search-item.large-item {
            flex: 1 1 100%;
        }

    .search-status-box {
        justify-content: center;
        border-bottom: 1px dashed #ccc;
        padding-bottom: 10px;
        margin-bottom: 5px;
        height: auto;
    }
    /* ========================================================= */
    /* MÃ€U Äá»Ž NHáº¤N Máº NH CHO CÃC CON Sá» TIá»€N Tá»† (Ghi Ä‘Ã¨ DevExpress)*/
    /* ========================================================= */
    .text-money-red {
        color: #e74c3c !important; /* MÃ£ mÃ u Ä‘á» thanh lá»‹ch */
        font-size: 14px !important;
        font-weight: bold !important;
    }

    /* ========================================================= */
    /* LÃ€M Máº¢NH CHá»® VÃ€ BO GÃ“C NÃšT (AN TOÃ€N TUYá»†T Äá»I)            */
    /* ========================================================= */

    /* Bo gÃ³c vá» ngoÃ i */
    .buttons-zone .btn-theme {
        border-radius: 15px !important;
    }

        /* XÃ³a chá»¯ in Ä‘áº­m Ä‘á»ƒ nÃºt nhÃ¬n nháº¹ nhÃ ng hÆ¡n */
        .buttons-zone .btn-theme span {
            font-weight: normal !important;
            font-size: 13px !important;
        }
    /* ========================================================= */
    /* GIAO DIá»†N POPUP DÃ™NG CHUNG TOÃ€N Há»† THá»NG                  */
    /* ========================================================= */
    body.popup-body {
        margin: 0;
        padding: 0;
        background: #ffffff;
    }

    .popup-container {
        padding: 20px;
        display: flex;
        flex-direction: column;
        gap: 15px;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

        .form-group label {
            font-weight: 600;
            color: #444;
            font-size: 14px;
        }

    .popup-buttons {
        display: flex;
        gap: 10px;
        margin-top: 15px;
    }

    @media (max-width: 400px) {
        .popup-buttons {
            flex-direction: column;
        }
    }


    /* ========================================================= */
/* GIAO DIá»†N POPUP DÃ™NG CHUNG TOÃ€N Há»† THá»NG                  */
/* ========================================================= */
body.popup-body { 
    margin: 0; 
    padding: 0; 
    background: #ffffff; 
}

.popup-container { 
    padding: 10px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.form-group { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
}

.form-group label { 
    font-weight: 600; 
    color: #444; 
    font-size: 14px; 
}

.popup-buttons { 
    display: flex; 
    gap: 10px; 
    margin-top: 5px; 
}

@media (max-width: 400px) {
    .popup-buttons { flex-direction: column; }
}
/* ================= CSS DÃ€NH RIÃŠNG CHO MÃY IN ================= */
        #print-section { display: none; } 
        
        @media print {
            /* 1. áº¨n táº¥t cáº£ nhá»¯ng tháº» cÃ³ class 'no-print' */
            .no-print { display: none !important; }
            
            /* 2. Bá» ná»n, bá» viá»n cá»§a cÃ¡c khung bao ngoÃ i Ä‘á»ƒ giáº¥y tráº¯ng tinh */
            body, .popup-body, .popup-container { background: #fff !important; box-shadow: none !important; border: none !important; padding: 0 !important; margin: 0 !important; }
            
            /* 3. Hiá»ƒn thá»‹ khu vá»±c in lÃªn */
            #print-section { display: block !important; width: 100%; color: #000; font-family: var(--theme-font); }
            @page { size: A5; margin: 15mm; }
            
            .print-header { text-align: center; margin-bottom: 20px; }
            .print-header h2 { margin: 0; font-size: 22px; text-transform: uppercase; font-weight: bold; }
            .print-header p { margin: 3px 0; font-size: 15px; }
            
            .print-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
            .print-table th, .print-table td { border: 1px solid #000; padding: 6px 8px; text-align: left; font-size: 14px; }
            .print-table th { background-color: #f0f0f0; font-weight: bold; }
            .text-center { text-align: center !important; }
        }
}

/* ========================================================= */
/* GLOBAL MODERN UI DESIGN SYSTEM                            */
/* ========================================================= */

.modern-wrapper { padding: 20px; max-width: 100%; margin: 0 auto; font-family: var(--theme-font); }

/* Page Header */
.page-header-container { display: flex; align-items: center; margin-bottom: 25px; padding: 0 10px; }
.page-header-icon { width: 60px; height: 60px; background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: white; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin-right: 20px; box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3); }
.page-header-text h2 { margin: 0; font-size: 24px; font-weight: 800; color: #0f172a; letter-spacing: -0.5px; }
.page-header-text p { margin: 6px 0 0 0; font-size: 14px; color: #64748b; }

/* Cards & Filters */
.modern-card { background: #ffffff; border-radius: 20px; box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05); border: 1px solid #f1f5f9; padding: 25px; margin-bottom: 25px; }
.filter-row { display: flex; gap: 15px; align-items: flex-end; flex-wrap: wrap; background: #ffffff; padding: 15px 20px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.filter-item { display: flex; flex-direction: column; justify-content: flex-end; }
.filter-item .btn-theme { height: 34px !important; display: inline-flex !important; align-items: center; justify-content: center; box-sizing: border-box; }
.filter-item label { display: block; font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }

/* Modern Grid */
.modern-grid { border-radius: 12px; overflow: hidden; border: 1px solid #e2e8f0; }
.modern-grid [class*="dxgvHeader"] { background-color: #f8fafc !important; color: #475569 !important; font-weight: 700 !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: 0.5px; padding: 15px 20px !important; border-bottom: 2px solid #e2e8f0 !important; border-right: none !important; }
.modern-grid [class*="dxgvDataRow"] { transition: background-color 0.2s; }
.modern-grid [class*="dxgvDataRow"]:hover { background-color: #f1f5f9 !important; }
.modern-grid td.dxgv { padding: 16px 20px !important; font-size: 14px; color: #334155; border-bottom: 1px solid #f1f5f9 !important; border-right: none !important; }

/* Action Buttons in Grid */
.btn-grid { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; margin: 0 4px; transition: all 0.2s; font-size: 14px; }
.btn-grid.btn-edit { background-color: #f8f9fa !important; border: 1px solid #ced4da !important; color: #495057 !important; }
.btn-grid.btn-edit:hover { background-color: #e2e6ea !important; border-color: #dae0e5 !important; color: #212529 !important; }
.btn-grid.btn-delete { background-color: #f8f9fa !important; border: 1px solid #ced4da !important; color: #495057 !important; }
.btn-grid.btn-delete:hover { background-color: #e2e6ea !important; border-color: #dae0e5 !important; color: #212529 !important; }

/* Standard Modern Buttons */
.btn-modern { padding: 12px 24px !important; border-radius: 8px !important; font-size: 14px !important; font-weight: 600 !important; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; justify-content: center; border: none; text-decoration: none; }
.btn-modern:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn-modern:active { transform: translateY(0); }
.btn-primary { background-color: #f8f9fa !important; border: 1px solid #ced4da !important; color: #495057 !important; }
.btn-primary:hover { background-color: #e2e6ea !important; border-color: #dae0e5 !important; color: #212529 !important; }
.btn-success { background-color: #f8f9fa !important; border: 1px solid #ced4da !important; color: #495057 !important; }
.btn-success:hover { background-color: #e2e6ea !important; border-color: #dae0e5 !important; color: #212529 !important; }
.btn-outline { background-color: #f8f9fa !important; border: 1px solid #ced4da !important; color: #495057 !important; border-radius: 15px !important; padding: 6px 12px !important; }
.btn-outline:hover { background-color: #e2e6ea !important; color: #212529 !important; border-color: #dae0e5 !important; }

/* DevExpress Modals & Controls */
.dxpc-header { border-top-left-radius: 20px !important; border-top-right-radius: 20px !important; background: #ffffff !important; color: #0f172a !important; border-bottom: 1px solid #f1f5f9 !important; padding: 20px 24px !important; font-weight: 800 !important; text-transform: uppercase; letter-spacing: 0.5px; }
.dxpc-content { border-bottom-left-radius: 20px !important; border-bottom-right-radius: 20px !important; padding: 30px 35px !important; background: #f8fafc !important; }
.dxeTextBoxSys, .dxeComboBoxSys, .dxeSpinEditSys, .dxeMemoSys { border-radius: 8px !important; border: 1px solid #cbd5e1 !important; box-shadow: 0 1px 2px rgba(0,0,0,0.02) inset; font-family: var(--theme-font); background: #fff !important; overflow: hidden; }

/* Phá»¥c há»“i mÃ u dÃ²ng chá»n trong báº£ng lÆ°á»›i (Grid FocusedRow) vá» mÃ u xÃ¡m nháº¡t nhÆ° cÅ© */
.dxgvFocusedRow_MaterialCompact,
.dxgvFocusedRow_MaterialCompact td {
    background-color: #f5f5f5 !important;
    color: #333333 !important;
    font-weight: bold !important;
}

/* Hide focused cell border in DevExpress Grids */
.dxgvFocusedCell, .dxgvFocusedCell_MaterialCompact, .dxgvFocusedCell_Moderno { outline: none !important; box-shadow: none !important; border-color: transparent !important; border-width: 0 !important; }





/* Hide text cursor in data rows to prevent confusion */
.dxgvDataRow, .dxgvDataRow_MaterialCompact, .dxgvDataRow *, .dxgvDataRow_MaterialCompact * { caret-color: transparent !important; user-select: none !important; -moz-user-select: none !important; -webkit-user-select: none !important; -ms-user-select: none !important; }




.dxgvDataRow input[type="text"], .dxgvDataRow textarea, .dxgvDataRow_MaterialCompact input[type="text"], .dxgvDataRow_MaterialCompact textarea { caret-color: auto !important; user-select: text !important; -moz-user-select: text !important; -webkit-user-select: text !important; -ms-user-select: text !important; }




/* Äá»“ng bá»™ Toolbar Buttons cá»§a DevExpress vá»›i btn-outline */
.dxgvToolbar_MaterialCompact .dxm-item,
.dxgvToolbar_MaterialCompact .dxm-item.dxm-hovered {
    background-color: #ffffff !important;
    border: 1px solid var(--dx-base-color, #3b82f6) !important;
    color: var(--dx-base-color, #3b82f6) !important;
    border-radius: 15px !important;
    padding: 6px 15px !important;
    margin-right: 10px !important;
}
.dxgvToolbar_MaterialCompact .dxm-item.dxm-hovered {
    background-color: var(--dx-base-color, #3b82f6) !important;
    color: #ffffff !important;
}
.dxgvToolbar_MaterialCompact .dxm-item .dxm-content,
.dxgvToolbar_MaterialCompact .dxm-item.dxm-hovered .dxm-content {
    color: inherit !important;
}


/* --- Sá»¬A Lá»–I MÃ€U CHECKBOX Bá»Š TRáº®NG (Máº¤T TÃCH) KHI CHá»ŒN DÃ’NG TRONG Báº¢NG LÆ¯á»šI --- */
.dxgvFocusedRow_MaterialCompact .dxWeb_edtCheckBoxChecked_MaterialCompact svg path,
.dxgvSelectedRow_MaterialCompact .dxWeb_edtCheckBoxChecked_MaterialCompact svg path,
.dxgvFocusedRow_MaterialCompact span[class*="dxWeb_edtCheckBoxChecked"] svg path,
.dxgvSelectedRow_MaterialCompact span[class*="dxWeb_edtCheckBoxChecked"] svg path {
    fill: var(--dx-base-color, #3b82f6) !important;
}

.dxgvFocusedRow_MaterialCompact .dxWeb_edtCheckBoxUnchecked_MaterialCompact svg path,
.dxgvSelectedRow_MaterialCompact .dxWeb_edtCheckBoxUnchecked_MaterialCompact svg path,
.dxgvFocusedRow_MaterialCompact span[class*="dxWeb_edtCheckBoxUnchecked"] svg path,
.dxgvSelectedRow_MaterialCompact span[class*="dxWeb_edtCheckBoxUnchecked"] svg path {
    fill: #94a3b8 !important;
}

/* --- KHOáº¢NG CÃCH GIá»®A CÃC NÃšT THAO TÃC (Sá»¬A/XÃ“A) TRONG LÆ¯á»šI --- */
.action-buttons-container {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}



















.btn-outline .dxb, .btn-outline span, .btn-outline .dx-vam { color: inherit !important; }



.btn-primary .dxb, .btn-primary span, .btn-success .dxb, .btn-success span { color: inherit !important; }


/* --- Äá»’NG Bá»˜ MÃ€U ICON (FONT AWESOME) GIá»NG Vá»šI DEVEXPRESS (KHÃM Bá»†NH) --- */
.btn-theme .fa-edit, .btn-theme .fa-pencil-alt,
.btn-outline .fa-edit, .btn-outline .fa-pencil-alt {
    color: #eab308 !important; /* VÃ ng cam giá»‘ng icon sá»­a cá»§a DevExpress */
}

.btn-theme .fa-trash-alt, .btn-theme .fa-trash,
.btn-outline .fa-trash-alt, .btn-outline .fa-trash {
    color: #ef4444 !important; /* Äá» giá»‘ng icon xÃ³a cá»§a DevExpress */
}

.btn-theme .fa-plus, .btn-theme .fa-plus-circle,
.btn-outline .fa-plus, .btn-outline .fa-plus-circle {
    color: #3b82f6 !important; /* Xanh dÆ°Æ¡ng giá»‘ng icon thÃªm cá»§a DevExpress */
}

.btn-theme .fa-sync, .btn-theme .fa-redo, .btn-theme .fa-sync-alt,
.btn-outline .fa-sync, .btn-outline .fa-redo, .btn-outline .fa-sync-alt {
    color: #10b981 !important; /* Xanh lÃ¡ hoáº·c xanh dÆ°Æ¡ng cho nÃºt lÃ m má»›i */
}

.btn-theme .fa-search { color: #3b82f6 !important; /* Xanh dÆ°Æ¡ng cho TÃ¬m kiáº¿m */ }
.btn-theme .fa-print { color: #8b5cf6 !important; /* TÃ­m/XÃ¡m cho In bÃ¡o cÃ¡o */ }


/* --- FIX CHECKBOX COLOR IN NORMAL ROWS --- */
.dxgvDataRow_MaterialCompact span[class*="dxWeb_edtCheckBoxUnchecked"] svg path,
.dxgvDataRow_MaterialCompact .dxWeb_edtCheckBoxUnchecked_MaterialCompact svg path {
    fill: #64748b !important;
}
.dxgvDataRow_MaterialCompact span[class*="dxWeb_edtCheckBoxChecked"] svg path,
.dxgvDataRow_MaterialCompact .dxWeb_edtCheckBoxChecked_MaterialCompact svg path {
    fill: #3b82f6 !important;
}


/* --- FIX GLOBAL ASPXROUNDPANEL TO MODERN CARD --- */
.dxrpControl_Default, .dxrpControl_MaterialCompact, .dxrpControl {
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}
.dxrpHeader_Default, .dxrpHeader_MaterialCompact, .dxrpHC {
    background: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: none !important; border-left: none !important; border-right: none !important;
    color: #1e293b !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    padding: 16px 20px !important;
}
.dxrpContent_Default, .dxrpContent_MaterialCompact, .dxrpCC {
    padding: 20px !important;
    background: transparent !important;
}


/* --- MOBILE OPTIMIZATION & RESPONSIVE GRID --- */
@media (max-width: 768px) {
    /* Panels become stackable on mobile */
    .flex-col-left, .flex-col-right { width: 100% !important; float: none !important; margin: 0 !important; }
    
    
    .row { display: flex; flex-direction: column; gap: 10px; }
    .col-md-2, .col-md-4, .col-md-5, .col-md-6, .col-md-8, .col-md-1, .col-md-12, .col-lg-8, .col-lg-4 { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; margin-bottom: 10px; }
    .form-row { flex-direction: column; align-items: flex-start; }
    .form-label { width: 100% !important; text-align: left !important; margin-bottom: 4px; }
    .action-bar, .buttons-row-full { flex-direction: column; width: 100%; gap: 10px; }
    .btn-theme, .btn-action { width: 100% !important; display: block !important; margin: 0 !important; }
    .modern-card, .card-panel { padding: 10px !important; }
    /* Scroll tables on mobile */
    .table-wrapper, .grid-wrapper, .grid-container { overflow-x: auto !important; -webkit-overflow-scrolling: touch; width: 100%; max-width: 100vw; }
}


