﻿/* ==========================================================================
   1. DEFAULTS & RESET (Nền tảng hệ thống)
   ========================================================================== */
* {
    box-sizing: border-box;
}

body {
    background: #f0f2f5;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333333;
    line-height: 1.6;
}

p {
    margin-bottom: 10px;
    line-height: 1.6em;
}

a:link, a:visited { 
    color: #1a73e8; 
    text-decoration: none; 
    transition: color 0.2s; 
}
a:hover { 
    color: #0d47a1; 
    text-decoration: underline; 
}
a:active { 
    color: #1a73e8; 
}

h1, h2, h3, h4, h5, h6 {
    color: #666666;
    text-transform: none;
    font-weight: 200;
    margin-bottom: 0px;
}
h1 { font-size: 1.6em; }
h2 { font-size: 1.5em; font-weight: 600; }
h3 { font-size: 1.2em; }

.clear { 
    clear: both; 
}

.bold { 
    font-weight: bold; 
}
/* ==========================================================================
   2. MODERN COMPONENT STYLES (Fieldset, Inputs, Buttons)
   ========================================================================== */
fieldset {
    margin: 1em 0px;
    padding: 1em;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    margin-top: 5px;
    margin-bottom: 5px;
}
.panel-reset-card {
    background-color: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 15px;
    margin-top: 15px;
}
legend {
    font-size: 1.1em;
    font-weight: 600;
    padding: 2px 4px 8px 4px;
}
input.textEntry, input.passwordEntry {
    width: 320px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    font-size: 1em;
    transition: border-color 0.2s;
    color: #334155;
}
input.textEntry:focus, input.passwordEntry:focus { 
    border-color: #3b82f6; 
}

/* Style khung hiển thị thông tin dạng Read-Only / Value Box */
.info-field-box {
    display: block;
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f8fafc; /* Nền xám nhẹ tạo cảm giác ô hiển thị dữ liệu */
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 600;
    box-sizing: border-box;
    min-height: 35px; /* Giữ độ cao cố định kể cả khi chuỗi rỗng */
    word-break: break-word;
}

/* Tùy chỉnh nhẹ lại info-item */
.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px; /* Khoảng cách giữa tiêu đề và ô nội dung */
}

.info-item .label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Thiết lập cho class search-input chiếm 100% chiều ngang */
.search-input {
    width: 100% !important;
    max-width: 100% !important; /* Đảm bảo không bị giới hạn bởi max-width nào khác */
    box-sizing: border-box !important; /* Giúp padding không làm ô input bị tràn viền ra ngoài */
    
    /* Các thuộc tính bổ trợ giao diện nếu chưa có */
    padding: 8px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
}

/* Đảm bảo khối bọc ngoài (.search-box) cho phép ô input giãn hết cỡ */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%; /* Khối bọc cũng phải rộng 100% */
    padding: 4px 4px 4px 4px !importantl
}
/* Buttons Style */
.btn-modern {
    display: inline-block;
    width: 100%;
    max-width: 160px;
    padding: 10px 20px;
    font-size: 1em;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-top: 5px;
    margin-bottom: 5px;
}
.btn-modern:active { 
    transform: scale(0.97); 
}

.btn-primary { background-color: #1e3a8a; color: #ffffff !important; }
.btn-primary:hover { background-color: #1d4ed8; }

.btn-success { background-color: #16a34a; color: #ffffff !important; }
.btn-success:hover { background-color: #15803d; }

.btn-secondary {
    background-color: #e2e8f0 !important;
    color: #475569 !important;
}
.btn-secondary:hover {
    background-color: #cbd5e1 !important;
}

/******************************************************************/
/*Format Checkbox*/
.checkbox-wrapper {
    justify-content: flex-end;
    padding-top: 12px; /* Căn lề thẳng hàng với ô input */
    color: #334155;
}
/******************************************************************/
/*Format Dropdownlist*/
.form-select-modern {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background-color: #ffffff;
    color: #334155;
    font-size: 0.95rem;
    outline: none;
    cursor: pointer;
}
/* Custom Select2 cho bằng kích thước với các ô input khác */
.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 4px 6px !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #334155 !important;
    line-height: normal !important;
    padding-left: 4px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    top: 1px !important;
}

.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default .select2-selection--single:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.select2-dropdown {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: #2563eb !important;
}


/* ==========================================================================
   3. GLOBAL MEDIA QUERIES (Quy hoạch toàn bộ Responsive Mobile tại đây)
   ========================================================================== */
@media (max-width: 768px) {
    .page {
        width: 95%;
    }

    .header h1 {
        font-size: 1.35rem !important;
        white-space: nowrap;
    }

    fieldset {
        padding: 15px !important;
        margin: 10px 0 !important;
        width: 100% !important;
    }
    .btn-modern {
        max-width: 49% !important;
        width: 49% !important;
    }
    input.textEntry, input.passwordEntry, .form-select-modern{
        width: 100%  !important;
    }
}