/* 
   ==========================================================================
   NETCONTROL FAMILY - PREMIUM OBSIDIAN & GLASSMORPHISM STYLESHEET
   Aesthetics: Ultra Premium, Dark Mode, High Contrast, Fluid Transitions
   ==========================================================================
*/

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

:root {
    /* Color Palette */
    --bg-main: #060913;
    --bg-surface-rgb: 15, 23, 42;
    --bg-surface: rgba(15, 23, 42, 0.65);
    --bg-surface-hover: rgba(30, 41, 59, 0.75);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(99, 102, 241, 0.5);
    
    /* Text Colors - High Contrast for Dark Mode */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-inactive: #64748b;
    
    /* Brand & Accent Colors (Gradients) */
    --primary-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --primary: #818cf8;
    --primary-hover: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --danger-grad: linear-gradient(135deg, #ef4444 0%, #ec4899 100%);
    --danger: #f87171;
    --danger-hover: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.25);
    
    --success-grad: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
    --success: #34d399;
    --success-hover: #10b981;
    --success-glow: rgba(16, 185, 129, 0.25);
    
    --info: #38bdf8;
    --warning: #fbbf24;
    
    /* Shadow & Glass Effects */
    --card-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --glass-border-hover: 1px solid rgba(99, 102, 241, 0.35);
    --blur-strength: 16px;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Reset & Body overrides */
body {
    background-color: var(--bg-main) !important;
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.08) 0px, transparent 50%) !important;
    background-attachment: fixed !important;
    color: var(--text-main) !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Overriding Bootstrap Text Colors for Dark Theme */
.text-muted {
    color: #cbd5e1 !important; /* Light slate for readable muted text */
}

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

.text-white {
    color: #ffffff !important;
}

body, p, span, label, li, th, td, strong, small {
    color: var(--text-main);
}


/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.25);
    border-radius: 99px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Breadcrumb Styling */
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-inactive) !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Premium Card Layout */
.glass-card {
    background: var(--bg-surface) !important;
    backdrop-filter: blur(var(--blur-strength)) !important;
    -webkit-backdrop-filter: blur(var(--blur-strength)) !important;
    border: var(--glass-border) !important;
    border-radius: 20px;
    box-shadow: var(--card-shadow) !important;
    transition: var(--transition-smooth);
}

.glass-card:hover {
    border: var(--glass-border-hover) !important;
    transform: translateY(-3px);
    box-shadow: 0 30px 50px -20px rgba(0, 0, 0, 0.8), 0 0 30px 0 rgba(99, 102, 241, 0.05) !important;
}

/* Sidebar Custom */
.sidebar {
    background: rgba(10, 15, 30, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    border-right: var(--glass-border) !important;
}

/* Navigation Links Premium styling */
.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    transition: var(--transition-smooth);
}

.nav-link i {
    font-size: 1.1rem;
    color: var(--text-muted) !important;
    transition: var(--transition-smooth);
}

.nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transform: translateX(4px);
}

.nav-link:hover i {
    color: #ffffff !important;
}

.nav-link.active {
    color: #ffffff !important;
    background: var(--primary-grad) !important;
    box-shadow: 0 8px 20px -6px var(--primary-glow) !important;
}

.nav-link.active i {
    color: #ffffff !important;
    transform: scale(1.1);
}

/* Premium Buttons with Glowing Effects */
.btn-primary-glow {
    background: var(--primary-grad) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 20px 0 var(--primary-glow) !important;
    transition: var(--transition-smooth);
}

.btn-primary-glow:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    box-shadow: 0 6px 26px 0 rgba(99, 102, 241, 0.45) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-danger-glow {
    background: var(--danger-grad) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 20px 0 var(--danger-glow) !important;
    transition: var(--transition-smooth);
}

.btn-danger-glow:hover {
    background: linear-gradient(135deg, #dc2626 0%, #db2777 100%) !important;
    box-shadow: 0 6px 26px 0 rgba(239, 68, 68, 0.45) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-success-glow {
    background: var(--success-grad) !important;
    color: #ffffff !important;
    border: none !important;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 20px 0 var(--success-glow) !important;
    transition: var(--transition-smooth);
}

.btn-success-glow:hover {
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%) !important;
    box-shadow: 0 6px 26px 0 rgba(16, 185, 129, 0.45) !important;
    transform: translateY(-2px);
    color: #ffffff !important;
}

.btn-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    background: transparent !important;
    color: var(--text-main) !important;
    border-radius: 12px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Pulsing Badge Animations */
.pulse-green {
    background: var(--success-grad) !important;
    position: relative;
    border: none;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    color: #ffffff !important;
}

.pulse-green::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: ripple 1.8s infinite ease-out;
}

.pulse-red {
    background: var(--danger-grad) !important;
    position: relative;
    border: none;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.4);
    color: #ffffff !important;
}

.pulse-red::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    animation: ripple 1.8s infinite ease-out;
}

@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    100% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

/* Inputs and Forms Premiumization */
.form-control, .form-select {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 0.75rem 1rem !important;
    transition: var(--transition-smooth) !important;
}

.form-control:focus, .form-select:focus {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: var(--text-inactive) !important;
}

/* Custom Table Premium Design (DARK MODE) */
.custom-table {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
    width: 100%;
    background-color: transparent !important;
}

/* Style table header row to be dark slate instead of white */
.custom-table thead th {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
    border: none !important;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase !important;
    letter-spacing: 0.05em;
    padding: 1.1rem 1rem !important;
    box-shadow: none !important; /* Disable Bootstrap's table cell shadow overlay */
}

.custom-table thead tr th:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.custom-table thead tr th:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.custom-table tbody td {
    background-color: rgba(15, 23, 42, 0.85) !important; /* Sleek dark background matching dashboard */
    color: #f8fafc !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    padding: 1.25rem 1rem !important;
    vertical-align: middle;
    box-shadow: none !important; /* Disable Bootstrap's table cell shadow overlay */
}

.custom-table tbody td strong {
    color: #ffffff !important;
}

.custom-table tbody td span {
    color: #cbd5e1 !important;
}

.custom-table tbody td small {
    color: #94a3b8 !important;
}

.custom-table tr td:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.custom-table tr td:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.custom-table tbody tr {
    transition: var(--transition-smooth);
}

.custom-table tbody tr:hover td {
    background-color: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.3) !important;
}


/* Custom code tag styling */
code {
    background-color: rgba(99, 102, 241, 0.15) !important;
    color: #a5b4fc !important;
    padding: 0.2rem 0.4rem;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
}

/* Badges styling */
.badge {
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.02em;
    color: #ffffff; /* Removed !important to allow overrides */
}

/* Premium Transparent Neon Badges for Status/Logs */
.badge.bg-success-subtle,
.custom-table .badge.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
}

.badge.bg-danger-subtle,
.custom-table .badge.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.15) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
}


/* Neon glow texts */
.text-neon-purple {
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-indigo {
    color: #cbd5e1 !important;
}

/* HTMX Request Overlay Spinner */
.htmx-indicator {
    display: none !important;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
    display: flex !important;
}


.group-card-container {
    transition: var(--transition-smooth);
}

.htmx-request.group-card-container {
    filter: blur(1px);
    opacity: 0.75;
}

/* Toast styling override */
.toast-container-custom {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
}

.toast {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8) !important;
    border-radius: 14px !important;
    animation: toast-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toast-in {
    from {
        transform: translateY(20px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Monospace text logs */
.text-monospace {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Premium Pagination */
.pagination .page-link {
    background-color: rgba(15, 23, 42, 0.65) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #cbd5e1 !important;
    padding: 0.6rem 1rem;
    transition: var(--transition-smooth);
}

.pagination .page-link:hover {
    background-color: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    color: #ffffff !important;
}

.pagination .page-item.active .page-link {
    background: var(--primary-grad) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px var(--primary-glow) !important;
}

/* Form Input Enhancements */
.input-group-text {
    background-color: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #cbd5e1 !important;
}

select option {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

.form-check-input {
    background-color: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

.form-check-input:checked {
    background-color: #6366f1 !important;
    border-color: #6366f1 !important;
}

