﻿:root {
    --defaultAppColor: #00b14f;
    --defaultHintAppColor: #5f6368;
}

.text-hint-app-defaut {
    color: var(--defaultHintAppColor) !important
}

.text-app-defaut {
    color: var(--defaultAppColor) !important
}

.bg-grab,
.bg-app-default {
    background: var(--defaultAppColor) !important;
}

.border-app-default {
    border-color: var(--defaultAppColor) !important;
}
/* ============================================
           RESET
           ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Source Sans Pro', sans-serif !important;
    background: #f8f9fa;
    font-size: 14px;
}

/* ============================================
           LAYOUT CHÍNH
           ============================================ */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Chiều cao tối thiểu = 100vh */
    background: white;
}

/* ============================================
           HEADER - CỐ ĐỊNH TRÊN CÙNG
           ============================================ */
.app-header {
    background: white;
    color: white;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: sticky;
    top: 0;
    z-index: 10;
}

    .app-header .logo {
        font-size: 20px;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .app-header .logo i {
            font-size: 28px;
        }

    .app-header .header-actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }

/* ============================================
           BODY - CHỨA SIDEBAR + CONTENT
           ============================================ */
.app-body {
    display: flex;
    flex: 1;
    /* Đẩy footer xuống dưới */
    background: #f8f9fa;
}

/* ============================================
           SIDEBAR LEFT
           ============================================ */
.app-sidebar-left {
    width: 240px;
    background: white;
    border-right: 1px solid #dadce0;
    padding: 16px 0;
    flex-shrink: 0;
    height: auto;
    /* KHÔNG cố định height */
    min-height: 100%;
    /* Chiều cao tối thiểu = content */
    overflow-y: auto;
}

    .app-sidebar-left .sidebar-title {
        font-size: 12px;
        font-weight: 600;
        color: var(--defaultHintAppColor);
        padding: 0 16px 8px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .app-sidebar-left .menu-item {
        padding: 5px 10px 5px 16px;
        cursor: pointer;
        transition: all 0.2s;
        font-size: 14px;
        color: #3c4043;
        display: flex;
        align-items: center;
        gap: 12px;
        border-left: 3px solid transparent;
    }

        .app-sidebar-left .menu-item:hover:not(:has(.sub-menu-item)) {
            background: #e9e8ea;
        }

        .app-sidebar-left .menu-item.active {
            color: #1a73e8;
            border-left-color: #1a73e8;
            font-weight: 500;
        }

        .app-sidebar-left .menu-item i {
            font-size: 18px;
            width: 24px;
            text-align: center;
        }

        .app-sidebar-left .menu-item .badge {
            margin-left: auto;
            background: #d93025;
            color: white;
            font-size: 10px;
            padding: 1px 8px;
            border-radius: 10px;
        }


    .app-sidebar-left .menu-divider {
        border-top: 1px solid #dadce0;
        margin: 8px 16px;
    }

    .app-sidebar-left .sub-menu-item {
        display: none;
        background: white;
    }

    .app-sidebar-left .menu-item:hover .sub-menu-item {
        display: flex;
        padding: 10px 0px 10px 16px;
    }

        .app-sidebar-left .menu-item:hover .sub-menu-item:hover {
            background: #e9e8ea;
        }

/* ============================================
           CONTENT
           ============================================ */
.app-content {
    flex: 1;
    padding: 5px;
    background: #f8f9fa;
    min-width: 0;
}

    .app-content .content-wrapper {
        margin: 0 auto;
        background: white;
        border-radius: 12px;
        padding: 24px;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    }

        .app-content .content-wrapper h1 {
            font-size: 24px;
            color: #202124;
            margin-bottom: 16px;
        }

        .app-content .content-wrapper p {
            /*color: var(--defaultHintAppColor);*/
            line-height: 1.8;
        }

/* ============================================
           FOOTER - TỰ NHIÊN, KHÔNG CỐ ĐỊNH
           ============================================ */
.app-footer {
    background: var(--defaultAppColor);
    color: #9aa0a6;
    flex-shrink: 0;
    width: 100%;
}

    .app-footer .footer-inner {
        padding: 32px 40px 0px;
        max-width: 1400px;
        margin: 0 auto;
    }

/* ===== FOOTER GRID ===== */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 20px;
}

    .footer-grid .col h5 {
        color: white;
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 16px;
    }


    .footer-grid .col ul {
        list-style: none;
        padding: 0;
    }

        .footer-grid .col ul li {
            margin-bottom: 6px;
        }

            .footer-grid .col ul li a {
                text-decoration: none;
                transition: color 0.2s;
                display: flex;
                align-items: center;
                gap: 8px;
            }

                .footer-grid .col ul li a:hover {
                    color: white;
                }

                .footer-grid .col ul li a i {
                    font-size: 14px;
                    width: 20px;
                }

/* ===== QUẢN LÝ TRẠNG THÁI ===== */
.state-logged-out,
.state-logged-in {
    display: flex;
}
/* ===== USER BUTTON ===== */
.user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border: none;
    border-radius: 30px;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    color: #3c4043;
    text-decoration: none;
}

    .user-btn:hover {
        background: #f1f3f4;
    }

    .user-btn .user-name {
        font-weight: 500;
        font-size: 14px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
/* ===== LOGIN BUTTON ===== */
.login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

    .login-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
    }

    .login-btn i {
        font-size: 18px;
    }

.avatar {
    background: var(--defaultAppColor) !important;
    border: 2px solid var(--bs-gray-100);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
}

    .avatar.lg {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        font-size: 18px;
        color: white;
        flex-shrink: 0;
    }
/* ===== BOOTSTRAP DROPDOWN CUSTOM ===== */
.dropdown-menu {
    min-width: 260px;
    padding: 6px 0;
    border-radius: 12px;
    border: 1px solid #dadce0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
}

.dropdown-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--defaultHintAppColor);
    display: flex;
    align-items: center;
    gap: 12px;
}

    .dropdown-item:hover {
        background: #f8f9fa;
        color: #202124;
    }

    .dropdown-item i {
        font-size: 18px;
        width: 24px;
        text-align: center;
    }

    .dropdown-item .shortcut {
        margin-left: auto;
        font-size: 11px;
        color: #bdc1c6;
        background: #f1f3f4;
        padding: 1px 8px;
        border-radius: 4px;
    }

    .dropdown-item.danger {
        color: var(--danger-500);
    }

        .dropdown-item.danger:hover {
            background: #fce8e6;
        }

.dropdown-divider {
    margin: 4px 0;
}

.dropdown-user-info {
    padding: 12px 16px;
    border-bottom: 1px solid #dadce0;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .dropdown-user-info .info {
        text-align: left;
    }

        .dropdown-user-info .info .name {
            font-weight: 600;
            color: #202124;
            font-size: 14px;
        }

        .dropdown-user-info .info .email {
            font-size: 12px;
            color: #9aa0a6;
        }

        .dropdown-user-info .info .role {
            font-size: 11px;
            color: var(--defaultAppColor);
            background: #e8f0fe;
            padding: 2px 5px;
            border-radius: 10px;
            display: inline-block;
            margin-top: 2px;
        }

#logo-header {
    display: block;
    height: 35px;
    width: 91px;
    background-size: contain;
    background-image: url(/Content/images/logo.png);
    background-repeat: no-repeat;
    font: 0 / 0 a !important;
    color: transparent;
    text-shadow: none;
    background-color: transparent;
    border: 0;
}

#CaptchaImage {
    border: var(--bs-border-width) solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    color: #555;
    display: inline-block;
    font-size: 20px;
    height: 40px;
    min-width: 250px;
    line-height: 1.42857;
    transition: border-color .15s ease-in-out 0s,box-shadow .15s ease-in-out 0s;
    vertical-align: middle;
    background-repeat: no-repeat; /* Không lặp lại */
    background-position: center; /* Căn giữa hình ảnh */
    background-size: contain; /* Đảm bảo hình nằm gọn trong khung, không bị mất góc */
    object-fit: none; /* Giữ tỷ lệ khung hình, không bị bóp méo */
}

#CaptchaInputText {
    text-transform: uppercase;
}

.select2-selection.select2-selection--single,
.select2-selection.select2-selection--multiple {
    padding-top: 10px !important;
}

.select2-selection.select2-selection--single,
.select2-selection.select2-selection--multiple,
a.btn.bg-grab,
button.btn.bg-grab,
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]) {
    height: 40px;
    min-width: 40px;
    align-content: center;
}


/* ===== WRAPPER ===== */
.notfound-wrapper {
    width: 100%;
    max-width: 700px;
    padding: 2rem 1.5rem;
}

/* ===== CARD CHÍNH ===== */
.notfound-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 48px;
    padding: 3rem 2rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 20, 40, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.2s ease;
    text-align: center;
}

    .notfound-card:hover {
        transform: scale(1.005);
    }

/* ===== ICON 404 ===== */
.error-icon {
    font-size: 5.5rem;
    background: rgba(43, 108, 148, 0.08);
    width: 130px;
    height: 130px;
    line-height: 130px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(43, 108, 148, 0.12);
    border: 1px solid rgba(43, 108, 148, 0.1);
}

    .error-icon i {
        filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
        animation: float 3s ease-in-out infinite;
    }

/* ===== TIÊU ĐỀ ===== */
.main-title {
    font-weight: 700;
    font-size: 2.6rem;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

    .main-title span {
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

.title-secondary {
    font-size: 1.9rem;
    line-height: 1.2;
    margin-top: -0.1rem;
    color: #1a3f58;
    font-weight: 600;
}

/* ===== MÔ TẢ ===== */
.description {
    font-size: 1.1rem;
    color: #2f4d66;
    margin: 0.5rem 0 1.8rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

    .description i {
        margin: 0 4px;
    }

/* ===== NHÓM NÚT ===== */
.btn-group-custom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.8rem 1rem;
    margin-top: 0.5rem;
}

.btn-primary-custom {
    border: none;
    padding: 0.7rem 2rem;
    border-radius: 60px;
    font-weight: 600;
    color: white;
    box-shadow: 0 6px 14px rgba(28, 90, 122, 0.3);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

    .btn-primary-custom:hover {
        background: #0f435e;
        transform: translateY(-3px);
        box-shadow: 0 12px 24px rgba(28, 90, 122, 0.35);
        color: white;
        text-decoration: none;
    }

.btn-outline-custom {
    background: transparent;
    border: 1.5px solid;
    padding: 0.7rem 1.8rem;
    border-radius: 60px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

    .btn-outline-custom:hover {
        background: rgba(28, 90, 122, 0.08);
        border-color: #1a5a7a;
        color: #0a2b3f;
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(28, 90, 122, 0.08);
        text-decoration: none;
    }

/* ===== MÃ LỖI ===== */
.error-code {
    font-size: 0.9rem;
    font-weight: 400;
    background: rgba(0, 0, 0, 0.02);
    padding: 0.3rem 1.2rem;
    border-radius: 60px;
    display: inline-block;
    letter-spacing: 1px;
    border: 1px solid rgba(43, 108, 148, 0.08);
    margin-top: 1.5rem;
}

    .error-code i {
        margin-right: 0.5rem;
    }

/* ===== LINK HỖ TRỢ ===== */
.support-link {
    margin-top: 1.2rem;
    font-size: 0.85rem;
    color: #4b6e88;
    opacity: 0.7;
}

    .support-link a {
        text-decoration: none;
        font-weight: 500;
    }

        .support-link a:hover {
            text-decoration: underline;
        }

    .support-link i {
        margin-right: 0.5rem;
    }

/* ===== ANIMATION ===== */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .notfound-card {
        padding: 2rem 1.2rem;
        border-radius: 32px;
    }

    .main-title {
        font-size: 2.1rem;
    }

    .title-secondary {
        font-size: 1.5rem;
    }

    .error-icon {
        width: 100px;
        height: 100px;
        line-height: 100px;
        font-size: 4rem;
    }

    .description {
        font-size: 1rem;
        padding: 0 0.2rem;
    }

    .btn-group-custom {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        width: 100%;
        justify-content: center;
    }
}

table.fix-width {
    table-layout: fixed;
    width: 100%;
}

    table.fix-width th,
    table.fix-width td {
        word-wrap: break-word;
    }


.context-menu {
    background-color: white;
    position: fixed;
    visibility: hidden;
    border: dotted 1px
}

    .context-menu.active {
        visibility: visible;
        z-index: 9999999999999;
    }

    .context-menu .item {
        padding: 10px 15px 10px 10px;
        background-color: white;
        min-width: 200px;
    }

        .context-menu .item:hover {
            cursor: pointer;
            background-color: #0d6efd !important;
            color: white !important;
        }

            .context-menu .item:hover i {
                color: white !important;
            }

    .context-menu
    .item-context-menu {
        display: block;
    }

.item-context-menu {
    display: none;
}

.current-modal .modal-dialog:has(.canvas-content ),
.current-modal .modal-dialog:has(iframe) {
    width: auto !important;
    max-width: fit-content !important;
}

.current-modal .modal-dialog:has(iframe) {
    min-width: 800px;
}

.current-modal .modal-dialog iframe {
    width: 800px;
    min-width: 800px;
    min-height: calc(100vh - 50px);
}

.current-modal .modal-dialog .canvas-content {
    position: relative;
}

.current-modal .modal-dialog .canvas-content {
    position: relative
}

    .current-modal .modal-dialog .canvas-content .canvas-pdf {
        position: relative
    }

    .current-modal .modal-dialog .canvas-content .canvas-pdf-paint {
        position: absolute;
        top: 0;
        left: 0;
    }

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
    color: var(--bs-body-color);
}

.pager {
    float: left;
    overflow: hidden;
    width: 60%;
    margin: 0 auto !important;
}

.page-a, .pagination, .page-select {
    float: left;
    border-radius: 4px;
    overflow: hidden;
}

    .page-a a, .page-a span, .pagination a, .pagination span {
        padding: 5px 10px;
        font-size: 12px;
        -moz-border-radius: 3px;
        -webkit-border-radius: 3px;
        border-radius: 3px;
        float: left;
        text-decoration: none;
        background-color: #fff;
        border: 1px solid #ddd;
        color: #656d78;
        margin-left: 3px;
        cursor: pointer;
    }

        .page-a span.current {
            background-color: #eee;
        }

.title-header {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    margin: 0 !important;
}
