@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS & CSS VARIABLES (Glassmorphism 2.0 & High-Tech DCIM)
   ========================================================================== */
:root {
    --bg-dark: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.94);
    --bg-card-solid: #ffffff;
    --border-color: rgba(2, 132, 199, 0.14);
    --border-hover: rgba(2, 132, 199, 0.4);
    --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.04);
    --card-shadow-hover: 0 12px 30px -4px rgba(2, 132, 199, 0.18), 0 0 0 1px rgba(2, 132, 199, 0.25);

    --primary-neon: #0ea5e9;
    --primary-blue: #0284c7;
    --primary-gradient: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    --secondary-neon: #8b5cf6;
    --secondary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --success-neon: #10b981;
    --success-gradient: linear-gradient(135deg, #059669 0%, #10b981 100%);
    --warning-neon: #f59e0b;
    --warning-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
    --danger-neon: #ef4444;
    --danger-gradient: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);

    --text-main: #0f172a;
    --text-muted: #475569;
    --text-subtle: #64748b;

    --sidebar-width: 250px;
    --sidebar-collapsed-width: 74px;
    --sidebar-bg: linear-gradient(180deg, #ea3a1e 0%, #c52910 100%);
    --sidebar-text: #ffffff;
    --sidebar-active-bg: rgba(255, 255, 255, 0.24);
    --sidebar-active-text: #ffd000;

    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-tech: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 9999px;
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- DARK / NIGHT MODE PALETTE --- */
[data-theme="dark"] {
    --bg-dark: #080d1a;
    --bg-card: rgba(15, 23, 42, 0.88);
    --bg-card-solid: #0f172a;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-hover: rgba(14, 165, 233, 0.45);
    --card-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --card-shadow-hover: 0 20px 40px -10px rgba(14, 165, 233, 0.2), 0 0 0 1px rgba(14, 165, 233, 0.35);

    --primary-blue: #0284c7;
    --primary-neon: #38bdf8;
    --text-main: #f8fafc;
    --text-muted: #cbd5e1;
    --text-subtle: #94a3b8;

    --sidebar-bg: linear-gradient(180deg, #111827 0%, #080d1a 100%);
    --sidebar-text: #f8fafc;
    --sidebar-active-bg: rgba(14, 165, 233, 0.22);
    --sidebar-active-text: #38bdf8;
}

/* ==========================================================================
   2. GLOBAL BASE STYLES & RESETS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Mặc định hiển thị tỉ lệ 90% cho toàn bộ hệ thống */
html {
    zoom: 0.9;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(circle at 10% 10%, rgba(2, 132, 199, 0.06) 0%, transparent 45%),
        radial-gradient(circle at 90% 90%, rgba(139, 92, 246, 0.05) 0%, transparent 45%);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: calc(100vh / 0.9);
    overflow-x: hidden;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
}

[data-theme="dark"] body {
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.12) 0px, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%) !important;
}

/* Typography & Headings Contrast */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-tech);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* --- LIGHT MODE CONTRAST ENHANCEMENTS --- */
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .modal-title,
[data-theme="light"] .card-title,
[data-theme="light"] .tech-card-header h1,
[data-theme="light"] .tech-card-header h2,
[data-theme="light"] .tech-card-header h3,
[data-theme="light"] .tech-card-header h4,
[data-theme="light"] .tech-card-header h5,
[data-theme="light"] .tech-card-header h6 {
    color: #0f172a !important;
}

[data-theme="light"] .text-white:not(.sidebar *):not(.rack-visualizer-frame *):not(.rack-3d-cabinet *):not(.dcim-inspector-card *):not(.dcim-floorplan-card *):not(.dcim-3d-wrapper *):not(#dcim-highlight-indicator *):not(.dcim-edit-toolbar *):not(.dcim-hotspot *):not(.dcim-pin-label *):not(.dcim-grid2d-container *):not(.btn-glow-primary):not(.btn-glow-success):not(.btn-glow-danger):not(.btn-primary):not(.btn-danger):not(.btn-success):not(.badge.bg-danger):not(.badge.bg-success):not(.badge.bg-primary):not(.badge.bg-dark):not(.badge.tech-badge-danger):not(.badge.tech-badge-success):not(.badge.tech-badge-warning):not(.user-avatar-circle) {
    color: #0f172a !important;
}

[data-theme="light"] .text-muted:not(.sidebar *):not(.rack-3d-cabinet *):not(.dcim-inspector-card *):not(.dcim-floorplan-card *):not(.dcim-3d-wrapper *):not(#dcim-highlight-indicator *):not(.dcim-edit-toolbar *):not(.dcim-grid2d-container *) {
    color: #334155 !important;
}

[data-theme="light"] .table-custom:not(.dcim-inspector-card *):not(.dcim-inspector-table) td {
    color: #0f172a !important;
}

[data-theme="light"] .table-custom:not(.dcim-inspector-card *):not(.dcim-inspector-table) td .text-muted {
    color: #475569 !important;
}

/* --- DARK MODE CONTRAST ENHANCEMENTS --- */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .card-title,
[data-theme="dark"] .tech-card-header h1,
[data-theme="dark"] .tech-card-header h2,
[data-theme="dark"] .tech-card-header h3,
[data-theme="dark"] .tech-card-header h4,
[data-theme="dark"] .tech-card-header h5,
[data-theme="dark"] .tech-card-header h6 {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-white {
    color: #f8fafc !important;
}

[data-theme="dark"] .text-muted {
    color: #94a3b8 !important;
}

[data-theme="dark"] .table-custom td {
    color: #f8fafc !important;
}

[data-theme="dark"] .table-custom td .text-muted {
    color: #94a3b8 !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: var(--radius-pill);
    transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.55);
}

code, .font-mono {
    font-family: var(--font-mono) !important;
}

.mobile-header {
    display: none;
}

/* ==========================================================================
   3. APP WRAPPER & SIDEBAR (Fixed Flush Layout - ZERO GAP)
   ========================================================================== */
.app-wrapper {
    display: block;
    min-height: calc(100vh / 0.9);
    width: 100%;
    position: relative;
}

.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    height: auto;
    background: var(--sidebar-bg);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.12);
}

.sidebar-brand {
    padding: 1.15rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 72px;
}
.sidebar-brand .brand-logo-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    text-decoration: none;
}
.sidebar-brand img {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.sidebar-brand .mini-logo {
    display: none;
    height: 42px;
    width: 42px;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.2));
}

.logo-reload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    padding: 3px 6px;
    border-radius: var(--radius-md);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.logo-reload-btn img {
    height: 38px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    image-rendering: auto;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), filter 0.35s ease;
}

.logo-reload-btn:hover {
    transform: scale(1.08) rotate(-2deg);
}

.logo-reload-btn:hover img {
    filter: drop-shadow(0 4px 12px rgba(234, 58, 30, 0.45));
}

.logo-reload-btn:active {
    transform: scale(0.92) rotate(2deg);
}

.sidebar-collapse-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.08);
}

.sidebar-nav {
    padding: 0.72rem 0.62rem;
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.68rem;
    padding: 0.54rem 0.72rem;
    color: var(--sidebar-text) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.35px;
    border-radius: 10px;
    transition: background 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.2s ease,
                transform 0.24s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.24s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
/* Diagonal glass light sweep on hover */
.sidebar-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.16) 50%, transparent 80%);
    transform: translateX(-115%);
    transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.sidebar-link:hover::after {
    transform: translateX(115%);
}
/* Vertical laser active indicator pill */
.sidebar-link::before {
    content: '';
    position: absolute;
    left: 3px;
    top: 22%;
    bottom: 22%;
    width: 3px;
    border-radius: 99px;
    background: var(--sidebar-active-text);
    box-shadow: 0 0 10px var(--sidebar-active-text);
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.sidebar-link.active::before {
    transform: scaleY(1);
    opacity: 1;
}
.sidebar-link span {
    color: inherit !important;
    font-weight: 700;
    text-transform: uppercase;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-link > i:first-child {
    font-size: 1.02rem;
    color: inherit !important;
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.22s ease, box-shadow 0.22s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
}
.sidebar-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14);
    transform: translateX(2px);
}
.sidebar-link:hover > i:first-child {
    transform: scale(1.1) rotate(-3deg);
    background: rgba(255, 255, 255, 0.2);
}
.sidebar-link:active {
    transform: scale(0.985);
}
.sidebar-link.active {
    color: var(--sidebar-active-text) !important;
    background: rgba(255, 255, 255, 0.18) !important;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 14px rgba(0, 0, 0, 0.14);
}
.sidebar-link.active > i:first-child {
    background: rgba(253, 224, 71, 0.2);
    box-shadow: 0 0 12px rgba(253, 224, 71, 0.25);
    color: var(--sidebar-active-text) !important;
}
[data-theme="dark"] .sidebar-link.active > i:first-child {
    background: rgba(56, 189, 248, 0.2);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.28);
}
.sidebar-link.active span {
    color: var(--sidebar-active-text) !important;
}

.sidebar-footer {
    padding: 0.85rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: background 0.3s ease;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    padding: 6px 10px;
    margin: -4px -6px;
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
}
.user-profile:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}
.user-profile:active {
    transform: scale(0.98);
}
.sidebar-footer.menu-open .user-profile {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), inset 0 0 12px rgba(56, 189, 248, 0.12);
}

.user-profile .avatar {
    font-size: 2rem;
    color: #ffffff;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease, color 0.3s ease;
}
.user-profile:hover .avatar {
    transform: scale(1.1);
}
.sidebar-footer.menu-open .user-profile .avatar {
    transform: scale(1.14);
    color: #38bdf8;
    filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.8));
}

.user-profile .user-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
    flex-grow: 1;
}
.user-profile .username {
    font-weight: 700;
    color: #ffffff;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    overflow: hidden;
    letter-spacing: 0.2px;
    transition: color 0.25s ease;
}
.sidebar-footer.menu-open .user-profile .username {
    color: #38bdf8;
}
.user-profile .role {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.user-profile .user-dropdown-arrow {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
    flex-shrink: 0;
}
.user-profile:hover .user-dropdown-arrow {
    color: #ffffff;
}
.sidebar-footer.menu-open .user-dropdown-arrow {
    transform: rotate(180deg);
    color: #38bdf8;
}

/* Collapsible and Animated user-actions Menu */
.user-actions {
    display: flex;
    gap: 0.45rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
    pointer-events: none;
    visibility: hidden;
    transform: translateY(-10px) scale(0.96);
    transition: max-height 0.38s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.28s ease,
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                margin 0.35s ease,
                padding 0.35s ease,
                visibility 0.38s;
}

.sidebar-footer.menu-open .user-actions {
    max-height: 54px;
    opacity: 1;
    margin-top: 0.75rem;
    pointer-events: auto;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Staggered entrance for action buttons */
.user-actions .action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(-12px) scale(0.85);
    transition: opacity 0.22s ease,
                transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease,
                color 0.2s ease;
}

.sidebar-footer.menu-open .user-actions .action-btn {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.sidebar-footer.menu-open .user-actions .action-btn:nth-child(1) {
    transition-delay: 0.04s;
}
.sidebar-footer.menu-open .user-actions .action-btn:nth-child(2) {
    transition-delay: 0.09s;
}
.sidebar-footer.menu-open .user-actions .action-btn:nth-child(3) {
    transition-delay: 0.14s;
}

/* Hover styles for the 3 buttons */
.user-actions #theme-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.25);
    border-color: #f59e0b;
    color: #fbbf24;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px) scale(1.06);
}
.user-actions .action-btn:nth-child(2):hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: #38bdf8;
    color: #38bdf8;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    transform: translateY(-2px) scale(1.06);
}
.user-actions .logout-btn:hover {
    background: #dc2626;
    border-color: #ef4444;
    color: #ffffff;
    box-shadow: 0 4px 18px rgba(220, 38, 38, 0.5);
    transform: translateY(-2px) scale(1.06);
}

/* Collapsed Mini-Sidebar & Zen Mode Support */
.sidebar.collapsed .sidebar-footer.menu-open .user-actions,
body.zen-mode .sidebar .sidebar-footer.menu-open .user-actions {
    max-height: 145px;
    margin-top: 0.5rem;
    flex-direction: column !important;
}
.sidebar.collapsed .user-dropdown-arrow,
body.zen-mode .sidebar .user-dropdown-arrow {
    display: none !important;
}

/* ==========================================================================
   4. COLLAPSED MINI-SIDEBAR & ZEN MODE TOOLTIPS
   ========================================================================== */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}
.sidebar.collapsed .sidebar-brand {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 0.5rem 0.7rem;
}
.sidebar.collapsed .brand-logo-container {
    justify-content: center;
    width: 100%;
}
.sidebar.collapsed .brand-logo-container img:not(.mini-logo) {
    display: none;
}
.sidebar.collapsed .brand-logo-container .mini-logo {
    display: block;
}
.sidebar.collapsed .sidebar-collapse-btn {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.42);
    font-size: 0.85rem;
}
.sidebar.collapsed .sidebar-collapse-btn:hover {
    background: rgba(56, 189, 248, 0.32);
    transform: translateX(2px) scale(1.06);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.45);
}
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .sidebar-author-tag {
    display: none !important;
}
.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.85rem 0;
    gap: 0;
}
.sidebar.collapsed .sidebar-link:hover {
    transform: scale(1.1);
}
.sidebar.collapsed .user-profile {
    justify-content: center;
}
.sidebar.collapsed .user-actions {
    flex-direction: column;
}

/* Tooltips in Collapsed Mini-Mode AND Zen Mode */
.sidebar.collapsed .sidebar-link::after,
body.zen-mode .sidebar .sidebar-link::after {
    content: attr(data-title);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: #0f172a;
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.9rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 99999;
}
.sidebar.collapsed .sidebar-link:hover::after,
body.zen-mode .sidebar .sidebar-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

/* ==========================================================================
   5. MAIN CONTENT PANE & TRUE ZEN MODE
   ========================================================================== */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0.65rem 1.5rem 2.5rem 1.5rem;
    min-height: calc(100vh / 0.9);
    width: calc(100% - var(--sidebar-width));
    transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
    box-sizing: border-box;
}

.sidebar.collapsed ~ .main-content,
.main-content.expanded-content {
    margin-left: var(--sidebar-collapsed-width) !important;
    width: calc(100% - var(--sidebar-collapsed-width)) !important;
}

/* TRUE ZEN / WIDE WORKSPACE MODE */
body.zen-mode .sidebar {
    width: var(--sidebar-collapsed-width) !important;
}
body.zen-mode .sidebar .brand-logo-container img:not(.mini-logo) {
    display: none !important;
}
body.zen-mode .sidebar .brand-logo-container .mini-logo {
    display: block !important;
}
body.zen-mode .sidebar .sidebar-collapse-btn {
    display: none !important;
}
body.zen-mode .sidebar .sidebar-link span,
body.zen-mode .sidebar .user-info,
body.zen-mode .sidebar .sidebar-author-tag {
    display: none !important;
}
body.zen-mode .sidebar .sidebar-link {
    justify-content: center !important;
    padding: 0.85rem 0 !important;
    gap: 0 !important;
}
body.zen-mode .sidebar .user-profile {
    justify-content: center !important;
}
body.zen-mode .sidebar .user-actions {
    flex-direction: column !important;
}

body.zen-mode .main-content {
    margin-left: var(--sidebar-collapsed-width) !important;
    width: calc(100% - var(--sidebar-collapsed-width)) !important;
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
}

/* Top App Header & Quick Controls Bar with Rich Micro-Animations */
.top-header-bar {
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.65rem 1.15rem;
    margin-bottom: 1rem;
    box-shadow: var(--card-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    position: relative;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease;
}

.top-header-bar:hover {
    border-color: rgba(234, 58, 30, 0.35);
    box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.08), 0 0 18px rgba(234, 58, 30, 0.08);
    transform: translateY(-2px);
}

[data-theme="dark"] .top-header-bar:hover {
    border-color: rgba(245, 158, 11, 0.4);
    box-shadow: 0 12px 30px -6px rgba(0, 0, 0, 0.6), 0 0 20px rgba(245, 158, 11, 0.15);
}

/* Header Title & Subtitle Hover Animation */
.top-header-bar h1,
.top-header-bar #main-header-title {
    display: inline-block;
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.top-header-bar h1:hover,
.top-header-bar #main-header-title:hover {
    transform: translateX(4px);
    color: #ea3a1e !important;
}

[data-theme="dark"] .top-header-bar h1:hover,
[data-theme="dark"] .top-header-bar #main-header-title:hover {
    color: #fbbf24 !important;
    text-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.top-header-bar p,
.top-header-bar #main-header-subtitle {
    cursor: default;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.top-header-bar p:hover,
.top-header-bar #main-header-subtitle:hover {
    transform: translateX(4px);
    color: var(--text-main) !important;
}

/* Header Select Filters Hover & Focus Animations */
.top-header-bar .form-select {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid var(--border-color);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .top-header-bar .form-select {
    background-color: rgba(30, 41, 59, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
    color: #f1f5f9;
}

.top-header-bar .form-select:hover {
    transform: translateY(-2.5px);
    background-color: #ffffff;
    border-color: #ea3a1e !important;
    box-shadow: 0 6px 16px rgba(234, 58, 30, 0.16) !important;
}

[data-theme="dark"] .top-header-bar .form-select:hover {
    background-color: rgba(30, 41, 59, 0.95);
    border-color: #f59e0b !important;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25) !important;
}

.top-header-bar .form-select:focus {
    transform: translateY(-2.5px);
    border-color: #ea3a1e !important;
    box-shadow: 0 0 0 3px rgba(234, 58, 30, 0.2) !important;
}

[data-theme="dark"] .top-header-bar .form-select:focus {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25) !important;
}

/* Quick Control Button (Chế độ Rộng, Quay lại Dashboard) */
.quick-control-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 0.95rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.75);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.45rem;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .quick-control-btn {
    background: rgba(30, 41, 59, 0.6);
    color: #f8fafc;
}

.quick-control-btn i {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.quick-control-btn:hover {
    background: #ea3a1e;
    color: #ffffff !important;
    border-color: #ea3a1e;
    transform: translateY(-2.5px);
    box-shadow: 0 6px 18px rgba(234, 58, 30, 0.35);
}

[data-theme="dark"] .quick-control-btn:hover {
    background: linear-gradient(135deg, #ea3a1e, #f59e0b);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(234, 58, 30, 0.45);
}

.quick-control-btn:hover i {
    transform: scale(1.22);
}

.quick-control-btn:hover .bi-arrows-fullscreen {
    transform: scale(1.25) rotate(90deg);
}

.quick-control-btn:hover .bi-arrow-left {
    transform: translateX(-4px) scale(1.2);
}

.quick-control-btn.active-zen {
    background: linear-gradient(135deg, #ea3a1e, #d97706) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 4px 15px rgba(234, 58, 30, 0.4) !important;
}

.quick-control-btn:active {
    transform: translateY(0) scale(0.95);
}

/* Giấy ủy quyền Action Button Hover & Pulse */
.top-header-bar .btn-glow-info {
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.top-header-bar .btn-glow-info i {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.top-header-bar .btn-glow-info .badge {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.top-header-bar .btn-glow-info:hover {
    transform: translateY(-2.5px);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.4) !important;
}

.top-header-bar .btn-glow-info:hover i {
    transform: scale(1.25) rotate(-10deg);
}

.top-header-bar .btn-glow-info:hover .badge {
    transform: scale(1.15);
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.7);
    animation: badgePulse 1.2s infinite alternate;
}

@keyframes badgePulse {
    0% { transform: scale(1.1); box-shadow: 0 0 3px rgba(220, 38, 38, 0.4); }
    100% { transform: scale(1.22); box-shadow: 0 0 12px rgba(220, 38, 38, 0.9); }
}

.top-header-bar .btn-glow-info:active {
    transform: translateY(0) scale(0.96);
}

/* ==========================================================================
   6. CARDS (Glassmorphism 2.0)
   ========================================================================== */
.tech-card {
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}
.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}
.tech-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: var(--card-shadow-hover);
}

.tech-card-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.15rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ==========================================================================
   7. KPI METRICS (Centered, Balanced & Ambient Glow)
   ========================================================================== */
.metric-box {
    padding: 1.25rem 0.85rem;
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.metric-box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.15;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.metric-box.blue::after { background: #0284c7; }
.metric-box.purple::after { background: #8b5cf6; }
.metric-box.green::after { background: #10b981; }
.metric-box.cyan::after { background: #0ea5e9; }
.metric-box.warning::after { background: #f59e0b; }
.metric-box.danger::after { background: #ef4444; }

.metric-box:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: var(--card-shadow-hover);
}
.metric-box:hover::after {
    opacity: 0.38;
}

.metric-value {
    font-family: var(--font-tech);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
    text-align: center;
    display: inline-block;
    transition: transform 0.3s ease;
}
.metric-box:hover .metric-value {
    transform: scale(1.08);
}

.metric-title {
    color: var(--text-main);
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.metric-icon {
    font-size: 2.2rem;
    opacity: 0.1;
    position: absolute;
    right: 0.85rem;
    bottom: 0.65rem;
    color: var(--text-main);
    transition: var(--transition-bounce);
    pointer-events: none;
}
.metric-box:hover .metric-icon {
    opacity: 0.35;
    transform: scale(1.2) rotate(10deg);
}

/* Active Filter State for Metric Boxes (e.g. Giấy ủy quyền) */
.metric-box.active-filter {
    transform: translateY(-4px) scale(1.02);
}
.metric-box.blue.active-filter {
    border: 2px solid #0ea5e9 !important;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.28) !important;
}
.metric-box.green.active-filter {
    border: 2px solid #10b981 !important;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.28) !important;
}
.metric-box.warning.active-filter {
    border: 2px solid #f59e0b !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.3) !important;
}
.metric-box.danger.active-filter {
    border: 2px solid #ef4444 !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3) !important;
}
.metric-box.active-filter::after {
    opacity: 0.42;
}
.metric-box.active-filter .metric-icon {
    opacity: 0.32;
    transform: scale(1.15) rotate(8deg);
}

/* ==========================================================================
   8. BUTTONS & TACTILE RIPPLE INTERACTIONS
   ========================================================================== */
.btn {
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.55rem 1.25rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.btn:active {
    transform: scale(0.96) !important;
}

.btn-glow-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(2, 132, 199, 0.25);
}
.btn-glow-primary:hover {
    box-shadow: 0 6px 25px rgba(2, 132, 199, 0.45);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-glow-success {
    background: var(--success-gradient);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
}
.btn-glow-success:hover {
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.45);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-glow-danger {
    background: var(--danger-gradient);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
}
.btn-glow-danger:hover {
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.45);
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-glow-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.btn-glow-warning:hover {
    background: #f59e0b;
    color: #ffffff !important;
    border-color: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.4);
}

.btn-glow-info {
    background: rgba(14, 165, 233, 0.12);
    color: var(--primary-blue) !important;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
[data-theme="dark"] .btn-glow-info {
    color: var(--primary-neon) !important;
}
.btn-glow-info:hover {
    background: var(--primary-neon);
    color: #ffffff !important;
    border-color: var(--primary-neon);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

/* ==========================================================================
   9. BADGES & STATUS CHIPS
   ========================================================================== */
.tech-badge-primary {
    background: rgba(2, 132, 199, 0.12);
    border: 1px solid rgba(2, 132, 199, 0.25);
    color: var(--primary-blue);
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.75rem;
}
.tech-badge-cyan {
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: #0284c7;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.75rem;
}
.tech-badge-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #059669;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.75rem;
}
.tech-badge-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: #d97706;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.75rem;
}
.tech-badge-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #dc2626;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.75rem;
}
.tech-badge-secondary {
    background: rgba(100, 116, 139, 0.14);
    border: 1px solid rgba(100, 116, 139, 0.28);
    color: #475569;
    font-weight: 600;
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.75rem;
}

[data-theme="light"] .tech-badge-secondary {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
    font-weight: 700 !important;
}

[data-theme="dark"] .tech-badge-cyan { color: #38bdf8; }
[data-theme="dark"] .tech-badge-success { color: #34d399; }
[data-theme="dark"] .tech-badge-warning { color: #fbbf24; }
[data-theme="dark"] .tech-badge-danger { color: #f87171; }
[data-theme="dark"] .tech-badge-secondary {
    background: rgba(148, 163, 184, 0.18) !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
    color: #cbd5e1 !important;
    font-weight: 600;
}

/* ==========================================================================
   10. INPUTS & FORM CONTROLS
   ========================================================================== */
.form-control, .form-select {
    background-color: #ffffff !important;
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    font-size: 0.92rem;
    transition: var(--transition-smooth);
}
.form-select {
    padding-right: 2.35rem !important;
    background-position: right 0.75rem center;
    cursor: pointer;
}
.form-select.form-select-sm {
    padding: 0.38rem 2.25rem 0.38rem 0.85rem !important;
    font-size: 0.85rem;
    background-position: right 0.65rem center;
}
#reportsPerPageSelect {
    min-width: 152px;
}
#reportsPerPageSelect:hover {
    transform: translateY(-1px);
    border-color: var(--primary-neon) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.16);
}
.form-select:hover {
    border-color: rgba(14, 165, 233, 0.55) !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}
[data-theme="dark"] .form-control, 
[data-theme="dark"] .form-select {
    background-color: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-neon) !important;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.18) !important;
    transform: translateY(-1px);
    outline: none;
}
.form-control::placeholder {
    color: var(--text-subtle) !important;
    opacity: 0.8;
}
.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.input-group-text {
    background-color: rgba(241, 245, 249, 0.8) !important;
    color: var(--primary-blue) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .input-group-text {
    background-color: rgba(15, 23, 42, 0.8) !important;
    color: var(--primary-neon) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* ==========================================================================
   11. DATA TABLES (Sticky Header & Row Glow)
   ========================================================================== */
.table-custom-container {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
}

.table-custom {
    color: var(--text-main) !important;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table-custom th {
    background: rgba(241, 245, 249, 0.96) !important;
    color: var(--text-main) !important;
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color) !important;
    padding: 0.9rem 1rem;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 5;
}
[data-theme="dark"] .table-custom th {
    background: rgba(15, 23, 42, 0.96) !important;
    color: #f8fafc !important;
}
.table-custom td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color) !important;
    background-color: transparent !important;
    font-size: 0.9rem;
    color: var(--text-main) !important;
}
.table-custom tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.table-custom tbody tr:hover {
    background-color: rgba(14, 165, 233, 0.05) !important;
}
[data-theme="dark"] .table-custom tbody tr:hover {
    background-color: rgba(14, 165, 233, 0.08) !important;
}

/* ==========================================================================
   BỘ LỌC & BÁO CÁO - COMPACT HIGH-DENSITY TABLE (HIỂN THỊ TRỌN VẸN 100% ZOOM)
   ========================================================================== */
.table-reports-compact {
    width: 100% !important;
    table-layout: auto !important;
    font-size: 0.8125rem !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table-reports-compact th {
    padding: 0.6rem 0.5rem !important;
    font-size: 0.73rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.25px !important;
    text-transform: uppercase !important;
    vertical-align: middle !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
}

.table-reports-compact td {
    padding: 0.5rem 0.5rem !important;
    font-size: 0.8125rem !important;
    vertical-align: middle !important;
    line-height: 1.25 !important;
}

/* Khống chế độ rộng và cắt gọn 2 dòng tránh vỡ layout */
.table-reports-compact .cell-customer {
    max-width: 220px;
    min-width: 100px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    word-break: break-word;
    font-weight: 600;
}

.table-reports-compact .cell-device {
    max-width: 240px;
    min-width: 120px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    word-break: break-word;
    color: var(--primary-neon);
    font-weight: 500;
}

.table-reports-compact .cell-serial {
    max-width: 180px;
    min-width: 100px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    word-break: break-all;
    white-space: pre-line;
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: #f472b6;
}

.table-reports-compact .badge {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    letter-spacing: 0.15px !important;
}

.table-reports-compact .btn-action-icon-sm {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    flex-shrink: 0 !important;
    line-height: 1 !important;
    transition: all 0.2s ease !important;
}

.table-reports-compact .btn-action-icon-sm:hover {
    transform: translateY(-2px) !important;
}

.table-reports-compact .btn-file-compact {
    font-size: 0.72rem !important;
    padding: 0.22rem 0.5rem !important;
    border-radius: 5px !important;
    white-space: nowrap !important;
    line-height: 1.1 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 3px !important;
}

/* ==========================================================================
   12. DCIM RACK VISUALIZER 42U
   ========================================================================== */
.rack-visualizer-frame {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #334155;
    border-radius: var(--radius-lg);
    padding: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.04);
    position: relative;
    width: 100%;
}
.rack-body {
    display: grid;
    grid-template-columns: 36px 1fr;
    grid-template-rows: repeat(42, 16px);
    gap: 1px;
    background: #090d16;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 4px;
    position: relative;
}
.u-number {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 800;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    user-select: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.u-content {
    border-radius: 4px;
    font-size: 0.80rem;
    font-weight: 700;
    font-family: var(--font-tech);
    display: flex;
    align-items: center;
    padding: 0 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    user-select: none;
}
.u-content.empty {
    background: rgba(30, 41, 59, 0.35);
    border: 1px dashed rgba(255, 255, 255, 0.12);
    color: #64748b;
    font-weight: 600;
}
.u-content.empty:hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: var(--primary-neon);
    color: #38bdf8;
    transform: scale(1.01);
}
.u-content.occupied-device {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.4) 0%, rgba(30, 58, 138, 0.65) 100%);
    border: 1px solid rgba(56, 189, 248, 0.75);
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: inset 3px 0 0 #0ea5e9;
}
.u-content.occupied-device:hover {
    transform: scale(1.01);
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.6), inset 3px 0 0 #38bdf8;
    border-color: #38bdf8;
    z-index: 5;
}
.u-content.occupied-linkien {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.4) 0%, rgba(180, 83, 9, 0.65) 100%);
    border: 1px solid rgba(251, 191, 36, 0.75);
    color: #ffffff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: inset 3px 0 0 #f59e0b;
}
.u-content.occupied-linkien:hover {
    transform: scale(1.01);
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.6), inset 3px 0 0 #fbbf24;
    border-color: #fbbf24;
    z-index: 5;
}

/* Row Visualizer Rack Styles */
#rowRacksContainer {
    --rack-zoom-factor: 1.0;
    --rack-width: calc(156px * var(--rack-zoom-factor));
    --rack-slot-height: calc(10.5px * var(--rack-zoom-factor));
    --rack-font-size: calc(0.62rem * var(--rack-zoom-factor));
    --rack-u-width: calc(22px * var(--rack-zoom-factor));
    --rack-padding: calc(7px * var(--rack-zoom-factor));
    --rack-body-padding: calc(3px * var(--rack-zoom-factor));
}

.row-visualizer-rack {
    width: var(--rack-width) !important;
    max-width: var(--rack-width) !important;
    flex-shrink: 0;
    margin-top: 10px !important;
    padding: var(--rack-padding) !important;
    background: linear-gradient(175deg, #162033 0%, #0b1120 60%, #060913 100%) !important;
    border: 1.5px solid #2b3c58 !important;
    border-radius: 10px !important;
}
.row-visualizer-rack .rack-body {
    grid-template-columns: var(--rack-u-width) 1fr !important;
    grid-template-rows: repeat(42, var(--rack-slot-height)) !important;
    gap: 0.5px !important;
    padding: var(--rack-body-padding) !important;
    background: #04070e !important;
    border: 1px solid #1e293b !important;
    box-shadow: inset 0 0 14px rgba(0, 0, 0, 0.92);
}
.row-visualizer-rack .u-number {
    min-height: var(--rack-slot-height) !important;
    font-size: calc(0.52rem * var(--rack-zoom-factor)) !important;
    line-height: 1.0 !important;
    padding: 0 calc(3px * var(--rack-zoom-factor)) 0 0 !important;
    border-bottom: none !important;
    border-right: 1px solid rgba(56, 189, 248, 0.16) !important;
    color: #64748b !important;
}
.row-visualizer-rack .u-number.is-tick-major {
    color: #94a3b8 !important;
    font-weight: 800;
}
.row-visualizer-rack .u-content {
    min-height: var(--rack-slot-height) !important;
    font-size: var(--rack-font-size) !important;
    line-height: 1.0 !important;
    padding: 0 calc(4px * var(--rack-zoom-factor)) !important;
    border-radius: 2px !important;
}
.row-visualizer-rack .u-content.empty {
    background: rgba(15, 23, 42, 0.42) !important;
    border: none !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.06) !important;
}
.row-visualizer-rack .u-content.occupied-device,
.row-visualizer-rack .u-content.occupied-linkien {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
    box-shadow: inset 2px 0 0 #38bdf8, 0 1px 3px rgba(0, 0, 0, 0.7);
}
.row-visualizer-rack .u-content.occupied-linkien {
    box-shadow: inset 2px 0 0 #fbbf24, 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* DCIM Tree Navigation Styles - 3D Zone Pods & Mini-Rack Cards */
.dcim-tree-container {
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}
.dcim-tree {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}
.dcim-tree-node {
    margin-bottom: 0.55rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.28), rgba(15, 23, 42, 0.14));
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 3px 10px rgba(2, 6, 23, 0.12);
}
[data-theme="light"] .dcim-tree-node {
    background: linear-gradient(160deg, #ffffff, #f8fafc);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.06);
}
.dcim-tree-node.expanded {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.12);
}
.dcim-tree-node-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    user-select: none;
    font-family: var(--font-tech);
    font-weight: 700;
    transition: background 0.2s ease;
}
.dcim-tree-node-header:hover {
    background: rgba(14, 165, 233, 0.09);
}
.dcim-tree-node-icon {
    transition: transform 0.22s ease;
    margin-right: 0.45rem;
    font-size: 0.85rem;
    color: var(--primary-neon);
}
.dcim-tree-node.expanded .dcim-tree-node-icon {
    transform: rotate(90deg);
}
.dcim-zone-pill {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    font-family: var(--font-mono);
    margin-right: 0.55rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(56, 189, 248, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #0284c7;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
[data-theme="dark"] .dcim-zone-pill {
    color: #38bdf8;
}
.dcim-zone-pill.zone-b {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(251, 191, 36, 0.08));
    border-color: rgba(245, 158, 11, 0.45);
    color: #d97706;
}
[data-theme="dark"] .dcim-zone-pill.zone-b {
    color: #fbbf24;
}
.dcim-tree-subnodes {
    display: none;
    list-style-type: none;
    padding: 0.55rem;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.22);
    perspective: 900px;
}
[data-theme="light"] .dcim-tree-subnodes {
    background: rgba(241, 245, 249, 0.75);
}
.dcim-tree-node.expanded > .dcim-tree-subnodes {
    display: grid;
}
.dcim-tree-root-subnodes {
    display: block !important;
    padding: 0.35rem 0 0 0 !important;
    background: transparent !important;
    border-top: none !important;
}
.dcim-tree-item {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.55rem 0.6rem;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: linear-gradient(155deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.75));
    color: #e2e8f0;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(2, 6, 23, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
[data-theme="light"] .dcim-tree-item {
    background: linear-gradient(155deg, #ffffff, #f1f5f9);
    color: #0f172a;
    border-color: rgba(148, 163, 184, 0.38);
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.dcim-tree-item:hover {
    transform: translateY(-2px) rotateX(3deg);
    border-color: rgba(56, 189, 248, 0.7);
    box-shadow: 0 8px 18px rgba(14, 165, 233, 0.22);
}
.dcim-tree-item.selected-rack-item {
    background: linear-gradient(155deg, rgba(14, 165, 233, 0.24), rgba(15, 23, 42, 0.95)) !important;
    border: 1.5px solid #38bdf8 !important;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.32), inset 0 0 10px rgba(56, 189, 248, 0.14) !important;
    transform: translateY(-2px);
}
[data-theme="light"] .dcim-tree-item.selected-rack-item {
    background: linear-gradient(155deg, #e0f2fe, #bae6fd) !important;
    color: #0c4a6e !important;
}
.dcim-mini-rack-led {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(148, 163, 184, 0.35);
}
.dcim-mini-rack-led.is-active {
    background: linear-gradient(90deg, #10b981, #38bdf8);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.75);
}
.dcim-mini-rack-led.is-warn {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.75);
}
.dcim-mini-rack-led.is-crit {
    background: linear-gradient(90deg, #ef4444, #f97316);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.85);
}
.dcim-mini-rack-silhouette {
    width: 18px;
    height: 28px;
    border-radius: 3px;
    padding: 2px;
    background: #060b14;
    border: 1px solid #334155;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 1.5px;
    flex-shrink: 0;
    box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.9);
}
.dcim-mini-rack-bar {
    height: 3px;
    width: 100%;
    border-radius: 1px;
    background: rgba(51, 65, 85, 0.45);
}
.dcim-mini-rack-bar.lit {
    background: #38bdf8;
    box-shadow: 0 0 4px rgba(56, 189, 248, 0.85);
}
.dcim-mini-rack-bar.lit.warn {
    background: #fbbf24;
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.85);
}
.dcim-mini-rack-bar.lit.crit {
    background: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.9);
}
.dcim-tree-item .btn-delete-rack {
    opacity: 0.45;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.dcim-tree-item:hover .btn-delete-rack {
    opacity: 1;
    transform: scale(1.1);
}
.dcim-tree-node-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    background: rgba(14, 165, 233, 0.1);
    color: var(--primary-neon);
    border: 1px solid rgba(14, 165, 233, 0.28);
    font-family: var(--font-tech);
}

/* --- DCIM INTERACTIVE FLOOR PLAN & 3D ROOM VISUALIZER --- */
.dcim-view-toolbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(14, 165, 233, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    transition: var(--transition-smooth);
}
[data-theme="light"] .dcim-view-toolbar {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.35);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .dcim-view-toolbar span.text-white,
[data-theme="light"] .dcim-view-toolbar .dcim-toolbar-label {
    color: #0f172a !important;
}
[data-theme="light"] .dcim-view-toolbar .btn-outline-secondary {
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}
[data-theme="light"] .dcim-view-toolbar .btn-outline-secondary:hover {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
}

.zone-chip-btn {
    font-family: var(--font-tech);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.32rem 0.8rem;
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #f1f5f9;
    transition: all 0.2s ease;
}
.zone-chip-btn:hover {
    background: rgba(14, 165, 233, 0.25);
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-1px);
}
.zone-chip-btn.active {
    background: rgba(14, 165, 233, 0.35);
    border-color: #38bdf8;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
}

/* 3D Floor Plan Card & Canvas */
.dcim-floorplan-card {
    background: #090d16 !important;
    border: 1.5px solid rgba(14, 165, 233, 0.4) !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7) !important;
}

.dcim-map-legend {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.84rem;
    font-family: var(--font-tech);
    color: #e2e8f0 !important;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.95rem;
    background: rgba(10, 16, 30, 0.96);
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #f8fafc;
    font-weight: 600;
}
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}
.legend-dot.green { background: #10b981; box-shadow: 0 0 8px #10b981; }
.legend-dot.yellow { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.legend-dot.red { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.dcim-3d-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 540px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #080d1a;
    box-shadow: inset 0 0 35px rgba(0, 0, 0, 0.9);
    user-select: none;
    cursor: default !important;
}

.dcim-3d-viewport {
    position: relative;
    width: 100%;
    transform: translate(0px, 0px) scale(1) !important;
}

.dcim-3d-image {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.dcim-hotspots-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* Floating Zoom & Action Controls Bar */
.dcim-map-controls {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(9, 14, 26, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(56, 189, 248, 0.45);
    border-radius: 10px;
    padding: 4px 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
}
.dcim-ctrl-btn {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #f1f5f9;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.dcim-ctrl-btn:hover {
    background: #0284c7;
    border-color: #38bdf8;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}
.dcim-ctrl-badge {
    font-size: 0.78rem;
    font-weight: 800;
    color: #38bdf8;
    padding: 0 6px;
    min-width: 44px;
    text-align: center;
}

/* Floating Filter Status Banner on Map Canvas */
.dcim-map-filter-banner {
    position: absolute;
    top: 12px;
    left: 12px;
    max-width: calc(100% - 76px);
    z-index: 95;
    background: rgba(9, 14, 26, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid #f59e0b;
    border-radius: 10px;
    padding: 6px 12px;
    color: #fbbf24;
    font-size: 0.80rem;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.2s ease-in-out;
}
.dcim-map-filter-banner #dcimMapFilterText {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.dcim-map-filter-banner > button {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Row-Grouped Layout & Overflow Protection for Customer Highlight Racks Panel */
.dcim-highlight-racks-groups {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
    max-height: 230px;
    overflow-y: auto;
    padding: 2px 4px 4px 2px;
}
.dcim-highlight-racks-groups.is-expanded {
    max-height: 520px;
}
.dcim-highlight-row-group {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(56, 189, 248, 0.16);
}
.dcim-highlight-row-label {
    flex: 0 0 76px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 8px;
    padding: 6px 4px;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35);
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: center;
}
.dcim-highlight-row-label.zone-b {
    background: rgba(16, 185, 129, 0.14);
    border-color: rgba(52, 211, 153, 0.38);
}
.dcim-highlight-row-label.zone-other {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(251, 191, 36, 0.38);
}
.dcim-highlight-row-label:hover {
    filter: brightness(1.18);
    transform: translateY(-1px);
}
.dcim-highlight-row-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}
.dcim-customer-rack-card {
    flex: 0 0 218px;
    width: 218px;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
}
.dcim-goto-42u-pill {
    font-size: 0.72rem;
    line-height: 1.2;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.42);
    border-radius: 999px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.16s ease;
}
.dcim-goto-42u-pill:hover,
.dcim-goto-42u-pill:focus-visible {
    color: #0b1120;
    background: #38bdf8;
    border-color: #7dd3fc;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.55);
    transform: translateX(1px);
    outline: none;
}
@media (max-width: 576px) {
    .dcim-highlight-row-group {
        flex-direction: column;
        gap: 6px;
    }
    .dcim-highlight-row-label {
        flex: none;
        flex-direction: row;
        justify-content: space-between;
        padding: 4px 10px;
    }
    .dcim-customer-rack-card {
        flex: 1 1 100%;
        width: 100%;
    }
}
.dcim-customer-u-badge {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* Hotspots */
.dcim-hotspot {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), filter 0.25s, opacity 0.25s;
    user-select: none;
}
.dcim-hotspot:hover {
    transform: translate(-50%, -58%) scale(1.08);
    z-index: 40;
}
.dcim-hotspot.active {
    transform: translate(-50%, -58%) scale(1.14);
    z-index: 45;
}

/* Dimmed Hotspots (when filter or single row is active) */
.dcim-hotspot.hotspot-dimmed {
    opacity: 0.20 !important;
    filter: grayscale(1) !important;
    pointer-events: none !important;
    transform: translate(-50%, -50%) !important;
}

/* Highlighted Zone Hotspots (e.g. Dãy A or Dãy B) */
.dcim-hotspot.hotspot-zone-focus {
    z-index: 50 !important;
    filter: drop-shadow(0 0 14px rgba(14, 165, 233, 0.85)) !important;
}
.dcim-hotspot.hotspot-zone-focus .dcim-pin-label {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.6) !important;
}

/* Single Selected Row Spotlight */
.dcim-hotspot.hotspot-spotlight {
    z-index: 90 !important;
    transform: translate(-50%, -60%) scale(1.24) !important;
    filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.95)) !important;
}
.dcim-hotspot.hotspot-spotlight .dcim-pin-label {
    background: rgba(14, 23, 42, 0.98) !important;
    border: 2px solid #38bdf8 !important;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.8) !important;
}

/* Fullscreen support */
:fullscreen .dcim-floorplan-card,
:-webkit-full-screen .dcim-floorplan-card {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    border-radius: 0 !important;
    padding: 1rem !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    background: #030712 !important;
    border: none !important;
}
:fullscreen .dcim-3d-wrapper,
:-webkit-full-screen .dcim-3d-wrapper {
    height: calc(100% - 75px) !important;
    min-height: auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dcim-pin-inner {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    position: relative;
}

.dcim-pin-marker {
    position: relative;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #0ea5e9;
    box-shadow: 0 0 10px #0ea5e9;
    flex-shrink: 0;
}
.dcim-pin-marker::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid currentColor;
    opacity: 0.8;
    animation: dcimRadarPing 2s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.dcim-pin-label {
    display: flex;
    flex-direction: column;
    background: rgba(9, 14, 26, 0.97) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(56, 189, 248, 0.65) !important;
    border-radius: 8px;
    padding: 0.35rem 0.65rem !important;
    color: #ffffff;
    font-family: var(--font-tech);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9), 0 0 12px rgba(14, 165, 233, 0.25) !important;
    white-space: nowrap;
    line-height: 1.25;
}

/* Nhãn ghim ngang nhỏ gọn (không xuống dòng) */
.dcim-pin-label.horizontal-pin {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    padding: 2px 8px !important;
    border-radius: 14px !important;
    line-height: 1 !important;
    font-size: 0.72rem !important;
}
.dcim-pin-title {
    font-size: 0.85rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.3px;
}
.dcim-pin-sub {
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    color: #e2e8f0 !important;
    margin-top: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

/* Distinct Hotspot Color Schemes - Compact & Horizontal */
.hotspot-noc .dcim-pin-marker { background: #38bdf8; color: #38bdf8; box-shadow: 0 0 10px #38bdf8; width: 10px; height: 10px; }
.hotspot-noc .dcim-pin-label { border-color: rgba(56, 189, 248, 0.75) !important; padding: 2px 8px !important; }

.hotspot-airlock .dcim-pin-marker { background: #10b981; color: #10b981; box-shadow: 0 0 10px #10b981; width: 10px; height: 10px; }
.hotspot-airlock .dcim-pin-label { border-color: rgba(16, 185, 129, 0.75) !important; padding: 2px 8px !important; }

.hotspot-row .dcim-pin-marker { width: 10px; height: 10px; }
.hotspot-row .dcim-pin-label {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
    gap: 5px !important;
    padding: 2px 7px !important;
    border-radius: 14px !important;
    line-height: 1 !important;
    font-size: 0.72rem !important;
}

/* Customer highlight pulse */
.hotspot-matched-customer {
    z-index: 55 !important;
    animation: dcimCustomerPulse 1.5s infinite;
}
.hotspot-matched-customer .dcim-pin-label {
    border-color: #f59e0b !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.75), 0 0 14px rgba(245, 158, 11, 0.45) !important;
}
@keyframes dcimCustomerPulse {
    0% { filter: drop-shadow(0 0 4px #f59e0b); }
    50% { filter: drop-shadow(0 0 18px #f59e0b); }
    100% { filter: drop-shadow(0 0 4px #f59e0b); }
}

/* Live Asset Radar Ping Animation */
.hotspot-radar-hit {
    z-index: 65 !important;
}
.hotspot-radar-hit .dcim-pin-marker {
    position: relative;
    background-color: #10b981 !important;
    box-shadow: 0 0 14px #10b981 !important;
}
.hotspot-radar-hit .dcim-pin-marker::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2.5px solid #34d399;
    animation: dcimRadarPing 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}
.hotspot-radar-hit .dcim-pin-label {
    border-color: #10b981 !important;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.8), 0 0 16px rgba(16, 185, 129, 0.55) !important;
}
@keyframes dcimRadarPing {
    0% { transform: scale(0.9); opacity: 1; }
    80%, 100% { transform: scale(2.9); opacity: 0; }
}

/* High Occupancy (>80%) Alert Pulse */
.hotspot-high-occ-alert {
    z-index: 60 !important;
    animation: dcimHighOccPulse 1.4s infinite;
}
.hotspot-high-occ-alert .dcim-pin-label {
    border-color: #ef4444 !important;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.8), 0 0 16px rgba(239, 68, 68, 0.55) !important;
}
@keyframes dcimHighOccPulse {
    0% { filter: drop-shadow(0 0 4px #ef4444); }
    50% { filter: drop-shadow(0 0 18px #ef4444); }
    100% { filter: drop-shadow(0 0 4px #ef4444); }
}

.dcim-high-occ-btn.active {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: #ef4444 !important;
    color: #fca5a5 !important;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
}
.dcim-radar-item-card {
    background: rgba(15, 23, 42, 0.82);
    border: 1px solid rgba(16, 185, 129, 0.38);
    border-radius: 10px;
    padding: 0.55rem 0.75rem;
    cursor: pointer;
    transition: all 0.18s ease;
}
.dcim-radar-item-card:hover {
    border-color: #34d399;
    background: rgba(16, 185, 129, 0.14);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22);
}
[data-theme="light"] .dcim-radar-item-card {
    background: #ffffff;
    border-color: #6ee7b7;
}
[data-theme="light"] .dcim-radar-item-card:hover {
    background: #ecfdf5;
}

/* Unified Professional Searchable Customer Combobox */
.dcim-cust-combobox {
    width: 265px;
    z-index: 40;
}
.dcim-cust-combo-control {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 6px 0 10px;
    border-radius: 8px;
    background: #0b1120;
    border: 1.5px solid rgba(14, 165, 233, 0.5);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.dcim-cust-combobox.is-open .dcim-cust-combo-control,
.dcim-cust-combo-control:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.dcim-cust-combo-icon {
    color: #38bdf8;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.dcim-cust-combo-input {
    border: none;
    outline: none;
    background: transparent;
    color: #f8fafc;
    font-size: 0.81rem;
    font-weight: 600;
    width: 100%;
    min-width: 0;
}
.dcim-cust-combo-input::placeholder {
    color: #94a3b8;
    font-weight: 500;
}
.dcim-cust-combo-clear,
.dcim-cust-combo-caret {
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 0.75rem;
    transition: color 0.15s ease, background 0.15s ease;
}
.dcim-cust-combo-clear:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.14);
}
.dcim-cust-combo-caret:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
}
.dcim-cust-combobox.is-open .dcim-cust-combo-caret i {
    display: inline-block;
    transform: rotate(180deg);
}
.dcim-cust-combo-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 290px;
    max-height: 310px;
    overflow-y: auto;
    padding: 5px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.98);
    border: 1.5px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    z-index: 1055;
}
.dcim-cust-combo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 7px;
    cursor: pointer;
    font-family: var(--font-tech);
    font-size: 0.80rem;
    color: #e2e8f0;
    transition: background 0.14s ease;
}
.dcim-cust-combo-item:hover,
.dcim-cust-combo-item.is-highlighted {
    background: rgba(14, 165, 233, 0.18);
    color: #ffffff;
}
.dcim-cust-combo-item.is-selected {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    font-weight: 700;
}
.dcim-cust-combo-meta {
    font-size: 0.69rem;
    color: #94a3b8;
    white-space: nowrap;
    flex-shrink: 0;
}
.dcim-cust-combo-item.is-selected .dcim-cust-combo-meta {
    color: #fde68a;
}

/* Light theme support for Customer Combobox */
[data-theme="light"] .dcim-cust-combo-control {
    background: #ffffff;
    border-color: #7dd3fc;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .dcim-cust-combo-input {
    color: #0f172a;
}
[data-theme="light"] .dcim-cust-combo-input::placeholder {
    color: #64748b;
}
[data-theme="light"] .dcim-cust-combo-icon {
    color: #0284c7;
}
[data-theme="light"] .dcim-cust-combo-menu {
    background: #ffffff;
    border-color: #bae6fd;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}
[data-theme="light"] .dcim-cust-combo-item {
    color: #1e293b;
}
[data-theme="light"] .dcim-cust-combo-item:hover,
[data-theme="light"] .dcim-cust-combo-item.is-highlighted {
    background: #e0f2fe;
    color: #0369a1;
}
[data-theme="light"] .dcim-cust-combo-item.is-selected {
    background: #fef3c7;
    color: #b45309;
}
[data-theme="light"] .dcim-cust-combo-item.is-selected .dcim-cust-combo-meta {
    color: #92400e;
}

/* ==========================================================================
   DCIM 42U Rack Blade Floating HUD Hover Tooltip Card
   ========================================================================== */
.dcim-blade-hud-tooltip {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10900;
    width: 315px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.98));
    border: 1.5px solid rgba(56, 189, 248, 0.65);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.65),
        0 0 22px rgba(14, 165, 233, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    color: #f8fafc;
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px) scale(0.98);
    transition: opacity 0.12s ease-out, transform 0.12s ease-out;
    overflow: hidden;
}
.dcim-blade-hud-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.dcim-hud-header {
    padding: 10px 13px 9px;
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.26), rgba(79, 70, 229, 0.18));
    border-bottom: 1px solid rgba(56, 189, 248, 0.28);
}
.dcim-hud-badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.dcim-hud-rack-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(14, 165, 233, 0.22);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.5);
    letter-spacing: 0.3px;
}
.dcim-hud-cat-pill {
    padding: 2px 8px;
    border-radius: 999px;
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.45);
}
.dcim-hud-cat-pill.is-lk {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.45);
}
.dcim-hud-title {
    font-family: var(--font-tech);
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.28;
    word-break: break-word;
}
.dcim-hud-body {
    padding: 10px 13px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.dcim-hud-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.79rem;
}
.dcim-hud-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.dcim-hud-val {
    font-family: var(--font-tech);
    font-weight: 700;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dcim-hud-val-cust {
    color: #fbbf24;
    font-size: 0.83rem;
}
.dcim-hud-val-sn {
    font-family: monospace;
    font-size: 0.78rem;
    color: #fda4af;
    background: rgba(244, 63, 94, 0.16);
    border: 1px solid rgba(244, 63, 94, 0.35);
    padding: 1px 7px;
    border-radius: 6px;
}
.dcim-hud-val-ip {
    font-family: monospace;
    font-size: 0.78rem;
    color: #38bdf8;
    background: rgba(14, 165, 233, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 1px 7px;
    border-radius: 6px;
}
.dcim-hud-val-muted {
    color: #64748b;
    font-weight: 500;
}
.dcim-hud-footer {
    padding: 6px 13px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 0.69rem;
    font-family: var(--font-tech);
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Light theme crisp contrast for HUD Tooltip Card */
[data-theme="light"] .dcim-blade-hud-tooltip {
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1.5px solid #0ea5e9;
    box-shadow:
        0 16px 36px rgba(15, 23, 42, 0.2),
        0 0 0 3px rgba(14, 165, 233, 0.12);
    color: #0f172a;
}
[data-theme="light"] .dcim-hud-header {
    background: linear-gradient(135deg, #e0f2fe, #eef2ff);
    border-bottom-color: #bae6fd;
}
[data-theme="light"] .dcim-hud-rack-pill {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
}
[data-theme="light"] .dcim-hud-cat-pill {
    background: #d1fae5;
    color: #047857;
    border-color: #6ee7b7;
}
[data-theme="light"] .dcim-hud-cat-pill.is-lk {
    background: #fef3c7;
    color: #b45309;
    border-color: #fcd34d;
}
[data-theme="light"] .dcim-hud-title {
    color: #0f172a;
}
[data-theme="light"] .dcim-hud-label {
    color: #475569;
}
[data-theme="light"] .dcim-hud-val-cust {
    color: #b45309;
}
[data-theme="light"] .dcim-hud-val-sn {
    color: #be123c;
    background: #ffe4e6;
    border-color: #fda4af;
}
[data-theme="light"] .dcim-hud-val-ip {
    color: #0369a1;
    background: #e0f2fe;
    border-color: #7dd3fc;
}
[data-theme="light"] .dcim-hud-footer {
    background: #f1f5f9;
    border-top-color: #e2e8f0;
    color: #475569;
}

/* ==========================================================================
   DCIM Row Editing Mode & Customer Badges
   ========================================================================== */

/* Edit Toolbar Banner */
.dcim-edit-toolbar {
    background: rgba(15, 23, 42, 0.98);
    border: 1.5px dashed #f59e0b;
    border-radius: 12px;
    padding: 0.85rem 1.15rem;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
    animation: fadeIn 0.25s ease-in-out;
}

/* Hotspots in Edit Mode */
.dcim-hotspots-layer.is-edit-mode .dcim-hotspot {
    cursor: grab !important;
}
.dcim-hotspots-layer.is-edit-mode .dcim-hotspot:active,
.dcim-hotspots-layer.is-edit-mode .dcim-hotspot.is-dragging {
    cursor: grabbing !important;
}
.dcim-hotspot.is-editable .dcim-pin-label {
    border: 1.5px dashed rgba(245, 158, 11, 0.9) !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}
.dcim-hotspot.is-dragging {
    z-index: 1000 !important;
    transform: translate(-50%, -50%) scale(1.15) !important;
    transition: none !important;
    filter: drop-shadow(0 0 18px rgba(245, 158, 11, 0.9));
}
.dcim-hotspot.is-dragging .dcim-pin-label {
    background: rgba(15, 23, 42, 0.98) !important;
    border: 2px solid #f59e0b !important;
}

/* Live Coordinate Tooltip during Drag */
.dcim-coord-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #020617;
    border: 1.5px solid #f59e0b;
    color: #fbbf24;
    font-size: 0.78rem;
    font-family: var(--font-tech);
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.8);
}

/* Customer Badges inside Pins */
.dcim-pin-cust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
    max-width: 175px;
}
.row-cust-badge {
    display: inline-block;
    font-size: 0.70rem !important;
    font-weight: 700 !important;
    font-family: var(--font-tech);
    padding: 2px 6px !important;
    border-radius: 4px;
    background: rgba(14, 165, 233, 0.3) !important;
    border: 1px solid #38bdf8 !important;
    color: #f0f9ff !important;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.row-cust-badge.matched {
    background: #f59e0b !important;
    border-color: #fbbf24 !important;
    color: #020617 !important;
    font-weight: 800 !important;
    text-shadow: none !important;
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.8);
}
.row-cust-badge.more {
    background: rgba(100, 116, 139, 0.5) !important;
    border: 1px solid rgba(148, 163, 184, 0.7) !important;
    color: #ffffff !important;
    font-size: 0.70rem !important;
}

/* Pin Label Header */
.dcim-pin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.dcim-pin-pct {
    font-size: 0.74rem !important;
    font-weight: 800 !important;
    color: #38bdf8 !important;
    background: rgba(14, 165, 233, 0.25) !important;
    padding: 1px 6px !important;
    border-radius: 4px;
    border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Quick Zone Sub-Pills */
.zone-sub-pills {
    display: inline-flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}
.zone-chip-btn-sm {
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    padding: 3px 9px !important;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(56, 189, 248, 0.45) !important;
    color: #ffffff !important;
    font-family: var(--font-tech);
    transition: all 0.15s ease;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.zone-chip-btn-sm:hover,
.zone-chip-btn-sm.active {
    background: #0284c7 !important;
    border-color: #38bdf8 !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.6);
    transform: translateY(-1px);
}


/* Floor Plan Inspector Card */
.dcim-inspector-card,
[data-theme="light"] .dcim-inspector-card,
[data-theme="dark"] .dcim-inspector-card {
    background: #090d16 !important;
    border: 1.5px solid rgba(14, 165, 233, 0.35) !important;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7) !important;
    color: #f8fafc !important;
    transition: var(--transition-smooth);
}

.dcim-inspector-card h1,
.dcim-inspector-card h2,
.dcim-inspector-card h3,
.dcim-inspector-card h4,
.dcim-inspector-card h5,
.dcim-inspector-card h6,
[data-theme="light"] .dcim-inspector-card h1,
[data-theme="light"] .dcim-inspector-card h2,
[data-theme="light"] .dcim-inspector-card h3,
[data-theme="light"] .dcim-inspector-card h4,
[data-theme="light"] .dcim-inspector-card h5,
[data-theme="light"] .dcim-inspector-card h6 {
    color: #ffffff !important;
}

.dcim-inspector-card .text-info,
[data-theme="light"] .dcim-inspector-card .text-info,
.dcim-inspector-card h5.text-info,
[data-theme="light"] .dcim-inspector-card h5.text-info {
    color: #38bdf8 !important;
}

.dcim-inspector-card .text-white,
[data-theme="light"] .dcim-inspector-card .text-white {
    color: #ffffff !important;
}

.dcim-inspector-card .text-muted,
[data-theme="light"] .dcim-inspector-card .text-muted {
    color: #94a3b8 !important;
}

/* DCIM Inspector Table (Device List inside Rack Detail Box) */
.dcim-inspector-card .table-custom,
.dcim-inspector-card .table,
.dcim-inspector-table {
    background-color: transparent !important;
    color: #f8fafc !important;
}

.dcim-inspector-card .table-custom th,
.dcim-inspector-card .table th,
.dcim-inspector-table th,
[data-theme="light"] .dcim-inspector-card .table-custom th,
[data-theme="light"] .dcim-inspector-card .table th,
[data-theme="light"] .dcim-inspector-table th,
[data-theme="dark"] .dcim-inspector-card .table-custom th {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #38bdf8 !important;
    font-weight: 800 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(56, 189, 248, 0.4) !important;
}

.dcim-inspector-card .table-custom td,
.dcim-inspector-card .table td,
.dcim-inspector-table td,
[data-theme="light"] .dcim-inspector-card .table-custom td,
[data-theme="light"] .dcim-inspector-card .table td,
[data-theme="light"] .dcim-inspector-table td,
[data-theme="dark"] .dcim-inspector-card .table-custom td {
    color: #f8fafc !important;
    background-color: transparent !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.dcim-inspector-card .table-custom td.text-white,
.dcim-inspector-card .table td.text-white,
.dcim-inspector-table td.text-white,
.dcim-inspector-card .table-custom td .text-white,
[data-theme="light"] .dcim-inspector-card .table-custom td.text-white,
[data-theme="light"] .dcim-inspector-card .table td.text-white,
[data-theme="light"] .dcim-inspector-table td.text-white {
    color: #ffffff !important;
    font-weight: 700 !important;
}

.dcim-inspector-card .table-custom tbody tr:hover,
.dcim-inspector-table tbody tr:hover,
[data-theme="light"] .dcim-inspector-card .table-custom tbody tr:hover,
[data-theme="light"] .dcim-inspector-table tbody tr:hover {
    background-color: rgba(14, 165, 233, 0.12) !important;
}
.dcim-inspector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.dcim-zone-badge {
    font-size: 0.78rem;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-family: var(--font-tech);
    font-weight: 800;
}

.inspector-rack-chip {
    cursor: pointer;
    min-width: 78px;
    padding: 0.45rem 0.4rem;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.inspector-rack-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.4);
    border-color: #38bdf8 !important;
}
.inspector-rack-chip .rack-chip-name {
    font-family: var(--font-tech);
    font-size: 0.82rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
}
.inspector-rack-chip .rack-chip-occ {
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
}

/* 2D Architectural Grid Container */
.dcim-grid2d-container {
    background: #090d16;
    background-image: 
        linear-gradient(rgba(14, 165, 233, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(14, 165, 233, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 1.5px solid rgba(14, 165, 233, 0.35);
    border-radius: 14px;
    padding: 1.5rem;
    position: relative;
    overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.grid2d-room-layout {
    display: flex;
    gap: 1.5rem;
    min-width: 980px;
}

.grid2d-noc-zone {
    width: 320px;
    background: rgba(15, 23, 42, 0.85);
    border: 2px dashed rgba(56, 189, 248, 0.45);
    border-radius: 12px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.grid2d-videowall {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(2, 22px);
    gap: 3px;
    background: #020617;
    border: 2px solid #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
    border-radius: 6px;
    padding: 4px;
}
.grid2d-screen-tile {
    background: rgba(14, 165, 233, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.6);
    border-radius: 2px;
    animation: screenFlicker 4s infinite;
}
@keyframes screenFlicker {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.65; }
}

.grid2d-console-desk {
    background: rgba(180, 83, 9, 0.35);
    border: 2px solid rgba(245, 158, 11, 0.7);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    color: #fef3c7;
    font-family: var(--font-tech);
    font-size: 0.80rem;
    font-weight: 800;
}

.grid2d-server-hall {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.grid2d-aisles-wrapper {
    display: flex;
    gap: 1.5rem;
}

.grid2d-aisle-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.grid2d-row-unit {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.6rem;
}
.grid2d-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-tech);
    font-size: 0.82rem;
    font-weight: 800;
    margin-bottom: 0.45rem;
    color: #f1f5f9;
}

.grid2d-racks-flex {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.grid2d-rack-chip {
    background: #090e1a;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    padding: 5px 3px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    position: relative;
    overflow: hidden;
}
.grid2d-rack-chip:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.5);
    z-index: 5;
}
.grid2d-rack-chip.selected {
    border-color: #38bdf8 !important;
    background: rgba(14, 165, 233, 0.3) !important;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.7);
}
.grid2d-rack-chip.matched-customer {
    border-color: #f59e0b !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.9);
    animation: dcimCustomerPulse 1.5s infinite;
}
.grid2d-rack-chip.dimmed-rack {
    opacity: 0.18;
    filter: grayscale(85%);
}
.grid2d-row-unit.active-row {
    border-color: #38bdf8 !important;
    background: rgba(14, 165, 233, 0.14) !important;
    box-shadow: 0 0 16px rgba(14, 165, 233, 0.35);
}
.grid2d-row-unit.dimmed-row {
    opacity: 0.22;
}
.grid2d-aisle-column.dimmed-aisle {
    opacity: 0.28;
}
.grid2d-noc-zone.active-zone {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 18px rgba(14, 165, 233, 0.4);
}
.grid2d-noc-zone.dimmed-zone {
    opacity: 0.25;
}
.grid2d-rack-name {
    font-family: var(--font-tech);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
    color: #ffffff;
}
.grid2d-rack-occ-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    overflow: hidden;
    margin: 2px 2px 0 2px;
}
.grid2d-rack-occ-fill {
    height: 100%;
    transition: width 0.3s ease;
}

/* NAM A BANK Security Cage Box in 2D */
.grid2d-nam-a-cage {
    background: rgba(40, 10, 15, 0.65);
    border: 2px dashed #ef4444;
    border-radius: 10px;
    padding: 0.65rem;
    position: relative;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.25);
}
.grid2d-cage-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #ef4444;
    color: #fff;
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.45rem;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   13. MODALS, TOASTS & NOC MONITORING BAR
   ========================================================================== */
.modal-content {
    background: var(--bg-card-solid) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: var(--card-shadow) !important;
    color: var(--text-main) !important;
}
[data-theme="dark"] .modal-content {
    background: #0f172a !important;
    border-color: rgba(14, 165, 233, 0.4) !important;
    color: #f8fafc !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6) !important;
}

.modal-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    border-top-left-radius: 16px !important;
    border-top-right-radius: 16px !important;
    color: var(--text-main) !important;
}
.modal-title {
    color: var(--text-main) !important;
    font-weight: 700 !important;
}
[data-theme="dark"] .modal-title {
    color: #f8fafc !important;
}

.modal-body {
    background: transparent !important;
    color: var(--text-main) !important;
}
[data-theme="dark"] .modal-body {
    color: #f8fafc !important;
}

.modal-footer {
    background: transparent !important;
    border-top: 1px solid var(--border-color) !important;
    border-bottom-left-radius: 16px !important;
    border-bottom-right-radius: 16px !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* User Detail Modal Adaptations for Both Themes */
.user-detail-profile-box {
    background: rgba(14, 165, 233, 0.08) !important;
    border: 1px solid rgba(14, 165, 233, 0.25) !important;
    border-radius: var(--radius-md);
}
[data-theme="dark"] .user-detail-profile-box {
    background: rgba(15, 23, 42, 0.7) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
}

.user-detail-stat-card {
    background: rgba(0, 0, 0, 0.03) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md);
    transition: var(--transition-smooth);
}
[data-theme="dark"] .user-detail-stat-card {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.user-detail-stat-val {
    color: var(--text-main) !important;
    font-family: var(--font-tech);
    font-weight: 700;
}

.user-detail-timeline-box {
    background: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md);
}
[data-theme="dark"] .user-detail-timeline-box {
    background: rgba(0, 0, 0, 0.25) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}
.user-detail-timeline-action {
    color: var(--text-main) !important;
    font-weight: 600;
}
.user-detail-timeline-detail {
    color: var(--text-muted) !important;
}

/* NOC Dashboard Bar - Futuristic Cyber Command Bar */
.noc-control-bar {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94) 0%, rgba(17, 34, 64, 0.86) 50%, rgba(15, 23, 42, 0.94) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(14, 165, 233, 0.3);
    border-radius: var(--radius-lg);
    padding: 0.9rem 1.35rem;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: visible;
    z-index: 25;
}
.noc-bar-bg-clip {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}
.noc-control-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #10b981, #f59e0b, #0ea5e9);
    background-size: 200% 100%;
    animation: nocTopShimmer 6s linear infinite;
    z-index: 3;
}
@keyframes nocTopShimmer {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
[data-theme="light"] .noc-control-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 55%, #ecfeff 100%);
    border: 1px solid rgba(2, 132, 199, 0.26);
    box-shadow: 0 8px 24px rgba(2, 132, 199, 0.09), inset 0 1px 0 #ffffff;
}

.noc-bar-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(32px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}
.noc-bar-glow-orb.orb-1 {
    width: 180px;
    height: 80px;
    top: -30px;
    left: 10%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.45), transparent 70%);
    animation: floatNocOrb 7s ease-in-out infinite alternate;
}
.noc-bar-glow-orb.orb-2 {
    width: 200px;
    height: 80px;
    bottom: -35px;
    right: 15%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.4), transparent 70%);
    animation: floatNocOrb 9s ease-in-out infinite alternate-reverse;
}
@keyframes floatNocOrb {
    0% { transform: translateX(-20px) scale(0.95); }
    100% { transform: translateX(30px) scale(1.1); }
}

/* Live Brand Pill */
.noc-live-brand-pill {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(16, 185, 129, 0.08));
    border: 1px solid rgba(14, 165, 233, 0.35);
    box-shadow: 0 3px 12px rgba(14, 165, 233, 0.12);
    transition: all 0.25s ease;
}
.noc-live-brand-pill:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.25);
    transform: translateY(-1px);
}
.noc-brand-text {
    color: var(--text-main);
}
[data-theme="dark"] .noc-brand-text {
    color: #f8fafc;
}
.noc-realtime-tag {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff !important;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
    animation: pulseRealtimeBadge 2.4s ease-in-out infinite;
}
@keyframes pulseRealtimeBadge {
    0%, 100% { box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35); }
    50% { box-shadow: 0 0 14px rgba(16, 185, 129, 0.7); }
}

/* Center Live Heartbeat Waveform & Equalizer */
.noc-live-wave-widget {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(14, 165, 233, 0.25);
    box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}
[data-theme="light"] .noc-live-wave-widget {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(2, 132, 199, 0.22);
    box-shadow: 0 2px 10px rgba(2, 132, 199, 0.07);
}
.noc-live-wave-widget:hover {
    border-color: #0ea5e9;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.18);
}

.noc-eq-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 2.5px;
    height: 18px;
}
.noc-eq-bars span {
    width: 3px;
    border-radius: 3px;
    background: linear-gradient(180deg, #0ea5e9, #10b981);
    animation: eqBounce 1.1s ease-in-out infinite;
}
.noc-eq-bars span:nth-child(1) { height: 8px; animation-delay: 0s; }
.noc-eq-bars span:nth-child(2) { height: 16px; animation-delay: 0.2s; }
.noc-eq-bars span:nth-child(3) { height: 11px; animation-delay: 0.4s; }
.noc-eq-bars span:nth-child(4) { height: 18px; animation-delay: 0.15s; }
.noc-eq-bars span:nth-child(5) { height: 9px; animation-delay: 0.35s; }
@keyframes eqBounce {
    0%, 100% { transform: scaleY(0.45); opacity: 0.7; }
    50% { transform: scaleY(1); opacity: 1; }
}

.noc-ecg-svg {
    overflow: visible;
}
.noc-ecg-bg {
    stroke: rgba(14, 165, 233, 0.2);
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.noc-ecg-line {
    stroke: #10b981;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 160;
    stroke-dashoffset: 160;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.65));
    animation: ecgPulseSweep 2.6s linear infinite;
}
@keyframes ecgPulseSweep {
    0% { stroke-dashoffset: 160; opacity: 0.4; }
    50% { stroke-dashoffset: 0; opacity: 1; }
    100% { stroke-dashoffset: -160; opacity: 0.4; }
}

.noc-sync-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(14, 165, 233, 0.35);
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}
[data-theme="dark"] .noc-sync-btn {
    color: #38bdf8;
}
.noc-sync-btn:hover {
    background: #0ea5e9;
    color: #ffffff;
    transform: rotate(90deg) scale(1.08);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
}

/* Right Status Badges */
.noc-telemetry-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 13px;
    border-radius: 50px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .noc-telemetry-badge {
    background: #ffffff;
}
.noc-telemetry-badge .telemetry-icon-box {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
}
.noc-telemetry-badge .telemetry-lbl {
    color: var(--text-muted);
    font-weight: 600;
}
.noc-telemetry-badge.badge-cyan {
    border-color: rgba(14, 165, 233, 0.32);
}
.noc-telemetry-badge.badge-cyan .telemetry-icon-box {
    background: rgba(14, 165, 233, 0.14);
    color: #0284c7;
}
[data-theme="dark"] .noc-telemetry-badge.badge-cyan .telemetry-icon-box { color: #38bdf8; }
.noc-telemetry-badge.badge-cyan .telemetry-val { color: #0284c7; font-weight: 800; }
[data-theme="dark"] .noc-telemetry-badge.badge-cyan .telemetry-val { color: #38bdf8; }

.noc-telemetry-badge.badge-emerald {
    border-color: rgba(16, 185, 129, 0.32);
}
.noc-telemetry-badge.badge-emerald .telemetry-icon-box {
    background: rgba(16, 185, 129, 0.14);
    color: #059669;
}
[data-theme="dark"] .noc-telemetry-badge.badge-emerald .telemetry-icon-box { color: #34d399; }
.noc-telemetry-badge.badge-emerald .telemetry-val { color: #059669; font-weight: 800; }
[data-theme="dark"] .noc-telemetry-badge.badge-emerald .telemetry-val { color: #34d399; }

.noc-telemetry-badge.badge-amber {
    border-color: rgba(245, 158, 11, 0.35);
}
.noc-telemetry-badge.badge-amber .telemetry-icon-box {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}
[data-theme="dark"] .noc-telemetry-badge.badge-amber .telemetry-icon-box { color: #fbbf24; }
.noc-telemetry-badge.badge-amber .telemetry-val { color: #d97706; font-weight: 800; }
[data-theme="dark"] .noc-telemetry-badge.badge-amber .telemetry-val { color: #fbbf24; }

.noc-telemetry-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.16);
}

.status-led {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}
.status-led.led-cyan {
    background: #0ea5e9;
    box-shadow: 0 0 8px #0ea5e9;
    animation: ledBlink 2s infinite ease-in-out;
}
.status-led.led-emerald {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: ledBlink 1.8s infinite ease-in-out 0.4s;
}
@keyframes ledBlink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.8); }
}

.pulse-radar-dot {
    width: 9px;
    height: 9px;
    background-color: #10b981;
    border-radius: 50%;
    position: relative;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    flex-shrink: 0;
}
.pulse-radar-dot::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid #10b981;
    animation: radar-pulse 2s infinite ease-out;
}
@keyframes radar-pulse {
    0% { transform: scale(0.6); opacity: 1; }
    100% { transform: scale(2.4); opacity: 0; }
}

.noc-kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.22s ease,
                border-color 0.22s ease,
                background-color 0.22s ease;
    height: 100%;
    user-select: none;
}
.noc-kpi-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 24px -6px rgba(14, 165, 233, 0.18), var(--card-shadow-hover);
}
.noc-kpi-card:active {
    transform: translateY(-1px) scale(0.975);
    box-shadow: 0 4px 10px -2px rgba(14, 165, 233, 0.22);
    transition-duration: 0.09s;
}
.noc-kpi-card .noc-kpi-icon {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}
.noc-kpi-card:hover .noc-kpi-icon {
    transform: scale(1.14) rotate(-5deg);
    opacity: 0.24;
}
.noc-kpi-card .bi-box-arrow-up-right {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.noc-kpi-card:hover .bi-box-arrow-up-right {
    transform: translate(2px, -2px);
    opacity: 1 !important;
}
.noc-kpi-card.blue:hover { box-shadow: 0 12px 24px -6px rgba(14, 165, 233, 0.24); }
.noc-kpi-card.green:hover { box-shadow: 0 12px 24px -6px rgba(16, 185, 129, 0.24); }
.noc-kpi-card.purple:hover { box-shadow: 0 12px 24px -6px rgba(245, 158, 11, 0.24); }
.noc-kpi-card.warning:hover { box-shadow: 0 12px 24px -6px rgba(59, 130, 246, 0.24); }
.noc-kpi-val {
    font-family: var(--font-tech);
    font-size: 2.05rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}
.noc-kpi-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.noc-kpi-icon {
    position: absolute;
    right: 1.25rem;
    bottom: 1rem;
    font-size: 2.2rem;
    opacity: 0.12;
    color: var(--text-main);
    pointer-events: none;
}
.noc-kpi-card.blue { border-left: 4px solid var(--primary-blue); }
.noc-kpi-card.green { border-left: 4px solid var(--success-neon); }
.noc-kpi-card.purple { border-left: 4px solid var(--secondary-neon); }
.noc-kpi-card.warning { border-left: 4px solid var(--warning-neon); }


/* ==========================================================================
   14. ANIMATIONS & TRANSITIONS
   ========================================================================== */
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes panelRevealIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes staggerCardIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes barGrowX {
    from {
        transform: scaleX(0);
        transform-origin: left center;
    }
    to {
        transform: scaleX(1);
        transform-origin: left center;
    }
}
.animate-fade-in {
    animation: fadeSlideIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.tab-pane-transition {
    animation: panelRevealIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.tab-pane-transition .noc-control-bar {
    animation: staggerCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tab-pane-transition .noc-kpi-card,
.tab-pane-transition .tech-card {
    animation: staggerCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.tab-pane-transition .row > [class*="col-"]:nth-child(1) .noc-kpi-card,
.tab-pane-transition .row > [class*="col-"]:nth-child(1) .tech-card { animation-delay: 0.04s; }
.tab-pane-transition .row > [class*="col-"]:nth-child(2) .noc-kpi-card,
.tab-pane-transition .row > [class*="col-"]:nth-child(2) .tech-card { animation-delay: 0.09s; }
.tab-pane-transition .row > [class*="col-"]:nth-child(3) .noc-kpi-card,
.tab-pane-transition .row > [class*="col-"]:nth-child(3) .tech-card { animation-delay: 0.14s; }
.tab-pane-transition .row > [class*="col-"]:nth-child(4) .noc-kpi-card,
.tab-pane-transition .row > [class*="col-"]:nth-child(4) .tech-card { animation-delay: 0.19s; }

/* Staggered entrance animation for Giấy Ủy Quyền page */
.uyquyen-animated-page .top-header-bar {
    animation: staggerCardIn 0.36s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.uyquyen-animated-page .noc-control-bar {
    animation: staggerCardIn 0.42s cubic-bezier(0.16, 1, 0.3, 1) 0.06s both;
}
.uyquyen-animated-page .progress-bar {
    animation: barGrowX 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
.uyquyen-animated-page #operational-metrics-row > .col .metric-box {
    animation: staggerCardIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.uyquyen-animated-page #operational-metrics-row > .col:nth-child(1) .metric-box { animation-delay: 0.08s; }
.uyquyen-animated-page #operational-metrics-row > .col:nth-child(2) .metric-box { animation-delay: 0.13s; }
.uyquyen-animated-page #operational-metrics-row > .col:nth-child(3) .metric-box { animation-delay: 0.18s; }
.uyquyen-animated-page #operational-metrics-row > .col:nth-child(4) .metric-box { animation-delay: 0.23s; }
.uyquyen-animated-page #operational-metrics-row > .col:nth-child(5) .metric-box { animation-delay: 0.28s; }
.uyquyen-animated-page .tech-card {
    animation: staggerCardIn 0.48s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}

@media (prefers-reduced-motion: reduce) {
    .animate-fade-in,
    .tab-pane-transition,
    .tab-pane-transition .noc-control-bar,
    .tab-pane-transition .noc-kpi-card,
    .tab-pane-transition .tech-card,
    .uyquyen-animated-page .top-header-bar,
    .uyquyen-animated-page .noc-control-bar,
    .uyquyen-animated-page .progress-bar,
    .uyquyen-animated-page #operational-metrics-row > .col .metric-box,
    .uyquyen-animated-page .tech-card {
        animation: none !important;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: rippleAnimation 0.6s linear;
    background-color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
}
@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.glowing-dot {
    width: 9px;
    height: 9px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #10b981;
    animation: pulseGlowGreen 2s infinite;
}
@keyframes pulseGlowGreen {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   15. RESPONSIVE MOBILE BEHAVIOR
   ========================================================================== */
@media (max-width: 991.98px) {
    .sidebar {
        left: -100%;
    }
    .sidebar.show {
        left: 0;
        width: var(--sidebar-width) !important;
    }
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding-top: 80px !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    .mobile-header {
        display: flex !important;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 64px;
        background: var(--bg-card);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-color);
        z-index: 1000;
        padding: 0 1.25rem;
        align-items: center;
        justify-content: space-between;
    }
    .mobile-header img {
        height: 34px;
        width: auto;
        max-width: 160px;
        object-fit: contain;
    }
    .dcim-3d-wrapper {
        min-height: auto;
    }
}

/* ==========================================================================
   16. APP FOOTER & AUTHOR ATTRIBUTION
   ========================================================================== */
.app-footer {
    padding: 1.5rem 1rem 0.5rem 1rem;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    background: transparent;
    transition: var(--transition-smooth);
}

.author-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-pill);
    background: rgba(14, 165, 233, 0.08);
    border: 1px solid rgba(14, 165, 233, 0.25);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
    transition: var(--transition-smooth);
}
.author-badge:hover {
    background: rgba(14, 165, 233, 0.15);
    border-color: var(--primary-neon);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}
.author-badge strong {
    color: var(--primary-neon) !important;
}
[data-theme="light"] .author-badge {
    background: rgba(2, 132, 199, 0.06);
    border-color: rgba(2, 132, 199, 0.2);
}
[data-theme="light"] .author-badge strong {
    color: #0284c7 !important;
}

/* ==========================================================================
   17. CYBER ANALOG CLOCK WIDGET
   ========================================================================== */
.analog-clock-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cyber-analog-clock {
    display: block;
    overflow: visible;
}

/* Dial rings */
.cyber-analog-clock .clock-dial-outer {
    fill: var(--bg-card);
    stroke: var(--primary-neon);
    stroke-width: 2.5px;
    transition: stroke var(--transition-smooth);
}
[data-theme="dark"] .cyber-analog-clock .clock-dial-outer {
    fill: rgba(15, 23, 42, 0.95);
    stroke: #0ea5e9;
    filter: drop-shadow(0 0 6px rgba(14, 165, 233, 0.45));
}
[data-theme="light"] .cyber-analog-clock .clock-dial-outer {
    fill: #ffffff;
    stroke: #0284c7;
    filter: drop-shadow(0 2px 6px rgba(2, 132, 199, 0.2));
}

.cyber-analog-clock .clock-dial-inner {
    fill: none;
    stroke-width: 1px;
    stroke-dasharray: 2, 3;
}
[data-theme="dark"] .cyber-analog-clock .clock-dial-inner {
    stroke: rgba(255, 255, 255, 0.12);
}
[data-theme="light"] .cyber-analog-clock .clock-dial-inner {
    stroke: rgba(15, 23, 42, 0.1);
}

/* Ticks */
.cyber-analog-clock .clock-tick {
    stroke-linecap: round;
}
[data-theme="dark"] .cyber-analog-clock .clock-tick.major {
    stroke: #38bdf8;
    stroke-width: 2.5px;
}
[data-theme="light"] .cyber-analog-clock .clock-tick.major {
    stroke: #0284c7;
    stroke-width: 2.5px;
}
[data-theme="dark"] .cyber-analog-clock .clock-tick {
    stroke: #64748b;
    stroke-width: 1.5px;
}
[data-theme="light"] .cyber-analog-clock .clock-tick {
    stroke: #94a3b8;
    stroke-width: 1.5px;
}

/* Hands with transform origin at dial center */
.cyber-analog-clock .clock-hand {
    transform-origin: 50px 50px;
    stroke-linecap: round;
}

.cyber-analog-clock .clock-hand.hour-hand {
    stroke-width: 3.5px;
}
[data-theme="dark"] .cyber-analog-clock .clock-hand.hour-hand {
    stroke: #f8fafc;
}
[data-theme="light"] .cyber-analog-clock .clock-hand.hour-hand {
    stroke: #0f172a;
}

.cyber-analog-clock .clock-hand.minute-hand {
    stroke-width: 2.5px;
}
[data-theme="dark"] .cyber-analog-clock .clock-hand.minute-hand {
    stroke: #38bdf8;
}
[data-theme="light"] .cyber-analog-clock .clock-hand.minute-hand {
    stroke: #0284c7;
}

.cyber-analog-clock .clock-hand.second-hand {
    stroke-width: 1.5px;
    stroke: #ef4444;
}
[data-theme="dark"] .cyber-analog-clock .clock-hand.second-hand {
    stroke: #f43f5e;
    filter: drop-shadow(0 0 3px rgba(244, 63, 94, 0.8));
}
[data-theme="light"] .cyber-analog-clock .clock-hand.second-hand {
    stroke: #dc2626;
}

/* Pivot dot */
.cyber-analog-clock .clock-pivot {
    fill: #ef4444;
}
[data-theme="dark"] .cyber-analog-clock .clock-pivot {
    fill: #f43f5e;
}
[data-theme="light"] .cyber-analog-clock .clock-pivot {
    fill: #dc2626;
}
.cyber-analog-clock .clock-pivot-center {
    fill: #ffffff;
}

/* Widget container styling */
.cyber-clock-widget {
    user-select: none;
    transition: var(--transition-smooth);
    background: var(--bg-card);
}
[data-theme="dark"] .cyber-clock-widget {
    background: rgba(15, 23, 42, 0.75);
    border-color: rgba(56, 189, 248, 0.25) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
[data-theme="light"] .cyber-clock-widget {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.2) !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.cyber-clock-widget:hover {
    transform: translateY(-1px);
}
[data-theme="dark"] .cyber-clock-widget:hover {
    border-color: var(--primary-neon) !important;
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.2);
}
[data-theme="light"] .cyber-clock-widget:hover {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

/* ==========================================================================
   Quản lý thiết bị - Sub-navigation Pills & Quick Add
   ========================================================================== */
.subnav-pills {
    display: inline-flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-pill);
    gap: 4px;
}
.subnav-pills .subnav-pill {
    padding: 7px 18px;
    border-radius: var(--radius-pill);
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.25s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}
.subnav-pills .subnav-pill:hover {
    color: var(--text-main);
    background: rgba(14, 165, 233, 0.08);
}
.subnav-pills .subnav-pill.active {
    background: var(--primary-gradient);
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(2, 132, 199, 0.35);
}
[data-theme="dark"] .subnav-pills {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(56, 189, 248, 0.2);
}
[data-theme="light"] .subnav-pills {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* ==========================================================================
   Customer Navigator & Catalog Server Management
   ========================================================================== */
.customer-nav-list {
    scrollbar-width: thin;
    scrollbar-color: rgba(14, 165, 233, 0.3) transparent;
}
.customer-nav-list::-webkit-scrollbar {
    width: 5px;
}
.customer-nav-list::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.3);
    border-radius: 4px;
}

.customer-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease-in-out;
    background: rgba(255, 255, 255, 0.02);
}
.customer-nav-item:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.25);
    transform: translateX(3px);
}
.customer-nav-item.active {
    background: rgba(14, 165, 233, 0.14) !important;
    border-color: var(--primary-neon) !important;
    box-shadow: 0 2px 10px rgba(14, 165, 233, 0.2);
}
.customer-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    background: var(--primary-gradient);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}
.customer-avatar.all {
    background: var(--secondary-gradient);
}
.customer-stat-chip {
    padding: 8px 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
[data-theme="light"] .customer-stat-chip {
    background: #f8fafc;
    border-color: #e2e8f0;
}
.instance-serial-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.25);
    color: var(--text-main);
    margin: 2px;
}
.instance-serial-badge.mounted {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: var(--success-neon);
}
.instance-serial-badge.removed {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.25);
    color: var(--text-subtle);
}
[data-theme="light"] .instance-serial-badge.removed {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #334155;
}

/* ==========================================================================
   MODERN NOC DASHBOARD CARDS & GLASSMORPHISM
   ========================================================================== */
.noc-dashboard-card {
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.noc-dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.45), transparent);
    opacity: 0;
    transition: opacity 0.28s ease;
    pointer-events: none;
}

.noc-dashboard-card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.35) !important;
    box-shadow: 0 18px 36px -12px rgba(14, 165, 233, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.noc-dashboard-card:hover::before {
    opacity: 1;
}

/* Light mode support */
[data-theme="light"] .noc-dashboard-card {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(226, 232, 240, 0.9) !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05);
}

/* Metric stat capsule */
.metric-capsule {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 6px 10px;
    transition: all 0.2s ease;
}
.metric-capsule:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(56, 189, 248, 0.25);
}
[data-theme="light"] .metric-capsule {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .metric-capsule:hover {
    background: #f1f5f9;
}

/* S/N badges in Catalog Table */
.sn-badge-mounted {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.4);
    color: #38bdf8 !important;
    font-weight: 600;
}
[data-theme="light"] .sn-badge-mounted {
    background: #e0f2fe !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
}

.sn-badge-exported {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: #e2e8f0 !important;
    font-weight: 500;
}
.sn-badge-exported .sn-code {
    color: #ffffff !important;
    font-weight: 700;
}
.sn-badge-exported .sn-tag {
    color: #fbbf24 !important;
    font-size: 0.72rem;
    margin-left: 2px;
}
[data-theme="light"] .sn-badge-exported {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
    color: #334155 !important;
}
[data-theme="light"] .sn-badge-exported .sn-code {
    color: #0f172a !important;
    font-weight: 700;
}
[data-theme="light"] .sn-badge-exported .sn-tag {
    color: #b45309 !important;
    font-size: 0.72rem;
    margin-left: 2px;
}

/* Catalog Master-Detail Accordion Styling */
.chevron-btn i {
    display: inline-block;
    transition: transform 0.2s ease-in-out, color 0.2s ease;
}
.chevron-btn.expanded i {
    transform: rotate(90deg);
}
.model-name-clickable:hover {
    color: var(--primary-neon) !important;
    text-decoration: underline;
}
.catalog-model-row {
    transition: background 0.15s ease;
}
.catalog-detail-row {
    transition: all 0.2s ease-in-out;
}

/* Customer Selector Quick Pills */
.customer-pills-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}
.customer-pills-bar::-webkit-scrollbar {
    height: 5px;
}
.customer-pills-bar::-webkit-scrollbar-thumb {
    background: rgba(14, 165, 233, 0.3);
    border-radius: 4px;
}
.customer-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    background: rgba(15, 23, 42, 0.65);
    color: var(--text-subtle);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
    flex-shrink: 0;
}
.customer-pill:hover {
    background: rgba(14, 165, 233, 0.18);
    color: #ffffff;
    border-color: rgba(14, 165, 233, 0.5);
    transform: translateY(-1px);
}
.customer-pill.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.35) 0%, rgba(99, 102, 241, 0.35) 100%);
    color: #38bdf8;
    border-color: #38bdf8;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.customer-pill .pill-badge {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 0.1rem 0.45rem;
    font-size: 0.72rem;
    font-family: var(--font-tech);
    color: inherit;
}
.customer-pill.active .pill-badge {
    background: #0284c7;
    color: #ffffff;
}

[data-theme="light"] .customer-pill {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}
[data-theme="light"] .customer-pill:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}
[data-theme="light"] .customer-pill.active {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #0284c7;
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.25);
}
[data-theme="light"] .customer-pill.active .pill-badge {
    background: #0284c7;
    color: #ffffff;
}

/* Customer Card Group Block */
.catalog-customer-card {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 23, 42, 0.4);
    margin-bottom: 1.25rem;
    transition: all 0.25s ease;
    overflow: hidden;
}
.catalog-customer-card:hover {
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.catalog-customer-card-header {
    background: rgba(30, 41, 59, 0.45);
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.catalog-customer-card-header .cust-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: -0.01em;
}
.catalog-customer-avatar {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
    border: 1px solid rgba(14, 165, 233, 0.4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-weight: 800;
    font-size: 0.85rem;
    font-family: var(--font-tech);
    flex-shrink: 0;
}
.cust-card-toggle i {
    transition: transform 0.2s ease-in-out;
}
.cust-card-toggle.collapsed i {
    transform: rotate(-90deg);
}

[data-theme="light"] .catalog-customer-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
[data-theme="light"] .catalog-customer-card:hover {
    border-color: #0284c7;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.1);
}
[data-theme="light"] .catalog-customer-card-header {
    background: #f8fafc;
    border-bottom-color: #e2e8f0;
}
[data-theme="light"] .catalog-customer-card-header .cust-title {
    color: #0f172a;
}
[data-theme="light"] .catalog-customer-avatar {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

/* ==========================================================================
   CUSTOMER INTELLIGENCE & STATISTICS DASHBOARD STYLES
   ========================================================================== */
/* Customer Intelligence KPI Cards */
.cust-kpi-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.15rem 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.cust-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: width 0.25s ease;
}
.cust-kpi-card.kpi-blue::before { background: linear-gradient(180deg, #0ea5e9, #38bdf8); }
.cust-kpi-card.kpi-emerald::before { background: linear-gradient(180deg, #10b981, #34d399); }
.cust-kpi-card.kpi-indigo::before { background: linear-gradient(180deg, #6366f1, #818cf8); }
.cust-kpi-card.kpi-amber::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }

.cust-kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 165, 233, 0.35);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.cust-kpi-card:hover::before {
    width: 6px;
}

.cust-kpi-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.cust-kpi-card:hover .cust-kpi-icon-wrap {
    transform: scale(1.08);
}
.cust-kpi-card.kpi-blue .cust-kpi-icon-wrap {
    background: rgba(14, 165, 233, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.3);
}
.cust-kpi-card.kpi-emerald .cust-kpi-icon-wrap {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.cust-kpi-card.kpi-indigo .cust-kpi-icon-wrap {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.cust-kpi-card.kpi-amber .cust-kpi-icon-wrap {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.cust-kpi-title {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-subtle);
    margin-bottom: 0.35rem;
}
.cust-kpi-value {
    font-family: var(--font-tech);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}
.cust-kpi-desc {
    font-size: 0.72rem;
    color: var(--text-subtle);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

[data-theme="light"] .cust-kpi-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}
[data-theme="light"] .cust-kpi-card:hover {
    border-color: #0284c7;
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.12);
}
[data-theme="light"] .cust-kpi-title {
    color: #64748b;
}
[data-theme="light"] .cust-kpi-desc {
    color: #64748b;
}
[data-theme="light"] .cust-kpi-card.kpi-blue .cust-kpi-icon-wrap {
    background: #e0f2fe;
    color: #0284c7;
    border-color: #bae6fd;
}
[data-theme="light"] .cust-kpi-card.kpi-emerald .cust-kpi-icon-wrap {
    background: #dcfce7;
    color: #059669;
    border-color: #a7f3d0;
}
[data-theme="light"] .cust-kpi-card.kpi-indigo .cust-kpi-icon-wrap {
    background: #e0e7ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}
[data-theme="light"] .cust-kpi-card.kpi-amber .cust-kpi-icon-wrap {
    background: #fef3c7;
    color: #d97706;
    border-color: #fde68a;
}

#customersTableBody tr {
    transition: all 0.18s ease;
}
#customersTableBody tr:hover {
    background: rgba(14, 165, 233, 0.08) !important;
}
#customersTableBody tr.selected-rack-row {
    background: rgba(14, 165, 233, 0.15) !important;
    border-left: 3px solid #0ea5e9 !important;
    box-shadow: inset 0 0 14px rgba(14, 165, 233, 0.12);
}
[data-theme="light"] #customersTableBody tr.selected-rack-row {
    background: rgba(14, 165, 233, 0.12) !important;
    border-left: 3px solid #0284c7 !important;
}

.cust-avatar-pill {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.72rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25), rgba(99, 102, 241, 0.25));
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.35);
    flex-shrink: 0;
    text-transform: uppercase;
}
[data-theme="light"] .cust-avatar-pill {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.cust-leaderboard-item {
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s ease;
    cursor: pointer;
}
.cust-leaderboard-item:hover {
    background: rgba(14, 165, 233, 0.08);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateX(3px);
}
[data-theme="light"] .cust-leaderboard-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .cust-leaderboard-item:hover {
    background: #f0f9ff;
    border-color: #7dd3fc;
}

.rack-alloc-card {
    padding: 8px 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(14, 165, 233, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s ease;
}
.rack-alloc-card:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.1);
}
[data-theme="light"] .rack-alloc-card {
    background: #f8fafc;
    border-color: #cbd5e1;
}
[data-theme="light"] .rack-alloc-card:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

/* ═══ Customer 360 Detail Workspace (Redesigned) ═══ */
.cust360-hero {
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.10), rgba(99, 102, 241, 0.08));
    border: 1px solid rgba(56, 189, 248, 0.22);
}
.cust360-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    font-family: var(--font-tech);
    background: linear-gradient(135deg, #0ea5e9, #6366f1);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.3);
    flex-shrink: 0;
}
.cust360-title {
    color: var(--text-main);
    font-size: 1.35rem;
    letter-spacing: 0.3px;
}
.cust360-meta-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-family: var(--font-tech);
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
    color: var(--text-main);
}
.cust360-stat-card {
    padding: 0.9rem 1.05rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-top-width: 3px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cust360-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.cust360-stat-card.stat-cyan { border-top-color: #0ea5e9; }
.cust360-stat-card.stat-blue { border-top-color: #6366f1; }
.cust360-stat-card.stat-emerald { border-top-color: #10b981; }
.cust360-stat-card.stat-amber { border-top-color: #f59e0b; }
.cust360-stat-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.cust360-stat-value {
    font-family: var(--font-tech);
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1.15;
}
.cust360-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}
.cust360-stat-icon.icon-cyan { background: rgba(14, 165, 233, 0.14); color: #38bdf8; }
.cust360-stat-icon.icon-blue { background: rgba(99, 102, 241, 0.14); color: #818cf8; }
.cust360-stat-icon.icon-emerald { background: rgba(16, 185, 129, 0.14); color: #34d399; }
.cust360-stat-icon.icon-amber { background: rgba(245, 158, 11, 0.14); color: #fbbf24; }

.cust360-tabs {
    padding: 6px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.16);
}
.cust360-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: 0.82rem;
    font-weight: 600;
    transition: all 0.18s ease;
    cursor: pointer;
}
.cust360-tab-btn:hover {
    color: var(--text-main);
    background: rgba(56, 189, 248, 0.08);
}
.cust360-tab-btn.active {
    color: #fff;
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.32);
}
.cust360-tab-badge {
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
}
.cust360-tab-btn.active .cust360-tab-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.cust360-rack-pill {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-family: var(--font-tech);
    font-weight: 600;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: transparent;
    color: var(--text-muted);
    transition: all 0.15s ease;
    cursor: pointer;
}
.cust360-rack-pill:hover,
.cust360-rack-pill.active {
    background: rgba(14, 165, 233, 0.18);
    border-color: #0ea5e9;
    color: #38bdf8;
}
.cust360-rack-card {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(14, 165, 233, 0.22);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.cust360-rack-card:hover {
    transform: translateY(-2px);
    border-color: #0ea5e9;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.14);
}
.cust360-rack-name {
    font-size: 0.95rem;
    color: var(--text-main);
}
.cust360-u-chip {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 5px;
    font-family: var(--font-tech);
    font-size: 0.71rem;
    font-weight: 600;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.28);
    color: #38bdf8;
}
.cust360-rack-loc-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: var(--font-tech);
    font-size: 0.76rem;
    font-weight: 600;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.28);
    color: #38bdf8;
    white-space: nowrap;
}
.cust360-u-tag {
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 4px;
    background: rgba(14, 165, 233, 0.24);
    font-size: 0.7rem;
}
.cust360-dev-name { color: var(--text-main); }
.cust360-code-sn {
    font-family: monospace;
    font-size: 0.78rem;
    color: #f472b6;
}
.cust360-code-ip {
    font-family: monospace;
    font-size: 0.78rem;
    color: #38bdf8;
}

/* Light theme overrides for Customer 360 */
[data-theme="light"] .cust360-hero {
    background: linear-gradient(135deg, #f0f9ff, #eef2ff);
    border-color: #bae6fd;
}
[data-theme="light"] .cust360-meta-chip {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
}
[data-theme="light"] .cust360-stat-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .cust360-tabs {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
[data-theme="light"] .cust360-tab-btn { color: #475569; }
[data-theme="light"] .cust360-tab-btn:hover { color: #0f172a; background: #e2e8f0; }
[data-theme="light"] .cust360-tab-btn.active { color: #ffffff; }
[data-theme="light"] .cust360-tab-badge { background: rgba(15, 23, 42, 0.08); color: #334155; }
[data-theme="light"] .cust360-tab-btn.active .cust360-tab-badge { background: rgba(255, 255, 255, 0.25); color: #fff; }
[data-theme="light"] .cust360-rack-card {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .cust360-u-chip,
[data-theme="light"] .cust360-rack-loc-badge {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0369a1;
}
[data-theme="light"] .cust360-rack-pill {
    color: #475569;
    border-color: #cbd5e1;
}
[data-theme="light"] .cust360-rack-pill.active,
[data-theme="light"] .cust360-rack-pill:hover {
    background: #e0f2fe;
    border-color: #0284c7;
    color: #0369a1;
}
[data-theme="light"] .cust360-code-sn { color: #be185d; }
[data-theme="light"] .cust360-code-ip { color: #0284c7; }

/* ═══ Customer 360 Expanded Sub-Tab Cards & Interactive Mindmap ═══ */
.cust360-subtab-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text-muted);
    transition: all 0.2s ease;
    cursor: pointer;
}
.cust360-subtab-card:hover {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(14, 165, 233, 0.10);
    color: var(--text-main);
    transform: translateY(-1px);
}
.cust360-subtab-card.active {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.28), rgba(14, 165, 233, 0.16));
    border-color: #0ea5e9;
    color: #fff;
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.22);
}
.cust360-subtab-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: rgba(14, 165, 233, 0.14);
    color: #38bdf8;
    flex-shrink: 0;
}
.cust360-subtab-card.active .cust360-subtab-icon {
    background: #0ea5e9;
    color: #fff;
}
.cust360-subtab-title {
    font-family: var(--font-tech);
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
}
.cust360-subtab-card.active .cust360-subtab-title { color: #fff; }
.cust360-subtab-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}
.cust360-subtab-card.active .cust360-subtab-sub { color: rgba(224, 242, 254, 0.85); }
.cust360-pane-box {
    padding: 1.1rem 1.15rem;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(148, 163, 184, 0.16);
}

/* Interactive Rack & U Mindmap — Balanced Overview + Zoom & Pan */
.cust360-mindmap-viewport {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 460px;
    overflow: hidden;
    border-radius: 12px;
    background:
        radial-gradient(circle at 1px 1px, rgba(56, 189, 248, 0.13) 1px, transparent 0) 0 0 / 22px 22px,
        rgba(2, 6, 23, 0.55);
    border: 1px solid rgba(56, 189, 248, 0.22);
    cursor: grab;
    user-select: none;
}
.cust360-mindmap-viewport.is-dragging {
    cursor: grabbing;
}
.cust360-mindmap-stage {
    position: absolute;
    top: 0;
    left: 0;
    min-width: max-content;
    transform-origin: 0 0;
    transition: transform 0.18s ease-out;
    will-change: transform;
}
.cust360-mindmap-viewport.is-dragging .cust360-mindmap-stage {
    transition: none;
}
.cust360-mindmap-hint {
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 5;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-family: var(--font-tech);
    color: rgba(148, 163, 184, 0.9);
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    pointer-events: none;
    backdrop-filter: blur(4px);
}
.mm-tree {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 20px 24px;
}
.mm-root-node {
    position: relative;
    min-width: 185px;
    max-width: 225px;
    padding: 0.9rem 1.05rem;
    border-radius: 16px;
    text-align: center;
    background: linear-gradient(135deg, #0284c7, #4f46e5);
    color: #fff;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.34);
    border: 2px solid rgba(186, 230, 253, 0.45);
    flex-shrink: 0;
    z-index: 2;
}
.mm-root-node.has-right::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -24px;
    width: 24px;
    height: 2px;
    background: rgba(56, 189, 248, 0.7);
}
.mm-root-node.has-left::before {
    content: '';
    position: absolute;
    top: 50%;
    left: -24px;
    width: 24px;
    height: 2px;
    background: rgba(56, 189, 248, 0.7);
}
.mm-root-avatar {
    width: 40px;
    height: 40px;
    margin: 0 auto 6px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-tech);
    font-weight: 800;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
}
.mm-root-name {
    font-family: var(--font-tech);
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.22;
    word-break: break-word;
}
.mm-root-stats {
    margin-top: 7px;
    font-size: 0.7rem;
    font-family: var(--font-tech);
    opacity: 0.92;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}

.mm-branches {
    list-style: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}
.mm-branches-right {
    padding: 0 0 0 24px;
    margin-left: 24px;
}
.mm-branches-left {
    padding: 0 24px 0 0;
    margin-right: 24px;
}
.mm-branch-item {
    position: relative;
    padding: 6px 0;
    display: flex;
    align-items: center;
}
.mm-branches-left .mm-branch-item {
    justify-content: flex-end;
}
/* Horizontal connector from parent spine into each rack branch */
.mm-branches-right .mm-branch-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    width: 24px;
    height: 2px;
    background: rgba(56, 189, 248, 0.58);
}
.mm-branches-left .mm-branch-item::before {
    content: '';
    position: absolute;
    right: -24px;
    top: 50%;
    width: 24px;
    height: 2px;
    background: rgba(56, 189, 248, 0.58);
}
/* Vertical spine linking sibling rack branches */
.mm-branches-right .mm-branch-item::after {
    content: '';
    position: absolute;
    left: -24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(56, 189, 248, 0.45);
}
.mm-branches-left .mm-branch-item::after {
    content: '';
    position: absolute;
    right: -24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(56, 189, 248, 0.45);
}
.mm-branch-item:first-child::after { top: 50%; }
.mm-branch-item:last-child::after { bottom: 50%; }
.mm-branch-item:only-child::after { display: none; }

.mm-branch-row {
    display: flex;
    align-items: center;
}
.mm-branches-left .mm-branch-row {
    flex-direction: row-reverse;
}
.mm-rack-node {
    position: relative;
    width: 230px;
    padding: 0.6rem 0.78rem;
    border-radius: 11px;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid rgba(14, 165, 233, 0.48);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.24);
    transition: border-color 0.18s ease, transform 0.18s ease;
    flex-shrink: 0;
}
.mm-rack-node:hover {
    border-color: #38bdf8;
    transform: translateY(-1px);
}
.mm-branches-right .mm-rack-node:not(.is-collapsed)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -20px;
    width: 20px;
    height: 2px;
    background: rgba(16, 185, 129, 0.65);
}
.mm-branches-left .mm-rack-node:not(.is-collapsed)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -20px;
    width: 20px;
    height: 2px;
    background: rgba(16, 185, 129, 0.65);
}
.mm-rack-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    cursor: pointer;
    margin-bottom: 3px;
}
.mm-rack-title {
    font-family: var(--font-tech);
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--text-main);
}
.mm-rack-count {
    padding: 1px 7px;
    border-radius: 999px;
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
    white-space: nowrap;
}
.mm-rack-u {
    font-size: 0.71rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm-rack-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Compact multi-column leaf cluster connected to rack node */
.mm-leaves-cluster {
    display: grid;
    gap: 5px;
    padding: 6px 8px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.42);
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.mm-branches-right .mm-leaves-cluster {
    margin-left: 20px;
    border-left: 3px solid rgba(16, 185, 129, 0.65);
}
.mm-branches-left .mm-leaves-cluster {
    margin-right: 20px;
    border-right: 3px solid rgba(16, 185, 129, 0.65);
}
.mm-leaves-cols-1 { grid-template-columns: minmax(210px, 260px); }
.mm-leaves-cols-2 { grid-template-columns: repeat(2, minmax(190px, 225px)); }
.mm-leaves-cols-3 { grid-template-columns: repeat(3, minmax(175px, 205px)); }

.mm-leaf-node {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 7px;
    border-radius: 7px;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(16, 185, 129, 0.32);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 0;
}
.mm-leaf-node:hover {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}
.mm-u-pill {
    padding: 2px 6px;
    border-radius: 5px;
    font-family: var(--font-tech);
    font-size: 0.69rem;
    font-weight: 800;
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
    white-space: nowrap;
    flex-shrink: 0;
}
.mm-leaf-body {
    overflow: hidden;
    flex-grow: 1;
    min-width: 0;
}
.mm-leaf-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}
.mm-leaf-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm-leaf-sn {
    font-family: monospace;
    font-size: 0.66rem;
    color: #f472b6;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm-leaf-ip {
    font-family: monospace;
    font-size: 0.66rem;
    color: #38bdf8;
    flex-shrink: 0;
}

/* Light theme overrides for Expanded Sub-Tabs & Mindmap */
[data-theme="light"] .cust360-subtab-card {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}
[data-theme="light"] .cust360-subtab-card:hover {
    background: #f0f9ff;
    border-color: #38bdf8;
}
[data-theme="light"] .cust360-subtab-card.active {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    border-color: #0284c7;
    color: #fff;
}
[data-theme="light"] .cust360-subtab-card.active .cust360-subtab-icon {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
[data-theme="light"] .cust360-pane-box {
    background: #f8fafc;
    border-color: #e2e8f0;
}
[data-theme="light"] .cust360-mindmap-viewport {
    background:
        radial-gradient(circle at 1px 1px, rgba(14, 165, 233, 0.16) 1px, transparent 0) 0 0 / 22px 22px,
        #f8fafc;
    border-color: #bae6fd;
}
[data-theme="light"] .mm-rack-node {
    background: #ffffff;
    border-color: #7dd3fc;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
[data-theme="light"] .mm-rack-count { background: #e0f2fe; color: #0369a1; }
[data-theme="light"] .cust360-mindmap-hint {
    background: rgba(255, 255, 255, 0.9);
    color: #475569;
    border-color: #cbd5e1;
}
[data-theme="light"] .mm-leaves-cluster {
    background: rgba(240, 253, 250, 0.75);
    border-color: #a7f3d0;
}
[data-theme="light"] .mm-leaf-node {
    background: #ffffff;
    border-color: #a7f3d0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
[data-theme="light"] .mm-leaf-node:hover {
    background: #ecfdf5;
    border-color: #10b981;
}
[data-theme="light"] .mm-u-pill {
    background: #d1fae5;
    color: #047857;
    border-color: #6ee7b7;
}
[data-theme="light"] .mm-leaf-sn { color: #be185d; }
[data-theme="light"] .mm-leaf-ip { color: #0284c7; }

/* Customer Intelligence Toolbar & Filter Pills */
.cust-toolbar-container {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.cust-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    font-family: var(--font-tech);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    user-select: none;
}

.cust-filter-pill:hover {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border-color: rgba(14, 165, 233, 0.35);
    transform: translateY(-1px);
}

.cust-filter-pill.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.3), rgba(99, 102, 241, 0.25));
    color: #ffffff !important;
    border-color: #0ea5e9;
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
}

.cust-pill-badge {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-family: var(--font-tech);
    font-weight: 700;
    transition: all 0.2s;
}

.cust-filter-pill.active .cust-pill-badge {
    background: rgba(14, 165, 233, 0.45);
    color: #ffffff;
}

/* Light Mode Overrides for Customer Toolbar */
[data-theme="light"] .cust-toolbar-container {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] #custSortSelect {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] #custSearchInput {
    color: #1e293b !important;
    border-color: #cbd5e1 !important;
}

[data-theme="light"] .cust-filter-pill {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
}

[data-theme="light"] .cust-filter-pill:hover {
    background: #f0f9ff;
    color: #0284c7;
    border-color: #38bdf8;
}

[data-theme="light"] .cust-filter-pill.active {
    background: #0ea5e9;
    color: #ffffff !important;
    border-color: #0284c7;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.3);
}

[data-theme="light"] .cust-pill-badge {
    background: #e2e8f0;
    color: #334155;
}

[data-theme="light"] .cust-filter-pill.active .cust-pill-badge {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

/* Visual Charts & Telemetry Ribbon */
.telemetry-ribbon {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.78) 0%, rgba(30, 41, 59, 0.65) 100%);
    border: 1px solid rgba(14, 165, 233, 0.28);
    backdrop-filter: blur(12px);
    transition: all 0.25s ease;
}
[data-theme="light"] .telemetry-ribbon {
    background: linear-gradient(90deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(2, 132, 199, 0.22);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
}

.telemetry-header-badge {
    background: linear-gradient(135deg, #0284c7, #0ea5e9);
    color: #ffffff !important;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.3);
}

.spin-pulse-icon {
    display: inline-block;
    animation: pulseCpuIcon 2.5s ease-in-out infinite;
}
@keyframes pulseCpuIcon {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}

.telemetry-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px;
    border-radius: 50px;
    font-size: 0.86rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}
[data-theme="light"] .telemetry-chip {
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.telemetry-chip:hover {
    transform: translateY(-2px);
}
.telemetry-chip .chip-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}
.telemetry-chip .chip-label {
    color: var(--text-muted);
    font-weight: 600;
}
.telemetry-chip .chip-value {
    font-weight: 800;
}

/* Chip Variants */
.telemetry-chip.chip-cyan { border-color: rgba(14, 165, 233, 0.3); }
.telemetry-chip.chip-cyan .chip-icon { background: rgba(14, 165, 233, 0.15); color: #0284c7; }
.telemetry-chip.chip-cyan .chip-value { color: #0284c7; }
[data-theme="dark"] .telemetry-chip.chip-cyan .chip-icon,
[data-theme="dark"] .telemetry-chip.chip-cyan .chip-value { color: #38bdf8; }
.telemetry-chip.chip-cyan:hover { border-color: #0ea5e9; box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2); }

.telemetry-chip.chip-rose { border-color: rgba(244, 63, 94, 0.3); }
.telemetry-chip.chip-rose .chip-icon { background: rgba(244, 63, 94, 0.14); color: #e11d48; }
.telemetry-chip.chip-rose .chip-value { color: #d97706; }
[data-theme="dark"] .telemetry-chip.chip-rose .chip-icon { color: #fb7185; }
[data-theme="dark"] .telemetry-chip.chip-rose .chip-value { color: #fbbf24; }
.telemetry-chip.chip-rose:hover { border-color: #f43f5e; box-shadow: 0 4px 12px rgba(244, 63, 94, 0.2); }

.telemetry-chip.chip-amber { border-color: rgba(245, 158, 11, 0.32); }
.telemetry-chip.chip-amber .chip-icon { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.telemetry-chip.chip-amber .chip-value { color: #0284c7; }
[data-theme="dark"] .telemetry-chip.chip-amber .chip-icon { color: #fbbf24; }
[data-theme="dark"] .telemetry-chip.chip-amber .chip-value { color: #38bdf8; }
.telemetry-chip.chip-amber:hover { border-color: #f59e0b; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2); }

.telemetry-chip.chip-emerald { border-color: rgba(16, 185, 129, 0.32); }
.telemetry-chip.chip-emerald .chip-icon { background: rgba(16, 185, 129, 0.15); color: #059669; }
.telemetry-chip.chip-emerald .chip-value { color: #059669; }
[data-theme="dark"] .telemetry-chip.chip-emerald .chip-icon,
[data-theme="dark"] .telemetry-chip.chip-emerald .chip-value { color: #34d399; }
.telemetry-chip.chip-emerald:hover { border-color: #10b981; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2); }

/* Podium Cards in Leaderboard Sub-tab */
.podium-card {
    border-radius: 12px;
    padding: 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.podium-card:hover {
    transform: translateY(-4px);
}

.podium-card.podium-gold {
    border: 2px solid #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.75));
    box-shadow: 0 0 24px rgba(245, 158, 11, 0.22);
}

.podium-card.podium-silver {
    border: 2px solid #94a3b8;
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.12), rgba(15, 23, 42, 0.75));
    box-shadow: 0 0 20px rgba(148, 163, 184, 0.18);
}

.podium-card.podium-bronze {
    border: 2px solid #d97706;
    background: linear-gradient(180deg, rgba(217, 119, 6, 0.12), rgba(15, 23, 42, 0.75));
    box-shadow: 0 0 20px rgba(217, 119, 6, 0.18);
}

[data-theme="light"] .podium-card.podium-gold {
    background: linear-gradient(180deg, #fffbeb, #ffffff);
    border-color: #f59e0b;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.2);
}

[data-theme="light"] .podium-card.podium-silver {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-color: #94a3b8;
    box-shadow: 0 6px 18px rgba(148, 163, 184, 0.15);
}

[data-theme="light"] .podium-card.podium-bronze {
    background: linear-gradient(180deg, #fff7ed, #ffffff);
    border-color: #d97706;
    box-shadow: 0 6px 18px rgba(217, 119, 6, 0.18);
}

/* ==========================================================================
   19. APEXCHARTS MODERN NOC VISUALIZATION THEME
   ========================================================================== */
.apexcharts-canvas {
    margin: 0 auto;
}

.apexcharts-toolbar {
    top: -4px !important;
    right: 4px !important;
    z-index: 5 !important;
}

.apexcharts-toolbar svg {
    fill: #94a3b8 !important;
    transition: all 0.2s ease !important;
}

.apexcharts-toolbar svg:hover {
    fill: #0ea5e9 !important;
    transform: scale(1.15);
}

.apexcharts-menu {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 10px !important;
    box-shadow: 0 12px 30px -4px rgba(0, 0, 0, 0.5) !important;
    padding: 6px !important;
}

.apexcharts-menu-item {
    font-family: var(--font-tech), sans-serif !important;
    font-size: 11.5px !important;
    color: #cbd5e1 !important;
    border-radius: 6px !important;
    padding: 6px 12px !important;
    transition: all 0.15s ease !important;
}

.apexcharts-menu-item:hover {
    background: rgba(14, 165, 233, 0.2) !important;
    color: #38bdf8 !important;
}

/* Light theme support for ApexCharts dropdown */
[data-theme="light"] .apexcharts-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="light"] .apexcharts-menu-item {
    color: #334155 !important;
}

[data-theme="light"] .apexcharts-menu-item:hover {
    background: #f0f9ff !important;
    color: #0284c7 !important;
}

/* Tooltips */
.apexcharts-tooltip {
    border-radius: 10px !important;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35) !important;
    font-family: var(--font-tech), sans-serif !important;
}

.apexcharts-tooltip.apexcharts-theme-dark {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #f8fafc !important;
}

.apexcharts-tooltip.apexcharts-theme-light {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

.apexcharts-tooltip-title {
    font-weight: 700 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
}

[data-theme="light"] .apexcharts-tooltip-title {
    border-bottom: 1px solid #e2e8f0 !important;
}

/* Legend items */
.apexcharts-legend-text {
    font-family: var(--font-tech), sans-serif !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: color 0.2s ease !important;
}

.apexcharts-datalabel-label,
.apexcharts-datalabel-value {
    font-family: var(--font-tech), sans-serif !important;
}


/* ==========================================================================
   SALE CONFIRMATION COLOR-CODED ROW STYLES (BỘ LỌC & BÁO CÁO)
   ========================================================================== */
tr.sale-confirmed-row {
    background-color: rgba(16, 185, 129, 0.08) !important;
    border-left: 3px solid #10b981 !important;
}
tr.sale-confirmed-row:hover {
    background-color: rgba(16, 185, 129, 0.14) !important;
}
[data-theme="light"] tr.sale-confirmed-row {
    background-color: rgba(16, 185, 129, 0.09) !important;
    border-left: 3px solid #059669 !important;
}
[data-theme="light"] tr.sale-confirmed-row:hover {
    background-color: rgba(16, 185, 129, 0.16) !important;
}

tr.sale-pending-row {
    background-color: rgba(245, 158, 11, 0.04) !important;
    border-left: 3px solid #f59e0b !important;
}
tr.sale-pending-row:hover {
    background-color: rgba(245, 158, 11, 0.09) !important;
}
[data-theme="light"] tr.sale-pending-row {
    background-color: rgba(245, 158, 11, 0.05) !important;
    border-left: 3px solid #d97706 !important;
}
[data-theme="light"] tr.sale-pending-row:hover {
    background-color: rgba(245, 158, 11, 0.11) !important;
}

.sale-confirm-btn {
    font-size: 0.72rem !important;
    border-radius: 6px !important;
    transition: all 0.18s ease !important;
}
.sale-confirm-btn.pending:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
}
.sale-confirm-btn.confirmed:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

/* ==========================================================================
   ENHANCED 3-CARD CHARTS SHOWCASE (BIỂU ĐỒ TRỰC QUAN)
   ========================================================================== */
.noc-chart-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease !important;
}
.noc-chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3.5px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 2;
}
.noc-chart-card.accent-cyan::before {
    background: linear-gradient(90deg, #0ea5e9 0%, #6366f1 100%);
}
.noc-chart-card.accent-emerald::before {
    background: linear-gradient(90deg, #10b981 0%, #0ea5e9 100%);
}
.noc-chart-card.accent-amber::before {
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 100%);
}

.noc-chart-card.accent-cyan {
    background-image: radial-gradient(circle at 0% 0%, rgba(14, 165, 233, 0.07) 0%, transparent 52%);
}
.noc-chart-card.accent-emerald {
    background-image: radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.07) 0%, transparent 52%);
}
.noc-chart-card.accent-amber {
    background-image: radial-gradient(circle at 0% 0%, rgba(245, 158, 11, 0.07) 0%, transparent 52%);
}

.noc-chart-card:hover {
    transform: translateY(-4px);
}
.noc-chart-card.accent-cyan:hover {
    border-color: rgba(14, 165, 233, 0.45) !important;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.14) !important;
}
.noc-chart-card.accent-emerald:hover {
    border-color: rgba(16, 185, 129, 0.45) !important;
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.14) !important;
}
.noc-chart-card.accent-amber:hover {
    border-color: rgba(245, 158, 11, 0.45) !important;
    box-shadow: 0 12px 28px rgba(245, 158, 11, 0.14) !important;
}

.chart-title-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.noc-chart-card:hover .chart-title-icon-badge {
    transform: scale(1.08);
}
.chart-title-icon-badge.icon-cyan {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.16));
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.3);
    box-shadow: 0 3px 10px rgba(14, 165, 233, 0.16);
}
.chart-title-icon-badge.icon-emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(14, 165, 233, 0.16));
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.16);
}
.chart-title-icon-badge.icon-amber {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(239, 68, 68, 0.14));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.32);
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.16);
}
[data-theme="dark"] .chart-title-icon-badge.icon-cyan { color: #38bdf8; }
[data-theme="dark"] .chart-title-icon-badge.icon-emerald { color: #34d399; }
[data-theme="dark"] .chart-title-icon-badge.icon-amber { color: #fbbf24; }

.noc-chart-card .metric-capsule {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.2s ease,
                box-shadow 0.2s ease,
                background-color 0.2s ease;
    border-top: 2px solid transparent;
    user-select: none;
}
.noc-chart-card .metric-capsule:hover {
    transform: translateY(-3px) scale(1.025);
    box-shadow: 0 8px 18px -4px rgba(14, 165, 233, 0.18);
}
.noc-chart-card .metric-capsule:active {
    transform: translateY(0) scale(0.955);
    box-shadow: 0 2px 6px rgba(14, 165, 233, 0.16);
    transition-duration: 0.08s;
}
.noc-chart-card .metric-capsule .fs-5,
.noc-chart-card .metric-capsule .fw-bold {
    transition: transform 0.2s ease;
}
.noc-chart-card .metric-capsule:hover .fs-5 {
    transform: scale(1.06);
}
.noc-chart-card .metric-capsule.capsule-info { border-top-color: rgba(14, 165, 233, 0.55); }
.noc-chart-card .metric-capsule.capsule-primary { border-top-color: rgba(99, 102, 241, 0.55); }
.noc-chart-card .metric-capsule.capsule-success { border-top-color: rgba(16, 185, 129, 0.55); }
.noc-chart-card .metric-capsule.capsule-warning { border-top-color: rgba(245, 158, 11, 0.6); }
.noc-chart-card .metric-capsule.capsule-danger { border-top-color: rgba(239, 68, 68, 0.6); }
.noc-chart-card .metric-capsule.capsule-info:hover { box-shadow: 0 8px 18px -4px rgba(14, 165, 233, 0.25); border-color: rgba(14, 165, 233, 0.45); }
.noc-chart-card .metric-capsule.capsule-primary:hover { box-shadow: 0 8px 18px -4px rgba(99, 102, 241, 0.25); border-color: rgba(99, 102, 241, 0.45); }
.noc-chart-card .metric-capsule.capsule-success:hover { box-shadow: 0 8px 18px -4px rgba(16, 185, 129, 0.25); border-color: rgba(16, 185, 129, 0.45); }
.noc-chart-card .metric-capsule.capsule-warning:hover { box-shadow: 0 8px 18px -4px rgba(245, 158, 11, 0.28); border-color: rgba(245, 158, 11, 0.5); }
.noc-chart-card .metric-capsule.capsule-danger:hover { box-shadow: 0 8px 18px -4px rgba(239, 68, 68, 0.28); border-color: rgba(239, 68, 68, 0.5); }

/* Hiệu ứng sóng Ripple rõ nét trên nền Sáng cho các thẻ KPI & ô chỉ số */
[data-theme="light"] .noc-kpi-card .ripple-effect,
[data-theme="light"] .metric-capsule .ripple-effect,
[data-theme="light"] .cust-kpi-card .ripple-effect {
    background: rgba(14, 165, 233, 0.24);
}

/* ==========================================================================
   NOC DASHBOARD 3 CHART CARDS - MODERN ENTERPRISE UI/UX
   ========================================================================== */
.noc-chart-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.25s ease,
                border-color 0.25s ease;
}
.noc-chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0.92;
}
.noc-chart-card.accent-cyan::before {
    background: linear-gradient(90deg, #0ea5e9, #38bdf8, #818cf8);
}
.noc-chart-card.accent-emerald::before {
    background: linear-gradient(90deg, #10b981, #34d399, #0ea5e9);
}
.noc-chart-card.accent-amber::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #ef4444);
}
.noc-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px rgba(15, 23, 42, 0.14);
}
[data-theme="dark"] .noc-chart-card:hover {
    box-shadow: 0 16px 34px -10px rgba(0, 0, 0, 0.45);
}

/* Segmented Switch (Tròn | Cột) & Action Pill */
.noc-chart-seg-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.22);
    gap: 2px;
}
.noc-chart-seg-switch .seg-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.1;
}
.noc-chart-seg-switch .seg-btn:hover {
    color: var(--text-main);
}
.noc-chart-seg-switch .seg-btn.active {
    background: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
[data-theme="light"] .noc-chart-seg-switch {
    background: #f1f5f9;
    border-color: #e2e8f0;
}
.noc-chart-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 999px;
    font-family: var(--font-tech);
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    color: #0284c7;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.28);
    transition: all 0.2s ease;
}
.noc-chart-action-pill:hover {
    background: #0ea5e9;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}
[data-theme="dark"] .noc-chart-action-pill {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}

/* Soft Radial Backdrop behind Donut Charts */
.noc-chart-stage {
    min-height: 252px;
    position: relative;
    border-radius: 14px;
}
.noc-chart-stage.stage-cyan {
    background: radial-gradient(circle at 50% 42%, rgba(14, 165, 233, 0.08) 0%, transparent 64%);
}
.noc-chart-stage.stage-emerald {
    background: radial-gradient(circle at 50% 42%, rgba(16, 185, 129, 0.08) 0%, transparent 64%);
}
.noc-chart-stage.stage-amber {
    background: radial-gradient(circle at 50% 42%, rgba(245, 158, 11, 0.08) 0%, transparent 64%);
}

/* Cross-highlight SVG Donut slices on metric hover */
.noc-chart-stage .apexcharts-pie-series {
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: center;
}
.noc-chart-stage.is-cross-highlighting .apexcharts-pie-series {
    opacity: 0.28;
}
.noc-chart-stage.is-cross-highlighting .apexcharts-pie-series.is-highlighted-slice {
    opacity: 1 !important;
    filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.35));
}

/* Unified Mini Metric Strip (Linear/Stripe style) */
.noc-metric-strip {
    display: grid;
    gap: 8px;
    text-align: center;
}
.noc-metric-strip.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.noc-metric-strip.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 575.98px) {
    .noc-metric-strip.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.noc-metric-strip .metric-capsule {
    padding: 8px 6px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.metric-strip-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 3px;
    white-space: nowrap;
}
.strip-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.strip-dot.dot-info { background: #0ea5e9; }
.strip-dot.dot-purple { background: #a855f7; }
.strip-dot.dot-indigo { background: #6366f1; }
.strip-dot.dot-success { background: #10b981; }
.strip-dot.dot-warning { background: #f59e0b; }
.strip-dot.dot-danger { background: #ef4444; }
.tabular-nums { font-variant-numeric: tabular-nums; }

/* Unified Footer Bar for all 3 cards */
.noc-chart-footer {
    font-size: 0.79rem;
    min-height: 24px;
}

/* Pulse Alert on Expired Authorization capsule */
.metric-capsule.has-alert-pulse {
    border-color: rgba(239, 68, 68, 0.55) !important;
    background: rgba(239, 68, 68, 0.08) !important;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.35);
    animation: expiredPulseRing 2.2s infinite;
}
.metric-capsule.has-alert-pulse .strip-dot.dot-danger {
    box-shadow: 0 0 6px #ef4444;
}
@keyframes expiredPulseRing {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.32); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   CUSTOMER DIRECTORY AUTOCOMPLETE DROPDOWN (QUẢN LÝ THIẾT BỊ)
   ========================================================================== */
.cust-dir-suggest-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1080;
    max-height: 260px;
    overflow-y: auto;
    border-radius: 10px;
    background: #ffffff;
    border: 1px solid rgba(14, 165, 233, 0.35);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    padding: 4px;
}
[data-theme="dark"] .cust-dir-suggest-menu {
    background: #0f172a;
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}
.cust-dir-suggest-header {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    padding: 4px 8px 6px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cust-dir-suggest-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color 0.14s ease;
}
.cust-dir-suggest-item:hover,
.cust-dir-suggest-item.active {
    background: rgba(14, 165, 233, 0.13);
}
.cust-dir-suggest-code {
    font-family: var(--font-tech);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    border: 1px solid rgba(14, 165, 233, 0.28);
    white-space: nowrap;
    flex-shrink: 0;
}
[data-theme="dark"] .cust-dir-suggest-code {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.14);
}
.cust-dir-suggest-fullname {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.form-control.cust-dir-matched {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.22) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%2310b981'%3e%3cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem 1rem;
    padding-right: 2.35rem !important;
}
[data-theme="dark"] .form-control.cust-dir-matched {
    border-color: #34d399 !important;
    box-shadow: 0 0 0 0.2rem rgba(52, 211, 153, 0.25) !important;
}

/* ==========================================================================
   23. 3D CYBER-PHYSICAL RACK TWIN & 3D CORRIDOR ROW VIEW (42U)
   ========================================================================== */
.rack-3d-stage {
    perspective: 1450px;
    perspective-origin: 48% 45%;
    padding: 8px 18px 16px 8px;
    overflow: visible;
}

.rack-3d-cabinet {
    width: 100%;
    max-width: 440px;
    position: relative;
    background: linear-gradient(165deg, #131c2e 0%, #090e1a 55%, #060911 100%);
    border: 2px solid #2b3b55;
    border-radius: 14px;
    padding: 10px 10px 12px;
    transform-style: preserve-3d;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
    box-shadow:
        0 20px 45px rgba(2, 6, 23, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 0 24px rgba(14, 165, 233, 0.06);
}

.rack-3d-cabinet.is-3d-iso {
    transform: rotateY(-11deg) rotateX(1.8deg);
    box-shadow:
        22px 26px 50px rgba(2, 6, 23, 0.62),
        0 0 0 1px rgba(56, 189, 248, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Thành tủ bên phải 3D (Physical Steel Sidewall) */
.rack-3d-cabinet::after {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    right: -22px;
    width: 22px;
    background: linear-gradient(90deg, #1a263b 0%, #0b1120 75%, #060912 100%);
    border: 1px solid #26354d;
    border-left: none;
    border-radius: 0 8px 8px 0;
    transform-origin: left center;
    transform: rotateY(78deg);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Nóc tủ 3D */
.rack-3d-cabinet::before {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: -12px;
    height: 12px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #334155;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    transform-origin: bottom center;
    transform: rotateX(70deg);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.rack-3d-cabinet.is-3d-iso::after,
.rack-3d-cabinet.is-3d-iso::before {
    opacity: 1;
}

.rack-3d-top-bezel {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 9px;
    margin-bottom: 8px;
    overflow: hidden;
}

.rack-3d-lightbar {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #10b981, #38bdf8, #10b981);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.85);
    transition: background 0.35s ease, box-shadow 0.35s ease;
}
.rack-3d-lightbar.load-warn {
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.85);
}
.rack-3d-lightbar.load-crit {
    background: linear-gradient(90deg, #ef4444, #f97316, #ef4444);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.9);
}

.rack-3d-brand-tag {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.4px;
}

.rack-3d-power-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    color: #34d399;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    padding: 2px 7px;
    border-radius: 999px;
}

.rack-led-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.rack-led-dot.green {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
}
.rack-led-dot.cyan {
    background: #38bdf8;
    box-shadow: 0 0 6px #38bdf8;
}
.rack-led-dot.amber {
    background: #f59e0b;
    box-shadow: 0 0 6px #f59e0b;
}
.rack-led-dot.pulse {
    animation: rackLedPulse 2s infinite ease-in-out;
}
.rack-led-dot.blink-fast {
    animation: rackLedPulse 1.1s infinite alternate ease-in-out;
}
@keyframes rackLedPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.82); }
}

/* Khoang tủ 3D có 2 thanh ray EIA đục lỗ */
.rack-3d-interior {
    background: #04070e;
    border: 1px solid #1e293b;
    border-radius: 9px;
    padding: 4px;
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.92);
    transform-style: preserve-3d;
}

.rack-body-3d {
    grid-template-columns: 36px 1fr 30px !important;
    grid-template-rows: repeat(42, 16px) !important;
    gap: 1.5px !important;
    background: transparent !important;
    border: none !important;
    padding: 2px 0 !important;
    transform-style: preserve-3d;
}

.rack-body-3d .u-number,
.rack-body-3d .u-number-right {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 800;
    color: #94a3b8;
    display: flex;
    align-items: center;
    user-select: none;
    background-image: repeating-linear-gradient(
        180deg,
        rgba(148, 163, 184, 0.25) 0 2px,
        transparent 2px 6px
    );
    background-size: 3px 100%;
    background-repeat: no-repeat;
}
.rack-body-3d .u-number {
    justify-content: flex-end;
    padding-right: 7px;
    background-position: right 2px center;
    border-right: 1px solid rgba(56, 189, 248, 0.22);
}
.rack-body-3d .u-number-right {
    justify-content: flex-start;
    padding-left: 7px;
    background-position: left 2px center;
    border-left: 1px solid rgba(56, 189, 248, 0.22);
    color: #64748b;
}

/* Rãnh trống lõm 3D */
.rack-body-3d .u-content.empty {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(7, 11, 20, 0.85) 100%);
    border: 1px solid rgba(51, 65, 85, 0.32);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.85);
    color: rgba(148, 163, 184, 0.35);
    font-size: 0.65rem;
    justify-content: center;
    border-radius: 3px;
}
.rack-body-3d .u-content.empty:hover {
    background: rgba(14, 165, 233, 0.2);
    border: 1px dashed #38bdf8;
    color: #38bdf8;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.35), inset 0 0 8px rgba(56, 189, 248, 0.18);
    transform: translateZ(6px);
    z-index: 6;
}

/* Hardware Blade 3D (Server / Network Switch / Linh kiện) */
.rack-body-3d .u-content.occupied-device,
.rack-body-3d .u-content.occupied-linkien {
    padding: 0 6px;
    gap: 6px;
    justify-content: space-between;
    border-radius: 4px;
    transform-style: preserve-3d;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.22s ease, border-color 0.2s ease;
}

.rack-body-3d .u-content.occupied-device {
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2442 52%, #0a1930 100%);
    border: 1px solid rgba(56, 189, 248, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(186, 230, 253, 0.28),
        inset 3px 0 0 #38bdf8,
        0 2px 5px rgba(0, 0, 0, 0.65);
}

.rack-body-3d .u-content.occupied-linkien {
    background: linear-gradient(180deg, #5c340b 0%, #3b2005 55%, #271403 100%);
    border: 1px solid rgba(251, 191, 36, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(254, 243, 199, 0.25),
        inset 3px 0 0 #fbbf24,
        0 2px 5px rgba(0, 0, 0, 0.65);
}

/* Hiệu ứng trượt khay server ra ngoài 3D khi hover */
.rack-body-3d .u-content.occupied-device:hover,
.rack-body-3d .u-content.occupied-linkien:hover {
    transform: translateZ(18px) translateX(-4px) scale(1.015);
    z-index: 20;
}
.rack-body-3d .u-content.occupied-device:hover {
    box-shadow:
        10px 10px 22px rgba(0, 0, 0, 0.78),
        0 0 18px rgba(56, 189, 248, 0.65),
        inset 3px 0 0 #7dd3fc;
    border-color: #7dd3fc;
}
.rack-body-3d .u-content.occupied-linkien:hover {
    box-shadow:
        10px 10px 22px rgba(0, 0, 0, 0.78),
        0 0 18px rgba(251, 191, 36, 0.65),
        inset 3px 0 0 #fde68a;
    border-color: #fde68a;
}

/* Khi đang focus 1 thiết bị, làm dịu nhẹ các blade khác */
.rack-body-3d.has-blade-hover .u-content.occupied-device:not(:hover),
.rack-body-3d.has-blade-hover .u-content.occupied-linkien:not(:hover) {
    opacity: 0.68;
}

/* Chi tiết mặt nạ phần cứng: khay ổ đĩa / cổng mạng / đèn LED */
.rack-blade-ports {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.rack-blade-bay {
    width: 6px;
    height: 8px;
    border-radius: 1px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(148, 163, 184, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.rack-blade-port {
    width: 5px;
    height: 6px;
    border-radius: 1px;
    background: #020617;
    border: 1px solid rgba(251, 191, 36, 0.6);
    box-shadow: 0 0 4px rgba(251, 191, 36, 0.55);
}

.rack-blade-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.72rem;
    letter-spacing: 0.15px;
    color: #f8fafc;
}

.rack-blade-u-tag {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0 4px;
    border-radius: 3px;
    background: rgba(2, 6, 23, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #bae6fd;
    flex-shrink: 0;
}

.rack-blade-leds {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

/* Cửa kính lưới mờ có thể bật/tắt */
.rack-3d-glass-door {
    position: absolute;
    inset: 2px;
    border-radius: 7px;
    pointer-events: none;
    opacity: 0;
    transform: translateZ(24px);
    background:
        linear-gradient(125deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 38%, rgba(56, 189, 248, 0.08) 100%),
        radial-gradient(rgba(148, 163, 184, 0.24) 1px, transparent 1px);
    background-size: 100% 100%, 6px 6px;
    border: 1.5px solid rgba(56, 189, 248, 0.35);
    box-shadow: inset 0 0 24px rgba(14, 165, 233, 0.15);
    transition: opacity 0.35s ease;
}
.rack-3d-cabinet.has-glass-door .rack-3d-glass-door {
    opacity: 1;
}

/* Panel Telemetry & Spotlight bên phải Split-View */
.rack-telemetry-card,
.rack-spotlight-card,
.rack-equipment-panel {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.24);
}
[data-theme="dark"] .rack-telemetry-card,
[data-theme="dark"] .rack-spotlight-card,
[data-theme="dark"] .rack-equipment-panel {
    background: rgba(15, 23, 42, 0.65);
    border-color: rgba(56, 189, 248, 0.22);
}
.rack-kpi-mini {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
}
[data-theme="dark"] .rack-kpi-mini {
    background: rgba(30, 41, 59, 0.65);
    border-color: rgba(148, 163, 184, 0.15);
}
.rack-spotlight-card.is-active {
    border-color: rgba(14, 165, 233, 0.55);
    box-shadow: 0 6px 18px rgba(14, 165, 233, 0.14);
}
.rack-legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}
.rack-legend-dot.server {
    background: #0ea5e9;
    box-shadow: 0 0 5px rgba(14, 165, 233, 0.6);
}
.rack-legend-dot.network {
    background: #f59e0b;
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.6);
}

/* 3D Corridor Row Mode (Các tủ Rack con đứng trên sàn nâng Data Center) */
.dcim-row-stage {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(14, 165, 233, 0.14), transparent 65%),
        linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, #070b14 0%, #0b1222 100%);
    background-size: 100% 100%, 28px 28px, 28px 28px, 100% 100%;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.75);
}
[data-theme="light"] .dcim-row-stage {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(14, 165, 233, 0.12), transparent 65%),
        linear-gradient(rgba(15, 23, 42, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.06) 1px, transparent 1px),
        linear-gradient(180deg, #e2e8f0 0%, #cbd5e1 100%);
    background-size: 100% 100%, 28px 28px, 28px 28px, 100% 100%;
    border-color: rgba(148, 163, 184, 0.45);
    box-shadow: inset 0 0 24px rgba(15, 23, 42, 0.12);
}

#rowRacksContainer.dcim-row-3d .row-visualizer-rack {
    position: relative;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.25s ease;
    box-shadow: 12px 16px 26px rgba(2, 6, 23, 0.55) !important;
    cursor: pointer;
}
/* Mặt nóc 3D của từng tủ trong dãy */
#rowRacksContainer.dcim-row-3d .row-visualizer-rack::before {
    content: "";
    position: absolute;
    left: 6px;
    right: -6px;
    top: -9px;
    height: 9px;
    background: linear-gradient(180deg, #27354d 0%, #172236 100%);
    border: 1px solid #334155;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    transform: skewX(-42deg);
    pointer-events: none;
}
/* Vách hông 3D sắc nét (chữ mặt trước không bị nhòe!) */
#rowRacksContainer.dcim-row-3d .row-visualizer-rack::after {
    content: "";
    position: absolute;
    top: -4px;
    bottom: 5px;
    right: -11px;
    width: 11px;
    background: linear-gradient(90deg, #1b273c 0%, #090e1a 100%);
    border: 1px solid #2b3c58;
    border-left: none;
    border-radius: 0 5px 5px 0;
    transform: skewY(-40deg);
    pointer-events: none;
}
#rowRacksContainer.dcim-row-3d .row-visualizer-rack:hover {
    transform: translateY(-7px) scale(1.025);
    z-index: 15;
    box-shadow: 16px 24px 36px rgba(14, 165, 233, 0.28) !important;
    border-color: #38bdf8 !important;
}
.rack-row-lightbar {
    height: 3.5px;
    border-radius: 999px;
    margin-bottom: 6px;
    background: linear-gradient(90deg, #10b981, #38bdf8);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.85);
}
.rack-row-lightbar.load-warn {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.85);
}
.rack-row-lightbar.load-crit {
    background: linear-gradient(90deg, #ef4444, #f97316);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.9);
}
.rack-row-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px;
    margin-bottom: 5px;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #f8fafc;
}
.rack-row-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    padding: 3px 6px;
    border-radius: 5px;
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(56, 189, 248, 0.16);
    color: #94a3b8;
    font-family: var(--font-mono);
    font-size: calc(0.58rem * var(--rack-zoom-factor));
}
.rack-row-blade-led {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 4px #22c55e;
    flex-shrink: 0;
}
.rack-row-blade-led.amber {
    background: #fbbf24;
    box-shadow: 0 0 4px #fbbf24;
}

@media (max-width: 991.98px) {
    .rack-3d-cabinet.is-3d-iso {
        transform: rotateY(-5deg) rotateX(1deg);
    }
}

/* Thu hẹp / Mở rộng cột Danh sách Tủ Rack (Kinetic 3D Drawer Animation) */
#dcimRacksLayoutRow {
    perspective: 1400px;
}

#dcimRackListCol {
    transition: flex-basis 0.44s cubic-bezier(0.22, 1.12, 0.36, 1),
                width 0.44s cubic-bezier(0.22, 1.12, 0.36, 1),
                max-width 0.44s cubic-bezier(0.22, 1.12, 0.36, 1),
                transform 0.36s ease;
    will-change: flex-basis, width, max-width;
}

#dcimRackDetailCol {
    transition: flex-basis 0.44s cubic-bezier(0.22, 1.12, 0.36, 1),
                width 0.44s cubic-bezier(0.22, 1.12, 0.36, 1),
                max-width 0.44s cubic-bezier(0.22, 1.12, 0.36, 1);
}

#dcimRackListCard {
    position: relative;
    overflow: hidden;
    transition: padding 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease,
                border-color 0.35s ease;
}

#dcimRackListCard.racklist-pulse-flash {
    border-color: rgba(56, 189, 248, 0.78) !important;
    box-shadow: 0 0 26px rgba(14, 165, 233, 0.32), inset 0 0 18px rgba(56, 189, 248, 0.14) !important;
}

#btnCollapseRackList #rackListCollapseIcon {
    display: inline-block;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#btnCollapseRackList:hover #rackListCollapseIcon {
    transform: translateX(-3px) scale(1.15);
}

#dcimRackListCol .dcim-racklist-body,
#dcimRackListCol .dcim-racklist-header {
    transform-origin: left center;
    transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

#dcimRacksLayoutRow.is-racklist-collapsed #dcimRackListCol .dcim-racklist-body {
    display: none !important;
}

#dcimRacksLayoutRow.is-racklist-expanding #dcimRackListCol .dcim-racklist-body,
#dcimRacksLayoutRow.is-racklist-expanding #dcimRackListCol .dcim-racklist-header {
    animation: rackDrawerReveal 0.44s cubic-bezier(0.22, 1.08, 0.36, 1) both;
}

@keyframes rackDrawerReveal {
    0% {
        opacity: 0;
        transform: translateX(-22px) scale(0.96);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@media (min-width: 992px) {
    #dcimRacksLayoutRow:not(.is-racklist-collapsed) #dcimRackListCol {
        flex: 0 0 33.333333%;
        width: 33.333333%;
        max-width: 33.333333%;
    }
    #dcimRacksLayoutRow:not(.is-racklist-collapsed) #dcimRackDetailCol {
        flex: 1 1 0%;
        width: auto;
        max-width: none;
        min-width: 0;
    }
    #dcimRacksLayoutRow.is-racklist-collapsed #dcimRackListCol {
        flex: 0 0 64px !important;
        width: 64px !important;
        max-width: 64px !important;
    }
    #dcimRacksLayoutRow.is-racklist-collapsed #dcimRackDetailCol {
        flex: 1 1 0% !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0;
    }
    #dcimRacksLayoutRow.is-racklist-collapsed #dcimRackListCard {
        padding: 1rem 0.5rem !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: linear-gradient(180deg, rgba(14, 165, 233, 0.12) 0%, rgba(15, 23, 42, 0.85) 100%);
        border-color: rgba(56, 189, 248, 0.42);
    }
    [data-theme="light"] #dcimRacksLayoutRow.is-racklist-collapsed #dcimRackListCard {
        background: linear-gradient(180deg, #e0f2fe 0%, #f8fafc 100%);
    }
    #dcimRacksLayoutRow.is-racklist-collapsed .dcim-racklist-header {
        display: none !important;
    }
    #dcimRacksLayoutRow.is-racklist-collapsed .dcim-racklist-collapsed-rail {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        cursor: pointer;
        width: 100%;
        padding-top: 6px;
        animation: rackRailSwingIn 0.45s cubic-bezier(0.22, 1.2, 0.36, 1) both;
        transform-origin: left center;
    }
    #dcimRacksLayoutRow.is-racklist-collapsed .dcim-racklist-collapsed-rail button {
        transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
        animation: rackRailBtnPulse 2.4s infinite ease-in-out;
    }
    #dcimRacksLayoutRow.is-racklist-collapsed .dcim-racklist-collapsed-rail:hover button {
        transform: translateX(3px) scale(1.12);
        box-shadow: 0 0 18px rgba(56, 189, 248, 0.75);
    }
    #dcimRacksLayoutRow.is-racklist-collapsed .dcim-racklist-collapsed-rail:hover .dcim-racklist-vertical-label {
        letter-spacing: 2.2px;
        text-shadow: 0 0 10px rgba(56, 189, 248, 0.6);
    }
}

@keyframes rackRailSwingIn {
    0% {
        opacity: 0;
        transform: perspective(600px) rotateY(-55deg) translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: perspective(600px) rotateY(0deg) translateX(0);
    }
}

@keyframes rackRailBtnPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.45);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(56, 189, 248, 0);
    }
}

@media (max-width: 991.98px) {
    #dcimRacksLayoutRow.is-racklist-collapsed .dcim-racklist-header {
        margin-bottom: 0 !important;
    }
}

.dcim-racklist-vertical-label {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    letter-spacing: 1.5px;
    font-size: 0.78rem;
    white-space: nowrap;
    user-select: none;
    transition: letter-spacing 0.25s ease, text-shadow 0.25s ease;
}

/* Cân đối thanh NOC Monitoring Live & Hạ tầng DC Telemetry Ribbon */
.noc-control-top-row,
.noc-ribbon-top-row {
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.noc-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}
.noc-status-grid .noc-telemetry-badge {
    width: 100%;
    padding: 7px 14px;
}
.telemetry-chips-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.telemetry-chips-grid .telemetry-chip {
    width: 100%;
    justify-content: center;
    padding: 7px 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1199.98px) {
    .telemetry-chips-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 767.98px) {
    .noc-status-grid,
    .telemetry-chips-grid {
        grid-template-columns: 1fr;
    }
}

/* Floating Tier III IDC Certificate Hover Popover on HEARTBEAT TELEMETRY */
.noc-cert-trigger {
    cursor: pointer;
}
.noc-cert-popover {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 280px;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.97) 0%, rgba(17, 34, 64, 0.98) 100%);
    border: 1.5px solid rgba(56, 189, 248, 0.55);
    box-shadow: 0 22px 48px rgba(2, 6, 23, 0.62), 0 0 24px rgba(14, 165, 233, 0.25);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px) scale(0.94);
    transform-origin: top right;
    transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.28s cubic-bezier(0.22, 1.15, 0.36, 1),
                visibility 0.26s ease;
    z-index: 1080;
}
[data-theme="light"] .noc-cert-popover {
    background: linear-gradient(160deg, #ffffff 0%, #f0f9ff 100%);
    border-color: rgba(2, 132, 199, 0.4);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.22), 0 0 20px rgba(2, 132, 199, 0.14);
}
.noc-cert-popover::before {
    content: "";
    position: absolute;
    top: -7px;
    right: 46px;
    width: 12px;
    height: 12px;
    background: #0f1b33;
    border-top: 1.5px solid rgba(56, 189, 248, 0.55);
    border-left: 1.5px solid rgba(56, 189, 248, 0.55);
    transform: rotate(45deg);
}
[data-theme="light"] .noc-cert-popover::before {
    background: #ffffff;
    border-color: rgba(2, 132, 199, 0.4);
}
/* Vùng đệm vô hình giúp rê chuột từ badge xuống ảnh không bị tắt */
.noc-cert-popover::after {
    content: "";
    position: absolute;
    top: -16px;
    left: 0;
    right: 0;
    height: 16px;
}
.noc-cert-trigger:hover .noc-cert-popover,
.noc-cert-trigger:focus-within .noc-cert-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}
.noc-cert-popover-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #38bdf8;
    padding-bottom: 7px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
}
[data-theme="light"] .noc-cert-popover-header {
    color: #0369a1;
}
.noc-cert-img-wrap {
    background: #ffffff;
    border-radius: 10px;
    padding: 8px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}
.noc-cert-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    object-fit: contain;
}
.noc-cert-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    font-family: var(--font-tech);
    font-size: 0.7rem;
    color: #cbd5e1;
}
[data-theme="light"] .noc-cert-popover-footer {
    color: #475569;
}



/* ============================================================================
   HARMONY & SYMMETRY — Header 1 dòng cân đối, Badge góc KPI & 3-cột NOC Live
   ============================================================================ */
.top-header-brand {
    flex: 1 1 auto;
    min-width: 0;
}
.top-header-titles {
    min-width: 0;
}
.top-header-titles #main-header-subtitle {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Badge CẢNH BÁO đặt gọn ở góc phải trên của thẻ KPI UQ Hết Hạn (tránh đẩy lệch hàng chữ) */
.metric-alert-corner-pill {
    position: absolute;
    top: 6px;
    right: 7px;
    z-index: 2;
    font-family: var(--font-tech);
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.35px;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
    pointer-events: none;
}

/* Mẫu số thống nhất cho 4 thẻ KPI DCIM (93 / 129 & 1955 / 5418 U) */
.noc-kpi-denom {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0;
}

/* Thanh NOC Monitoring Live — 3 cột đối xứng (Trái: Brand • Giữa: Đồng hồ • Phải: Heartbeat) */
@media (min-width: 1200px) {
    .noc-control-top-row {
        display: grid !important;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        column-gap: 0.75rem;
        row-gap: 0.35rem;
    }
    .noc-control-top-row > .noc-live-brand-pill {
        justify-self: start;
        white-space: nowrap;
    }
    .noc-control-top-row > .cyber-clock-widget {
        justify-self: center;
        white-space: nowrap;
    }
    .noc-control-top-row > .noc-live-wave-widget {
        justify-self: end;
        white-space: nowrap;
    }
}

/* ============================================================================
   TỔNG QUAN SỐ LIỆU IDC — Single-Screen 100% Zoom Balanced Executive Grid
   Cân đối hài hòa toàn bộ 5 tầng (Header • 8 KPI • NOC Live • Hạ tầng DC • 4 KPI DCIM)
   + 3 biểu đồ chuẩn tỷ lệ 100% zoom, thẳng hàng tuyệt đối không lệch dòng.
   ============================================================================ */
@media (min-width: 1200px) {
    body.tab-charts-active .main-content {
        padding-top: 0.56rem !important;
        padding-bottom: 0.62rem !important;
    }

    /* 1. Top Header Bar — Luôn cân bằng trên 1 hàng ngang chuẩn chiều cao 34px */
    body.tab-charts-active .top-header-bar {
        flex-wrap: nowrap !important;
        margin-bottom: 0.6rem !important;
        padding: 0.58rem 1.05rem !important;
        border-radius: 14px !important;
        gap: 0.75rem !important;
    }
    body.tab-charts-active .top-header-bar .logo-reload-btn img {
        height: 38px !important;
    }
    body.tab-charts-active #main-header-title {
        font-size: 1.28rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.08rem !important;
        letter-spacing: 0.25px;
        white-space: nowrap;
    }
    body.tab-charts-active #main-header-subtitle {
        font-size: 0.82rem !important;
        line-height: 1.25 !important;
    }
    body.tab-charts-active #headerControlsRight,
    body.tab-charts-active #global-filter-container {
        flex-wrap: nowrap !important;
        gap: 0.42rem !important;
        flex-shrink: 0;
    }
    body.tab-charts-active .top-header-bar .form-select {
        min-width: 0 !important;
        height: 34px !important;
        font-size: 0.81rem !important;
        padding: 0.28rem 1.75rem 0.28rem 0.78rem !important;
        line-height: 1.2 !important;
    }
    body.tab-charts-active .top-header-bar .quick-control-btn,
    body.tab-charts-active .top-header-bar .btn-glow-info {
        height: 34px !important;
        font-size: 0.81rem !important;
        padding: 0 0.82rem !important;
        white-space: nowrap !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }

    /* 2. 8 Operational KPI Cards — Lưới 8 cột đều nhau tuyệt đối, số & nhãn thẳng hàng 1 dòng */
    body.tab-charts-active #operational-metrics-row:not(.d-none) {
        display: grid !important;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        gap: 0.6rem !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 0.6rem !important;
    }
    body.tab-charts-active #operational-metrics-row > [class*="col-"] {
        width: 100% !important;
        max-width: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    body.tab-charts-active #operational-metrics-row .metric-box {
        padding: 0.64rem 0.45rem !important;
        min-height: 76px !important;
        border-radius: 14px !important;
        justify-content: center !important;
        align-items: center !important;
    }
    body.tab-charts-active #operational-metrics-row .metric-value {
        font-size: 1.46rem !important;
        line-height: 1.12 !important;
        margin-bottom: 0.24rem !important;
    }
    body.tab-charts-active #operational-metrics-row .metric-title {
        font-size: clamp(0.63rem, 0.68vw, 0.74rem) !important;
        letter-spacing: 0.14px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    body.tab-charts-active #operational-metrics-row .metric-icon {
        font-size: 1.3rem !important;
        right: 0.48rem !important;
        bottom: 0.34rem !important;
        opacity: 0.08 !important;
    }

    /* Sub-nav Pills Row (fallback if present) */
    body.tab-charts-active #panel-charts > .d-flex {
        margin-bottom: 0.5rem !important;
        padding-bottom: 0.34rem !important;
    }
    body.tab-charts-active #chartsSubNav .subnav-pill {
        padding: 0.34rem 0.9rem !important;
        font-size: 0.84rem !important;
    }
    body.tab-charts-active #panel-charts > .d-flex .tech-badge-primary {
        padding: 0.32rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    /* 3. NOC Monitoring Live Control Bar — Đối xứng 3 cột trên & 3 badge dưới đồng nhất */
    body.tab-charts-active .noc-control-bar {
        padding: 0.56rem 0.96rem !important;
        margin-bottom: 0.6rem !important;
        border-radius: 14px !important;
    }
    body.tab-charts-active .noc-control-top-row {
        padding-bottom: 0.42rem !important;
    }
    body.tab-charts-active .noc-live-brand-pill,
    body.tab-charts-active .cyber-clock-widget,
    body.tab-charts-active .noc-live-wave-widget {
        min-height: 36px !important;
        padding-top: 0.24rem !important;
        padding-bottom: 0.24rem !important;
    }
    body.tab-charts-active .noc-brand-text {
        font-size: 0.85rem !important;
    }
    body.tab-charts-active .cyber-analog-clock {
        width: 24px !important;
        height: 24px !important;
    }
    body.tab-charts-active .digital-clock-time {
        font-size: 0.94rem !important;
    }
    body.tab-charts-active .digital-clock-date {
        font-size: 0.8rem !important;
    }
    body.tab-charts-active .noc-ecg-svg {
        width: 82px !important;
    }
    body.tab-charts-active .noc-status-grid {
        padding-top: 0.42rem !important;
        gap: 0.62rem !important;
    }
    body.tab-charts-active .noc-telemetry-badge {
        min-height: 34px !important;
        padding: 0.28rem 0.72rem !important;
        font-size: 0.81rem !important;
    }

    /* 4. Telemetry Health Ribbon Bar (HẠ TẦNG DC) — 4 cột đồng trục với 4 KPI DCIM bên dưới */
    body.tab-charts-active .telemetry-ribbon {
        padding: 0.56rem 0.96rem !important;
        margin-bottom: 0.6rem !important;
        border-radius: 14px !important;
    }
    body.tab-charts-active .noc-ribbon-top-row {
        padding-bottom: 0.36rem !important;
        margin-bottom: 0.42rem !important;
    }
    body.tab-charts-active .telemetry-header-badge {
        padding: 0.26rem 0.72rem !important;
        font-size: 0.78rem !important;
    }
    body.tab-charts-active .telemetry-chips-grid {
        gap: 0.62rem !important;
    }
    body.tab-charts-active .telemetry-chip {
        min-height: 34px !important;
        padding: 0.28rem 0.72rem !important;
        font-size: 0.81rem !important;
    }

    /* 5. 4 DCIM Real-time KPIs Row — Cân bằng độ cao, thẳng lề 4 cột, icon căn giữa dọc */
    body.tab-charts-active #subpanel-charts-overview > .row.g-3.mb-4 {
        margin-bottom: 0.6rem !important;
        --bs-gutter-x: 0.62rem;
        --bs-gutter-y: 0.54rem;
    }
    body.tab-charts-active .noc-kpi-card {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        padding: 0.64rem 1rem !important;
        min-height: 76px !important;
        border-radius: 14px !important;
    }
    body.tab-charts-active .noc-kpi-val {
        font-size: 1.46rem !important;
        line-height: 1.15 !important;
        margin-bottom: 0.16rem !important;
        display: flex;
        align-items: baseline;
        gap: 0.25rem;
    }
    body.tab-charts-active .noc-kpi-title {
        font-size: 0.76rem !important;
        letter-spacing: 0.25px !important;
        white-space: nowrap;
    }
    body.tab-charts-active .noc-kpi-icon {
        font-size: 1.65rem !important;
        top: 50% !important;
        bottom: auto !important;
        right: 1rem !important;
        transform: translateY(-50%);
        opacity: 0.11 !important;
    }
    body.tab-charts-active .noc-kpi-card:hover .noc-kpi-icon {
        transform: translateY(-50%) scale(1.12) rotate(-5deg);
        opacity: 0.24 !important;
    }

    /* 6. 3 Main Donut Chart Cards Row */
    body.tab-charts-active #subpanel-charts-overview > .row.g-4.mb-4 {
        margin-bottom: 0.85rem !important;
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.65rem;
    }
    body.tab-charts-active .noc-chart-card {
        padding: 0.82rem 1rem !important;
        border-radius: 14px !important;
    }
    body.tab-charts-active .noc-chart-card > .d-flex.mb-2,
    body.tab-charts-active .noc-chart-card > .d-flex.mb-3 {
        margin-bottom: 0.34rem !important;
    }
    body.tab-charts-active .noc-chart-card h5 {
        font-size: 0.98rem !important;
        margin-bottom: 0.08rem !important;
    }
    body.tab-charts-active .noc-chart-card .chart-title-icon-badge {
        width: 27px !important;
        height: 27px !important;
        font-size: 0.86rem !important;
    }
    body.tab-charts-active .noc-chart-card > .d-flex .text-muted {
        font-size: 0.81rem !important;
    }
    body.tab-charts-active .noc-chart-card .noc-chart-stage {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    body.tab-charts-active .noc-chart-card .mt-auto.pt-3 {
        padding-top: 0.52rem !important;
    }
    body.tab-charts-active .noc-chart-card .noc-metric-strip {
        margin-bottom: 0.36rem !important;
    }
    body.tab-charts-active .noc-chart-card .metric-capsule {
        padding: 0.36rem 0.32rem !important;
    }
    body.tab-charts-active .noc-chart-card .metric-strip-label,
    body.tab-charts-active .noc-chart-card .metric-capsule .text-muted {
        font-size: 0.76rem !important;
        margin-bottom: 0.08rem !important;
    }
    body.tab-charts-active .noc-chart-card .metric-capsule .fs-5 {
        font-size: 1.14rem !important;
        line-height: 1.2 !important;
    }
    body.tab-charts-active .noc-chart-card #cl-top-partner {
        font-size: 0.86rem !important;
        line-height: 1.55 !important;
    }
    body.tab-charts-active .noc-chart-footer {
        font-size: 0.83rem !important;
        padding-top: 0.18rem !important;
    }
}


/* ============================================================================
   Performance Optimization: Tắt GPU backdrop-filter lặp lại trên các thẻ KPI/Card
   (giữ nguyên màu nền trong suốt & viền kính mờ, tăng tốc cuộn & chuyển tab)
   ============================================================================ */
.tech-card,
.metric-box,
.noc-kpi-card,
.noc-dashboard-card,
.telemetry-ribbon {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Không cắt/tạo thanh cuộn trong chú thích (legend) biểu đồ Donut */
.noc-chart-stage .apexcharts-legend {
    overflow: visible !important;
    max-height: none !important;
}


/* ============================================================================
   CYBER-NOC PAGE TRANSITION MORPHING — TỔNG QUAN SỐ LIỆU IDC
   Hiệu ứng chuyển cảnh Morphing 60fps (GPU-only: clip-path, transform, opacity)
   tự động gỡ class sau 920ms để không ảnh hưởng hover / popover chứng nhận Tier III.
   ============================================================================ */
.idc-morph-stage {
    position: fixed;
    inset: 0;
    z-index: 1040;
    pointer-events: none;
    overflow: hidden;
    display: none;
}

.idc-morph-stage.is-morphing {
    display: block;
}

/* Liquid Aperture Wave nở từ đúng nút tab TỔNG QUAN SỐ LIỆU */
.idc-morph-blob {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--morph-ox, 12%) var(--morph-oy, 14%),
        rgba(14, 165, 233, 0.24) 0%,
        rgba(99, 102, 241, 0.16) 36%,
        rgba(16, 185, 129, 0.1) 66%,
        transparent 88%
    );
    will-change: clip-path, opacity;
}

.idc-morph-stage.is-morphing .idc-morph-blob {
    animation: idcMorphBlobWave 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Vòng năng lượng mở rộng đồng tâm */
.idc-morph-ring {
    position: absolute;
    left: var(--morph-ox, 12%);
    top: var(--morph-oy, 14%);
    width: 120px;
    height: 120px;
    margin-left: -60px;
    margin-top: -60px;
    border-radius: 44% 56% 52% 48% / 48% 42% 58% 52%;
    border: 2px solid rgba(56, 189, 248, 0.72);
    box-shadow: 0 0 28px rgba(14, 165, 233, 0.45), inset 0 0 22px rgba(99, 102, 241, 0.28);
    will-change: transform, opacity, border-radius;
}

.idc-morph-stage.is-morphing .idc-morph-ring {
    animation: idcMorphRingBurst 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Tia quét Cyber Scanline lướt mượt chéo qua màn hình */
.idc-morph-scanline {
    position: absolute;
    top: -15%;
    left: -30%;
    width: 34%;
    height: 130%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(14, 165, 233, 0.04) 35%,
        rgba(56, 189, 248, 0.28) 50%,
        rgba(99, 102, 241, 0.12) 64%,
        transparent 100%
    );
    transform: skewX(-18deg) translateX(-100%);
    will-change: transform, opacity;
}

.idc-morph-stage.is-morphing .idc-morph-scanline {
    animation: idcMorphScanSweep 0.64s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes idcMorphBlobWave {
    0% {
        clip-path: circle(0% at var(--morph-ox, 12%) var(--morph-oy, 14%));
        opacity: 0.95;
    }
    45% {
        clip-path: circle(85% at var(--morph-ox, 12%) var(--morph-oy, 14%));
        opacity: 0.7;
    }
    100% {
        clip-path: circle(155% at var(--morph-ox, 12%) var(--morph-oy, 14%));
        opacity: 0;
    }
}

@keyframes idcMorphRingBurst {
    0% {
        transform: scale(0.15) rotate(0deg);
        opacity: 0.95;
        border-radius: 38% 62% 54% 46% / 44% 38% 62% 56%;
    }
    55% {
        border-radius: 56% 44% 48% 52% / 52% 58% 42% 48%;
        opacity: 0.45;
    }
    100% {
        transform: scale(15) rotate(42deg);
        opacity: 0;
        border-radius: 50%;
    }
}

@keyframes idcMorphScanSweep {
    0% {
        transform: skewX(-18deg) translateX(-120%);
        opacity: 0;
    }
    25% {
        opacity: 0.9;
    }
    100% {
        transform: skewX(-18deg) translateX(460%);
        opacity: 0;
    }
}

/* Wave 0: Tiêu đề header morph nhẹ */
body.idc-morph-active .top-header-bar {
    animation: idcMorphHeaderSlide 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Wave 1: 8 thẻ KPI vận hành morph từ hình viên nang sang thẻ đầy đủ theo sóng trái -> phải */
body.idc-morph-active #operational-metrics-row .metric-box {
    animation: idcMorphPillToCard 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--morph-i, 0) * 28ms);
    will-change: transform, opacity, clip-path;
}

/* Wave 2: Thanh NOC MONITORING LIVE & HẠ TẦNG DC mở khẩu độ ngang từ giữa */
body.idc-morph-active #subpanel-charts-overview .noc-control-bar {
    animation: idcMorphApertureWide 0.54s cubic-bezier(0.22, 1, 0.36, 1) 70ms both;
    will-change: transform, opacity, clip-path;
}
body.idc-morph-active #subpanel-charts-overview .telemetry-ribbon {
    animation: idcMorphApertureWide 0.54s cubic-bezier(0.22, 1, 0.36, 1) 125ms both;
    will-change: transform, opacity, clip-path;
}

/* Wave 3: 4 thẻ chỉ số DCIM bật nổi 3D theo thứ tự */
body.idc-morph-active #subpanel-charts-overview .noc-kpi-card {
    animation: idcMorph3DLift 0.54s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(155ms + var(--morph-i, 0) * 45ms);
    will-change: transform, opacity, clip-path;
}

/* Wave 4: 3 khối biểu đồ Donut morph 3D + rạng sáng viền */
body.idc-morph-active #subpanel-charts-overview .noc-chart-card {
    animation: idcMorphChartCard 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: calc(220ms + var(--morph-i, 0) * 70ms);
    will-change: transform, opacity, clip-path;
}

/* Wave 5: Biểu đồ xu hướng bên dưới */
body.idc-morph-active #subpanel-charts-overview > .row:last-child .noc-dashboard-card {
    animation: idcMorphChartCard 0.62s cubic-bezier(0.16, 1, 0.3, 1) 360ms both;
}

@keyframes idcMorphHeaderSlide {
    0% {
        opacity: 0;
        transform: translateY(-10px) scale(0.985);
        clip-path: inset(0 6% 0 6% round 20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: inset(0 0 0 0 round 14px);
    }
}

@keyframes idcMorphPillToCard {
    0% {
        opacity: 0;
        transform: translateY(18px) scale(0.86);
        clip-path: inset(10% 8% 10% 8% round 28px);
    }
    65% {
        opacity: 1;
        transform: translateY(-2px) scale(1.012);
        clip-path: inset(0 0 0 0 round 14px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        clip-path: inset(0 0 0 0 round 12px);
    }
}

@keyframes idcMorphApertureWide {
    0% {
        opacity: 0;
        transform: scaleX(0.92) translateY(10px);
        clip-path: inset(0 18% 0 18% round 32px);
    }
    100% {
        opacity: 1;
        transform: scaleX(1) translateY(0);
        clip-path: inset(0 0 0 0 round 16px);
    }
}

@keyframes idcMorph3DLift {
    0% {
        opacity: 0;
        transform: perspective(900px) translateY(20px) rotateX(9deg) scale(0.92);
        clip-path: inset(8% 4% 8% 4% round 24px);
    }
    70% {
        opacity: 1;
        transform: perspective(900px) translateY(-2px) rotateX(-1deg) scale(1.008);
    }
    100% {
        opacity: 1;
        transform: perspective(900px) translateY(0) rotateX(0deg) scale(1);
        clip-path: inset(0 0 0 0 round 12px);
    }
}

@keyframes idcMorphChartCard {
    0% {
        opacity: 0;
        transform: perspective(1100px) translateY(26px) rotateX(6deg) scale(0.93);
        clip-path: inset(0 0 14% 0 round 28px);
    }
    68% {
        opacity: 1;
        transform: perspective(1100px) translateY(-3px) rotateX(-0.8deg) scale(1.006);
        clip-path: inset(0 0 0 0 round 16px);
    }
    100% {
        opacity: 1;
        transform: perspective(1100px) translateY(0) rotateX(0deg) scale(1);
        clip-path: inset(0 0 0 0 round 16px);
    }
}

/* Chuyển cảnh Morphing có hướng giữa 2 sub-tab trong TỔNG QUAN SỐ LIỆU IDC */
.idc-subtab-morph-right {
    animation: idcSubtabMorphFromRight 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.idc-subtab-morph-left {
    animation: idcSubtabMorphFromLeft 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes idcSubtabMorphFromRight {
    0% {
        opacity: 0;
        transform: translateX(28px) scale(0.975);
        clip-path: inset(0 0 0 8% round 22px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        clip-path: inset(0 0 0 0 round 16px);
    }
}

@keyframes idcSubtabMorphFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-28px) scale(0.975);
        clip-path: inset(0 8% 0 0 round 22px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        clip-path: inset(0 0 0 0 round 16px);
    }
}

/* Tôn trọng thiết lập giảm chuyển động của hệ điều hành */
@media (prefers-reduced-motion: reduce) {
    .idc-morph-stage,
    body.idc-morph-active .top-header-bar,
    body.idc-morph-active #operational-metrics-row .metric-box,
    body.idc-morph-active #subpanel-charts-overview .noc-control-bar,
    body.idc-morph-active #subpanel-charts-overview .telemetry-ribbon,
    body.idc-morph-active #subpanel-charts-overview .noc-kpi-card,
    body.idc-morph-active #subpanel-charts-overview .noc-chart-card,
    .idc-subtab-morph-right,
    .idc-subtab-morph-left {
        animation: none !important;
        transition: none !important;
    }
}


/* ============================================================================
   SIDEBAR ACCORDION SUB-MENUS & COLLAPSED FLYOUT MENUS (PRO EXECUTIVE EDITION)
   Gọn gàng, tinh tế, hiệu ứng spring mượt mà & staggered cascade đỉnh cao.
   ============================================================================ */
.sidebar-group {
    display: flex;
    flex-direction: column;
    position: relative;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background 0.32s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.32s ease,
                box-shadow 0.32s ease,
                padding 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                margin 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-group.is-open {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 20px -6px rgba(0, 0, 0, 0.22);
    padding: 3px;
    margin: 2px 0;
}

[data-theme="dark"] .sidebar-group.is-open {
    background: rgba(15, 23, 42, 0.62);
    border-color: rgba(56, 189, 248, 0.22);
    box-shadow: inset 0 1px 0 rgba(56, 189, 248, 0.12), 0 8px 22px -6px rgba(0, 0, 0, 0.45);
}

.sidebar-link.has-submenu {
    padding-right: 0.52rem;
}

/* Micro-pill caret badge thay cho mũi tên rời rạc */
.sidebar-chevron {
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    font-size: 0.62rem !important;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85) !important;
    opacity: 0.85;
    padding: 0;
    margin-right: 0;
    flex-shrink: 0;
    transition: transform 0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.22s ease,
                border-color 0.22s ease,
                color 0.22s ease,
                box-shadow 0.24s ease,
                opacity 0.2s ease;
}

.sidebar-link.has-submenu:hover .sidebar-chevron {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.32);
    color: #ffffff !important;
    opacity: 1;
}

.sidebar-group.is-open > .sidebar-link .sidebar-chevron {
    transform: rotate(180deg);
    background: rgba(253, 224, 71, 0.22);
    border-color: rgba(253, 224, 71, 0.48);
    color: #fde047 !important;
    box-shadow: 0 0 10px rgba(253, 224, 71, 0.28);
    opacity: 1;
}

[data-theme="dark"] .sidebar-group.is-open > .sidebar-link .sidebar-chevron {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.45);
    color: #38bdf8 !important;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

/* Smooth CSS Grid accordion expand/collapse — ZERO ghost gap when closed */
.sidebar-submenu {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.34s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.24s ease;
}

.sidebar-group.is-open > .sidebar-submenu {
    grid-template-rows: 1fr;
    opacity: 1;
}

.sidebar-submenu-inner {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    position: relative;
    transition: padding 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-group.is-open > .sidebar-submenu > .sidebar-submenu-inner {
    padding: 5px 2px 3px 1.28rem;
}

/* Glowing gradient vertical rail inside open submenu */
.sidebar-submenu-inner::before {
    content: '';
    position: absolute;
    left: 0.78rem;
    top: 6px;
    bottom: 8px;
    width: 1.5px;
    border-radius: 99px;
    background: linear-gradient(180deg, rgba(253, 224, 71, 0.75) 0%, rgba(255, 255, 255, 0.22) 65%, transparent 100%);
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1) 0.05s, opacity 0.25s ease;
}

[data-theme="dark"] .sidebar-submenu-inner::before {
    background: linear-gradient(180deg, rgba(56, 189, 248, 0.8) 0%, rgba(148, 163, 184, 0.22) 65%, transparent 100%);
}

.sidebar-group.is-open > .sidebar-submenu > .sidebar-submenu-inner::before {
    transform: scaleY(1);
    opacity: 1;
}

.sidebar-flyout-title {
    display: none;
}

/* Sub-links with staggered cascade entrance & glowing beacon dot */
.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.62rem;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.84) !important;
    text-decoration: none !important;
    font-family: var(--font-tech);
    font-size: 0.755rem;
    font-weight: 500;
    line-height: 1.25;
    position: relative;
    opacity: 0;
    transform: translateX(-10px) scale(0.97);
    transition: background 0.2s ease,
                color 0.2s ease,
                box-shadow 0.22s ease,
                opacity 0.28s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Connector node on the vertical rail */
.sidebar-sublink::before {
    content: '';
    position: absolute;
    left: -0.62rem;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.32);
    transform: translateY(-50%) scale(0.8);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease,
                box-shadow 0.2s ease;
}

.sidebar-group.is-open .sidebar-sublink {
    opacity: 1;
    transform: translateX(0) scale(1);
}
.sidebar-group.is-open .sidebar-sublink:nth-of-type(1) { transition-delay: 0.03s; }
.sidebar-group.is-open .sidebar-sublink:nth-of-type(2) { transition-delay: 0.065s; }
.sidebar-group.is-open .sidebar-sublink:nth-of-type(3) { transition-delay: 0.1s; }
.sidebar-group.is-open .sidebar-sublink:nth-of-type(4) { transition-delay: 0.135s; }
.sidebar-group.is-open .sidebar-sublink:nth-of-type(5) { transition-delay: 0.17s; }
.sidebar-group.is-open .sidebar-sublink:nth-of-type(6) { transition-delay: 0.205s; }

.sidebar-sublink i {
    font-size: 0.78rem;
    opacity: 0.8;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease, opacity 0.2s ease;
}

.sidebar-sublink span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-sublink:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff !important;
    transform: translateX(3px) scale(1);
    transition-delay: 0s !important;
}

.sidebar-sublink:hover::before {
    background: rgba(255, 255, 255, 0.85);
    transform: translateY(-50%) scale(1.15);
}

.sidebar-sublink:hover i {
    opacity: 1;
    transform: scale(1.14);
}

.sidebar-sublink.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.14) 100%);
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 3px 10px rgba(0, 0, 0, 0.14);
}

.sidebar-sublink.active::before {
    background: #fde047;
    transform: translateY(-50%) scale(1.35);
    box-shadow: 0 0 0 3px rgba(253, 224, 71, 0.25), 0 0 8px #fde047;
}

[data-theme="dark"] .sidebar-sublink.active {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.24) 0%, rgba(56, 189, 248, 0.08) 100%);
    color: #e0f2fe !important;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.32), 0 3px 10px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .sidebar-sublink.active::before {
    background: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.24), 0 0 8px #38bdf8;
}

.sidebar-sublink.active i {
    opacity: 1;
    color: #fde047;
    transform: scale(1.08);
}

[data-theme="dark"] .sidebar-sublink.active i {
    color: #38bdf8;
}

/* ── Collapsed Sidebar (Mini Icon Mode): Hover Flyout Sub-menu ── */
.sidebar.collapsed .sidebar-nav,
body.zen-mode .sidebar .sidebar-nav {
    overflow: visible !important;
    gap: 5px;
}

.sidebar.collapsed .sidebar-group.is-open,
body.zen-mode .sidebar .sidebar-group.is-open {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar.collapsed .sidebar-link,
body.zen-mode .sidebar .sidebar-link {
    padding: 0.5rem !important;
    justify-content: center;
    overflow: visible !important;
}

.sidebar.collapsed .sidebar-link:not(.has-submenu)::after,
body.zen-mode .sidebar .sidebar-link:not(.has-submenu)::after {
    inset: auto;
    left: calc(100% + 12px);
    top: 50%;
}

.sidebar.collapsed .sidebar-link > i:first-child,
body.zen-mode .sidebar .sidebar-link > i:first-child {
    width: 34px;
    height: 34px;
    background: transparent;
}

.sidebar.collapsed .sidebar-chevron,
body.zen-mode .sidebar .sidebar-chevron {
    display: none !important;
}

/* Ẩn tooltip đơn cho các nhóm đã có flyout menu con */
.sidebar.collapsed .sidebar-link.has-submenu::after,
body.zen-mode .sidebar .sidebar-link.has-submenu::after {
    display: none !important;
}

.sidebar.collapsed .sidebar-submenu,
body.zen-mode .sidebar .sidebar-submenu {
    display: block !important;
    position: absolute;
    left: calc(100% + 10px);
    top: -4px;
    min-width: 224px;
    background: rgba(15, 23, 42, 0.96);
    border: 1px solid rgba(56, 189, 248, 0.34);
    border-radius: 12px;
    box-shadow: 0 16px 38px rgba(2, 6, 23, 0.48), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    padding: 0.45rem;
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-8px) scale(0.96);
    transition: opacity 0.2s ease, transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.2s ease;
    z-index: 1090;
}

/* Cầu nối tàng hình giúp rê chuột từ icon sang menu con không bị đóng */
.sidebar.collapsed .sidebar-submenu::before,
body.zen-mode .sidebar .sidebar-submenu::before {
    content: '';
    position: absolute;
    left: -14px;
    top: 0;
    bottom: 0;
    width: 14px;
}

.sidebar.collapsed .sidebar-group:hover > .sidebar-submenu,
body.zen-mode .sidebar .sidebar-group:hover > .sidebar-submenu {
    opacity: 1 !important;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.sidebar.collapsed .sidebar-submenu-inner,
body.zen-mode .sidebar .sidebar-submenu-inner {
    margin: 0 !important;
    padding: 0 !important;
    border-left: none !important;
    overflow: visible !important;
    gap: 2px;
}

.sidebar.collapsed .sidebar-submenu-inner::before,
body.zen-mode .sidebar .sidebar-submenu-inner::before,
.sidebar.collapsed .sidebar-sublink::before,
body.zen-mode .sidebar .sidebar-sublink::before {
    display: none !important;
}

.sidebar.collapsed .sidebar-flyout-title,
body.zen-mode .sidebar .sidebar-flyout-title {
    display: block;
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.7px;
    color: #38bdf8;
    padding: 0.25rem 0.6rem 0.42rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.sidebar.collapsed .sidebar-sublink,
body.zen-mode .sidebar .sidebar-sublink {
    color: #e2e8f0 !important;
    padding: 0.44rem 0.62rem;
    opacity: 1 !important;
    transform: none !important;
    transition-delay: 0s !important;
}

.sidebar.collapsed .sidebar-sublink:hover,
body.zen-mode .sidebar .sidebar-sublink:hover {
    background: rgba(56, 189, 248, 0.18);
    color: #ffffff !important;
    transform: translateX(2px) !important;
}

.sidebar.collapsed .sidebar-sublink.active,
body.zen-mode .sidebar .sidebar-sublink.active {
    background: rgba(14, 165, 233, 0.26);
    color: #38bdf8 !important;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.36);
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-group,
    .sidebar-link,
    .sidebar-link::before,
    .sidebar-link::after,
    .sidebar-chevron,
    .sidebar-submenu,
    .sidebar-submenu-inner,
    .sidebar-submenu-inner::before,
    .sidebar-sublink {
        transition: none !important;
    }
}


/* ============================================================================
   HẠ TẦNG (CAMERA • MLCX • UPS SOCOMEC MODULYS GP 2.0 — 3D + REALTIME)
   ============================================================================ */
.sidebar-section-sep {
    height: 1px;
    margin: 6px 8px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
    flex-shrink: 0;
}
[data-theme="dark"] .sidebar-section-sep {
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.25), transparent);
}
.infra-subtab-pill {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}
.infra-subtab-pill:hover {
    color: var(--primary-blue);
    border-color: rgba(14, 165, 233, 0.5);
    transform: translateY(-1px);
}
.infra-subtab-pill.active {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff !important;
    border-color: #38bdf8;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}
.infra-subtab-pill.active .badge {
    background: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

.infra-empty-stage {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-style: dashed !important;
}
.infra-empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.ups-spin {
    display: inline-block;
    animation: upsSpinAnim 0.7s linear infinite;
}
@keyframes upsSpinAnim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.ups-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    background: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: upsPulseDot 1.8s infinite;
}
.ups-live-dot.dot-warn {
    background: #f59e0b;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.65);
}
.ups-live-dot.dot-crit {
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.65);
}
.ups-live-dot.dot-off {
    background: #94a3b8;
    box-shadow: none;
    animation: none;
}
@keyframes upsPulseDot {
    0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(56, 189, 248, 0); }
    100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* 2 Thẻ chọn UPS realtime ở trên cùng */
.ups-selector-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: var(--card-shadow);
}
.ups-selector-card:hover {
    border-color: rgba(14, 165, 233, 0.6);
    transform: translateY(-2px);
}
.ups-selector-card.is-selected {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2), 0 10px 24px -8px rgba(14, 165, 233, 0.3);
}
.ups-selector-card.health-warning.is-selected,
.ups-selector-card.health-unconfigured.is-selected {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.18), 0 10px 24px -8px rgba(245, 158, 11, 0.22);
}
.ups-selector-card.health-critical.is-selected {
    border-color: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.18), 0 10px 24px -8px rgba(239, 68, 68, 0.22);
}
.ups-selector-card.health-offline.is-selected {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.18), 0 10px 24px -8px rgba(15, 23, 42, 0.18);
}
.ups-selector-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
}
.ups-selector-metrics.cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 991.98px) {
    .ups-selector-metrics.cols-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
.ups-selector-metrics .sel-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}
.ups-selector-metrics .sel-metric .lbl {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}
.ups-selector-metrics .sel-metric strong {
    font-size: 0.84rem;
    white-space: nowrap;
}
@media (max-width: 576px) {
    .ups-selector-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ── SÂN KHẤU 3D SOCOMEC MODULYS GP 2.0 200.0kVA ── */
.ups-3d-stage {
    min-height: 580px;
    border-radius: 14px;
    overflow: hidden;
    background: radial-gradient(circle at 50% 34%, #162947 0%, #0b1324 58%, #060a14 100%);
    border: 1px solid rgba(56, 189, 248, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1450px;
    cursor: grab;
    user-select: none;
}
.ups-3d-stage.is-dragging {
    cursor: grabbing;
}
.ups-3d-grid-floor {
    position: absolute;
    left: -25%;
    right: -25%;
    bottom: -44px;
    height: 220px;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.22) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.22) 1px, transparent 1px);
    background-size: 30px 30px;
    transform: rotateX(68deg);
    opacity: 0.58;
    pointer-events: none;
}

/* Lớp mô phỏng nhiệt phát sáng quanh tủ 3D */
.ups-thermal-aura {
    position: absolute;
    width: 460px;
    height: 500px;
    border-radius: 50%;
    filter: blur(65px);
    opacity: 0.44;
    pointer-events: none;
    transition: all 0.5s ease;
}
.ups-thermal-aura.aura-normal {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.55), transparent 70%);
}
.ups-thermal-aura.aura-warning {
    background: radial-gradient(circle, rgba(245, 158, 11, 0.78), rgba(239, 68, 68, 0.28) 55%, transparent 72%);
    animation: upsThermalPulse 2.2s ease-in-out infinite;
}
.ups-thermal-aura.aura-critical {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.9), rgba(245, 158, 11, 0.4) 52%, transparent 72%);
    animation: upsThermalPulse 1.1s ease-in-out infinite;
}
.ups-thermal-aura.aura-off {
    opacity: 0;
}
@keyframes upsThermalPulse {
    0%, 100% { transform: scale(0.95); opacity: 0.45; }
    50% { transform: scale(1.08); opacity: 0.75; }
}

.ups-3d-rig {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    transform-style: preserve-3d;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 3;
    margin-top: 10px;
}

.ups-cabinet-3d {
    position: relative;
    transform-style: preserve-3d;
}
.ups-cabinet-3d.main-cabinet {
    width: 286px;
    height: 496px;
}
.ups-cabinet-3d.batt-cabinet {
    width: 108px;
    height: 424px;
}

.cab-face {
    position: absolute;
    box-sizing: border-box;
    backface-visibility: hidden;
}
.main-cabinet .cab-front {
    width: 286px;
    height: 496px;
    transform: translateZ(56px);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #475569;
    border-radius: 8px;
    padding: 11px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.65), 0 22px 48px rgba(0, 0, 0, 0.7);
}
.main-cabinet .cab-side-right {
    width: 112px;
    height: 496px;
    right: -56px;
    transform: rotateY(90deg);
    background: linear-gradient(180deg, #162033 0%, #0b1120 100%);
    border: 1.5px solid #334155;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px 10px;
}
.main-cabinet .cab-top {
    width: 286px;
    height: 112px;
    top: -56px;
    transform: rotateX(90deg);
    background: linear-gradient(135deg, #334155, #1e293b);
    border: 1.5px solid #475569;
    display: flex;
    align-items: center;
    justify-content: center;
}
.top-fan-grid {
    display: flex;
    gap: 24px;
}
.top-fan {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px dashed rgba(56, 189, 248, 0.45);
    background: radial-gradient(circle, #020617 30%, #1e293b 70%);
}
.side-vent-panel {
    height: 245px;
    border-radius: 5px;
    background: repeating-linear-gradient(0deg, rgba(148,163,184,0.18) 0 4px, transparent 4px 10px);
    border: 1px solid rgba(148, 163, 184, 0.22);
}
.side-spec-plate {
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.38);
    border-radius: 5px;
    padding: 8px 6px;
    color: #cbd5e1;
    font-size: 0.64rem;
    line-height: 1.35;
    text-align: center;
}

.cab-vent-top {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 5px;
    height: 9px;
}
.cab-vent-top span {
    background: #020617;
    border-radius: 2px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.3);
}

/* Màn hình LCD Socomec trên mặt tủ */
.cab-crown {
    background: linear-gradient(180deg, #0f172a, #1e293b);
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 7px 9px;
}
.cab-brand-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.cab-brand {
    font-family: var(--font-tech);
    font-size: 0.82rem;
    font-weight: 800;
    color: #38bdf8;
    letter-spacing: 1px;
}
.cab-series {
    font-family: var(--font-tech);
    font-size: 0.7rem;
    color: #94a3b8;
    font-weight: 700;
}
.cab-lcd-screen {
    background: linear-gradient(180deg, #021526 0%, #04223b 100%);
    border: 1px solid rgba(56, 189, 248, 0.55);
    border-radius: 5px;
    padding: 6px 9px;
    font-family: monospace;
    color: #e0f2fe;
    box-shadow: inset 0 0 14px rgba(14, 165, 233, 0.28);
}
.lcd-top,
.lcd-bottom {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
}
.lcd-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 6px 0;
}
.flow-node {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    background: rgba(16, 185, 129, 0.22);
    border: 1px solid #10b981;
    color: #6ee7b7;
}
.flow-wire {
    flex: 1;
    height: 2px;
    margin: 0 3px;
    background: linear-gradient(90deg, #10b981, #38bdf8);
}

.cab-status-strip {
    height: 5px;
    border-radius: 999px;
    margin-top: 7px;
    background: #10b981;
    box-shadow: 0 0 12px #10b981;
}
.cab-status-strip.strip-warning {
    background: #f59e0b;
    box-shadow: 0 0 14px #f59e0b;
}
.cab-status-strip.strip-crit {
    background: #ef4444;
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.75);
}
.cab-status-strip.strip-offline {
    background: #64748b;
    box-shadow: none;
}

/* 8 Module công suất 25kVA (PM1..PM8) */
.cab-modules-bay {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: space-between;
}
.ups-power-mod {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 4px;
    background: linear-gradient(90deg, #1e293b 0%, #273549 50%, #1e293b 100%);
    border: 1px solid #475569;
    font-family: var(--font-tech);
    font-size: 0.72rem;
    color: #e2e8f0;
    transition: all 0.2s ease;
}
.ups-power-mod:hover {
    border-color: #38bdf8;
    transform: translateZ(5px);
}
.ups-power-mod.heat-warning {
    border-color: rgba(245, 158, 11, 0.72);
    box-shadow: inset 0 0 12px rgba(245, 158, 11, 0.28);
}
.ups-power-mod.heat-critical {
    border-color: rgba(239, 68, 68, 0.85);
    box-shadow: inset 0 0 14px rgba(239, 68, 68, 0.42);
}
.mod-handle {
    width: 5px;
    height: 15px;
    border-radius: 2px;
    background: #64748b;
}
.mod-label {
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.mod-vents {
    display: flex;
    gap: 3px;
    margin-left: auto;
}
.mod-vents i {
    display: block;
    width: 3.5px;
    height: 11px;
    background: #020617;
    border-radius: 1px;
}
.mod-led {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}
.ups-power-mod.mod-standby .mod-led {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}
.ups-power-mod.mod-offline .mod-led {
    background: #64748b;
    box-shadow: none;
}

.cab-bypass-bay {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 9px;
    border-radius: 5px;
    background: #0b1120;
    border: 1px solid #334155;
    color: #94a3b8;
    font-family: var(--font-tech);
    font-size: 0.66rem;
    font-weight: 700;
}
.bypass-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
}

/* Tủ Ắc quy 3D kế bên */
.batt-cabinet .cab-front {
    width: 108px;
    height: 424px;
    transform: translateZ(44px);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #475569;
    border-radius: 8px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.65);
}
.batt-cabinet .cab-side-right {
    width: 88px;
    height: 424px;
    right: -44px;
    transform: rotateY(90deg);
    background: #0b1120;
    border: 1.5px solid #334155;
}
.batt-cabinet .cab-top {
    width: 108px;
    height: 88px;
    top: -44px;
    transform: rotateX(90deg);
    background: #334155;
    border: 1.5px solid #475569;
}
.batt-cab-header,
.batt-cab-footer {
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 800;
    color: #cbd5e1;
    text-align: center;
    letter-spacing: 0.45px;
}
.batt-soc-tube {
    position: relative;
    width: 72px;
    height: 228px;
    border-radius: 10px;
    background: #020617;
    border: 2px solid #475569;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.batt-soc-fill {
    width: 100%;
    background: linear-gradient(180deg, #34d399, #059669);
    transition: height 0.6s ease;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.58);
}
.batt-soc-fill.fill-warning {
    background: linear-gradient(180deg, #fbbf24, #d97706);
}
.batt-soc-fill.fill-critical {
    background: linear-gradient(180deg, #f87171, #dc2626);
}
.batt-soc-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-tech);
    color: #ffffff;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.85);
}
.batt-soc-overlay strong {
    font-size: 1.12rem;
}
.batt-soc-overlay span {
    font-size: 0.74rem;
    opacity: 0.92;
}
.batt-cells-stack {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.batt-cells-stack span {
    height: 16px;
    border-radius: 3px;
    background: #162033;
    border: 1px solid #334155;
}

/* 3 Nhãn cảm biến Holographic gắn quanh mô hình 3D */
.ups-3d-pin {
    position: absolute;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.88);
    border: 1.5px solid rgba(56, 189, 248, 0.55);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    pointer-events: auto;
    font-family: var(--font-tech);
}
.ups-3d-pin .pin-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 8px #38bdf8;
    flex-shrink: 0;
}
.ups-3d-pin .pin-body {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}
.ups-3d-pin .pin-lbl {
    font-size: 0.6rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.4px;
}
.ups-3d-pin .pin-val {
    font-size: 0.9rem;
    color: #ffffff;
}
.ups-3d-pin .pin-sub {
    font-size: 0.63rem;
    color: #cbd5e1;
}
.ups-3d-pin.level-warning {
    border-color: #f59e0b;
    background: rgba(69, 26, 3, 0.9);
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.45);
}
.ups-3d-pin.level-warning .pin-dot {
    background: #f59e0b;
    box-shadow: 0 0 10px #f59e0b;
}
.ups-3d-pin.level-warning .pin-sub {
    color: #fde68a;
    font-weight: 700;
}
.ups-3d-pin.level-critical {
    border-color: #ef4444;
    background: rgba(69, 10, 10, 0.92);
    box-shadow: 0 0 22px rgba(239, 68, 68, 0.6);
    animation: upsPinFlash 1.2s ease-in-out infinite;
}
.ups-3d-pin.level-critical .pin-dot {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}
.ups-3d-pin.level-critical .pin-sub {
    color: #fecaca;
    font-weight: 700;
}
@keyframes upsPinFlash {
    0%, 100% { box-shadow: 0 0 12px rgba(239, 68, 68, 0.45); }
    50% { box-shadow: 0 0 26px rgba(239, 68, 68, 0.88); }
}

.ups-3d-pin.pin-temp { top: 12px; left: 12px; }
.ups-3d-pin.pin-load { top: 12px; right: 12px; }
.ups-3d-pin.pin-batt { bottom: 12px; right: 12px; }

/* ── CỘT PHẢI: BANNER CẢNH BÁO & THANH NGƯỠNG REALTIME ── */
.ups-alert-banner {
    border-radius: 14px;
    padding: 0.75rem 1rem;
    border: 1.5px solid transparent;
    transition: all 0.25s ease;
}
.ups-alert-banner.level-normal {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
    color: #047857;
}
[data-theme="dark"] .ups-alert-banner.level-normal {
    color: #6ee7b7;
}
.ups-alert-banner.level-warning {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.55);
    color: #92400e;
}
[data-theme="dark"] .ups-alert-banner.level-warning {
    color: #fde68a;
}
.ups-alert-banner.level-critical {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.42);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}
[data-theme="dark"] .ups-alert-banner.level-critical {
    background: rgba(239, 68, 68, 0.13);
    color: #fecaca;
}
.ups-alert-banner.level-offline {
    background: var(--bg-card);
    border-color: rgba(239, 68, 68, 0.3);
    border-left: 4px solid #ef4444;
    color: var(--text-main);
    box-shadow: var(--card-shadow);
}
.ups-alert-banner.level-setup {
    background: rgba(14, 165, 233, 0.09);
    border-color: rgba(14, 165, 233, 0.35);
    border-left: 4px solid #0ea5e9;
    color: var(--text-main);
}

.ups-gauge-tile {
    padding: 0.65rem 0.8rem;
    border-radius: 11px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border-color);
}
.ups-gauge-tile.level-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.55);
}
.ups-gauge-tile.level-critical {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.65);
}
.ups-gauge-val {
    font-size: 1.28rem;
    line-height: 1.1;
}
.ups-gauge-track {
    position: relative;
    height: 9px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
    overflow: visible;
}
.ups-gauge-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #10b981);
    transition: width 0.5s ease;
}
.ups-gauge-fill.fill-warning {
    background: linear-gradient(90deg, #f59e0b, #fb923c);
}
.ups-gauge-fill.fill-critical {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}
.ups-gauge-tick {
    position: absolute;
    top: -3px;
    width: 2.5px;
    height: 15px;
    border-radius: 2px;
    z-index: 2;
}
.ups-gauge-tick.tick-warn {
    background: #f59e0b;
    box-shadow: 0 0 4px rgba(245, 158, 11, 0.7);
}
.ups-gauge-tick.tick-crit {
    background: #ef4444;
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.75);
}

.ups-mini-kpi {
    padding: 0.65rem 0.85rem !important;
    min-height: 82px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.ups-mini-lbl {
    font-size: 0.64rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.35px;
}
.ups-mini-val {
    font-size: 1.24rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 2px 0;
}
.ups-mini-sub {
    font-size: 0.69rem;
}
.ups-mini-icon {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.55rem;
    opacity: 0.14;
    pointer-events: none;
}

.ups-3phase-table th {
    font-family: var(--font-tech);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--text-muted);
    border-bottom-width: 1.5px;
}
.ups-phase-tag {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(14, 165, 233, 0.14);
    color: #0284c7;
}
[data-theme="dark"] .ups-phase-tag {
    color: #38bdf8;
}
.ups-comp-table td {
    padding-top: 0.34rem !important;
    padding-bottom: 0.34rem !important;
}
.ups-comp-val-box {
    display: flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 7px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.22);
    min-height: 28px;
}
[data-theme="dark"] .ups-comp-val-box {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.18);
}

/* ── BIỂU ĐỒ XU HƯỚNG NHIỆT ĐỘ & MỨC TẢI (GỌN SẠCH, DỄ NHÌN) ── */
.ups-trend-switcher {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid var(--border-color);
}
.ups-trend-pill {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-tech);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.ups-trend-pill:hover {
    color: var(--text-main);
}
.ups-trend-pill.active {
    background: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
.ups-trend-summary-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 6px 10px;
    border-radius: 9px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 0.74rem;
}
[data-theme="dark"] .ups-trend-summary-strip {
    background: rgba(15, 23, 42, 0.45);
    border-color: rgba(148, 163, 184, 0.16);
}
.ups-trend-metric-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.ups-trend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ups-trend-dot.dot-temp {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.65);
}
.ups-trend-dot.dot-load {
    background: #0ea5e9;
    box-shadow: 0 0 6px rgba(14, 165, 233, 0.65);
}
.ups-trend-thresh-hint {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── NHẬP VỊ TRÍ U TỰ ĐỘNG & DANH SÁCH MÃ ĐỊNH DANH (SN/PN/ST) THEO TỪNG MÁY ── */
.u-calc-hint {
    font-size: 0.73rem;
    line-height: 1.3;
    font-weight: 600;
}
.sn-slot-grid {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-height: 245px;
    overflow-y: auto;
    padding: 6px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border-color);
}
[data-theme="dark"] .sn-slot-grid {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(148, 163, 184, 0.2);
}
.sn-slot-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.sn-slot-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 78px;
    padding: 4px 7px;
    border-radius: 7px;
    background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(14, 165, 233, 0.34);
    color: #0284c7;
    font-family: var(--font-tech);
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}
[data-theme="dark"] .sn-slot-tag {
    background: rgba(14, 165, 233, 0.16);
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.35);
}
.sn-slot-tag.no-u {
    min-width: 36px;
    background: rgba(148, 163, 184, 0.15);
    border-color: rgba(148, 163, 184, 0.3);
    color: var(--text-muted);
}
.sn-slot-input {
    font-size: 0.8rem !important;
    padding: 0.26rem 0.55rem !important;
    min-height: 31px !important;
}
.sn-slot-input.is-slot-missing {
    border-color: rgba(245, 158, 11, 0.8) !important;
    box-shadow: 0 0 0 0.12rem rgba(245, 158, 11, 0.18);
}

/* ── DANH BẠ KHÁCH HÀNG ĐA THÀNH VIÊN (1 CÔNG TY -> NHIỀU ĐẠI DIỆN) ── */
.dir-contact-editor-row {
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border-color);
}
[data-theme="dark"] .dir-contact-editor-row {
    background: rgba(15, 23, 42, 0.5);
    border-color: rgba(148, 163, 184, 0.18);
}
.dir-default-star-btn.active {
    background: rgba(245, 158, 11, 0.22) !important;
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}
.dir-company-first-row > td {
    border-top: 1.5px solid rgba(56, 189, 248, 0.22) !important;
}
.dir-member-subrow > td {
    border-top: 1px dashed rgba(148, 163, 184, 0.22) !important;
}
.dir-member-del-btn {
    opacity: 0.45;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.dir-member-del-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1);
}
.cust-member-picker-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    padding: 6px 8px;
    border-radius: 9px;
    background: rgba(14, 165, 233, 0.07);
    border: 1px dashed rgba(14, 165, 233, 0.34);
}
[data-theme="dark"] .cust-member-picker-bar {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(56, 189, 248, 0.32);
}
.cust-member-picker-lbl {
    font-family: var(--font-tech);
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-muted);
    margin-right: 2px;
}
.cust-member-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.36);
    background: var(--bg-card);
    color: var(--text-main);
    font-family: var(--font-tech);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}
.cust-member-pill:hover {
    border-color: #0ea5e9;
    background: rgba(14, 165, 233, 0.16);
    color: #0ea5e9;
}
.cust-member-pill.active {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.35);
}
.cust-member-pill .pill-role {
    font-weight: 500;
    opacity: 0.78;
    font-size: 0.67rem;
}
