:root {
    --nbr-navy: #0f1d3b;
    --nbr-navy-soft: #18274a;
    --nbr-green: #24a96e;
    --nbr-border: #e3e7ef;
    /*--nbr-bg: #f4f6fb;*/
    --nbr-bg: #ffffff;
    --nbr-text-main: #222;
    --nbr-text-sub: #6b7280;
    --nbr-radius-lg: 16px;
}

/* ===== RESET CƠ BẢN ===== */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--nbr-bg);
    color: var(--nbr-text-main);
}

a {
    text-decoration: none;
}

/* Xem trước ảnh lớn khi hover thumb (bảng danh sách admin) */
#dashImgHoverPreview.dash-img-hover-flyout,
.dash-img-hover-flyout {
    position: fixed;
    z-index: 20000;
    max-width: min(92vw, 520px);
    max-height: min(70vh, 480px);
    padding: 6px;
    background: #fff;
    border: 1px solid var(--nbr-border, #e3e7ef);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.22);
    pointer-events: auto;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease, visibility 0.12s;
    left: 0;
    top: 0;
}
#dashImgHoverPreview.dash-img-hover-flyout.is-visible,
.dash-img-hover-flyout.is-visible {
    opacity: 1;
    visibility: visible;
}
#dashImgHoverPreview.dash-img-hover-flyout img,
.dash-img-hover-flyout img {
    display: block;
    max-width: 100%;
    max-height: min(68vh, 460px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
}

/* ===== LAYOUT CHUNG ===== */
.layout {
    display: flex;
    min-height: 100vh;
    background: var(--nbr-bg);
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: #ffffff;
    border-right: 1px solid var(--nbr-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 18px 18px 20px;
}

.sidebar-brand-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

a.brand {
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    padding: 2px 4px 2px 2px;
    margin: -2px;
}

a.brand:focus-visible {
    outline: 2px solid var(--nbr-green);
    outline-offset: 2px;
}

a.brand--sidebar {
    flex: 1;
}

.brand-titles {
    min-width: 0;
}

.sidebar-close {
    flex-shrink: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid var(--nbr-border);
    background: #f8fafc;
    color: var(--nbr-navy);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar-close:hover {
    background: #eef2f7;
}

.sidebar-close:focus-visible {
    outline: 2px solid var(--nbr-green);
    outline-offset: 2px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: radial-gradient(circle at 0% 0%, #34d399, var(--nbr-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.brand-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--nbr-navy);
    line-height: 1.1;
}

.brand-sub {
    font-size: 12px;
    color: var(--nbr-text-sub);
}

.sidebar-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--nbr-text-sub);
    margin: 16px 4px 6px;
}

.nav-main {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-main li {
    margin-bottom: 4px;
}

.nav-link-main {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: var(--nbr-text-main);
    border: 1px solid transparent;
    transition: all .15s ease;
}

.nav-link-main i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.nav-link-main span.badge {
    margin-left: auto;
    font-size: 11px;
}

.nav-link-main.active {
    background: rgba(36, 169, 110, 0.08);
    color: var(--nbr-navy);
    border-color: rgba(36, 169, 110, 0.4);
    font-weight: 600;
}

.nav-link-main:hover {
    background: #f2f5ff;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--nbr-border);
    font-size: 12px;
    color: var(--nbr-text-sub);
}

.sidebar-footer strong {
    color: var(--nbr-navy);
}

/* ===== MAIN AREA ===== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
    height: 64px;
    background: #ffffff;
    border-bottom: 1px solid var(--nbr-border);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    display: none;
}

.breadcrumb-title {
    font-size: 13px;
    color: var(--nbr-text-sub);
}

.breadcrumb-title span {
    color: var(--nbr-navy);
    font-weight: 600;
}

.topbar-search {
    width: 260px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.topbar-icon-btn {
    border: none;
    background: transparent;
    position: relative;
    padding: 4px;
    cursor: pointer;
    color: var(--nbr-text-sub);
}

.topbar-icon-btn .badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #f97316;
    position: absolute;
    top: 4px;
    right: 2px;
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #c7d2fe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nbr-navy);
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar--has-photo {
    background: #e2e8f0;
    padding: 0;
}

.user-avatar__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 999px;
}

.user-avatar__initials,
.user-avatar__fallback {
    line-height: 1;
}

.user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--nbr-navy);
}

.user-role {
    font-size: 11px;
    color: var(--nbr-text-sub);
}

/* ===== CONTENT WRAPPER ===== */
.content {
    padding: 20px 20px 24px;
}

/* Bloc content lớn (header, stats, charts, list) */
.page-section {
    margin-bottom: 8px;
}

.page-section + .page-section {
    margin-top: 4px;
}

/* Title & subtitle trong content */
.page-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--nbr-navy);
}

.page-subtitle {
    font-size: 13px;
    color: var(--nbr-text-sub);
}

/* ===== CARD CHUNG ===== */
.card-clean + .card-clean {
    margin-top: 16px;
}

/* ===== STATS CARD ===== */
.stat-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: var(--nbr-radius-lg);
    padding: 14px 16px;
    background: linear-gradient(135deg, #ffffff, #f9fafb);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    border: 1px solid var(--nbr-border);
}

.stat-label {
    font-size: 13px;
    color: var(--nbr-text-sub);
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--nbr-navy);
}

.stat-trend {
    font-size: 12px;
}

.stat-trend i {
    margin-right: 2px;
}

.stat-trend.up {
    color: var(--nbr-green);
}

.stat-trend.down {
    color: #ef4444;
}

.stat-badge {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #15803d;
}

/* ===== TABLE CHUNG ===== */
.table-clean {
    margin-bottom: 0;
    font-size: 13px;
}

.table-clean tbody tr td:not(:last-child) a {
    color: #0a0a0a !important;
}

.table-clean thead th {
    font-weight: 500;
    font-size: 13px;
    color: #0f172a;
    background: #e5efff;
    border-bottom: 1px solid #cbd5f5;
}

.table-clean tbody tr:hover {
    background: #f9fafb;
}

/* Trạng thái pill */
.pill-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #bbf7d0;
    background: #ecfdf3;
    color: #166534;
}

.pill-status.draft {
    border-color: #e5e7eb;
    background: #f9fafb;
    color: #6b7280;
}

/* ===== CHARTS ===== */
.chart-container {
    position: relative;
    height: 260px;
}

.chart-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.chart-sub {
    font-size: 12px;
    color: var(--nbr-text-sub);
}

/* ===== DROPDOWNS ===== */

/* thuộc tính chung cho các dropdown */
.notif-dropdown,
.calendar-dropdown,
.user-dropdown {
    border-radius: 14px;
    border: 1px solid var(--nbr-border);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
    font-size: 13px;
}

/* Thông báo */
.notif-dropdown {
    width: 320px;
    overflow: hidden;
}

.notif-list {
    max-height: 260px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    gap: 10px;
    padding: 8px 12px;
    color: var(--nbr-text-main);
}

.notif-item:hover {
    background: #f9fafb;
}

.notif-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.notif-body {
    flex: 1;
}

.notif-title {
    font-size: 13px;
    font-weight: 500;
}

.notif-meta {
    font-size: 11px;
    color: var(--nbr-text-sub);
}

/* Lịch / Công việc */
.calendar-dropdown {
    width: 300px;
}

.calendar-list {
    padding: 6px 10px 8px;
    max-height: 260px;
    overflow-y: auto;
}

.calendar-item {
    display: flex;
    gap: 8px;
    padding: 6px 4px;
    border-radius: 8px;
}

.calendar-item:hover {
    background: #f9fafb;
}

.calendar-item .time {
    font-size: 12px;
    font-weight: 600;
    color: var(--nbr-navy);
    min-width: 50px;
}

.calendar-item .info .title {
    font-size: 13px;
    font-weight: 500;
}

.calendar-item .info .meta {
    font-size: 11px;
    color: var(--nbr-text-sub);
}

/* User / Tài khoản */
.user-dropdown {
    min-width: 230px;
    background: #ffffff;
}

.user-dropdown .dropdown-item {
    font-size: 13px;
    padding: 7px 12px;
}

.user-dropdown .dropdown-item i {
    width: 16px;
    text-align: center;
}

/* Lớp mờ khi mở sidebar (chỉ mobile) */
.sidebar-backdrop {
    display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    :root {
        --dash-topbar-h: calc(64px + env(safe-area-inset-top, 0px));
    }

    .topbar {
        height: auto;
        min-height: var(--dash-topbar-h);
        padding-top: env(safe-area-inset-top, 0);
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: var(--dash-topbar-h);
        width: min(300px, 92vw);
        max-width: 100%;
        z-index: 1050;
        height: calc(100dvh - var(--dash-topbar-h));
        min-height: 0;
        max-height: none;
        padding: 14px 14px calc(16px + env(safe-area-inset-bottom, 0)) 16px;
        box-shadow: none;
        border-right: 1px solid var(--nbr-border);
        transform: translateX(-100%);
        transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.26s;
        -webkit-overflow-scrolling: touch;
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(15, 23, 42, 0.18);
    }

    .sidebar-backdrop {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        top: var(--dash-topbar-h);
        z-index: 1040;
        background: rgba(15, 23, 42, 0.42);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s;
    }

    .sidebar-backdrop.is-visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    html.dash-sidebar-open,
    body.dash-sidebar-open {
        overflow: hidden;
    }

    .layout.dash-layout {
        flex-direction: row;
    }

    .topbar {
        padding-left: max(10px, env(safe-area-inset-left, 0));
        padding-right: max(8px, env(safe-area-inset-right, 0));
    }

    .topbar-breadcrumb-wrap {
        min-width: 0;
        flex: 1;
    }

    .breadcrumb-title {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .topbar {
        z-index: 1080;
    }

    .topbar-left {
        gap: 10px;
        min-width: 0;
        flex: 1;
    }

    .btn-sidebar-toggle {
        display: inline-flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 12px;
        border: 1px solid var(--nbr-border);
        background: #fff;
        color: var(--nbr-navy);
        -webkit-tap-highlight-color: transparent;
    }

    .btn-sidebar-toggle:focus-visible {
        outline: 2px solid var(--nbr-green);
        outline-offset: 2px;
    }

    .topbar-right {
        gap: 0.4rem;
        flex-shrink: 0;
    }

    .user-mini {
        gap: 0;
    }

    .user-mini .user-avatar {
        width: 40px;
        height: 40px;
    }

    .notif-dropdown,
    .user-dropdown,
    .calendar-dropdown {
        max-width: calc(100vw - 1.5rem);
    }

    .sidebar-close {
        display: inline-flex;
    }

    /* Menu: cho phép xuống dòng trên drawer hẹp */
    .nav-link-group > span {
        min-width: 0;
        line-height: 1.3;
    }

    .nav-link-group > span,
    .nav-link-main > span:not(.badge) {
        white-space: normal;
    }

    .nav-link-sub {
        white-space: normal;
        line-height: 1.35;
        padding: 0.4rem 0 0.4rem 0.1rem;
    }

    .nav-sub {
        padding-left: 1.25rem;
    }

    .topbar-search {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .content {
        padding: 14px 12px 20px;
    }

    .page-title {
        font-size: 1.2rem;
        line-height: 1.3;
    }

    .page-head {
        margin-bottom: 0.5rem;
    }
}

/* Điện thoại nhỏ: tăng vùng chạm, bảng & form thoáng hơn */
@media (max-width: 575.98px) {
    .content {
        padding: 12px 10px 18px;
    }

    .page-table .btn,
    .page-list-actions .btn,
    .page-head .btn {
        min-height: 40px;
    }

    .table-responsive {
        border-radius: 0.4rem;
    }
}

/* ===== CRUD LIST (Gii sinh) ===== */

/* Bảng CRUD */
.page-table tr > th,
.page-table tr > td {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    font-size: 13px;
}

/* Header list (Gii) */
.page-head .page-title {
    font-size: 20px;
    font-weight: 600;
}

.page-head .page-subtitle {
    font-size: 13px;
    color: #6b7280;
}

/* Card list chứa bảng CRUD */
.page-card-list {
    padding: 0;
}

/* Toolbar trên list */
.page-list-toolbar .toolbar-label {
    font-size: 12px;
}

.page-list-toolbar .toolbar-search {
    min-width: 220px;
}

/* Table trong list CRUD */
.page-table {
    font-size: 13px;
}

.page-table thead th {
    font-weight: 600;
    font-size: 13px;
    color: var(--nbr-navy);
    background: #e5efff;
    border-bottom-color: #cbd5f5;
    white-space: nowrap;
}

.page-table thead tr th:first-child {
    border-top-left-radius: 8px;
}

.page-table thead tr th:last-child {
    border-top-right-radius: 8px;
}

.page-table tbody td {
    border-top-color: #f3f4f6;
}

.page-table tbody tr:hover {
    background: #f9fafb;
}

/* Cột theo mức nội dung — bảng CRUD */
.page-table-col-cb {
    width: 40px;
    max-width: 40px;
}
.page-table-col-active {
    width: 4.5rem;
    min-width: 4.5rem;
    max-width: 4.5rem;
}
.page-table-col-order {
    width: 3.5rem;
    min-width: 3.5rem;
    max-width: 4.5rem;
    white-space: nowrap;
    text-align: center;
}
.page-table-col-narrow {
    width: 5rem;
    min-width: 4rem;
    max-width: 6rem;
    text-align: center;
    white-space: nowrap;
}
.page-table-col-actions {
    width: 120px;
    min-width: 110px;
    max-width: 130px;
    white-space: nowrap;
}
.page-table-cell-clip,
.page-table-cell-clip--sm,
.page-table-cell-clip--lg {
    max-width: 10rem;
    vertical-align: middle;
}
.page-table-cell-clip--sm {
    max-width: 7.5rem;
}
.page-table-cell-clip--lg {
    max-width: 16rem;
}
.page-table .page-table-cell-clip,
.page-table .page-table-cell-clip--sm,
.page-table .page-table-cell-clip--lg {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-wrap: break-word;
}
/* Trang xem chi tiết: nhãn cột bên trái cố định, nội dung xuống dòng */
main[class$="-view"] .table th:first-of-type,
main.content[class*="page-"][class$="-view"] .table tbody th,
main.content[class*="page-"][class$="-view"] .table thead th:first-child {
    width: 12rem;
    min-width: 10rem;
    color: #374151;
    vertical-align: top;
    white-space: normal;
}
main.content[class*="page-"][class$="-view"] .table td,
main.content[class*="page-"][class$="-view"] .table tbody th + td {
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    vertical-align: top;
    max-width: 48rem;
}

/* Link hành động */
.table-action-link {
    font-size: 13px;
    color: #4b5563;
    text-decoration: none;
    padding: 0 2px;
}

.table-action-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.table-action-sep {
    color: #d1d5db;
    padding: 0 2px;
}

/* Form CRUD gọn */
.page-form .form-label-sm {
    font-size: 12px;
    color: #6b7280;
}

.page-form .form-control-sm,
.page-form .form-select-sm {
    font-size: 13px;
}

.page-form .form-control-sm,
.page-form .form-select-sm,
.page-form textarea {
    border-radius: 0.45rem;
}

/* Footer list */
.page-list-footer {
    font-size: 12px;
}

/* ===== Pagination (hàm page) ===== */
.page-pagination-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.page-pagination-wrap .pagination {
    display: flex;
    justify-content: center;
    gap: 2px;
}

.page-pagination-wrap .page-link {
    min-width: 32px;
    text-align: center;
    padding: 4px 8px;
    font-size: 13px;
}

/* ===== Actions trong cột Hành động ===== */
.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

/* Nút icon tròn */
.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    color: #6b7280;
    font-size: 13px;
}

.btn-icon:hover {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #111827;
}

/* Nhóm menu 3 chấm */
.action-more {
    position: relative;
}

.action-more-menu {
    position: absolute;
    right: 0;
    top: 110%;
    min-width: 140px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--nbr-border);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.15);
    padding: 4px 0;
    z-index: 30;
    display: none;
}

.action-more-menu.show {
    display: block;
}

.action-more-item {
    width: 100%;
    padding: 6px 12px;
    font-size: 13px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    color: var(--nbr-text-main);
}

.action-more-item:hover {
    background: #f9fafb;
}

.action-more-item.text-danger {
    color: #dc2626;
}

.action-more-item.text-danger:hover {
    background: #fef2f2;
}

/* Divider giữa các section trong page */
.page-section-divider {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 16px 0;
}

/* Toolbar + meta + actions cho list */
.page-list-toolbar {
    font-size: 13px;
}

.page-list-meta {
    color: var(--nbr-text-sub);
}

.page-list-meta .fw-semibold {
    color: var(--nbr-navy);
}

.page-list-actions .btn {
    padding-inline: 0.6rem;
}
/* Bố cục tổng thể */
.layout {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    overflow-y: auto;          /* vẫn scroll được */
    -ms-overflow-style: none;  /* IE, Edge cũ */
    scrollbar-width: none;     /* Firefox */
}

/* Chrome, Edge mới, Safari */
.sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
}
/* Nhóm có dropdown */
.nav-group {
    margin-bottom: 4px;
}

/* Button group (dùng như link chính) */
.nav-link-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 0;
    padding: 0.55rem 1.15rem;
    cursor: pointer;
    text-align: left;
}

/* Icon caret */
.nav-caret {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

/* Sub menu */
.nav-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 0.4rem 2.2rem;
    display: none;
}

.nav-link-sub {
    display: block;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: #555;
    text-decoration: none;
}

.nav-link-sub:hover {
    color: #111;
}

/* Khi group mở */
.nav-group.is-open .nav-sub {
    display: block;
}

.nav-group.is-open .nav-caret {
    transform: rotate(180deg);
}

/* Active trong submenu nổi bật hơn */
.nav-link-sub.active {
    font-weight: 600;
    color: #0d6efd;
}
.nav-link-main span,
.nav-link-sub {
    white-space: nowrap;       /* không cho xuống dòng */
}

/* Nếu vẫn bị chật thì cho chữ nhỏ hơn 1 chút */
.nav-link-main span {
    font-size: 0.94rem;
}
/* Base chung cho tất cả trạng thái */
.btn.status-available,
.btn.status-deposit,
.btn.status-sold,
.btn.status-rented,
.btn.status-expired {
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    border-radius: 999px;
    line-height: 1.5;
    border: 1px solid transparent;
}

/* available = Còn hàng (xanh lá) */
.btn.status-available {
    background-color: #dcfce7;   /* nền xanh lá nhạt */
    color: #166534;              /* chữ xanh lá đậm */
    border-color: #22c55e;
}

/* deposit = Đặt cọc (cam) */
.btn.status-deposit {
    background-color: #fef3c7;   /* nền vàng cam nhạt */
    color: #92400e;              /* chữ nâu cam đậm */
    border-color: #f59e0b;
}

/* sold = Đã bán (đỏ) */
.btn.status-sold {
    background-color: #fee2e2;   /* nền đỏ nhạt */
    color: #b91c1c;              /* chữ đỏ đậm */
    border-color: #ef4444;
}

/* rented = Đã thuê (xanh dương) */
.btn.status-rented {
    background-color: #dbeafe;   /* nền xanh dương nhạt */
    color: #1d4ed8;              /* chữ xanh dương đậm */
    border-color: #3b82f6;
}

/* expired = Hết hạn (xám) */
.btn.status-expired {
    background-color: #e5e7eb;   /* nền xám nhạt */
    color: #374151;              /* chữ xám đậm */
    border-color: #6b7280;
}

/* Cho Select2 trông gần giống form-control-sm */
.select2-container--default .select2-selection--single {
    height: calc(1.5rem + 2px);
    padding: 0 .4rem;
    font-size: .875rem;
    border-radius: .2rem;
    border-color: #ced4da;
    display: flex;
    align-items: center;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    line-height: 1.4;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
}
.page-projects-form-body .ck-editor__editable_inline {
    min-height: 160px;
}
/* Thư viện ảnh chung */
.js-image-library-grid .img-lib-item {
    cursor: pointer;
    border-radius: .35rem;
    border: 1px solid transparent;
    overflow: hidden;
    position: relative;
    background-color: #f8fafc;
}

.js-image-library-grid .img-lib-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.js-image-library-grid .img-lib-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 .25rem .75rem rgba(13, 110, 253, .25);
}

.js-image-library-grid .img-lib-item .img-lib-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
    rgba(15, 23, 42, .0), rgba(15, 23, 42, .5));
    color: #fff;
    font-size: .7rem;
    padding: .25rem .35rem;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

/* Chiều cao CKEditor block */
.ck-editor__editable_inline {
    min-height: 250px;
    max-height: 500px;
}

.pi-upload-dropzone {
    border: 2px dashed #ced4da;
    border-radius: .5rem;
    padding: 1.75rem 1.25rem;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all .15s ease-in-out;
}

.pi-upload-dropzone:hover,
.pi-upload-dropzone.pi-upload-dropzone--hover {
    background-color: #eef4ff;
    border-color: #0d6efd;
}

.pi-upload-thumb {
    border-radius: .5rem;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 4px rgba(15, 23, 42, .04);
    position: relative;
}

.pi-upload-thumb-img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.pi-upload-thumb-body {
    padding: .5rem .6rem .45rem;
}

.pi-upload-thumb-title {
    font-size: .75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pi-upload-thumb-meta {
    font-size: .7rem;
    color: #6c757d;
}

.pi-upload-thumb-actions {
    position: absolute;
    top: .35rem;
    right: .35rem;
    display: flex;
    gap: .25rem;
}

.pi-upload-icon-btn {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    border: none;
    background: rgba(15,23,42,.75);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .7rem;
}

.pi-upload-icon-btn:hover {
    background: rgba(37,99,235,.95);
}

.pi-upload-icon-btn--danger {
    background: rgba(220,53,69,.9);
}

.pi-upload-icon-btn--danger:hover {
    background: rgba(220,53,69,1);
}
.page-filter-head {
    padding: .4rem .75rem;
    border: 1px solid rgba(13, 110, 253, 0.25);
    border-radius: .5rem .5rem 0 0;
    background: linear-gradient(135deg, #f5f9ff 0%, #ffffff 60%);
}

/* card filter bên trong include (form.card-clean.page-filter ...) */
.page-filter-panel .page-filter {
    margin-top: 0 !important;
    border-radius: 0 0 .5rem .5rem;
    border-color: rgba(13, 110, 253, 0.25);
    box-shadow: 0 0.4rem 1.2rem rgba(15, 23, 42, 0.06);
    background-color: #ffffff;
}

#js-toggle-filter.is-open {
    border-color: #0d6efd;
    background-color: #0d6efd;
    color: #fff;
    box-shadow: 0 0.25rem 0.75rem rgba(13, 110, 253, 0.35);
}

/* Bộ lọc danh sách: 1 dòng (cuộn ngang khi cần) — dùng cùng .row.g-2 có sẵn */
.page-filter--oneline .page-filter__row,
.page-filter--oneline > .row.g-2 {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-left: 0;
    margin-right: 0;
    gap: 0.5rem 0.35rem;
    align-items: flex-end;
}
.page-filter--oneline .page-filter__row > [class*="col-"],
.page-filter--oneline > .row.g-2 > [class*="col-"] {
    flex: 0 0 auto;
    max-width: none;
    width: auto;
    min-width: 6.5rem;
    padding-left: 0.25rem;
    padding-right: 0.25rem;
}
.page-filter--oneline .page-filter__row > [class*="col-"]:first-child,
.page-filter--oneline > .row.g-2 > [class*="col-"]:first-child {
    flex: 1 1 9rem;
    min-width: 8rem;
    max-width: 24rem;
}
.page-filter--oneline .form-label {
    line-height: 1.1;
    margin-bottom: 0.15rem;
    font-size: 0.72rem;
    color: var(--nbr-text-sub);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
@media (min-width: 992px) {
    .page-filter--oneline .form-label {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        border: 0;
    }
}

/* nút cực nhỏ */
.btn-xs {
    --bs-btn-padding-y: .15rem;
    --bs-btn-padding-x: .35rem;
    --bs-btn-font-size: .7rem;
}
/* Thư viện ảnh chung */
.js-image-library-grid .img-lib-item {
    cursor: pointer;
    border-radius: .35rem;
    border: 1px solid transparent;
    overflow: hidden;
    position: relative;
    background-color: #f8fafc;
}

.js-image-library-grid .img-lib-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.js-image-library-grid .img-lib-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 .25rem .75rem rgba(13, 110, 253, .25);
}

.js-image-library-grid .img-lib-item .img-lib-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
    rgba(15, 23, 42, .0), rgba(15, 23, 42, .5));
    color: #fff;
    font-size: .7rem;
    padding: .25rem .35rem;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
}

/* Chiều cao CKEditor block */
.ck-editor__editable_inline {
    min-height: 250px;
    max-height: 500px;
}

/* Cột trạng thái: đủ rộng để hiện full text */
.col-status {
    width: 190px;              /* anh chỉnh 180–220 tùy ý */
}

/* Nút trạng thái: không bị cắt chữ */
.col-status .status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;          /* đảm bảo dài vừa đủ cho "Còn hàng / Đang bán" */
    white-space: nowrap;       /* không xuống dòng giữa chừng */
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
/* Cột trạng thái: đủ rộng cho text đầy đủ */
.page-projects .col-prj-status {
    width: 190px;
}
/* Cột trạng thái: đủ rộng cho text đầy đủ */
.col-prj-status {
    width: 190px;
}

/* Nút trạng thái chung */
.prj-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 170px;          /* chỉnh tùy ý */
    padding: 0.15rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;        /* ~12px */
    font-weight: 600;
    white-space: nowrap;
    border-width: 1px;
    border-style: solid;
    background-color: #fff;
}

/* Đang quy hoạch */
.prj-status-planning {
    border-color: #6c757d;
    color: #495057;
    background-color: #f8f9fa;
}

/* Đang mở bán */
.prj-status-selling {
    border-color: #0d6efd;
    color: #0d6efd;
    background-color: #e7f0ff;
}

/* Đã bán hết */
.prj-status-sold_out {
    border-color: #dc3545;
    color: #dc3545;
    background-color: #fdecef;
}

/* Tạm dừng */
.prj-status-paused {
    border-color: #ffc107;
    color: #8a6d00;
    background-color: #fff8e1;
}

/* Item đang active trong dropdown (cho đậm hơn tí) */
.dropdown-menu .js-project-status-item.active {
    font-weight: 600;
}
.inputInTd{
    width: 40px;text-align: center;border:1px solid #ccc;border-radius: 3px
}

.js-dash-inline-image-picker {
    position: relative;
}

.js-dash-inline-image-picker .js-dash-inline-img {
    transition: opacity 0.18s ease, transform 0.12s ease, box-shadow 0.12s ease;
}

.js-dash-inline-image-picker:hover .js-dash-inline-img {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

.js-dash-inline-image-picker.is-uploading::after {
    content: "Đang lưu...";
    position: absolute;
    right: 2px;
    bottom: 2px;
    font-size: 10px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(13, 110, 253, 0.95);
    color: #fff;
    pointer-events: none;
}

/* ===== Sidebar Pro Refresh ===== */
.sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f7faf9 100%);
    border-right: 1px solid #e2ebe7;
    box-shadow: inset -1px 0 0 rgba(15, 23, 42, 0.02);
}

.sidebar-brand-row {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e7eeeb;
}

a.brand {
    border-radius: 14px;
    padding: 6px 8px 6px 4px;
}

a.brand:hover {
    background: rgba(36, 169, 110, 0.08);
}

.brand-logo {
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(36, 169, 110, 0.24);
}

.nav-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-main li {
    margin-bottom: 0;
}

.nav-link-main {
    min-height: 40px;
    border-radius: 12px;
    padding: 0.56rem 0.72rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #32484a;
}

.nav-link-main i {
    color: #4a6662;
    opacity: 0.95;
}

.nav-link-main:hover {
    background: #edf4f2;
    border-color: #d9e7e2;
    color: #1d3331;
}

.nav-link-main.active {
    background: linear-gradient(90deg, rgba(36, 169, 110, 0.18), rgba(36, 169, 110, 0.08));
    border-color: rgba(36, 169, 110, 0.35);
    color: #12342c;
}

.nav-link-group {
    padding: 0.56rem 0.72rem;
    border-radius: 12px;
}

.nav-link-group > span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-link-group .nav-caret {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.05);
    font-size: 0.66rem;
}

.nav-group.is-open > .nav-link-group,
.nav-link-group.active {
    background: rgba(36, 169, 110, 0.1);
    border: 1px solid rgba(36, 169, 110, 0.22);
}

.nav-sub {
    margin-top: 5px;
    padding: 0.35rem 0.2rem 0.25rem 0.62rem;
    border-left: 2px solid #dce9e4;
}

.nav-link-sub {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0.36rem 0.48rem;
    border-radius: 9px;
    font-size: 0.86rem;
    color: #4a5d5c;
    transition: background 0.14s ease, color 0.14s ease;
}

.nav-link-sub i {
    width: 15px;
    text-align: center;
    color: #5b7672;
}

.nav-link-sub:hover {
    background: #edf4f2;
    color: #173a34;
}

.nav-link-sub.active {
    color: #0f5132;
    background: rgba(25, 135, 84, 0.12);
    font-weight: 600;
}

.sidebar-footer {
    margin-top: 14px;
    border-top: 1px dashed #d4e3dd;
    background: rgba(255, 255, 255, 0.64);
    border-radius: 10px;
    padding: 10px 10px 6px;
}

@media (max-width: 991.98px) {
    .sidebar {
        background: #ffffff;
        border-right: 1px solid #dfe8e4;
        box-shadow: 0 14px 36px rgba(15, 23, 42, 0.2);
    }
}

/* ===== Form Professional + Richtext ===== */
.page-form.card-clean {
    border: 1px solid #dfe8e4;
    border-radius: 14px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    padding: 14px 14px 10px;
}

.page-form .form-label {
    color: #1f3140;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
}

.page-form .form-control,
.page-form .form-select {
    border-radius: 10px;
    border-color: #d9e4e2;
    min-height: 2.2rem;
}

.page-form .form-control:focus,
.page-form .form-select:focus {
    border-color: #6ebc9a;
    box-shadow: 0 0 0 0.18rem rgba(36, 169, 110, 0.14);
}

.page-form textarea.form-control {
    min-height: 110px;
}

.page-form .js-richtext-detail + .cke,
.page-form textarea[name*="[content"] + .cke,
.page-form textarea[name*="[detail"] + .cke,
.page-form textarea[name*="[html_content]"] + .cke {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #d8e4e0 !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.page-form .cke_top {
    background: linear-gradient(180deg, #f8fbfa, #f1f6f4) !important;
    border-bottom: 1px solid #d6e4df !important;
}

.page-form .cke_bottom {
    background: #f8fbfa !important;
    border-top: 1px solid #d6e4df !important;
}