/*====================================== DuAnList Modern ==============================*/

.UIDuAnList {
    --list-primary: var(--color-primary, #0d6efd);
    --list-primary-dark: #0056b3;
    --list-text: #182940;
    --list-muted: #62748d;
    --list-border: #e5e7eb;
    --list-soft-bg: #f8fafc;
    --list-card-bg: #ffffff;
    --list-hover-bg: rgba(13, 110, 253, 0.04);

    color: var(--list-text);
    font-family: Roboto, Arial, sans-serif;
}

/*================ Title ================*/

.UIDuAnList .Title {
    position: relative;
    margin-bottom: 20px;
    padding-bottom: 10px;

    font-family: Merriweather, Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    color: #031739;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.UIDuAnList .Title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;

    width: 90px;
    height: 3px;

    background: linear-gradient(
        90deg,
        var(--list-primary),
        rgba(13, 110, 253, 0.15)
    );
    border-radius: 999px;
}

/*================ Search Box ================*/

.UIDuAnList .search-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;

    margin-bottom: 24px;
    padding: 28px;

    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid var(--list-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.UIDuAnList .search-box > div span {
    display: block;
    margin-bottom: 8px;

    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--list-muted);
}

.UIDuAnList .search-box input[type="text"],
.UIDuAnList .search-box select {
    display: block;
    width: 100%;
    height: 44px;
    box-sizing: border-box;

    padding: 10px 14px;

    font-family: Roboto, Arial, sans-serif;
    font-size: 15px;
    color: var(--list-text);

    background-color: #ffffff;
    border: 1px solid var(--list-border);
    border-radius: 10px;
    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.UIDuAnList .search-box input[type="text"]::placeholder {
    color: #94a3b8;
}

.UIDuAnList .search-box input[type="text"]:focus,
.UIDuAnList .search-box select:focus {
    border-color: var(--list-primary);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
}

/* Search Button */

.UIDuAnList .search-box > div:last-child {
    display: flex;
    align-items: flex-end;
}

.UIDuAnList .search-box > div:last-child input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 150px;
    height: 44px;
    margin: 0;
    padding: 0 28px;

    font-family: Roboto, Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;

    color: #ffffff;
    background: linear-gradient(
        135deg,
        var(--list-primary),
        var(--list-primary-dark)
    );
    border: none;
    border-radius: 999px;
    cursor: pointer;

    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.24);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;
}

.UIDuAnList .search-box > div:last-child input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(13, 110, 253, 0.3);
    filter: brightness(1.04);
}

.UIDuAnList .search-box > div:last-child input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.2);
}

/*================ List Table ================*/

.UIDuAnList .List {
    margin-top: 24px;
}

.UIDuAnList .List > div > table {
    width: 100%;
    overflow: hidden;

    background: var(--list-card-bg);
    border: 1px solid var(--list-border);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;

    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

/* Header */

.UIDuAnList th {
    padding: 14px 16px;

    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;

    color: #334155;
    text-align: center;
    vertical-align: middle;

    background: #f1f5f9;
    border-bottom: 1px solid var(--list-border);
}

.UIDuAnList th:nth-child(3),
.UIDuAnList th:nth-child(4) {
    width: 240px;
}

/* Body */

.UIDuAnList td {
    padding: 14px 16px;

    font-family: Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    color: var(--list-text);
    vertical-align: top;

    border-bottom: 1px solid var(--list-border);
}

.UIDuAnList .List > div > table > tbody > tr:not(.grid-pager):last-of-type td {
    border-bottom: none;
}

.UIDuAnList .List table tr:nth-child(odd):not(.grid-pager) {
    background: #ffffff;
}

.UIDuAnList .List table tr:nth-child(even):not(.grid-pager) {
    background: #f8fafc;
}

.UIDuAnList .List table tr:not(.grid-pager) {
    transition:
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.UIDuAnList .List table tr:not(.grid-pager):hover {
    background: var(--list-hover-bg);
}

/* Cột STT */

.UIDuAnList table td:has(> span.stt) {
    text-align: center;
    vertical-align: middle;
}

.UIDuAnList table td span.stt {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 30px;
    height: 30px;

    font-size: 13px;
    font-weight: 700;
    color: var(--list-muted);

    background: #f1f5f9;
    border-radius: 999px;
}

/* Link tên dự án */

.UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td:nth-child(2) a {
    color: #0068b4;
    font-weight: 600;
    text-decoration: none;

    transition:
        color 0.2s ease,
        text-decoration-color 0.2s ease;
}

.UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td:nth-child(2) a:hover {
    color: var(--list-primary);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* Label mobile mặc định ẩn */

.UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td span.Name {
    display: none;
}

/*================ Pager ================*/

.UIDuAnList tr.grid-pager td {
    border: none;
    background: transparent;
}

.UIDuAnList tr.grid-pager table {
    margin: 18px auto 4px;
    border: none;
    border-collapse: separate;
}

.UIDuAnList tr.grid-pager tr {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.UIDuAnList table tr.grid-pager tr td {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;

    background: #f1f5f9;
    border: none;
    border-radius: 10px !important;

    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.UIDuAnList table tr.grid-pager tr td:hover {
    transform: translateY(-1px);
    background: #e2e8f0;
}

.UIDuAnList table tr.grid-pager tr td a,
.UIDuAnList table tr.grid-pager tr td span {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;
    margin: 0 !important;
    padding: 0;

    font-family: Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.UIDuAnList table tr.grid-pager tr td a {
    color: var(--list-text);
}

.UIDuAnList table tr.grid-pager tr td span {
    color: #ffffff;
}

/* Trang hiện tại */

.UIDuAnList table tr.grid-pager tr td:has(span) {
    background: var(--list-primary);
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.24);
}

/*================ Responsive ================*/

@media only screen and (max-width: 768px) {
    .UIDuAnList {
        padding: 0 16px;
    }

    .UIDuAnList .Title {
        font-size: 18px;
        line-height: 1.4;
    }

    .UIDuAnList .search-box {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 20px;
        border-radius: 14px;
    }

    .UIDuAnList .search-box > div:last-child {
        align-items: stretch;
    }

    .UIDuAnList .search-box > div:last-child input[type="submit"] {
        width: 100%;
        max-width: 100%;
    }

    .UIDuAnList .List > div > table {
        display: block;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .UIDuAnList .List table.search-result > tbody > tr:first-child:not(.grid-pager) {
        display: none;
    }

    .UIDuAnList .List table.search-result > tbody > tr:not(.grid-pager) {
        display: flex;
        flex-direction: column;

        margin-bottom: 14px;
        overflow: hidden;

        background: #ffffff;
        border: 1px solid var(--list-border);
        border-radius: 14px;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    }

    .UIDuAnList .List table.search-result > tbody > tr:not(.grid-pager) > td:first-child {
        display: none;
    }

    .UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td {
        display: block;
        padding: 12px 14px;

        font-size: 14px;
        line-height: 1.55;

        border: none;
        border-bottom: 1px solid var(--list-border);
    }

    .UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td:last-child {
        border-bottom: none;
    }

    .UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td span.Name {
        display: block;
        margin-bottom: 4px;

        font-size: 13px;
        font-weight: 700;
        color: var(--list-muted);
    }

    .UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td:nth-child(2) {
        background: linear-gradient(
            135deg,
            rgba(13, 110, 253, 0.07),
            rgba(13, 110, 253, 0.015)
        );
    }

    .UIDuAnList .List > div > table > tbody > tr:not(.grid-pager) td:nth-child(2) a {
        font-size: 15px;
        line-height: 1.5;
    }

    .UIDuAnList tr.grid-pager table {
        margin-top: 20px;
    }

    .UIDuAnList tr.grid-pager tr {
        flex-wrap: wrap;
        gap: 6px;
    }

    .UIDuAnList table tr.grid-pager tr td {
        width: 38px !important;
        height: 38px !important;
        border-radius: 9px !important;
    }
}

/*====================================================================================*/