﻿/* =============================================================================
   1. BIẾN HỆ THỐNG (VARIABLES) & RESET
   ============================================================================= */
:root {
   
    /* Fonts hệ thống */
    --font-title: 'Oswald', sans-serif; /* Dùng cho Tiêu đề, Số liệu */
    --font-heading: 'Montserrat', sans-serif; /* Dùng cho Labels, Buttons */
    --font-body: 'Inter', sans-serif; /* Dùng cho Nội dung, Input */

    --navy-dark: #04243d; /* Nền Sidebar/Header chính */
    --navy-bg: #04243d; /* Nền Sidebar/Header chính */
    --navy-light: #011f37; /* Nền Sidebar item / Header grid */
    --gold-primary: #d4a64a; /* Vàng đồng trung tính */
    --gold-light: #f4c55a; /* Vàng sáng highlight */
    --gold-bright: #f4c55a;
    --gold-glow: rgba(212, 166, 74, 0.3);
    --bg-workspace: #f0f2f5;
    --white: #ffffff;
    --font-title: "Oswald", cursive;
    --font-heading: "Montserrat", sans-serif;
    --font-body: "Inter", sans-serif; /* Dùng cho Nội dung, Input */
    --bg-body: #f0f2f5; /* Xám nhạt vùng làm việc */
    --border-color: #e2e8f0;
     --text-main: #1e293b;
    --text-muted: #64748B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --font-title: "Oswald", cursive; /* Dùng cho Tiêu đề, Số liệu */
    --font-heading: "Montserrat", sans-serif; /* Dùng cho Labels, Buttons */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --header-height: 55px;
    --footer-height: 32px;
    --sidebar-width: 260px;
    --right-panel-width: 360px;
    --shadow-erp: 0 2px 4px rgba(0, 0, 0, 0.08);
    --gold: #d4a64a;
}
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,body {
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
    color: var(--text-main);
}

.title-bebas, .stat-value, .brand-name {
    font-family: var(--font-title);
    text-transform: uppercase; /* Ép in hoa để giống Bebas */
    letter-spacing: 1px;
}
.luxury-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase; /* Luôn in hoa */
    letter-spacing: -0.5px; /* Thu hẹp khoảng cách chữ lại một chút */
    line-height: 1; /* Giảm khoảng cách dòng */
    color: var(--gold); /* Màu vàng ánh kim */
}
.title-inline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.luxury-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient( to right, transparent, var(--gold-primary), transparent );
    border: none;
}
/* Divider đặc trưng: Vàng ánh kim mờ dần */
.luxury-divider-end {
    height: 1px;
    background: linear-gradient(to right, var(--gold), rgba(212, 166, 74, 0.1));
    margin: 10px 0;
    border: none;
}
/* Đường kẻ đứt đoạn cho Voucher/Vé */
.luxury-divider-dashed {
    height: 0;
    border-top: 1.5px dashed #E2E8F0;
    margin: 15px 0;
}
/* Title đặc biệt font Bebas Neue */
.title-bebas {
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 2px;
    color: var(--gold);
}
.divider {
    height: 1px;
    width: 100%;
    background: var(--gold-primary);
    border: none;
}
header {
    height: var(--header-height);
    background: var(--navy-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: relative;
    z-index: 1001;    
}
.branding {
    display: flex;
    align-items: center;
    gap: 15px;
}
.branding h1 {
        font-family: var(--font-title);
        font-size: 1.8rem;
        margin: 0;
        color: var(--gold-light);
        letter-spacing: 1.5px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }
/* =============================================================================
   2. CẤU TRÚC KHUNG (LAYOUT SYSTEM) - Fixed SaaS Style
   ============================================================================= */
.erp-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.brand-area {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.brand-name {
    font-family: var(--font-title);
    font-size: 1.6rem;
    color: var(--gold-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 1.5px;
}
.wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}
/* Sidebar Left */
.sidebar {
    width: 260px;
    background: var(--navy-bg);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: 0.3s;
}
.sidebar-title {
    padding: 20px 15px 10px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--gold);
    font-weight: 800;
    letter-spacing: 1px;
}
.sidebar-left {
    width: var(--sidebar-width);
    background: var(--navy-light);
    color: #d1d5db;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 1000;
}
.sidebar-header {
    padding: 15px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}
.nav-item {
    padding: 12px 6px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #CBD5E1;
    transition: 0.2s;
}
.nav-item i {
        width: 18px;
        text-align: center;
        color: var(--gold);
    }
.nav-item:hover, .nav-item.active {
        background: rgba(255,255,255,0.05);
        color: var(--white);
    }
.nav-item.active {
        border-left: 4px solid var(--gold);
        box-shadow: inset 10px 0 20px rgba(0,0,0,0.2);
    }
.menu-tree {
    list-style: none;
    padding: 0;
    margin: 0;
}
.menu-link {
    padding: 12px 6px;
    display: flex;
    align-items:flex-end;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.3s;
}
.menu-link:hover,
.menu-link.active {
        background: rgba(255, 255, 255, 0.05);
        color: var(--gold-light);
        box-shadow: inset 4px 0 0 var(--gold-primary);
    }
.menu-link i {
        color: var(--gold-primary);
        width: 20px;
        text-align: left;
    }
/* Main Workspace */
.wrapper {
    display: flex;
    flex: 1;
    height: calc(100vh - 87px);
    overflow: hidden;
}
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.tabs-bar {
    background: #CBD5E1;
    padding: 8px 8px 0 10px;
    display: flex;
    gap: 4px;
}
.tab {
    background: #94A3B8;
    padding: 8px 18px;
    border-radius: 6px 6px 0 0;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--navy-bg);
    cursor: pointer;
    transition: 0.3s;
}
.tab.active {
        background: var(--bg-body);
        color: var(--navy-bg);
    }
.workspace {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
}
/* Footer / Status Bar */
footer {
    height: var(--footer-height);
    background: var(--navy-dark);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 0.7rem;
   
}
.footer-tools {
    display: flex;
    gap: 20px;
}
.tool-link {
    color: var(--gold-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tool-link:hover {
        color: var(--white);
    }
/* =============================================================================
   3. CÁC THÀNH PHẦN GIAO DIỆN (UI COMPONENTS)
   ============================================================================= */
.card {
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 8px;
}
.card-header-luxury {
    font-family: var(--font-title);
    font-size: 1.1rem;
    color: var(--navy-bg);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-header-erp {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--navy-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
}
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    z-index: 999;
}
#overlay.show {
        display: block;
    }
.show {
    display: block !important;
    animation: fadeIn 0.2s;
}
.showDesktop {
    display: block !important;
    animation: fadeIn 0.2s;
}
.hideDesktop {
    display: none !important;
    animation: fadeIn 0.2s;
}
/* Card phía trên */
.card-input {
    flex: 0 0 auto; /* Không co giãn, giữ kích thước theo nội dung */
}
/* Card phía dưới - Quan trọng */
.card-grid-fill {
    flex: 1; /* Tự động chiếm toàn bộ không gian còn lại */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ngăn card bị tràn */
}
.grid-scroll-area {
    flex: 1;
    overflow-y: auto; /* Tạo thanh cuộn riêng cho lưới dữ liệu */
    margin-top: 5px;
}
/* Form layout */
.form-row {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.flex-1 {
    flex: 1;
    min-width: 150px;
}
.flex-2 {
    flex: 2;
    min-width: 250px;
}
/* Banner Right Styling */
.ref-card {
    background: var(--navy-dark);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid var(--gold-primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.ref-value-title {
    font-family: var(--font-title);
    font-size: 1.4rem;
    color: var(--gold-light);
    margin-top: 5px;
}
.ref-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #cbd5e0;
    margin-bottom: 5px;
}
.ref-label {
    font-size: 0.65rem;
    color: var(--gold-primary);
    font-weight: bold;
}
/* Form Elements */
.erp-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--navy-bg);
    margin-bottom: 5px;
    text-transform: uppercase;
}
.form-group {
    margin-bottom: 12px;
}
.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    text-transform: uppercase;
    margin-bottom: 4px;
    color: var(--navy-light);
    font-weight: 600;
}
td, th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Label kiểu Luxury: Chữ in hoa, đậm, nhỏ gọn */
.erp-label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--navy-bg);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.form-control:focus {
        border-color: var(--gold-primary);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(212, 166, 74, 0.1);
    }
.form-control::placeholder {
        color: #cbd5e0;
    }
.form-control, .erp-input {
    width: 100%;
    padding: 8px 12px;
    background: #F8FAFC;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: 0.3s;
}
.form-control:focus {
        border-color: var(--gold);
        background: #FFF;
        box-shadow: 0 0 0 3px var(--gold-glow);
    }
/* Custom Select */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4A64A' stroke-width='3'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px;
}
select.erp-input{
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4A64A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 35px !important;
    cursor: pointer;
    height: 30px;
}
/* Fix lỗi hiển thị trên IE */
select::-ms-expand {
    display: none;
}
/* Input Groups */
.input-group {
    display: flex;
    width: 100%;
}
.input-group-text {
    background: #E2E8F0;
    border: 1px solid var(--border-color);
    border-right: none;
    padding: 0 10px;
    display: flex;
    align-items: center;
    color: var(--gold);
    border-radius: 4px 0 0 4px;
}
.input-group .form-control {
    border-radius: 0 4px 4px 0;
}
/* Buttons */
.btn-erp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}
.btn-gold-filled {
    background: linear-gradient(135deg, var(--gold), var(--gold-bright));
    color: var(--navy-bg);
}
.btn-gold-filled:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px var(--gold-glow);
    }
.btn-outline-gold {
    background: transparent;
    border: 1.5px solid var(--gold);
    color: var(--gold);
}
.btn-outline-gold:hover {
        background: var(--gold-glow);
    }
.btn-navy {
    background: var(--navy-bg);
    color: var(--gold);
}
.btn-action-dots {
    cursor: pointer;
    color: var(--gold-primary);
    padding: 5px;
    border-radius: 50%;
    transition: 0.2s;
}
.btn-action-dots:hover {
        background: #f1f5f9;
    }
/* Nút kích thước nhỏ (Dùng trong Grid/Table) */
.btn-erp-sm {
    padding: 5px 12px;
    font-size: 0.65rem;
    border-radius: 3px;
    background: var(--navy-bg);
    color: var(--gold);
    border: 1px solid var(--gold);
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.btn-erp-sm:hover {
        background: var(--gold);
        color: var(--navy-bg);
    }
/* Action Button trong Grid */
.btn-action-edit {
    background: none;
    border: none;
    color: var(--gold-primary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-action-edit:hover {
        color: var(--navy-dark);
        transform: scale(1.1);
    }
.btn-action-delete {
    background: none;
    border: none;
    color: indianred;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
}
.btn-action-delete:hover {
        color: red;
        transform: scale(1.1);
    }
/* =============================================================================
   4. HỆ THỐNG LƯỚI DỮ LIỆU (ERP GRID)
   ============================================================================= */
.grid-scroll-area {
    flex: 1;
    overflow: auto;
    border: 1px solid var(--border-color);
    background: #fff;
}
.erp-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.8rem;
}
.erp-grid th {
        position: sticky;
        top: 0;
        background: var(--navy-bg);
        color: var(--gold);
        padding: 12px 10px;
        text-align: left;
        z-index: 10;
        font-family: var(--font-heading);
        text-transform: uppercase;
        font-size: 0.65rem;
        border-bottom: 2px solid var(--gold);
        white-space: nowrap;
    }
.erp-grid td {
        padding: 8px 10px;
        border-bottom: 1px solid #F1F5F9;
        background: #fff;
        vertical-align: middle;
    }
.erp-grid tr:hover td {
        background: rgba(212, 166, 74, 0.05);
        cursor: pointer;
    }
.erp-grid tr:nth-child(even) td {
        background: #F8FAFC;
    }
/* Sticky Cột Thao tác */
.col-action {
    position: sticky;
    right: 0;
    background: #fff !important;
    text-align: center;
    border-left: 1px solid var(--border-color);
    box-shadow: -3px 0 10px rgba(0,0,0,0.05);
    z-index: 5;
}
.erp-grid th:last-child {
    position: sticky;
    right: 0;
    z-index: 11;
}
.text-right {
    text-align: right !important;
    font-family: var(--font-title);
    font-size: 1rem;
}
.text-center {
    text-align: center !important;
}
.badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.bg-success {
    background: #D1FAE5;
    color: #065F46;
    border-color: #10B981;
}
.bg-danger {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #EF4444;
}
.bg-warning {
    background: #FEF3C7;
    color: #92400E;
    border-color: #F59E0B;
}
/* =============================================================================
   5. PANEL CHI TIẾT & MOBILE BOTTOM SHEET
   ============================================================================= */
.panel-right-container {
    width: 320px;
    background: #fff;
    border-left: 1px solid var(--gold);
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
}
.right-panel-container {
    width: 320px;
    background: #fff;
    border-left: 1px solid var(--gold);
    padding: 10px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
}
.panel-heading {
    font-family: var(--font-title);
    font-size: 1.2rem;
    color: var(--navy-bg);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.footer-info {
    display: none;

}
/* =============================================================================
   6. DASHBOARD WIDGETS
   ============================================================================= */
/* GRID LAYOUT */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px; /* Padding < 10px */
    margin-bottom: 8px;
}

.main-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 8px;
}

/* STAT CARD STYLE */
.stat-card {
    background: white;
    padding: 10px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border-left: 3px solid var(--gold);
}

.stat-icon {
    width: 45px;
    height: 45px;
    background: rgba(212, 166, 74, 0.1);
    color: var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 12px;
}

.icon-red {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.icon-navy {
    color: var(--navy-bg);
    background: rgba(5, 25, 51, 0.1);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: #64748B;
    letter-spacing: 0.5px;
}

.stat-value {
    font-family: 'Bebas Neue';
    font-size: 1.6rem;
    color: var(--navy-bg);
    margin-top: 2px;
}

.stat-value small {
        font-family: 'Inter';
        font-size: 0.8rem;
    }

.stat-trend {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: bold;
    color: #94A3B8;
}

.trend-up {
    color: #10B981;
}

/* ALERT LIST STYLE */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.alert-item {
    padding: 8px;
    background: #F8FAFC;
    border-radius: 4px;
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    align-items: flex-start;
}

.alert-item i {
        color: #3B82F6;
        margin-top: 2px;
    }

.alert-item.warn {
        background: #FEF2F2;
    }

.alert-item.warn i {
            color: #EF4444;
        }

.alert-msg b {
    color: var(--navy-bg);
    display: block;
    margin-bottom: 2px;
}
/* =============================================================================
   7. DROPDOWN
   ============================================================================= */
.btn-toggle-menu {
    color: var(--gold-primary);
    cursor: pointer;
    font-size: 1.4rem;
    display: none;
}
.dropdown {
    position: relative;
    display: inline-block;
}
.user-profile {
    color: var(--gold-primary);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: 0.3s;
}
.user-profile:hover {
        background: rgba(255, 255, 255, 0.1);
    }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: 110%;
    background: var(--white);
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    display: none;
    z-index: 2000;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.dropdown-menu a {
        color: var(--navy-dark);
        padding: 10px 15px;
        text-decoration: none;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.8rem;
        transition: 0.2s;
        border-bottom: 1px solid #f1f5f9;
    }
.dropdown-menu a:hover {
            background: #f8fafc;
            color: var(--gold-primary);
        }
.dropdown-menu i {
        width: 16px;
        color: var(--gold-primary);
    }
/* Hiệu ứng mượt mà */
.animate-fadeIn {
    animation: fadeIn 0.4s ease-out;
}
/* Mobile logic (Bottom Sheet) */
@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -260px;
        height: 100%;
        z-index: 2000;
    }

    .panel-right-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85vh;
        z-index: 9999;
        transform: translateY(100%);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-top: 4px solid var(--gold);
        box-shadow: 0 -15px 35px rgba(0,0,0,0.3);
    }

    .right-panel-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85vh;
        z-index: 9999;
        transform: translateY(100%);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 20px 20px 0 0;
        border-left: none;
        border-top: 4px solid var(--gold);
        box-shadow: 0 -15px 35px rgba(0,0,0,0.3);
    }

        .right-panel-container.active {
            transform: translateY(0);
        }

    .panel-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 9998;
        display: none;
        backdrop-filter: blur(4px);
    }

    .panel-handle {
        width: 45px;
        height: 5px;
        background: #CBD5E1;
        border-radius: 10px;
        margin: 0 auto 15px;
        cursor: pointer;
    }

    .btn-toggle-menu {
        display: block;
    }

    .sidebar-left {
        position: absolute;
        left: -300px;
        height: 100%;
        z-index: 999;
    }

        .sidebar-left.open {
            left: 0;
        }

    .sidebar-right {
        display: none;
    }
}

@media print {
    #userPofile, .sidebar-left, .sidebar-right, .panel-right-container, .tabs-container, .status-info, .footer-tools {
        display: none !important;
    }
    .stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }

    .card {
        box-shadow: none;
        border: 1px solid #eee;
    }

    .workspace, .footer-info {
        display: block !important;
    }
}

@media (max-width: 578px) {
    .hidenMobi {
        display: none !important;
    }

    .showMobi {
        display: none !important;
    }

    .branding h1 {
        font-size: 1.6rem !important;
    }

    .branding span {
        font-size: 0.7rem !important;
    }

    .tab {
        padding: 5px 8px;
        font-family: var(--font-body);
        font-size: 0.65rem;
    }

    header {
        padding: 0 5px !important;
    }
}
/* --- CSS CHO MOBILE (Dưới 992px) --- */
@media (max-width: 992px) {
    /* Lớp nền mờ khi Panel hiện lên */
    .panel-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        display: none; /* Mặc định ẩn */
        backdrop-filter: blur(3px);
    }

    .panel-right-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 85vh; /* Chiếm 85% chiều cao màn hình */
        background: #fff;
        z-index: 9999;
        border-top: 4px solid var(--gold);
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.2);
        /* Hiệu ứng trồi sụt */
        transform: translateY(100%); /* Mặc định nằm dưới cùng ẩn đi */
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 10px;
        display: block !important; /* Luôn cho phép tồn tại để bind dữ liệu */
        overflow-y: auto;
    }
        /* Khi Panel ở trạng thái Active (Trồi lên) */
        .panel-right-container.active {
            transform: translateY(0);
        }
    /* Thanh cầm để vuốt xuống (Handle) */
    .panel-handle {
        width: 40px;
        height: 5px;
        background: #cbd5e1;
        border-radius: 10px;
        margin: 5px auto 15px auto;
        cursor: pointer;
    }
    /* Nút đóng Panel trên Mobile */
    .btn-close-panel {
        position: absolute;
        right: 15px;
        top: 15px;
        font-size: 1.2rem;
        color: var(--navy-bg);
        display: block !important;
    }
}
/* Container Card cần có thuộc tính này để Ribbon bám theo góc */
.blog-card {
    position: relative;
    overflow: hidden; /* Quan trọng: Để cắt phần Ribbon thừa ra ngoài */
}

/* Khung định vị Ribbon */
.ribbon-wrapper {
    width: 100px;
    height: 100px;
    overflow: hidden;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    pointer-events: none; /* Không cản trở việc click vào card */
}

/* Dải băng nghiêng */
.ribbon-inner {
    font-family: 'Oswald', sans-serif;
    text-align: center;
    transform: rotate(45deg);
    position: relative;
    padding: 4px 0;
    left: 10px;
    top: 15px;
    width: 140px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* Màu Vàng Gold cho Ưu tiên (Luxury Gradient) */
.ribbon-priority {
    background: linear-gradient(135deg, #ef4444, #991b1b);
    color: #fff;
}

/* Màu Xám Navy cho Tạm ẩn */
.ribbon-hidden {
    background: #475569; /* Xám xanh Navy mờ */
    color: #fff;
    opacity: 0.9;
}

/* Hiệu ứng bài bị ẩn */
.blog-card.is-hidden {
    border-color: #cbd5e1;
}

    .blog-card.is-hidden img {
        filter: grayscale(1) opacity(0.5);
    }

.nav-item.disabled {
    cursor: not-allowed; /* Hiện icon cấm khi rê chuột */
    position: relative;
}

.disabled-link {
    pointer-events: none; /* Ngăn chặn hoàn toàn sự kiện click */
    background: transparent !important;
    border-left: 4px solid transparent !important;
}

.nav-item.disabled:hover {
    background: rgba(255, 255, 255, 0.02); /* Hiệu ứng hover cực nhẹ cho mục bị khóa */
}

/* Hiển thị tooltip mặc định của trình duyệt hoặc bạn có thể dùng thư viện Tippy.js */
.nav-item.disabled[title] {
    /* Đảm bảo tiêu đề được hiển thị */
}
/* --- BSM LUXURY TOAST SYSTEM --- */
#bsm-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bsm-toast {
    min-width: 300px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-left: 4px solid var(--gold-primary);
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    cursor: pointer;
}

    .bsm-toast.show {
        transform: translateX(0);
    }

.bsm-toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bsm-toast-content {
    flex: 1;
}

.bsm-toast-title {
    font-family: 'Oswald';
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--navy-dark);
    margin-bottom: 2px;
    letter-spacing: 0.5px;
}

.bsm-toast-msg {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Các loại thông báo */
.bsm-toast.success {
    border-left-color: var(--success);
}

    .bsm-toast.success .bsm-toast-icon {
        color: var(--success);
    }

.bsm-toast.error {
    border-left-color: var(--danger);
}

    .bsm-toast.error .bsm-toast-icon {
        color: var(--danger);
    }

.bsm-toast.warning {
    border-left-color: var(--gold-primary);
}

    .bsm-toast.warning .bsm-toast-icon {
        color: var(--gold-primary);
    }

.bsm-toast.info {
    border-left-color: var(--navy-bg);
}

    .bsm-toast.info .bsm-toast-icon {
        color: var(--navy-bg);
    }

/* Ẩn các thành phần đặc thù di động trên Desktop */
@media (min-width: 993px) {
    .panel-handle, .btn-close-panel, .panel-backdrop {
        display: none !important;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Style cho mục menu bị Disabled */
