/* Main Layout Styles */

/* Bang mau Studio: den + neon cyan/magenta. Dat o day de header/sidebar/dropdown
   dung chung mot nguon -> doi mau sau nay chi sua 1 cho.
   LUU Y: file nay la CSS THUONG (wwwroot) => KHONG duoc dung :deep(), no la no-op. */
:root {
    --st-bg: #0a0a0f;
    --st-bg-2: #12121b;
    --st-surface: rgba(255, 255, 255, 0.06);
    --st-border: rgba(255, 255, 255, 0.10);
    --st-cyan: #25f4ee;
    --st-magenta: #fe2c55;
    --st-text: #f4f4f6;
    --st-muted: #8b8b99;
}

/* Required field marker (dấu * màu đỏ) */
.required-mark {
    color: #dc3545;
    font-weight: bold;
    margin-left: 2px;
}


/* Modern Header Styling */
.modern-header {
    background: var(--st-bg) !important;
    border-bottom: 1px solid var(--st-border) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.55) !important;
    position: relative !important;
    overflow: visible !important;
    padding: 0 24px !important;
    height: 60px !important;
    z-index: 1000 !important;
}

/* Vach neon duoi day header - gradient chay qua lai, thay cho vien phang */
.modern-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--st-cyan) 25%, var(--st-magenta) 75%, transparent 100%);
    background-size: 220% 100%;
    animation: st-header-sweep 9s linear infinite;
    opacity: 0.9;
    pointer-events: none;
}

@keyframes st-header-sweep {
    0%   { background-position: 0% 0; }
    100% { background-position: 220% 0; }
}

/* Animated background pattern */
.header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image:
        linear-gradient(30deg, rgba(255, 255, 255, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.1) 87.5%, rgba(255, 255, 255, 0.1)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.1) 87.5%, rgba(255, 255, 255, 0.1));
    background-size: 80px 140px;
    animation: pattern-move 20s linear infinite;
}

@keyframes pattern-move {
    0% {
        background-position: 0 0, 0 0;
    }
    100% {
        background-position: 80px 140px, 80px 140px;
    }
}

/* Logo section */
.header-logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 10;
    cursor: pointer;
    padding: 8px 12px 8px 0;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin-left: -12px;
}

.header-logo-section:hover {
    background: rgba(255, 255, 255, 0.15);
}

.header-logo-section:active {
    transform: scale(0.98);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--st-cyan) 0%, var(--st-magenta) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 0 16px rgba(37, 244, 238, 0.35);
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo-icon:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    fill: #0a0a0f;
}

.header-title {
    color: white !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

/* Sidebar toggle button */
.modern-header .rz-sidebar-toggle {
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px !important;
    width: 40px !important;
    height: 40px !important;
    transition: all 0.3s ease !important;
}

.modern-header .rz-sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05) !important;
}

.modern-header .rz-sidebar-toggle .rzi {
    color: white !important;
    font-size: 20px !important;
}

/* Profile menu */
.modern-header .rz-profile-menu,
.modern-header .rz-profile-menu-button,
.modern-header .rz-splitbutton {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.modern-header .rz-profile-menu .rz-profile-menu-button,
.modern-header .rz-profile-menu .rz-button,
.modern-header .rz-splitbutton .rz-button {
    background: transparent !important;
    background-color: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 6px 12px !important;
    color: white !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    min-width: auto !important;
    box-shadow: none !important;
}

.modern-header .rz-profile-menu .rz-profile-menu-button:hover,
.modern-header .rz-profile-menu .rz-button:hover,
.modern-header .rz-splitbutton .rz-button:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-1px) !important;
    box-shadow: none !important;
}

.modern-header .rz-profile-menu .rzi {
    color: white !important;
}

/* Custom Profile Menu */
.custom-profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.custom-profile-menu:hover {
    background: rgba(255, 255, 255, 0.15);
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: white;
}

.user-role {
    font-size: 11px;
    opacity: 0.9;
    line-height: 1.2;
    color: white;
}

.profile-arrow {
    font-size: 14px;
    margin-left: 4px;
    color: white;
    transition: transform 0.3s ease;
}

.custom-profile-menu:hover .profile-arrow {
    transform: translateY(2px);
}

/* Custom Dropdown Menu */
.custom-dropdown-menu {
    position: fixed;
    top: 65px;
    right: 24px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #e8ecf1;
    overflow: hidden;
    min-width: 200px;
    z-index: 20000;
    animation: dropdown-slide 0.2s ease-out;
}

@keyframes dropdown-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
    font-size: 14px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.dropdown-item i {
    font-size: 18px;
}

.dropdown-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

/* Dropdown menu styling */
.modern-header .rz-dropdown-menu {
    z-index: 10000 !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid #e8ecf1 !important;
    margin-top: 8px !important;
    overflow: hidden !important;
}

.modern-header .rz-dropdown-menu .rz-dropdown-item {
    padding: 12px 20px !important;
    transition: all 0.2s ease !important;
    color: #333 !important;
}

.modern-header .rz-dropdown-menu .rz-dropdown-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
}

.modern-header .rz-dropdown-menu .rz-dropdown-item .rzi {
    color: inherit !important;
}

/* User info section */
.user-info-section {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 10;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--st-surface);
    backdrop-filter: blur(10px);
    border: 2px solid var(--st-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--st-cyan);
    font-size: 14px;
    box-shadow: 0 0 12px rgba(37, 244, 238, 0.35);
    animation: pulse-avatar 3s ease-in-out infinite;
}

@keyframes pulse-avatar {
    0%, 100% {
        box-shadow: 0 0 10px rgba(37, 244, 238, 0.30);
    }
    50% {
        box-shadow: 0 0 22px rgba(254, 44, 85, 0.55);
    }
}

/* Notification badge */
.notification-icon {
    position: relative;
    width: 40px;
    height: 40px;
    background: var(--st-surface);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--st-border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-icon:hover {
    background: rgba(37, 244, 238, 0.14);
    border-color: var(--st-cyan);
    transform: scale(1.05);
}

.notification-icon .rzi {
    color: white;
    font-size: 18px;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--st-magenta);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid var(--st-bg);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ── Sidebar ────────────────────────────────────────────────────────────
   Giao dien trang (light) giong sportlink. Dau mau o day, khong lien quan header.
   ────────────────────────────────────────────────────────────────────── */
.rz-sidebar.modern-sidebar {
    background: #ffffff !important;
    border-right: 1px solid #e8ecf1 !important;
    padding: 0 !important;
}

.modern-sidebar .rz-panel-menu {
    background: transparent !important;
    padding: 0.5rem 0 !important;
}

.modern-sidebar .rz-navigation-item-wrapper {
    background: transparent !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    transition: all 0.25s ease !important;
}

.modern-sidebar .rz-navigation-item-link {
    color: #4a4a5a !important;
    background: transparent !important;
    border-radius: 8px !important;
    transition: all 0.25s ease !important;
}

.modern-sidebar .rz-navigation-item-link .rzi,
.modern-sidebar .rz-navigation-item-link .rz-navigation-item-icon {
    color: inherit !important;
}

.modern-sidebar .rz-navigation-item-wrapper:hover {
    background: rgba(102, 126, 234, 0.10) !important;
    transform: translateX(4px) !important;
}

.modern-sidebar .rz-navigation-item-wrapper:hover .rz-navigation-item-link {
    color: #667eea !important;
}

/* Muc dang mo: nen gradient tim, chu trang */
.modern-sidebar .rz-navigation-item-wrapper-active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.30) !important;
}

.modern-sidebar .rz-navigation-item-wrapper-active .rz-navigation-item-link,
.modern-sidebar .rz-navigation-item-link-active {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Nhom "He thong": muc cha khi dang mo chi sang nhe, khong an het gradient cua muc con */
.modern-sidebar .rz-navigation-item > .rz-navigation-item-wrapper-active:has(+ ul) {
    background: #f0f2f5 !important;
    box-shadow: none !important;
}

.modern-sidebar .rz-navigation-item > .rz-navigation-item-wrapper-active:has(+ ul) .rz-navigation-item-link {
    color: #667eea !important;
}

/* Menu con thut vao, nen trong suot de an theo sidebar */
.modern-sidebar .rz-navigation-menu {
    background: transparent !important;
}

.modern-sidebar .rz-navigation-menu .rz-navigation-item-link {
    font-size: 0.92em !important;
}

/* Vien giua cac muc menu tren nen trang */
.modern-sidebar .rz-navigation-item,
.modern-sidebar .rz-navigation-item-wrapper,
.modern-sidebar .rz-navigation-item-link {
    border-color: transparent !important;
}

.modern-sidebar .rz-navigation-item-wrapper-active,
.modern-sidebar .rz-navigation-item-wrapper-active .rz-navigation-item-link {
    border-color: transparent !important;
}
