:root, [data-bs-theme="dark"] {
    --bg-main: linear-gradient(135deg, #0b0f19 0%, #111827 50%, #070a12 100%);
    --bg-card: rgba(17, 24, 39, 0.7);
    --bg-card-hover: rgba(30, 41, 59, 0.8);
    --bg-sidebar: rgba(15, 23, 42, 0.75);
    --bg-navbar: rgba(15, 23, 42, 0.85);
    --bg-table-head: rgba(15, 23, 42, 0.6);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-heading: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-highlight: rgba(59, 130, 246, 0.4);
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.25);
    --card-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.4);
    --table-hover: rgba(255, 255, 255, 0.04);
}

[data-bs-theme="light"] {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-sidebar: #f1f5f9;
    --bg-navbar: #ffffff;
    --bg-table-head: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-heading: #020617;
    --border-color: #cbd5e1;
    --border-highlight: rgba(37, 99, 235, 0.45);
    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-glow: rgba(37, 99, 235, 0.15);
    --card-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.06);
    --table-hover: #f1f5f9;
}

[data-bs-theme="light"] code {
    color: #0369a1 !important;
    background-color: #e0f2fe !important;
    border: 1px solid #bae6fd !important;
}

[data-bs-theme="light"] .alert-info {
    background-color: #f0f9ff !important;
    border-color: #7dd3fc !important;
    color: #0369a1 !important;
}

[data-bs-theme="light"] .alert-warning {
    background-color: #fffbeb !important;
    border-color: #fcd34d !important;
    color: #92400e !important;
}

[data-bs-theme="light"] .alert-danger {
    background-color: #fef2f2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
}

[data-bs-theme="light"] .bg-body-tertiary {
    background-color: #f1f5f9 !important;
}

[data-bs-theme="light"] .text-warning {
    color: #b45309 !important;
}

[data-bs-theme="light"] .btn-outline-warning {
    --bs-btn-color: #b45309;
    --bs-btn-border-color: #d97706;
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: #d97706;
    --bs-btn-hover-border-color: #d97706;
    --bs-btn-active-color: #ffffff;
    --bs-btn-active-bg: #b45309;
    --bs-btn-active-border-color: #b45309;
    --bs-btn-disabled-color: #b45309;
    --bs-btn-disabled-border-color: #d97706;
    color: #b45309;
    border-color: #d97706;
}

[data-bs-theme="light"] .btn-outline-warning:hover,
[data-bs-theme="light"] .btn-outline-warning:focus,
[data-bs-theme="light"] .btn-outline-warning:active {
    color: #ffffff !important;
    background-color: #d97706 !important;
    border-color: #d97706 !important;
}

[data-bs-theme="light"] .text-info {
    color: #0284c7 !important;
}

[data-bs-theme="light"] .text-success {
    color: #15803d !important;
}

[data-bs-theme="light"] .text-primary {
    color: #1d4ed8 !important;
}

[data-bs-theme="light"] .modal-content {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="light"] .list-group-item {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #e2e8f0 !important;
}

/* ====================================================
   HIGH-CONTRAST SOFT BADGES FOR DARK & LIGHT THEMES
==================================================== */
.badge-soft-primary {
    background-color: rgba(59, 130, 246, 0.25) !important;
    color: #60a5fa !important;
    border: 1px solid rgba(96, 165, 250, 0.4) !important;
}
[data-bs-theme="light"] .badge-soft-primary {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border: 1px solid #93c5fd !important;
}

.badge-soft-success {
    background-color: rgba(34, 197, 94, 0.25) !important;
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.4) !important;
}
[data-bs-theme="light"] .badge-soft-success {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #86efac !important;
}

.badge-soft-warning {
    background-color: rgba(245, 158, 11, 0.25) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.4) !important;
}
[data-bs-theme="light"] .badge-soft-warning {
    background-color: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

.badge-soft-danger {
    background-color: rgba(239, 68, 68, 0.25) !important;
    color: #f87171 !important;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
}
[data-bs-theme="light"] .badge-soft-danger {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fca5a5 !important;
}

.badge-soft-info {
    background-color: rgba(14, 165, 233, 0.25) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
}
[data-bs-theme="light"] .badge-soft-info {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #7dd3fc !important;
}

.badge-soft-secondary {
    background-color: rgba(148, 163, 184, 0.25) !important;
    color: #cbd5e1 !important;
    border: 1px solid rgba(203, 213, 225, 0.3) !important;
}
[data-bs-theme="light"] .badge-soft-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Custom Settings Navigation Tabs */
.custom-settings-tabs {
    border-bottom: 1px solid var(--border-color) !important;
}

.custom-settings-tabs .nav-link {
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    padding: 10px 18px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

/* Dark Mode Hover & Active */
.custom-settings-tabs .nav-link:hover {
    color: #ffffff !important;
    background: rgba(59, 130, 246, 0.18) !important;
    border-color: rgba(59, 130, 246, 0.35) !important;
}

.custom-settings-tabs .nav-link:hover i {
    color: #60a5fa !important;
}

.custom-settings-tabs .nav-link.active {
    color: #ffffff !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35) !important;
}

.custom-settings-tabs .nav-link.active i {
    color: #ffffff !important;
}

/* Light Mode Normal, Hover & Active Overrides */
[data-bs-theme="light"] .custom-settings-tabs .nav-link {
    color: #475569 !important;
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
}

[data-bs-theme="light"] .custom-settings-tabs .nav-link:hover {
    color: #1e40af !important;
    background: #dbeafe !important;
    border-color: #93c5fd !important;
}

[data-bs-theme="light"] .custom-settings-tabs .nav-link:hover i {
    color: #2563eb !important;
}

[data-bs-theme="light"] .custom-settings-tabs .nav-link.active {
    color: #ffffff !important;
    background: #2563eb !important;
    border-color: #2563eb !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25) !important;
}

[data-bs-theme="light"] .custom-settings-tabs .nav-link.active i {
    color: #ffffff !important;
}

body {
    background: var(--bg-main);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
}

.btn-primary, .btn-success, .btn-danger, .btn-dark {
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.btn-success:hover, .btn-success:focus, .btn-success:active,
.btn-danger:hover, .btn-danger:focus, .btn-danger:active,
.btn-dark:hover, .btn-dark:focus, .btn-dark:active {
    color: #ffffff !important;
}

.btn-warning {
    color: #0f172a !important;
}

.text-muted, .text-secondary {
    color: var(--text-secondary) !important;
}

.text-light {
    color: var(--text-heading) !important;
}

/* Glassmorphism Navbar */
.navbar-custom {
    background: var(--bg-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.brand-logo-img {
    height: 38px;
    width: 38px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    will-change: transform;
}

.brand-logo-img:hover {
    transform: rotate(360deg) scale(1.2);
    filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.85));
}

/* Interactive Expanding Somersault Logo */
.brand-expand-container {
    text-decoration: none;
    cursor: pointer;
    user-select: none;
}

.brand-expand-container .brand-somersault {
    height: 38px;
    width: 38px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
    will-change: transform;
}

.brand-expand-container .brand-expand-text {
    display: inline-block;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.35s ease;
    vertical-align: middle;
    color: var(--text-heading);
}

.brand-expand-container:hover .brand-somersault {
    transform: rotate(360deg) scale(1.2);
    filter: drop-shadow(0 0 14px rgba(59, 130, 246, 0.85));
}

.brand-expand-container:hover .brand-expand-text {
    max-width: 200px;
    opacity: 1;
}

/* Discord Somersault Icon Badge */
.discord-somersault-badge {
    width: 90px;
    height: 90px;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5865F2 0%, #404EED 100%);
    box-shadow: 0 10px 30px rgba(88, 101, 242, 0.45);
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    cursor: pointer;
    will-change: transform;
}

.discord-somersault-badge:hover {
    transform: rotate(360deg) scale(1.18);
    box-shadow: 0 15px 45px rgba(88, 101, 242, 0.85) !important;
}

/* Glassmorphism Sidebar */
.sidebar {
    background: var(--bg-sidebar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    min-height: calc(100vh - 65px);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Modern Glass Pill Navigation Style */
.nav-link {
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 8px 18px;
    margin: 0 4px 6px 4px;
    font-size: 0.9rem;
    font-weight: 500;
    border-left: none !important;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--text-heading);
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--border-color);
    transform: translateY(-1px);
}

.nav-link.active {
    color: var(--accent-blue) !important;
    background: rgba(59, 130, 246, 0.12) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: 0 0 12px var(--accent-glow);
    font-weight: 600;
    transform: none;
}

/* Glassmorphism Cards */
.card-custom {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card-custom:hover {
    background: var(--bg-card-hover);
    transform: translateY(-3px);
    border-color: var(--border-highlight);
    box-shadow: 0 16px 36px 0 rgba(0, 0, 0, 0.15);
}

/* Table Containers */
.table-responsive {
    border-radius: 16px;
    overflow: hidden;
}

.table-custom {
    color: var(--text-primary);
    margin-bottom: 0;
}

.table-custom th {
    background-color: var(--bg-table-head);
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.6px;
    padding: 0.85rem 1rem;
}

.table-custom td {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.85rem 1rem;
    transition: background-color 0.2s ease;
}

.table-custom tbody tr:hover {
    background-color: var(--table-hover);
}

/* Glass Modals */
.modal-content {
    background: var(--bg-card) !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: 0 25px 50px -12px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden;
    color: var(--text-primary) !important;
}

.modal-backdrop.show {
    backdrop-filter: blur(6px);
    opacity: 0.5;
}

/* Pulsing Status Indicators */
.pulse-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    flex-shrink: 0;
}

.pulse-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.pulse-dot.online {
    background-color: #10b981;
}

.pulse-dot.online::before {
    background-color: #10b981;
    animation: pulse-ring-green 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-dot.warning {
    background-color: #f59e0b;
}

.pulse-dot.warning::before {
    background-color: #f59e0b;
    animation: pulse-ring-amber 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.pulse-dot.danger {
    background-color: #ef4444;
}

.pulse-dot.danger::before {
    background-color: #ef4444;
    animation: pulse-ring-red 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring-green {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.8;
    }
    70%, 100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

@keyframes pulse-ring-amber {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.8;
    }
    70%, 100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

@keyframes pulse-ring-red {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.8;
    }
    70%, 100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

/* Animations */
.fade-in-up {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Inputs Glass */
.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.4) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 10px !important;
    transition: all 0.25s ease !important;
}

[data-bs-theme="light"] .form-control, [data-bs-theme="light"] .form-select {
    background-color: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 12px var(--accent-glow) !important;
}

/* Compact Action Buttons & Sizing */
.btn {
    transition: all 0.2s ease-in-out;
    border-radius: 8px;
    font-weight: 500;
    padding: 6px 14px;
}

.btn-sm {
    padding: 5px 12px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-pill, .badge-pill {
    border-radius: 30px !important;
}

.badge {
    border-radius: 8px;
    padding: 0.45em 0.75em;
    font-weight: 600;
}

/* Transparent Glass Status Badges */
.badge-status-online {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    font-weight: 600;
}

[data-bs-theme="light"] .badge-status-online {
    background: #d1fae5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

.badge-status-offline {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.25) !important;
    font-weight: 600;
}

[data-bs-theme="light"] .badge-status-offline {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #cbd5e1 !important;
}

/* Dynamic Badge Styling */
.badge-unassigned {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="light"] .badge-unassigned {
    background: #e2e8f0 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

.badge-pending-ip {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.25) !important;
}

[data-bs-theme="light"] .badge-pending-ip {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}

.badge-assigned-client {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
}

[data-bs-theme="light"] .badge-assigned-client {
    background: #d1fae5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
}

/* Invoice Status Badges - High Contrast Light & Dark Mode */
.badge-invoice-unpaid {
    background: rgba(245, 158, 11, 0.22) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.5) !important;
}

[data-bs-theme="light"] .badge-invoice-unpaid {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fcd34d !important;
}

.badge-invoice-paid {
    background: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
}

[data-bs-theme="light"] .badge-invoice-paid {
    background: #d1fae5 !important;
    color: #047857 !important;
    border: 1px solid #6ee7b7 !important;
}

.badge-invoice-overdue {
    background: #ef4444 !important;
    color: #ffffff !important;
    border: 1px solid #dc2626 !important;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.badge-invoice-cancelled {
    background: rgba(148, 163, 184, 0.2) !important;
    color: #94a3b8 !important;
    border: 1px solid rgba(148, 163, 184, 0.3) !important;
}

[data-bs-theme="light"] .badge-invoice-cancelled {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}

/* Server Type Badges - High Contrast Light & Dark Mode */
.badge-type-vps {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.3) !important;
    font-weight: 700;
}

[data-bs-theme="light"] .badge-type-vps {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
}

.badge-type-dedicated {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #fbbf24 !important;
    border: 1px solid rgba(245, 158, 11, 0.3) !important;
    font-weight: 700;
}

[data-bs-theme="light"] .badge-type-dedicated {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
}

/* View Invoice Button - High Contrast Light & Dark Mode */
.btn-view-invoice {
    background: rgba(2, 132, 199, 0.1) !important;
    color: #0284c7 !important;
    border: 1px solid rgba(2, 132, 199, 0.35) !important;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-view-invoice:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
}

[data-bs-theme="dark"] .btn-view-invoice {
    background: rgba(56, 189, 248, 0.15) !important;
    color: #38bdf8 !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
}

[data-bs-theme="dark"] .btn-view-invoice:hover {
    background: #38bdf8 !important;
    color: #0b0f19 !important;
    border-color: #38bdf8 !important;
}

/* Payment Email Box Styling */
.payment-email-box {
    font-family: 'JetBrains Mono', 'Fira Code', 'Outfit', system-ui, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.4px !important;
}

/* Modern Glass Pill View Switcher Segmented Control */
.view-toggle-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 4px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

[data-bs-theme="light"] .view-toggle-pill {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.view-toggle-btn {
    border-radius: 20px !important;
    padding: 6px 14px !important;
    border: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.view-toggle-btn.btn-outline-secondary {
    background-color: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
}

.view-toggle-btn.btn-outline-secondary:hover {
    color: var(--text-heading) !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

[data-bs-theme="light"] .view-toggle-btn.btn-outline-secondary:hover {
    background-color: #e2e8f0 !important;
}

.view-toggle-btn.btn-primary, .view-toggle-btn.active {
    background-color: var(--accent-blue) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 10px var(--accent-glow) !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn:active {
    transform: translateY(0);
}

/* Theme Switcher Toggle - High Contrast Glassmorphic Pill */
.theme-switch-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
}

[data-bs-theme="light"] .theme-switch-wrapper {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.theme-switch-wrapper:hover {
    transform: translateY(-1px);
}

[data-bs-theme="light"] .theme-switch-wrapper:hover {
    border-color: rgba(0, 0, 0, 0.25) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

[data-bs-theme="dark"] .theme-switch-wrapper:hover {
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.theme-switch-icon-sun {
    color: #f59e0b !important;
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.theme-switch-icon-moon {
    color: #38bdf8 !important;
    font-size: 0.95rem;
    transition: color 0.25s ease;
}

.theme-switch {
    display: inline-block;
    height: 20px;
    position: relative;
    width: 38px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: rgba(148, 163, 184, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

[data-bs-theme="light"] .slider {
    background-color: #cbd5e1;
    border-color: rgba(0, 0, 0, 0.1);
}

.slider:before {
    background-color: #ffffff;
    bottom: 2px;
    content: "";
    height: 14px;
    left: 2px;
    position: absolute;
    transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 14px;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

input:checked + .slider {
    background-color: #3b82f6;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Card Hover Lift Utility */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

/* ADMIN SIDEBAR & GROUPED NAVIGATION */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.sidebar .nav-link {
    color: var(--text-secondary);
    font-size: 0.84rem;
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: var(--text-primary);
    background-color: var(--table-hover);
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: var(--accent-blue) !important;
    border-left: 3px solid var(--accent-blue);
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.sidebar-category-header {
    font-size: 0.68rem;
    letter-spacing: 0.8px;
    user-select: none;
}

/* Minimalist Vercel / GitHub Style Underline Navigation */
.nav-tabs-underline {
    display: flex;
    gap: 1.75rem;
    padding: 0;
    margin: 0;
    list-style: none;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    overflow: hidden;
}

.nav-tabs-underline .nav-link {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: var(--text-secondary) !important;
    font-size: 0.925rem;
    font-weight: 500;
    padding: 0.65rem 0.25rem 0.85rem 0.25rem !important;
    margin: 0 !important;
    transition: color 0.25s ease;
    position: relative;
    cursor: pointer;
}

.nav-tabs-underline .nav-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: var(--accent-blue);
    border-radius: 4px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease, box-shadow 0.35s ease;
}

.nav-tabs-underline .nav-link:hover {
    color: var(--text-heading) !important;
    transform: none !important;
}

.nav-tabs-underline .nav-link:hover::after {
    transform: scaleX(1);
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.2);
}

[data-bs-theme="light"] .nav-tabs-underline .nav-link:hover::after {
    background: rgba(15, 23, 42, 0.25);
    box-shadow: 0 0 8px rgba(15, 23, 42, 0.15);
}

.nav-tabs-underline .nav-link.active {
    color: var(--text-heading) !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.nav-tabs-underline .nav-link.active::after {
    transform: scaleX(1);
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

[data-bs-theme="light"] .nav-tabs-underline .nav-link.active::after {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}

.badge-tab-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    font-size: 0.725rem;
    font-weight: 600;
    padding: 0.15rem 0.55rem;
    border-radius: 20px;
    transition: all 0.25s ease;
}

[data-bs-theme="light"] .badge-tab-count {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.nav-tabs-underline .nav-link:hover .badge-tab-count {
    color: var(--text-heading);
    border-color: var(--border-highlight);
}

.nav-tabs-underline .nav-link.active .badge-tab-count {
    background: rgba(59, 130, 246, 0.2) !important;
    color: var(--accent-blue) !important;
    border: 1px solid rgba(59, 130, 246, 0.4) !important;
}

[data-bs-theme="light"] .nav-tabs-underline .nav-link.active .badge-tab-count {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
    border: 1px solid rgba(37, 99, 235, 0.3) !important;
}

/* Custom Select & Option Styling for Uniform Full-Width Dark Dropdowns */
select,
.form-select {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

select option,
.form-select option,
option {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    padding: 6px 12px !important;
}

[data-bs-theme="light"] select,
[data-bs-theme="light"] .form-select {
    background-color: #ffffff !important;
    color: #0f172a !important;
    border-color: #cbd5e1 !important;
}

[data-bs-theme="light"] select option,
[data-bs-theme="light"] .form-select option,
[data-bs-theme="light"] option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* ====================================================
   MOBILE-FRIENDLY & RESPONSIVE DESIGN UTILITIES
==================================================== */
@media (max-width: 768px) {
    /* Responsive Containers & Card Padding */
    .container, .container-fluid {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .card-body {
        padding: 1rem !important;
    }

    /* Headings on Mobile */
    h2, .h2 {
        font-size: 1.4rem !important;
    }
    h4, .h4 {
        font-size: 1.15rem !important;
    }

    /* Touch-Scrollable Horizontal Tabs & Filter Pills */
    .nav-tabs-custom,
    .nav-tabs-underline,
    .nav-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none !important;
        padding-bottom: 4px !important;
    }
    .nav-tabs-custom::-webkit-scrollbar,
    .nav-tabs-underline::-webkit-scrollbar,
    .nav-tabs::-webkit-scrollbar {
        display: none !important;
    }
    .nav-tabs .nav-item {
        flex-shrink: 0 !important;
    }
    .nav-tabs .nav-link {
        white-space: nowrap !important;
        padding: 0.5rem 0.85rem !important;
        font-size: 0.825rem !important;
    }

    /* Table Mobile Responsiveness & Touch Scroll */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 0.5rem;
    }
    .table-custom {
        min-width: 650px !important;
    }
    .table-custom th,
    .table-custom td {
        padding: 0.65rem 0.75rem !important;
        font-size: 0.8rem !important;
        white-space: nowrap !important;
    }

    /* Mobile Buttons & Controls */
    .btn-mobile-full {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Header Nav Padding & Layout */
    .navbar-custom .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* View Toggle Switcher alignment */
    .view-toggle-pill {
        margin-top: 0.25rem;
    }
}

/* ====================================================
   PRIVACY EMAIL MASKING FOR SCREEN SHARING
==================================================== */
.masked-email {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: filter 0.25s ease, opacity 0.25s ease, background 0.2s ease;
    border-radius: 4px;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(148, 163, 184, 0.25);
}
.masked-email:not(.is-revealed) .email-text,
.masked-email:not(.is-revealed).email-text {
    filter: blur(4.5px);
    opacity: 0.65;
}
.masked-email:not(.is-revealed):hover .email-text,
.masked-email:not(.is-revealed):hover.email-text {
    filter: blur(2.5px);
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.06);
}
.masked-email.is-revealed .email-text,
.masked-email.is-revealed.email-text {
    filter: none !important;
    opacity: 1 !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}
.masked-email.is-revealed {
    border-style: solid;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.08);
}
.masked-email .email-eye-icon {
    font-size: 0.85em;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.masked-email:hover .email-eye-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Email Input fields privacy blur */
input.masked-email-input:not(:focus):not(.is-revealed) {
    filter: blur(4.5px);
    opacity: 0.7;
    cursor: pointer;
    transition: filter 0.25s ease, opacity 0.25s ease;
}
input.masked-email-input:focus,
input.masked-email-input.is-revealed {
    filter: none !important;
    opacity: 1 !important;
    cursor: text;
}

/* ====================================================
   PRIVACY IP MASKING FOR SCREEN SHARING & GDPR
==================================================== */
.masked-ip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: filter 0.25s ease, opacity 0.25s ease, background 0.2s ease;
    border-radius: 4px;
    padding: 1px 5px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(148, 163, 184, 0.25);
}
.masked-ip:not(.is-revealed) .ip-text,
.masked-ip:not(.is-revealed).ip-text,
code.masked-ip:not(.is-revealed) {
    filter: blur(4.5px);
    opacity: 0.65;
    user-select: none;
    -webkit-user-select: none;
}
.masked-ip:not(.is-revealed):hover .ip-text,
.masked-ip:not(.is-revealed):hover.ip-text,
code.masked-ip:not(.is-revealed):hover {
    filter: blur(2.5px);
    opacity: 0.9;
    background: rgba(255, 255, 255, 0.06);
}
.masked-ip.is-revealed .ip-text,
.masked-ip.is-revealed.ip-text,
code.masked-ip.is-revealed {
    filter: none !important;
    opacity: 1 !important;
    user-select: text !important;
    -webkit-user-select: text !important;
}
.masked-ip.is-revealed {
    border-style: solid;
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.08);
}
.masked-ip .ip-eye-icon {
    font-size: 0.85em;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.masked-ip:hover .ip-eye-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* IP Input fields privacy blur */
input.masked-ip-input:not(:focus):not(.is-revealed) {
    filter: blur(4.5px);
    opacity: 0.7;
    cursor: pointer;
    transition: filter 0.25s ease, opacity 0.25s ease;
}
input.masked-ip-input:focus,
input.masked-ip-input.is-revealed {
    filter: none !important;
    opacity: 1 !important;
    cursor: text;
}

/* ====================================================
   NETWORK & CYBER CANVAS AUTHENTICATION STYLING
==================================================== */
.network-auth-wrapper {
    position: relative;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0b1120 !important;
}

#networkCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.glass-network-card {
    position: relative;
    z-index: 1;
    background: #161e31 !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #202c46 !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 210, 255, 0.05) !important;
    overflow: hidden !important;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.glass-network-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d2ff 0%, #0072ff 100%);
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.85);
    z-index: 2;
}

[data-bs-theme="light"] .glass-network-card {
    background: rgba(255, 255, 255, 0.94) !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}

.glass-network-card:hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65), 0 0 40px rgba(0, 210, 255, 0.12) !important;
    transform: translateY(-2px);
}

.network-badge-green {
    background: rgba(16, 185, 129, 0.1) !important;
    border: 1px solid rgba(16, 185, 129, 0.35) !important;
    color: #10b981 !important;
    font-size: 0.82rem !important;
    font-weight: 600 !important;
    padding: 6px 18px !important;
    border-radius: 50px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    letter-spacing: 0.2px;
}

[data-bs-theme="light"] .network-badge-green {
    background: rgba(16, 185, 129, 0.15) !important;
    border: 1px solid rgba(16, 185, 129, 0.4) !important;
    color: #047857 !important;
}

.network-input-group {
    background-color: #0f1729 !important;
    border: 1px solid #1f2b45 !important;
    border-radius: 12px !important;
    overflow: hidden;
    transition: all 0.25s ease;
}

.network-input-group:focus-within {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.35) !important;
}

.network-input-group .input-group-text {
    background-color: transparent !important;
    border: none !important;
    color: #3b82f6 !important;
    font-size: 1.1rem;
    padding-left: 14px;
    padding-right: 8px;
}

.network-input-group .form-control {
    background-color: transparent !important;
    border: none !important;
    color: #ffffff !important;
    padding: 12px 14px;
    font-size: 0.95rem;
}

[data-bs-theme="light"] .network-input-group {
    background-color: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}

[data-bs-theme="light"] .network-input-group .form-control {
    color: #0f172a !important;
}

.network-btn-blue {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 12px 20px !important;
    font-weight: 700 !important;
    letter-spacing: 0.6px !important;
    text-transform: uppercase !important;
    color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.45) !important;
    transition: all 0.3s ease !important;
}

.network-btn-blue:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%) !important;
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.65) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.network-btn-blue:hover {
    background: linear-gradient(90deg, #1d4ed8 0%, #2563eb 100%) !important;
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.65) !important;
    transform: translateY(-1px);
    color: #ffffff !important;
}

.network-glow-icon {
    filter: drop-shadow(0 0 10px rgba(0, 198, 255, 0.6));
}

.network-ping-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
    flex-shrink: 0;
}

.network-ping-dot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #10b981;
    animation: smoothNetworkPulse 2.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
    will-change: transform, opacity;
}

@keyframes smoothNetworkPulse {
    0% {
        transform: scale(0.9);
        opacity: 0.85;
    }
    70%, 100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

.btn-xs {
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    border-radius: 0.25rem;
    line-height: 1.2;
}

/* Fix dropdown clipping inside table-responsive */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible !important;
}

/* Ensure dropdown menu items and labels display clearly without awkward wrapping */
.dropdown-menu {
    min-width: 13rem !important;
    z-index: 1060 !important;
    background-color: var(--bg-card) !important;
    backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--card-shadow) !important;
}

[data-bs-theme="light"] .dropdown-menu {
    background-color: #ffffff !important;
}

.dropdown-item-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.5rem 0.85rem;
    clear: both;
    font-weight: 500;
    color: var(--text-primary);
    text-align: inherit;
    text-decoration: none;
    white-space: nowrap;
    background-color: transparent;
    border: 0;
    border-radius: 6px;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.dropdown-item-btn:hover {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

[data-bs-theme="light"] .dropdown-item-btn {
    color: #1e293b;
}

[data-bs-theme="light"] .dropdown-item-btn:hover {
    background-color: #e0f2fe;
    color: #0369a1;
}






