﻿/* Nexus management page template: reusable shell for pages using ProfileMenu */
:root {
    --nx-navy: #071B3C;
    --nx-navy-2: #123F7B;
    --nx-gold: #D5A13A;
    --nx-bg: #F4F7FB;
    --nx-border: rgba(7, 27, 60, .10);
    --nx-row-alt: #F8FAFD;
    --nx-row-hover: #F3F7FC;
}

.nexus-management-page {
    min-height: calc(100vh - 150px);
    background: var(--nx-bg);
}

.nexus-management-page__hero {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(90deg, rgba(7,27,60,.92) 0%, rgba(7,27,60,.70) 50%, rgba(7,27,60,.32) 100%), url('/styles/images/nexus-cover.jpg') center 45% / cover no-repeat;
}

    .nexus-management-page__hero::after {
        content: "";
        position: absolute;
        inset: auto 0 0;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(213,161,58,.55), transparent);
    }

.nexus-management-page__hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
    padding: 34px 0;
    margin-bottom: 10px;
}

.nexus-management-page__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px 13px;
    border: 1px solid rgba(213,161,58,.70);
    border-radius: 999px;
    color: #F3C75B;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}

.nexus-management-page__hero h1 {
    margin: 0 0 10px;
    font-size: clamp(34px,4vw,48px);
    line-height: 1.05;
    font-weight: 750;
}

.nexus-management-page__hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255,255,255,.86);
    font-size: 16px;
    line-height: 1.6;
}

.nexus-management-page__main {
    padding: 0 0 56px;
}

.nexus-management-page__container,
.nexus-management-page .container {
    width: min(1440px, calc(100% - 48px));
    max-width: 1440px !important;
    margin: 0 auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.nexus-management-page__hero + .nexus-management-page__main {
    padding-top: 0;
}

    .nexus-management-page__hero + .nexus-management-page__main > .nexus-management-page__container {
        transform: translateY(-34px);
        margin-bottom: -34px;
    }

/* Optional summary. A page may omit this block completely. */
.nexus-management-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.nexus-management-metric {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 96px;
    padding: 17px 20px;
    border: 1px solid var(--nx-border);
    border-radius: 20px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 16px 38px rgba(7,27,60,.09);
}

.nexus-management-metric__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #0B326B, #071B3C);
}

    .nexus-management-metric__icon.is-warning {
        color: #5B4300;
        background: linear-gradient(145deg,#F6D777,#D5A13A);
    }

    .nexus-management-metric__icon.is-success {
        background: linear-gradient(145deg,#2FB071,#12834D);
    }

    .nexus-management-metric__icon.is-danger {
        background: linear-gradient(145deg,#E16770,#B93646);
    }

.nexus-management-metric small {
    display: block;
    margin-bottom: 2px;
    color: #718097;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.nexus-management-metric strong {
    display: block;
    color: var(--nx-navy);
    font-size: 29px;
    line-height: 1;
    font-weight: 700;
}

.nexus-management-page .nexus-account-nav {
    margin-bottom: 20px;
}

.nexus-management-workspace {
    overflow: hidden;
    border: 1px solid var(--nx-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(7,27,60,.07);
}

.nexus-management-workspace__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--nx-border);
    background: linear-gradient(110deg,#fff 0%,#fff 72%,rgba(213,161,58,.08) 100%);
}

    .nexus-management-workspace__head h2 {
        margin: 3px 0 4px;
        color: var(--nx-navy);
        font-size: 25px;
        font-weight: 650;
    }

    .nexus-management-workspace__head p {
        margin: 0;
        color: #748197;
        font-size: 13px;
    }

.nexus-management-workspace__kicker {
    color: #B47B0B;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .11em;
}

.nexus-management-workspace__body {
    padding: 14px;
}

.nexus-management-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid rgba(7,27,60,.13);
    border-radius: 12px;
    color: var(--nx-navy);
    background: #fff;
    box-shadow: 0 8px 20px rgba(7,27,60,.08);
    font-weight: 600;
}

/* Nút hành động dùng chung cho các trang quản lý (Thêm mới, Xuất excel...),
   thay cho màu Bootstrap mặc định (btn-primary/btn-success) không khớp tông site. */
.nexus-management-btn-primary,
.nexus-management-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 18px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13.5px;
    line-height: 1;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.nexus-management-btn-primary {
    border: 1px solid rgba(181, 125, 26, .72);
    background-color: var(--nx-gold);
    background-image: linear-gradient(135deg, #e6b94f 0%, #fcdb99 52%, #ffcc73 100%);
    color: #071b3c !important;
    box-shadow: 0 10px 22px rgba(181, 125, 26, .22), inset 0 1px 0 rgba(255, 255, 255, .38);
}
.nexus-management-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(181, 125, 26, .30), inset 0 1px 0 rgba(255, 255, 255, .46);
    filter: saturate(1.04);
}
.nexus-management-btn-secondary {
    border: 1px solid rgba(7, 27, 60, .16);
    background: #fff;
    color: var(--nx-navy) !important;
    box-shadow: 0 8px 20px rgba(7,27,60,.06);
}
.nexus-management-btn-secondary:hover {
    background: #F5F8FC;
    border-color: rgba(7, 27, 60, .28);
}

/* Kendo grid template. Preserve Kendo's own horizontal scroll. */
.nexus-management-grid {
    min-width: 0;
}

    .nexus-management-grid .nexus-grid-shell {
        width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    .nexus-management-grid .k-grid {
        width: 100% !important;
        max-width: 100%;
        overflow: hidden !important;
        border: 1px solid var(--nx-border) !important;
        border-radius: 14px !important;
        background: #fff !important;
        font-family: inherit !important;
    }

    .nexus-management-grid .k-grid-header,
    .nexus-management-grid .k-grid-header-wrap,
    .nexus-management-grid .k-grid-header-locked {
        border-color: var(--nx-border) !important;
        background: linear-gradient(180deg,#F5F8FC,#EDF2F8) !important;
    }

        .nexus-management-grid .k-grid-header th.k-header {
            height: 38px !important;
            padding: 6px 9px !important;
            border-color: rgba(7,27,60,.07) !important;
            color: #34445B !important;
            background: transparent !important;
            font-size: 12px !important;
            font-weight: 600 !important;
            line-height: 1.2 !important;
            vertical-align: middle !important;
        }

    .nexus-management-grid .k-grid td {
        height: 36px !important;
        min-height: 36px !important;
        padding: 4px 9px !important;
        border-color: rgba(7,27,60,.06) !important;
        color: #314056 !important;
        background: #fff !important;
        font-size: 12.5px !important;
        font-weight: 400 !important;
        line-height: 1.25 !important;
        vertical-align: middle !important;
    }

    .nexus-management-grid .k-grid-content,
    .nexus-management-grid .k-grid-content-locked {
        overflow-y: auto !important;
    }

    .nexus-management-grid .k-grid-content {
        overflow-x: auto !important;
        scrollbar-width: thin;
        scrollbar-color: rgba(7,27,60,.28) transparent;
    }

        .nexus-management-grid .k-grid-content::-webkit-scrollbar {
            height: 9px;
            width: 9px;
        }

        .nexus-management-grid .k-grid-content::-webkit-scrollbar-thumb {
            border: 2px solid transparent;
            border-radius: 999px;
            background: rgba(7,27,60,.25);
            background-clip: padding-box;
        }
        /* Do not force Kendo's internal tables to 100%; their computed widths create native scrolling. */
        .nexus-management-grid .k-grid-content table,
        .nexus-management-grid .k-grid-header-wrap table {
            width: auto !important;
            min-width: 100%;
        }

    .nexus-management-grid .k-grid-content-locked table,
    .nexus-management-grid .k-grid-header-locked table {
        width: auto !important;
    }

    .nexus-management-grid .k-alt td,
    .nexus-management-grid .k-grid-content-locked .k-alt td {
        background: var(--nx-row-alt) !important;
    }

    .nexus-management-grid .k-grid tbody tr:hover td,
    .nexus-management-grid .k-grid-content-locked tbody tr:hover td {
        background: var(--nx-row-hover) !important;
    }

    .nexus-management-grid .highlight-row td {
        background: #FBFCFE !important;
    }

    .nexus-management-grid .btns,
    .nexus-management-grid .buttons {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 5px;
        white-space: nowrap;
    }

        .nexus-management-grid .btns > a,
        .nexus-management-grid .buttons > a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 30px;
            width: 30px;
            height: 30px;
            padding: 0;
            border: 1px solid rgba(7,27,60,.11);
            border-radius: 9px;
            color: var(--nx-navy) !important;
            background: #fff;
            box-shadow: 0 3px 9px rgba(7,27,60,.07);
        }

    .nexus-management-grid .k-pager-wrap {
        border-color: var(--nx-border) !important;
        background: #FAFCFF !important;
    }

@media (max-width: 991px) {
    .nexus-management-page__container,
    .nexus-management-page .container {
        width: min(100% - 28px,1440px);
    }

    .nexus-management-summary {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .nexus-management-page__hero + .nexus-management-page__main > .nexus-management-page__container {
        transform: translateY(-24px);
        margin-bottom: -24px;
    }
}

@media (max-width: 575px) {
    .nexus-management-summary {
        grid-template-columns: 1fr;
    }

    .nexus-management-workspace__head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .nexus-management-workspace__body {
        padding: 8px;
    }
}


/* v3.2 - unified hero/summary/workspace alignment */
.nexus-management-page__hero > .nexus-management-page__container,
.nexus-management-page__main > .nexus-management-page__container {
    width: min(1440px, calc(100% - 48px)) !important;
    max-width: 1440px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.nexus-management-page__main > .nexus-management-page__container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.nexus-management-summary,
.nexus-management-page .nexus-account-nav,
.nexus-management-workspace {
    width: 100%;
    min-width: 0;
}

.nexus-management-workspace__body,
.nexus-grid-shell {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Keep Kendo locked and scrollable areas aligned and let Kendo own scrolling. */
.nexus-management-grid .k-grid {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

.nexus-management-grid .k-grid-header,
.nexus-management-grid .k-grid-content {
    width: 100% !important;
}

.nexus-management-grid .k-grid-header-wrap,
.nexus-management-grid .k-grid-content {
    min-width: 0 !important;
}

.nexus-management-grid .k-grid-content {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

    .nexus-management-grid .k-grid-header-wrap table,
    .nexus-management-grid .k-grid-content table {
        width: auto !important;
        min-width: 100% !important;
        table-layout: fixed !important;
    }

.nexus-management-grid .k-grid-header-locked,
.nexus-management-grid .k-grid-content-locked {
    box-sizing: border-box !important;
}

    .nexus-management-grid .k-grid-header-locked table,
    .nexus-management-grid .k-grid-content-locked table {
        width: 100% !important;
        min-width: 100% !important;
        table-layout: fixed !important;
    }

.nexus-management-grid .k-grid-content-locked {
    overflow: hidden !important;
}

@media (max-width: 991px) {
    .nexus-management-page__hero > .nexus-management-page__container,
    .nexus-management-page__main > .nexus-management-page__container {
        width: min(100% - 28px, 1440px) !important;
    }
}


/* v3.3 - Flight booking grid: use one native Kendo table, no locked columns.
   Locked columns were splitting header/body into two synchronized tables and caused visual drift. */
.nexus-management-grid--unlocked .k-grid-header-locked,
.nexus-management-grid--unlocked .k-grid-content-locked {
    display: none !important;
}

.nexus-management-grid--unlocked .k-grid-header,
.nexus-management-grid--unlocked .k-grid-content {
    width: 100% !important;
    margin-left: 0 !important;
}

.nexus-management-grid--unlocked .k-grid-header-wrap {
    width: 100% !important;
    border-right: 0 !important;
}

.nexus-management-grid--unlocked .k-grid-content {
    overflow-x: auto !important;
    overflow-y: auto !important;
}

    .nexus-management-grid--unlocked .k-grid-header-wrap table,
    .nexus-management-grid--unlocked .k-grid-content table {
        width: max-content !important;
        min-width: 100% !important;
        table-layout: fixed !important;
    }

.nexus-management-grid--unlocked .k-grid td,
.nexus-management-grid--unlocked .k-grid th {
    box-sizing: border-box !important;
}

/* ==========================================================================
   v4.0: Custom HTML table + pagination (thay thế Kendo Grid).
   Dùng chung cho mọi trang có <uc:ProfileMenu> cần hiển thị danh sách dạng bảng.
   Cách dùng: bọc <table class="nexus-management-table"> trong
   <div class="nexus-management-table-wrap">, và thanh phân trang dùng
   class .nexus-management-pagination (xem mẫu tại FlightBookingHistory.aspx).
   ========================================================================== */
.nexus-management-table-wrap {
    position: relative;
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--nx-border);
    border-radius: 14px;
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: rgba(7, 27, 60, .28) transparent;
}

    .nexus-management-table-wrap::-webkit-scrollbar {
        height: 9px;
    }

    .nexus-management-table-wrap::-webkit-scrollbar-thumb {
        border: 2px solid transparent;
        border-radius: 999px;
        background: rgba(7, 27, 60, .25);
        background-clip: padding-box;
    }

.nexus-management-table {
    width: 100%;
    min-width: 960px;
    border-collapse: collapse;
    font-family: inherit;
}

    .nexus-management-table thead th {
        height: 38px;
        padding: 6px 9px;
        border-bottom: 1px solid rgba(7, 27, 60, .07);
        background: linear-gradient(180deg,#F5F8FC,#EDF2F8);
        color: #34445B;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        text-align: left;
        white-space: nowrap;
    }

        .nexus-management-table thead th:last-child {
            text-align: right;
        }

    .nexus-management-table tbody td {
        height: 36px;
        padding: 6px 9px;
        border-bottom: 1px solid rgba(7, 27, 60, .06);
        color: #314056;
        font-size: 12.5px;
        font-weight: 400;
        line-height: 1.25;
        vertical-align: middle;
    }

        .nexus-management-table tbody td:last-child {
            text-align: right;
        }

    .nexus-management-table tbody tr:nth-child(even) td {
        background: var(--nx-row-alt);
    }

    .nexus-management-table tbody tr:hover td {
        background: var(--nx-row-hover);
    }

    .nexus-management-table tbody tr.highlight-row td {
        background: #FFF7E4 !important;
    }

    .nexus-management-table .text-center {
        text-align: center;
    }

    .nexus-management-table tbody td.nexus-empty {
        text-align: center;
        padding: 40px 12px;
        color: var(--nx-text-muted, #647187);
    }

    .nexus-management-table .btns,
    .nexus-management-table .buttons {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        white-space: nowrap;
    }

        .nexus-management-table .btns > a,
        .nexus-management-table .buttons > a {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 30px;
            width: 30px;
            height: 30px;
            padding: 0;
            border: 1px solid rgba(7, 27, 60, .11);
            border-radius: 9px;
            color: var(--nx-navy) !important;
            background: #fff;
            box-shadow: 0 3px 9px rgba(7, 27, 60, .07);
            cursor: pointer;
        }

            .nexus-management-table .btns > a:hover,
            .nexus-management-table .buttons > a:hover {
                background: #F5F8FC;
            }

    /* Nhóm action dạng gọn: 1 nút xem nhanh + 1 nút "..." mở dropdown các thao tác còn lại.
   Ưu tiên dùng pattern này cho cột "Thao tác" thay vì dàn hàng loạt icon rời rạc. */
    .nexus-management-table .nexus-actions {
        display: flex;
        align-items: center;
        justify-content: right;
        gap: 6px;
    }

    .nexus-management-table .nexus-actions__view,
    .nexus-management-table .nexus-actions__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border: 1px solid rgba(7, 27, 60, .11);
        border-radius: 9px;
        color: var(--nx-navy);
        background: #fff;
        box-shadow: 0 3px 9px rgba(7, 27, 60, .07);
        cursor: pointer;
    }

        .nexus-management-table .nexus-actions__view:hover,
        .nexus-management-table .nexus-actions__toggle:hover {
            background: #F5F8FC;
        }

    .nexus-management-table .nexus-actions .dropdown-menu {
        min-width: 210px;
        padding: 6px;
        border-radius: 12px;
        border: 1px solid var(--nx-border);
        box-shadow: 0 18px 40px rgba(7, 27, 60, .16);
    }

        .nexus-management-table .nexus-actions .dropdown-menu li > a {
            display: flex;
            align-items: center;
            gap: 9px;
            padding: 8px 10px;
            border-radius: 8px;
            color: #314056;
            font-size: 13px;
            cursor: pointer;
        }

            .nexus-management-table .nexus-actions .dropdown-menu li > a:hover {
                background: #F3F7FC;
            }

            .nexus-management-table .nexus-actions .dropdown-menu li > a.text-danger {
                color: #C04646;
            }

            .nexus-management-table .nexus-actions .dropdown-menu li > a i {
                width: 16px;
                text-align: center;
            }

[class^="status-"], [class*=" status-"] {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 9px;
    border: 1px solid #EEE;
    border-radius: 999px;
    background: #F7F8FA;
    font-size: 10.5px;
    line-height: 1.2;
    font-weight: 600;
    white-space: nowrap;
}

.status-success-green {
    color: #0E7145;
    background: #E7F8EF;
    border-color: #BDE9D1;
}

.status-success-blue {
    color: #175BA8;
    background: #EAF3FF;
    border-color: #C8DEFA;
}

.status-warning-orange {
    color: #8A5A00;
    background: #FFF4D7;
    border-color: #EED99E;
}

.status-fail-purple,
.status-pending-red {
    color: #A3374D;
    background: #FDECEF;
    border-color: #F4C4CD;
}

.status-void {
    color: #647187;
    background: #EEF1F5;
    border-color: #D8DEE7;
}

.status-refunded {
    color: #5A4BB2;
    background: #F0EDFF;
    border-color: #D8D1FC;
}

.nexus-management-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-top: 1px solid var(--nx-border);
    background: #FAFCFF;
}

.nexus-management-pagination__summary {
    color: var(--nx-text-muted, #647187);
    font-size: 12.5px;
}

.nexus-management-pagination__pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

    .nexus-management-pagination__pages button {
        min-width: 30px;
        height: 30px;
        padding: 0 8px;
        border: 1px solid rgba(7, 27, 60, .11);
        border-radius: 8px;
        background: #fff;
        color: var(--nx-navy);
        font-size: 12.5px;
        font-weight: 600;
        cursor: pointer;
    }

        .nexus-management-pagination__pages button.is-active {
            color: #fff;
            background: linear-gradient(135deg,#0D356A,#071B3C);
            border-color: transparent;
            cursor: default;
        }

        .nexus-management-pagination__pages button:disabled {
            opacity: .4;
            cursor: not-allowed;
        }

@media (max-width: 767px) {
    .nexus-management-pagination {
        padding: 12px;
    }

    .nexus-management-pagination__summary {
        flex: 1 0 100%;
        order: 2;
        text-align: center;
    }
}

/* Loading nhỏ riêng cho bảng, đặt lệch góc trên-phải (không dùng modal toàn màn hình
   để tránh race condition giữa show/hide làm loading bị kẹt mãi không tắt). */
.nexus-table-loading {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(7, 27, 60, .85);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(7, 27, 60, .18);
}

.nexus-table-loading__spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: nexus-table-spin .7s linear infinite;
}

@keyframes nexus-table-spin {
    to {
        transform: rotate(360deg);
    }
}
