/* General Styling */
:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --light-gray: #f8f9fa;
    --dark-text: #343a40;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Header */
header {
    background-color: #fff;
    padding: 10px 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    height: 50px;
    display: block;
}

.filter-toggle {
    text-align: center;
    margin-top: 10px;
}

#toggleFilterBtn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9em;
    text-decoration: underline;
}

.filter-container {
    background-color: #f1f3f5;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid #e9ecef;
}

.filter-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 5px;
    color: #495057;
}

.filter-group select {
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background-color: #fff;
    font-size: 0.95em;
}

/* Persistent Search Wrapper */
.search-wrapper {
    background-color: #fff;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}
.search-container {
    max-width: 960px;
    margin: 0 auto;
}

.search-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.95em;
    text-decoration: underline;
}

/* NEW: Excel Button Style */
.btn-excel {
    background-color: #28a745; /* Màu xanh Excel */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-excel:hover {
    background-color: #218838;
}

#searchInput {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
}

#searchInput:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
}

/* Landing Section */
.landing-container {
    max-width: 960px;
    margin: 40px auto;
    text-align: center;
    padding: 20px;
}

.landing-container h1 {
    color: var(--primary-color);
    font-size: 2.8em;
    margin-bottom: 10px;
}

.landing-container h2 {
    font-weight: 300;
    margin-bottom: 40px;
}

/* Infographic */
.infographic-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
    text-align: left;
}

.infographic-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 25px;
    flex: 1;
    border-top: 4px solid var(--secondary-color);
}

.infographic-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.description {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
    color: #6c757d;
}

.action-buttons button {
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #fff;
    transition: all 0.3s;
    margin: 10px;
}

.action-buttons button:hover {
    background-color: #004494;
    transform: translateY(-2px);
}

/* Tables Section */
.hidden {
    display: none !important;
}

.tables-container {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.table-wrapper {
    flex: 1;
    min-width: 45%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.table-wrapper h3 {
    text-align: center;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.table-content {
    max-height: 65vh;
    overflow-y: auto;
}

table{width:100%;border-collapse:collapse}th,td{padding:12px;border:1px solid var(--border-color);text-align:left}thead{background-color:#f2f2f2;position:sticky;top:0}tbody tr:nth-child(even){background-color:#f9f9f9}tbody tr:hover{background-color:#e9ecef;cursor:pointer}.highlight{background-color:#ffc107!important}.pagination{margin-top:15px;text-align:center;padding-bottom:10px;}.pagination button{padding:8px 12px;margin:2px;cursor:pointer;border:1px solid var(--primary-color);background-color:#fff;color:var(--primary-color);border-radius:3px}.pagination button:disabled{cursor:not-allowed;opacity:.5}.pagination button.active{background-color:var(--primary-color);color:#fff}

/* Footer */
footer {
    background-color: var(--dark-text);
    color: #f8f9fa;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer p {
    margin: 5px 0;
}
/* General Styling */
:root {
    --primary-color: #0056b3;
    --secondary-color: #007bff;
    --light-gray: #f8f9fa;
    --dark-text: #343a40;
    --border-color: #dee2e6;
    --card-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--dark-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Header */
header {
    background-color: #fff;
    padding: 10px 40px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo {
    height: 50px;
    display: block;
}

/* Persistent Search Wrapper */
.search-wrapper {
    background-color: #fff;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}
.search-container {
    max-width: 960px;
    margin: 0 auto;
}

#searchInput {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    box-sizing: border-box;
}

#searchInput:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.25);
}

/* Landing Section */
.landing-container {
    max-width: 960px;
    margin: 40px auto;
    text-align: center;
    padding: 20px;
}

.landing-container h1 {
    color: var(--primary-color);
    font-size: 2.8em;
    margin-bottom: 10px;
}

.landing-container h2 {
    font-weight: 300;
    margin-bottom: 40px;
}

/* Infographic */
.infographic-grid {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-bottom: 40px;
    text-align: left;
}

.infographic-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: 25px;
    flex: 1;
    border-top: 4px solid var(--secondary-color);
}

.infographic-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.description {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 1.1em;
    color: #6c757d;
}

.action-buttons button {
    padding: 12px 25px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: var(--primary-color);
    color: #fff;
    transition: all 0.3s;
    margin: 10px;
}

.action-buttons button:hover {
    background-color: #004494;
    transform: translateY(-2px);
}

/* Tables Section */
.hidden {
    display: none !important;
}

.tables-container {
    display: flex;
    gap: 20px;
    padding: 20px;
}

.table-wrapper {
    flex: 1;
    min-width: 45%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
}

.table-wrapper h3 {
    text-align: center;
    color: var(--primary-color);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.table-content {
    max-height: 65vh;
    overflow-y: auto;
}

table{width:100%;border-collapse:collapse}th,td{padding:12px;border:1px solid var(--border-color);text-align:left}thead{background-color:#f2f2f2;position:sticky;top:0}tbody tr:nth-child(even){background-color:#f9f9f9}tbody tr:hover{background-color:#e9ecef;cursor:pointer}.highlight{background-color:#ffc107!important}.pagination{margin-top:15px;text-align:center;padding-bottom:10px;}.pagination button{padding:8px 12px;margin:2px;cursor:pointer;border:1px solid var(--primary-color);background-color:#fff;color:var(--primary-color);border-radius:3px}.pagination button:disabled{cursor:not-allowed;opacity:.5}.pagination button.active{background-color:var(--primary-color);color:#fff}

/* Footer */
footer {
    background-color: var(--dark-text);
    color: #f8f9fa;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

footer p {
    margin: 5px 0;
}

/* ======================================================= */
/* === RESPONSIVE DESIGN FOR MOBILE & TABLET === */
/* ======================================================= */
@media (max-width: 768px) {
    header {
        padding: 10px 20px;
        text-align: center;
    }
    
    .landing-container h1 {
        font-size: 2em;
    }
    
    .landing-container h2 {
        font-size: 1.2em;
    }

    .infographic-grid, .tables-container {
        flex-direction: column;
    }

    .action-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .table-content {
        /* Allow horizontal scroll on small screens */
        overflow-x: auto;
    }
    .filter-row {
        flex-direction: column;
    }

}

.tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 25px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Viewer Search Box */
.viewer-search {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    margin-bottom: 20px;
    box-sizing: border-box;
}
.viewer-search:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* ======================================================= */
/* === PHÂN LOẠI PTTT (MỚI THÊM) === */
/* ======================================================= */
.col-pttt {
    text-align: center;
    font-weight: bold;
    width: 100px;
}
.pttt-loai {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: #e9ecef;
    color: var(--dark-text);
    cursor: help;
    font-size: 0.9em;
}
.pttt-loai:hover {
    background-color: var(--secondary-color);
    color: #fff;
}
/* ======================================================= */
/* === RESPONSIVE DESIGN FOR MOBILE & TABLET === */
/* ======================================================= */
@media (max-width: 768px) {
    header {
        padding: 10px 20px;
        text-align: center;
    }
    
    .landing-container h1 {
        font-size: 2em;
    }
    
    .landing-container h2 {
        font-size: 1.2em;
    }

    .infographic-grid, .tables-container {
        flex-direction: column;
    }

    .action-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .table-content {
        /* Allow horizontal scroll on small screens */
        overflow-x: auto;
    }
}