/* Main Layout Styles */

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


/* Modern Header Styling */
.modern-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
    position: relative !important;
    overflow: visible !important;
    padding: 0 24px !important;
    height: 60px !important;
    z-index: 1000 !important;
}

/* 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 là dấu hiệu thương hiệu, không phải nút. Để nó nền mờ + bo góc + viền
   giống hệt nút hamburger ngay bên cạnh thì mắt đọc ra hai cái nút song sinh. */
.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

.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 :deep(.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 :deep(.rz-sidebar-toggle:hover) {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05) !important;
}

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

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

.modern-header :deep(.rz-profile-menu .rz-profile-menu-button),
.modern-header :deep(.rz-profile-menu .rz-button),
.modern-header :deep(.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 :deep(.rz-profile-menu .rz-profile-menu-button:hover),
.modern-header :deep(.rz-profile-menu .rz-button:hover),
.modern-header :deep(.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 :deep(.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: absolute;
    top: 65px;
    right: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(102, 126, 234, 0.1);
    overflow: hidden;
    min-width: 200px;
    z-index: 10000;
    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: white;
}

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

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

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

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

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

.modern-header :deep(.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: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: pulse-avatar 3s ease-in-out infinite;
}

@keyframes pulse-avatar {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    50% {
        box-shadow: 0 4px 16px rgba(255, 255, 255, 0.4);
    }
}

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

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

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

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ff4757;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    border: 2px solid #667eea;
    animation: badge-pulse 2s ease-in-out infinite;
}

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

/* Sidebar styling */
.modern-sidebar :deep(.rz-sidebar) {
    background: #1a1a2e !important;
    border-right: 1px solid rgba(102, 126, 234, 0.2) !important;
    padding: 0 !important;
}

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

.modern-sidebar :deep(.rz-panel-menu-item) {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
    border-radius: 8px !important;
    margin: 2px 8px !important;
    padding-left: 12px !important;
}

.modern-sidebar :deep(.rz-panel-menu-item:hover) {
    background: rgba(102, 126, 234, 0.2) !important;
    color: white !important;
    transform: translateX(4px) !important;
}

.modern-sidebar :deep(.rz-panel-menu-item.rz-state-active) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.modern-sidebar :deep(.rz-panel-menu-item .rzi) {
    color: inherit !important;
}

/* ============================================================
   SUPER THEME — Dark + Red glow (matches /login Super theme)
   Applied via <RadzenLayout class="super-theme"> in SuperMainLayout
   ============================================================ */

.super-theme .modern-header {
    background: linear-gradient(135deg, #0a0a0f 0%, #1a0510 50%, #991b1b 100%) !important;
    box-shadow: 0 4px 24px rgba(220, 38, 38, 0.3),
                0 0 0 1px rgba(220, 38, 38, 0.15) !important;
}

.super-theme .header-pattern {
    background-image:
        linear-gradient(30deg, rgba(220, 38, 38, 0.12) 12%, transparent 12.5%, transparent 87%, rgba(220, 38, 38, 0.12) 87.5%, rgba(220, 38, 38, 0.12)),
        linear-gradient(150deg, rgba(220, 38, 38, 0.12) 12%, transparent 12.5%, transparent 87%, rgba(220, 38, 38, 0.12) 87.5%, rgba(220, 38, 38, 0.12));
    opacity: 0.4;
}

.super-theme .header-title {
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.5), 0 2px 10px rgba(0, 0, 0, 0.3);
}

.super-theme .user-avatar {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    border-color: rgba(252, 165, 165, 0.5) !important;
    box-shadow: 0 2px 12px rgba(220, 38, 38, 0.4) !important;
    animation: super-avatar-glow 3s ease-in-out infinite;
}

@keyframes super-avatar-glow {
    0%, 100% { box-shadow: 0 2px 12px rgba(220, 38, 38, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(220, 38, 38, 0.8); }
}

.super-theme .notification-icon {
    background: rgba(220, 38, 38, 0.15) !important;
    border-color: rgba(220, 38, 38, 0.35) !important;
}

.super-theme .notification-icon:hover {
    background: rgba(220, 38, 38, 0.28) !important;
}

.super-theme .notification-badge {
    background: #f97316 !important;
    border-color: #1a0510 !important;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.6);
}

/* Sidebar — keep dark base, swap purple accent → red */
.super-theme .modern-sidebar :deep(.rz-sidebar) {
    border-right-color: rgba(220, 38, 38, 0.2) !important;
}

.super-theme .modern-sidebar :deep(.rz-panel-menu-item:hover) {
    background: rgba(220, 38, 38, 0.18) !important;
}

.super-theme .modern-sidebar :deep(.rz-panel-menu-item.rz-state-active) {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%) !important;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45) !important;
}
