﻿/* ================================
   UFM PORTAL STANDARD STYLE
   Dung chung cho cac trang Portal
================================ */

/* ===== Page Layout ===== */
.ufm-page {
    background: #f4f7fb;
    padding: 16px;
    border-radius: 12px;
}

.ufm-page-header {
    background: linear-gradient(135deg, #005496, #0277bd);
    color: #fff;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 16px;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

    .ufm-page-header h4,
    .ufm-page-header .ufm-page-title {
        margin: 0;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .3px;
        text-align: center;
        color: #fff;
    }

/* ===== Section / Box ===== */
.ufm-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    margin-bottom: 14px;
}

.ufm-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #005496;
    margin-bottom: 12px;
    text-transform: uppercase;
}

/* ===== Form ===== */
.ufm-form-label,
.ufm-section .form-label {
    font-size: 13px;
    font-weight: 700;
    color: #495057;
    margin-bottom: 5px;
}

/* ===== Buttons ===== */
.btn-ufm {
    background-color: #005496 !important;
    border-color: #005496 !important;
    color: #fff !important;
    font-weight: 700;
}

    .btn-ufm:hover,
    .btn-ufm:focus {
        background-color: #0277bd !important;
        border-color: #0277bd !important;
        color: #fff !important;
    }

/* ===== Tabs ===== */
.ufm-tabs {
    border-bottom: 2px solid #005496;
    margin-bottom: 16px;
}

    .ufm-tabs .nav-link {
        color: #495057;
        font-weight: 600;
        border: none;
        padding: 10px 20px;
        text-transform: uppercase;
        font-size: 13px;
    }

        .ufm-tabs .nav-link.active {
            color: #fff !important;
            background-color: #005496 !important;
            border-top-left-radius: 8px;
            border-top-right-radius: 8px;
        }

/* ===== Grid / Table ===== */
.ufm-grid-wrap {
    max-height: none !important;
    overflow: visible !important;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    background: #fff;
    width: 100%;
}

.ufm-grid {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.95rem;
    margin-bottom: 0;
    width: 100% !important;
    table-layout: auto;
}

    .ufm-grid th {
        background-color: #005496 !important;
        color: #fff !important;
        text-transform: uppercase !important;
        font-weight: 600;
        padding: 12px;
        text-align: center;
        vertical-align: middle;
        position: static;
        top: auto;
        z-index: auto;
    }

    .ufm-grid td {
        vertical-align: middle;
        padding: 8px 12px;
    }

    .ufm-grid tfoot,
    .ufm-grid .footer,
    .ufm-grid-footer {
        background-color: #005496 !important;
        color: #fff !important;
        font-weight: 700;
    }

/* ===== Card Header ===== */
.ufm-card-title {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #005496;
}

/* ===== Utilities ===== */
.ufm-text-center {
    text-align: center !important;
}

.ufm-text-end {
    text-align: right !important;
}

.ufm-badge-total {
    background-color: #005496;
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 700;
}

/* ===== KPI Cards ===== */
.ufm-kpi-card {
    height: 100%;
    border: 1px solid #dee2e6;
    border-left: 4px solid #005496;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 .125rem .5rem rgba(0,0,0,.05);
}

    .ufm-kpi-card .card-body {
        padding: 14px;
    }

.ufm-kpi-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .35px;
    color: #6c757d;
    font-weight: 700;
}

.ufm-kpi-value {
    margin-top: 4px;
    font-size: 1.35rem;
    line-height: 1.25;
    font-weight: 800;
}

.ufm-kpi-success {
    border-left-color: #198754;
}

.ufm-kpi-danger {
    border-left-color: #dc3545;
}

.ufm-kpi-warning {
    border-left-color: #ffc107;
}

.ufm-kpi-purple {
    border-left-color: #6f42c1;
}

.ufm-kpi-info {
    border-left-color: #0dcaf0;
}

/* ===== Statistics Layout ===== */
.ufm-stat-column {
    min-width: 0;
}

.ufm-stat-table {
    width: 100%;
    overflow-x: auto;
}

/* ===== Grid Special Rows ===== */
.ufm-grid .total-row td {
    background: #fff8e1 !important;
    color: #7a4d00 !important;
    font-weight: 800 !important;
    border-top: 2px solid #f0ad4e !important;
}

/* ===== Additional Colors ===== */
.ufm-text-purple {
    color: #6f42c1 !important;
}

.ufm-bg-purple {
    background-color: #6f42c1 !important;
    color: #fff !important;
}
/* ==========================================================
   UFM GRIDVIEW PAGER
   Áp dụng cho PagerStyle của GridView
   ========================================================== */

.ufm-grid-pager {
    padding: 10px 12px;
    background: #fff;
    border-top: 1px solid #dee2e6;
}

    .ufm-grid-pager table {
        margin-left: auto;
        margin-bottom: 0;
        border-collapse: separate;
        border-spacing: 4px;
    }

        .ufm-grid-pager table td {
            padding: 0;
        }

            .ufm-grid-pager table td a,
            .ufm-grid-pager table td span {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 36px;
                height: 36px;
                padding: 0 12px;
                border: 1px solid #d0d7de;
                border-radius: 8px;
                background: #fff;
                color: var(--ufm-primary, #005496);
                font-size: .9rem;
                font-weight: 600;
                text-decoration: none;
                transition: all .2s ease;
            }

                .ufm-grid-pager table td a:hover {
                    background: var(--ufm-primary, #005496);
                    border-color: var(--ufm-primary, #005496);
                    color: #fff;
                }

            .ufm-grid-pager table td span {
                background: var(--ufm-primary, #005496);
                border-color: var(--ufm-primary, #005496);
                color: #fff;
                cursor: default;
            }

            .ufm-grid-pager table td:first-child a,
            .ufm-grid-pager table td:last-child a {
                font-weight: 700;
            }

@media (max-width:768px) {

    .ufm-grid-pager {
        padding: 8px;
    }

        .ufm-grid-pager table {
            margin: 0 auto;
        }

            .ufm-grid-pager table td a,
            .ufm-grid-pager table td span {
                min-width: 32px;
                height: 32px;
                font-size: .85rem;
                padding: 0 8px;
            }
}


/* ==========================================================
   UFM PROFESSIONAL DASHBOARD
   KPI, doughnut chart, ranking list, detail accordion
   Dung chung cho cac trang tong quan va thong ke
   ========================================================== */
.ufm-dashboard-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .05);
}

.ufm-dashboard-kpi {
    position: relative;
    height: 100%;
    min-height: 138px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

    .ufm-dashboard-kpi:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(15, 23, 42, .10);
    }

    .ufm-dashboard-kpi::after {
        position: absolute;
        right: -24px;
        bottom: -34px;
        width: 110px;
        height: 110px;
        border-radius: 50%;
        background: var(--kpi-soft, #eff6ff);
        content: "";
    }

.ufm-dashboard-kpi-head {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ufm-dashboard-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    color: var(--kpi-color, #005496);
    background: var(--kpi-soft, #eff6ff);
    font-size: 18px;
}

.ufm-dashboard-kpi-label {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.ufm-dashboard-kpi-value {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: #0f172a;
    font-size: 29px;
    font-weight: 800;
    line-height: 1.1;
}

.ufm-dashboard-kpi-note {
    position: relative;
    z-index: 1;
    display: block;
    min-height: 20px;
    margin-top: 7px;
    overflow: hidden;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ufm-dashboard-kpi-primary {
    --kpi-color: #005496;
    --kpi-soft: #eaf4fb;
}

.ufm-dashboard-kpi-success {
    --kpi-color: #198754;
    --kpi-soft: #eaf7ef;
}

.ufm-dashboard-kpi-purple {
    --kpi-color: #6f42c1;
    --kpi-soft: #f2ecfb;
}

.ufm-dashboard-kpi-info {
    --kpi-color: #0d6efd;
    --kpi-soft: #eaf2ff;
}

.ufm-dashboard-kpi-warning {
    --kpi-color: #c88700;
    --kpi-soft: #fff6dd;
}

.ufm-dashboard-kpi-teal {
    --kpi-color: #0f766e;
    --kpi-soft: #e7f8f5;
}

.ufm-dashboard-card {
    height: 100%;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .05);
}

.ufm-dashboard-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 13px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eef2f7;
}

.ufm-dashboard-card-title {
    margin: 0;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.ufm-dashboard-card-subtitle {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 12px;
}

.ufm-chart-layout {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    min-height: 220px;
}

.ufm-donut-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 170px;
    height: 170px;
    margin: 0 auto;
}

.ufm-donut-chart {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .04);
}

    .ufm-donut-chart::after {
        position: absolute;
        inset: 27px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 3px 14px rgba(15, 23, 42, .08);
        content: "";
    }

.ufm-donut-center {
    position: relative;
    z-index: 2;
    text-align: center;
}

    .ufm-donut-center strong {
        display: block;
        color: #0f172a;
        font-size: 27px;
        line-height: 1.1;
    }

    .ufm-donut-center span {
        color: #94a3b8;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
    }

.ufm-chart-legend {
    display: grid;
    gap: 9px;
}

.ufm-chart-legend-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    padding: 7px 0;
    border-bottom: 1px dashed #e2e8f0;
}

.ufm-chart-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.ufm-chart-legend-label {
    overflow: hidden;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ufm-chart-legend-value {
    color: #0f172a;
    font-size: 12px;
    font-weight: 800;
}

    .ufm-chart-legend-value small {
        color: #94a3b8;
        font-weight: 600;
    }

.ufm-ranking-list {
    display: grid;
    gap: 13px;
}

.ufm-ranking-item {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.ufm-ranking-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: #005496;
    background: #eaf4fb;
    font-size: 12px;
    font-weight: 800;
}

.ufm-ranking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
    color: #475569;
    font-size: 12px;
}

    .ufm-ranking-head span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ufm-ranking-head strong {
        color: #0f172a;
        font-size: 13px;
    }

.ufm-ranking-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

    .ufm-ranking-track span {
        display: block;
        height: 100%;
        min-width: 4px;
        border-radius: inherit;
        background: linear-gradient(90deg, #005496, #38bdf8);
    }

.ufm-mini-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ufm-mini-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}

.ufm-mini-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    color: #005496;
    background: #eaf4fb;
}

.ufm-mini-stat small,
.ufm-mini-stat strong {
    display: block;
}

.ufm-mini-stat small {
    color: #64748b;
    font-size: 11px;
}

.ufm-mini-stat strong {
    margin-top: 2px;
    color: #0f172a;
    font-size: 18px;
}

.ufm-dashboard-empty {
    padding: 28px 14px;
    color: #94a3b8;
    text-align: center;
    font-size: 12px;
}

.ufm-details-toggle {
    border: 0;
    color: #005496;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
}

.ufm-dashboard-details .accordion-button {
    color: #0f172a;
    background: #fff;
    font-size: 13px;
    font-weight: 800;
}

    .ufm-dashboard-details .accordion-button:not(.collapsed) {
        color: #005496;
        background: #f5faff;
        box-shadow: none;
    }

@media (max-width: 991.98px) {
    .ufm-chart-layout {
        grid-template-columns: 1fr;
    }

    .ufm-mini-stat-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .ufm-dashboard-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

        .ufm-dashboard-toolbar .btn {
            width: 100%;
        }

    .ufm-dashboard-kpi {
        min-height: 124px;
    }
}
/* ==========================================================
   UFM GRID ACTION BUTTONS
   Icon tác vụ dùng chung cho GridView
   ========================================================== */

.ufm-grid-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

.ufm-action-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #dbe3ef;
    background: #fff;
    text-decoration: none;
    transition: all .2s ease;
    cursor: pointer;
}

    .ufm-action-btn i {
        font-size: 14px;
    }

.ufm-action-edit {
    color: #0d6efd;
}

    .ufm-action-edit:hover {
        background: #e7f1ff;
        border-color: #0d6efd;
        color: #0d6efd;
    }

.ufm-action-delete {
    color: #dc3545;
}

    .ufm-action-delete:hover {
        background: #fdecec;
        border-color: #dc3545;
        color: #dc3545;
    }

.ufm-action-view {
    color: #0dcaf0;
}

    .ufm-action-view:hover {
        background: #e9fbff;
        border-color: #0dcaf0;
        color: #0dcaf0;
    }

.ufm-action-print {
    color: #198754;
}

    .ufm-action-print:hover {
        background: #eaf7ef;
        border-color: #198754;
        color: #198754;
    }

.ufm-action-copy {
    color: #6f42c1;
}

    .ufm-action-copy:hover {
        background: #f2ecfb;
        border-color: #6f42c1;
        color: #6f42c1;
    }

.ufm-action-download {
    color: #fd7e14;
}

    .ufm-action-download:hover {
        background: #fff3e8;
        border-color: #fd7e14;
        color: #fd7e14;
    }

.ufm-action-disabled {
    opacity: .45;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.btn-ufm {
    min-height: 38px;
    padding: 7px 16px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ==========================================================
   SCORE / DATA LIST LAYOUT
   Dung chung cho cac trang co bo loc + thong ke nhanh + grid rong
   Dong bo theo UI CapNhatDiemXetTuyen
   ========================================================== */
.score-filter {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
}

.score-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.score-summary {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: #005496;
    font-size: 12px;
    font-weight: 700;
}

.score-pill-success {
    background: #ecfdf5;
    color: #047857;
}

.score-pill-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.score-pill-muted {
    background: #f1f5f9;
    color: #64748b;
}

.score-grid-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    position: relative;
}

.score-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
    min-width: 1500px;
    max-width: none !important;
    margin: 0;
    table-layout: auto !important;
}

    .score-table th,
    .score-table td {
        border-right: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
        padding: 8px 9px;
        vertical-align: middle;
        background: #fff;
        font-size: 13px;
    }

    .score-table th {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #005496;
        color: #fff;
        text-align: center;
        font-weight: 700;
        white-space: nowrap;
    }

    .score-table tbody tr:hover td {
        background: #f8fbff;
    }

    .score-table > tbody > tr:last-child > td {
        border-bottom: 0;
    }

    .score-table th:last-child,
    .score-table td:last-child {
        border-right: 0;
    }

/* ==========================================================
   PHAN LOAI MINH CHUNG
   Style dac thu cua trang PhanLoaiMinhChung
   ========================================================== */
.plmc-page {
    min-width: 0;
    max-width: 100%;
}

    .plmc-page .ufm-section {
        min-width: 0;
        max-width: 100%;
    }

    .plmc-page .form-label {
        margin-bottom: 6px;
    }

.plmc-doc-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.45;
    white-space: normal;
    min-width: 340px;
}

.plmc-doc-sub {
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
    margin-top: 4px;
}

.plmc-info-box {
    min-width: 255px;
    font-size: 12px;
    line-height: 1.55;
    color: #334155;
}

.plmc-info-line {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    margin-bottom: 2px;
}

.plmc-info-label {
    min-width: 72px;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.plmc-info-value {
    color: #0f172a;
    font-weight: 600;
    word-break: break-word;
}

.plmc-suggest {
    background: #eef7ff;
    border-left: 3px solid #0d6efd;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: 12px;
    min-width: 120px;
}

.plmc-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.plmc-badge-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffe69c;
}

.plmc-badge-done {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.plmc-badge-skip {
    background: #e2e3e5;
    color: #41464b;
    border: 1px solid #d3d6d8;
}

.plmc-file-ok {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.plmc-file-missing {
    background: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.plmc-file-empty {
    background: #e2e3e5;
    color: #41464b;
    border: 1px solid #d3d6d8;
}

.plmc-kpi {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.plmc-kpi-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 9px;
    padding: 10px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.plmc-kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6c757d;
    font-weight: 700;
}

.plmc-kpi-value {
    font-size: 20px;
    font-weight: 800;
    color: #005b96;
    line-height: 1.25;
}

.plmc-kpi-file .plmc-kpi-value {
    font-size: 18px;
}

.plmc-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.plmc-bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.plmc-bulk-category {
    flex: 1 1 300px;
    max-width: 390px;
    min-width: 260px;
}

.plmc-select-all-box {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 7px;
    background: #f8fafc;
    white-space: nowrap;
}

    .plmc-select-all-box input[type="checkbox"] {
        width: 16px;
        height: 16px;
        margin: 0;
        flex: 0 0 auto;
        cursor: pointer;
        accent-color: #0d6efd;
    }

    .plmc-select-all-box span {
        margin: 0;
        line-height: 1.2;
        font-size: 13px;
        font-weight: 600;
        color: #334155;
        cursor: pointer;
    }

.plmc-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.plmc-download-area {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.plmc-download-check {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 10px;
    border: 1px solid #dee2e6;
    border-radius: 7px;
    background: #fff;
}

.plmc-download-note {
    font-size: 12px;
    color: #64748b;
    margin-top: 8px;
}

.plmc-download-check span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    white-space: nowrap;
}

.plmc-download-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: #198754;
}

.plmc-download-check label {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
}

.plmc-grid-wrap {
    width: 100%;
    overflow-x: auto;
}

.plmc-grid {
    min-width: 1500px;
}

    .plmc-grid th {
        white-space: nowrap;
        vertical-align: middle;
    }

    .plmc-grid td {
        vertical-align: middle;
    }

.plmc-row-select {
    width: 18px;
    height: 18px;
}

.plmc-grid .form-select-sm {
    min-width: 185px;
}

.plmc-grid-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.plmc-modal-frame {
    width: 100%;
    height: 78vh;
    border: 0;
    background: #fff;
}

.plmc-preview-message {
    padding: 45px 20px;
    text-align: center;
    color: #64748b;
}

.plmc-page .ufm-grid-pager td {
    background: #fff !important;
    border: 0 !important;
    padding: 10px !important;
}

@media (max-width: 1199.98px) {
    .plmc-kpi {
        grid-template-columns: repeat(2, minmax(150px, 1fr));
    }

    .plmc-download-area {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 767.98px) {
    .plmc-kpi {
        grid-template-columns: 1fr;
    }

    .plmc-filter-actions {
        justify-content: flex-start;
    }

    .plmc-bulk-category {
        max-width: none;
        min-width: 100%;
    }

    .plmc-bulk-actions,
    .plmc-download-area {
        width: 100%;
    }
}

/* UFM UI STANDARD v1 - 2026-11-04
   Contract: docs/UI_STANDARD_UFM.md. Opt-in on .ufm-page.ufm-ui only.
   Legacy pages keep their layout; shared grid text size is unified in v1.1. */
.ufm-page.ufm-ui {
    --ufm-primary: #005496;
    --ufm-primary-hover: #0277bd;
    --ufm-border: #e2e8f0;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
}
.ufm-ui .ufm-section { min-width: 0; max-width: 100%; }
.ufm-ui .ufm-toolbar, .ufm-ui .ufm-toolbar-actions, .ufm-ui .ufm-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.ufm-ui .ufm-toolbar { justify-content: space-between; margin-bottom: 12px; }
.ufm-ui .ufm-toolbar .ufm-section-title { margin-bottom: 0; }
.ufm-ui .ufm-summary { margin-bottom: 12px; }
.ufm-ui .form-control, .ufm-ui .form-select { min-height: 38px; font-size: 14px; }
.ufm-ui .btn.ufm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    white-space: nowrap;
    text-decoration: none;
}
.ufm-ui .ufm-btn > i { margin: 0 !important; flex-shrink: 0; }
.ufm-ui .btn.ufm-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 7px;
    font-size: 14px;
    flex: 0 0 34px;
}
.ufm-ui .ufm-btn:focus-visible, .ufm-ui .ufm-btn-icon:focus-visible {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
    box-shadow: none;
}
.ufm-ui .ufm-grid-actions { flex-wrap: wrap; }
.ufm-ui .ufm-grid-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto !important;
    max-height: none !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    border: 1px solid var(--ufm-border);
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}
.ufm-ui .ufm-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin: 0;
    table-layout: auto;
}
.ufm-ui .ufm-table > thead > tr > th,
.ufm-ui .ufm-table > tbody > tr > th,
.ufm-ui .ufm-table > tbody > tr > td,
.ufm-ui .ufm-table > tfoot > tr > td {
    padding: 8px 9px;
    vertical-align: middle;
    border-right: 1px solid var(--ufm-border);
    border-bottom: 1px solid var(--ufm-border);
    font-size: 13px;
    background: #fff;
}
.ufm-ui .ufm-table > thead > tr > th,
.ufm-ui .ufm-table > tbody > tr > th {
    background: var(--ufm-primary);
    color: #fff;
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}
.ufm-ui .ufm-table > tbody > tr:hover > td { background: #f8fbff; }
.ufm-ui .ufm-table > tbody > tr:last-child > td { border-bottom: 0; }
.ufm-ui .ufm-table > thead > tr > th:last-child,
.ufm-ui .ufm-table > tbody > tr > th:last-child,
.ufm-ui .ufm-table > tbody > tr > td:last-child { border-right: 0; }
.ufm-ui .ufm-table-wide { min-width: 1250px; }
.ufm-ui .ufm-table .ufm-grid-pager > td { background: #fff; padding: 10px 12px; }
/* Default text size for shared legacy/standard grids, nested labels, editors
   and pager. Compact actions/badges have explicit exceptions in v1.6 below.
   Reference: gvThongKeXetTuyen/TenNganh
   in CapNhatDiemXetTuyen.aspx inherits .ufm-grid's 0.95rem.
   Text utilities must not shrink/enlarge grid content; icon glyphs stay separate. */
table.ufm-grid,
.ufm-ui table.ufm-table,
table.ufm-grid-text {
    --ufm-grid-font-size: 0.95rem;
    font-size: var(--ufm-grid-font-size) !important;
}
table.ufm-grid :where(th, td, a, span, div, p, label, small, strong, b, em, input, select, textarea, button):not(.ufm-btn-icon, .fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands),
.ufm-ui table.ufm-table :where(th, td, a, span, div, p, label, small, strong, b, em, input, select, textarea, button):not(.ufm-btn-icon, .fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands) {
    font-size: var(--ufm-grid-font-size) !important;
}
/* Default data typography for existing/custom/public tables. Compact controls
   in these tables follow the explicit v1.6 exceptions below. */
table.ufm-grid-text :where(th, td, a, span, div, p, label, small, strong, b, em, input, select, option, textarea, button, h1, h2, h3, h4, h5, h6, code, pre, sup, sub):not(.ufm-btn-icon, .ufm-action-btn, .fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands) {
    font-size: var(--ufm-grid-font-size) !important;
}
table.ufm-grid-text .btn:not(.ufm-btn-icon, .ufm-action-btn),
table.ufm-grid-text .badge {
    white-space: normal;
    overflow-wrap: anywhere;
}
.ufm-ui .ufm-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--ufm-primary);
    font-size: 12px;
    font-weight: 700;
}
.ufm-ui .ufm-pill-success { background: #198754; color: #fff; }
.ufm-ui .ufm-pill-warning { background: #ffc107; color: #212529; }
.ufm-ui .ufm-pill-danger { background: #dc3545; color: #fff; }
.ufm-ui .ufm-pill-info { background: #0dcaf0; color: #212529; }
.ufm-ui .ufm-pill-muted { background: #6c757d; color: #fff; }
.ufm-ui .ufm-pill-purple { background: #6f42c1; color: #fff; }
.ufm-ui .ufm-modal .modal-content { border: 1px solid var(--ufm-border, #e2e8f0); border-radius: 12px; }
.ufm-ui .ufm-modal .modal-header { background: var(--ufm-primary, #005496); color: #fff; }
.ufm-ui .ufm-modal .modal-title { font-size: 16px; font-weight: 700; }
.ufm-ui .ufm-modal .modal-footer { background: #f8fafc; gap: 8px; }
.ufm-ui .ufm-modal .modal-footer .ufm-btn { min-width: 120px; margin: 0; }
@media (max-width: 575.98px) {
    .ufm-page.ufm-ui { padding: 12px; }
    .ufm-ui .ufm-page-header h4 { font-size: 18px; line-height: 1.5; }
    .ufm-ui .ufm-toolbar-actions { width: 100%; }
    .ufm-ui .ufm-toolbar-actions > .ufm-btn { flex: 1 1 140px; white-space: normal; }
    .ufm-ui .ufm-modal .modal-footer .ufm-btn { flex: 1 1 120px; }
}

/* Modal UpdatePanel flex bridge: a server panel may wrap header + body. */
.ufm-ui .ufm-modal .modal-content > div:has(> .modal-body) {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}
.ufm-ui .ufm-modal .modal-body { min-height: 0; }
.ufm-ui .ufm-modal .modal-title { color: inherit; }
.ufm-ui .tab-content, .ufm-ui .tab-pane { min-width: 0; max-width: 100%; }
.ufm-ui .ufm-btn { box-shadow: none; }
.ufm-ui .ufm-table .ufm-btn {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
}
.ufm-ui .ufm-table .badge,
.ufm-ui .ufm-table .ufm-pill {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

/* v1.4: long Vietnamese action labels must fit narrow forms as well as toolbars. */
.ufm-ui .btn.ufm-btn { max-width: 100%; white-space: normal; }
.ufm-ui .btn.ufm-btn, .ufm-ui .btn.ufm-btn-icon { position: relative; }
.ufm-ui .ufm-toolbar-actions > .btn { position: relative; inset: auto; }
.ufm-ui .ufm-grid-pager table { width: auto !important; min-width: 0 !important; }

/* Shared checkbox dropdown: keep the label and chevron in separate flex items. */
.filter-dropdown-box .filter-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: auto;
    min-height: 38px;
    white-space: normal;
    overflow-wrap: anywhere;
}
.filter-dropdown-box .filter-dropdown-btn::after {
    content: "";
    display: block;
    position: static;
    flex: 0 0 7px;
    width: 7px;
    height: 7px;
    margin-left: 4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.filter-dropdown-box .filter-dropdown-menu {
    top: calc(100% + 4px);
}

/* v1.6 — compact grid actions/status only. Toolbars, summary badges and
   data/pager typography outside these controls keep their existing styles. */
table:is(.ufm-table, .ufm-grid, .ufm-grid-text)
    :is(.btn, button, input[type="submit"], input[type="button"]):not(.ufm-btn-icon, .ufm-action-btn, .ufm-grid-action, .badge, .ufm-pill, [class^="badge-"], [class*=" badge-"], [class*="-badge"], .tdvb-state-done) {
    min-height: 32px !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: 100%;
    padding: 4px 10px !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    gap: 6px;
    white-space: normal !important;
}
table:is(.ufm-table, .ufm-grid, .ufm-grid-text)
    :is(.btn, button):not(.ufm-btn-icon, .ufm-action-btn, .ufm-grid-action)
    :is(span, strong, b, small):not(.fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands, .badge, .ufm-pill, [class^="badge-"], [class*=" badge-"], [class*="-badge"], .tdvb-state-done) {
    font-size: inherit !important;
    font-weight: 400 !important;
}
table:is(.ufm-table, .ufm-grid, .ufm-grid-text)
    :is(.ufm-btn-icon, .ufm-action-btn, .ufm-grid-action) {
    width: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    height: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    flex: 0 0 32px !important;
}
table:is(.ufm-table, .ufm-grid, .ufm-grid-text)
    :is(.badge, .ufm-pill, [class^="badge-"], [class*=" badge-"], [class*="-badge"], .tdvb-state-done):not(.fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands) {
    padding: 3px 7px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}
table:is(.ufm-table, .ufm-grid, .ufm-grid-text)
    :is(.badge, .ufm-pill, [class^="badge-"], [class*=" badge-"], [class*="-badge"], .tdvb-state-done)
    :is(span, strong, b, small):not(.fa, .fas, .far, .fab, .fal, .fad, .fa-solid, .fa-regular, .fa-brands) {
    font-size: inherit !important;
    font-weight: 400 !important;
}
