﻿:root {
    --primary: #003366;
    --accent: #00A69B;
    --text-dark: #333;
    --bg-body: #f4f7f6;
    --white: #ffffff;
}

/* Reset & Base - Đã tăng cỡ chữ gốc lên 16px */
body {
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    font-size: 16px;
}

.app-wrapper {
    width: 98%;
    margin: 15px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Header */
.app-header {
    background: #003366;
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 15px; /* Tăng cỡ chữ panel người dùng */
}

    .user-panel a {
        color: #fff;
        text-decoration: none;
        opacity: 0.9;
        transition: 0.3s;
    }

        .user-panel a:hover {
            opacity: 1;
            color: #00A69B;
        }

/* Navigation */
.app-nav {
    background: #00A69B;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .nav-menu > li > a {
        color: #fff;
        padding: 15px 25px;
        display: block;
        text-decoration: none;
        font-weight: 600;
        font-size: 15px; /* Tăng cỡ chữ menu chính */
        transition: 0.3s;
    }

    .nav-menu > li:hover {
        background: #008f85;
    }

/* Submenu */
.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li {
    padding: 0;
    margin: 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

    .submenu li a {
        padding: 10px 20px;
        display: block;
        text-decoration: none;
        color: #333;
        white-space: nowrap;
        font-size: 15px; /* Tăng cỡ chữ menu con */
    }

        .submenu li a:hover {
            background: #f4f4f4;
            color: #00A69B;
        }

/* Content Area */
.page-title-box {
    padding: 10px 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-weight: 700;
    color: #003366;
}

.content-body {
    padding: 10px;
    min-height: 600px;
}

.wrapper {
    width: 98%;
    max-width: 98%;
    margin: 20px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}

.header {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
}

.nameHR {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
}

/* =========================
   FORM ELEMENTS & CONTROLS
========================= */
.form-control {
    width: 100%;
    padding: 8px 14px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    height: 40px;
}

    .form-control:focus {
        border-color: #00A69B;
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 166, 155, 0.15);
    }

textarea.form-control {
    height: auto;
    min-height: 220px;
    resize: vertical;
}

/* =========================
   BUTTONS (Đã tối ưu lại độ rộng)
========================= */
.btn {
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
}

    .btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,.12);
    }

.btn-success {
    background: #198754;
}

    .btn-success:hover {
        background: #157347;
    }

.btn-primary {
    background: #0d6efd;
}

    .btn-primary:hover {
        background: #0b5ed7;
    }

.btn-secondary {
    background: #F59E0B;
    color: #fff;
}

    .btn-secondary:hover {
        background: #d97706;
    }

.btn-danger {
    background: #dc3545;
}

    .btn-danger:hover {
        background: #bb2d3b;
    }

.btn-info {
    background: #0dcaf0;
    color: #fff;
}

    .btn-info:hover {
        background: #31d2f2;
    }

/* =========================
   CARDS & LAYOUT GITHUB/ADMIN
========================= */
.card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,.04);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    padding: 14px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #003366;
    border-bottom: 1px solid #e5e7eb;
}

.card-body {
    padding: 10px;
	max-height: 600px; overflow-y: auto; overflow-x: auto;
	
}

/* =========================
   BỐ CỤC 3 CỘT
========================= */
.form-layout-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
    align-items: stretch;
}

.form-layout-3cols {
    display: grid;
    grid-template-columns: 320px 320px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media(max-width: 1400px) {
    .form-layout-3cols {
        grid-template-columns: 1fr;
    }
}

.form-layout-grid .card {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.form-layout-grid .card-header {
    background: linear-gradient(135deg,#003366,#005792);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 18px;
    border: 0;
}

.form-layout-grid .card-body {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    width: 429px;
}

/* Form */
.form-item {
    margin-bottom: 15px;
}

    .form-item label {
        display: block;
        margin-bottom: 6px;
        font-weight: 600;
        color: #2c3e50;
    }

/* Checkbox */
.form-item-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

/* Button Group */
.button-group {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .button-group .btn {
        flex: 0 1 auto;
        min-width: 90px;
    }

/* Hướng dẫn */
.guide-box {
    background: #f8fafc;
    border: 1px dashed #b6c2cf;
    border-radius: 8px;
    padding: 12px;
    line-height: 1.8;
}

    .guide-box ul {
        margin: 0;
        padding-left: 20px;
    }

    .guide-box li {
        margin-bottom: 8px;
        color: #555;
    }

/* Responsive */
@media (max-width:1200px) {
    .form-layout-grid {
        grid-template-columns: 1fr 1fr;
    }

        .form-layout-grid .card:last-child {
            grid-column: 1 / span 2;
        }
}

@media (max-width:768px) {
    .form-layout-grid {
        grid-template-columns: 1fr;
    }

        .form-layout-grid .card:last-child {
            grid-column: auto;
        }

    .button-group {
        flex-direction: column;
    }

        .button-group .btn {
            width: 100%;
        }
}

/* ================= TÙY CHỈNH KHU VỰC TÌM KIẾM ================= */
.search-card .card-body {
    padding: 15px 20px;
}

.search-inline-group {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    max-width: 480px;
}

    .search-inline-group .form-item {
        flex: 1;
        margin-bottom: 0 !important;
    }

/* =========================
   GRIDVIEW / TABLE
========================= */
.table-wrapper, .table-responsive {
    width: 100%;
    overflow-x: auto;
    margin: 0 auto;
}

.mGrid {
    width: 100% !important;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dee2e6;
    margin-top: 10px;
    font-size: 13px; /* Đã thêm: Giảm cỡ chữ tổng thể cho bảng */
}

    .mGrid th {
        background-color: #003366 !important;
        color: #ffffff !important;
        padding: 14px;
        text-align: center !important;
        font-weight: normal !important; /* Bỏ in đậm chữ tiêu đề dòng/cột */
        border: 1px solid #002244;
        white-space: nowrap;
    }

    .mGrid td {
        padding: 12px 14px;
        border: 1px solid #e5e7eb;
        color: #333;
        font-weight: normal; /* Đảm bảo chữ ở các ô dữ liệu không bị in đậm */
        vertical-align: middle;
    }

    .mGrid tr:nth-child(even) {
        background-color: #f9fafb;
    }

    .mGrid tr:hover {
        background-color: #eef6ff !important;
    }
/* =========================
   STATUS & BADGES
========================= */
.status-open {
    display: inline-block;
    color: #198754;
    background: #e9f8ee;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.status-lock {
    display: inline-block;
    color: #dc3545;
    background: #fdecec;
    padding: 5px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

/* Action Buttons inside Grid */
.btn-grid {
    display: inline-block;
    padding: 6px 12px;
    margin: 2px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
    transition: .2s;
}

.btn-edit {
    color: #0d6efd;
    background: #e7f1ff;
}

    .btn-edit:hover {
        background: #cfe2ff;
    }

.btn-lock {
    color: #fd7e14;
    background: #fff3cd;
}

    .btn-lock:hover {
        background: #ffe69c;
    }

.btn-delete {
    color: #dc3545;
    background: #fde2e4;
}

    .btn-delete:hover {
        background: #f8c7cc;
    }

/* =========================
   PAGE TITLE STYLING
========================= */
.page-title {
    display: inline-block;
    background: #ffebee;
    color: #c62828;
    border-left: 6px solid #d32f2f;
    padding: 10px 18px;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(211,47,47,.2);
    margin-bottom: 20px;
}

    .page-title i {
        color: var(--accent);
        font-size: 20px;
    }

.form-item label,
.form-item span.form-label {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 4px;
    white-space: nowrap;
    user-select: none;
}

.form-item .checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    cursor: pointer;
}

    .form-item .checkbox-inline input[type="checkbox"] {
        width: 18px;
        height: 18px;
        cursor: pointer;
        accent-color: #00A69B;
    }

    .form-item .checkbox-inline span {
        font-size: 15px;
        font-weight: 500;
        color: #333;
    }

.form-control.text-end,
input.txt-data-input {
    text-align: right;
}

.don-vi-tinh-right {
    font-size: 14px;
    font-style: italic;
    color: #d32f2f;
    text-align: right;
    display: block;
    font-weight: 500;
}

.tenbieu {
    font-size: 16px;
    font-weight: 700;
    color: #0b5ed7;
    background: transparent;
    padding: 2px 0;
    border: none;
    box-shadow: none;
    display: block;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Khối Logo */
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.logo-icon {
    width: 52px;
    height: 52px;
    object-fit: contain;
    padding: 6px;
    transition: transform 0.3s ease;
}

.logo-area:hover .logo-icon {
    transform: scale(1.05);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/* Container giới hạn độ cao & cuộn nhẹ nếu có quá nhiều năm */
.checkbox-nam-container {
    width: 100%;
    max-height: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 0;
    margin-bottom: 6px;
}

/* Xóa bỏ dấu chấm đầu dòng ul/li và căn dàn hàng ngang */
ul.custom-checkbox-list,
.custom-checkbox-list {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important; /* Tự xuống dòng nếu quá nhiều năm */
    gap: 5px !important; /* Khoảng cách nhỏ giữa các nút */
}

    /* Định dạng từng dòng thẻ li */
    .custom-checkbox-list li {
        list-style: none !important;
        list-style-type: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: inline-flex !important;
    }

    /* Thiết kế thẻ Năm dạng Badges/Chips nhỏ gọn */
    .custom-checkbox-list label {
        display: inline-flex !important;
        align-items: center !important;
        gap: 4px !important;
        padding: 2px 8px !important;
        background-color: #f8f9fa;
        border: 1px solid #ced4da;
        border-radius: 4px;
        font-size: 11px !important; /* Chữ nhỏ nhắn hợp với bộ lọc */
        font-weight: 500;
        color: #495057;
        cursor: pointer;
        user-select: none;
        line-height: 1.2;
        transition: all 0.15s ease-in-out;
    }

        /* Hiệu ứng rê chuột */
        .custom-checkbox-list label:hover {
            background-color: #e9ecef;
            border-color: #adb5bd;
        }

    /* Thu nhỏ checkbox chuẩn tỉ lệ */
    .custom-checkbox-list input[type="checkbox"] {
        width: 13px !important;
        height: 13px !important;
        margin: 0 !important;
        padding: 0 !important;
        cursor: pointer;
        accent-color: #0d6efd; /* Màu xanh lá/dương khi tick */
        vertical-align: middle;
    }

    /* Đổi màu nổi bật khi Năm đó được tích chọn */
    .custom-checkbox-list label:has(input[type="checkbox"]:checked) {
        background-color: #e7f1ff !important;
        border-color: #86b7fe !important;
        color: #0d6efd !important;
        font-weight: 600;
    }