:root {
    --primary: #6366f1; /* Indigo 500 - More vibrant */
    --primary-hover: #4f46e5; /* Indigo 600 */
    --primary-light: #e0e7ff; /* Indigo 100 */
    
    --bg-body: #f8fafc; /* Slate 50 - Cleaner than Gray 100 */
    --bg-card: #ffffff;
    --bg-sidebar: #1e293b; /* Slate 800 - Deep Blue/Grey */
    
    --text-main: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94a3b8; /* Slate 400 */
    --text-on-dark: #f1f5f9; /* Slate 100 */
    
    --border: #e2e8f0; /* Slate 200 */
    
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    
    --warning: #f59e0b;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    line-height: 1.5;
}

/* Utilities */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--primary) !important; }
.bg-success { background-color: var(--success) !important; }
.bg-danger { background-color: var(--danger) !important; }

.icon-primary { background-color: var(--primary-light); color: var(--primary); }
.icon-success { background-color: var(--success-bg); color: var(--success); }
.icon-danger { background-color: var(--danger-bg); color: var(--danger); }
.icon-warning { background-color: #fef3c7; color: var(--warning); } /* Amber 100 */

.stat-subtext {
    font-size: 0.5em; 
    color: var(--text-muted); 
    font-weight: 500;
}

.icon-circle {
    width: 32px; 
    height: 32px; 
    background: #f1f5f9; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--text-secondary);
}

.monospace-text {
    font-family: monospace; 
    color: var(--text-secondary); 
    font-size: 0.9em;
}

.empty-state {
    text-align: center; 
    color: var(--text-muted); 
    padding: 3rem;
}

.empty-state-content {
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 1rem;
}

.empty-state-content i {
    font-size: 3rem; 
    opacity: 0.3;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: var(--text-muted);
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 50;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}

.sidebar-header {
    height: 70px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    background: rgba(0,0,0,0.1);
}

.sidebar-header i {
    font-size: 1.5rem;
    color: var(--primary);
}

.sidebar-header span {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.nav-links {
    flex: 1;
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #94a3b8; /* Slate 400 */
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: white;
}

.nav-item.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1em;
}

.user-info {
    padding: 1rem;
    background-color: rgba(0,0,0,0.2);
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 2rem 3rem;
    max-width: 1600px; /* Limit width on ultra-wide screens */
    width: calc(100% - 260px);
}

.page-header {
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.025em;
    margin-bottom: 0.5rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border);
}

.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 2rem;
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-color: rgba(255,255,255,0.2);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 60;
    background: var(--bg-sidebar);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 40;
    backdrop-filter: blur(2px);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-content {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 4rem 1rem 2rem 1rem; /* Top padding for menu button */
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }

    /* Table Responsive */
    .table-container {
        border-radius: 0;
        margin: 0 -1rem;
        border-left: none;
        border-right: none;
        width: calc(100% + 2rem);
    }

    /* Hide less important columns on mobile */
    th:nth-child(3), td:nth-child(3), /* Node */
    th:nth-child(4), td:nth-child(4), /* IP Destino */
    th:nth-child(5), td:nth-child(5)  /* Upstream */
    {
        display: none;
    }
}

.section-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
}

.section-header h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.section-body {
    padding: 1.5rem;
}

/* Form Elements Global */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background-color: #fff;
    color: var(--text-main);
    transition: all 0.2s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

/* Toggle Switch Global */
.toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 0.75rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #e2e8f0;
    border-radius: 34px;
    transition: .3s;
    flex-shrink: 0;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

input:checked + .slider {
    background-color: var(--primary);
}

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

.toggle-label {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.toggle-description {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Grid Layouts */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* WAF / Feature Cards */
.waf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.waf-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: all 0.2s;
    background: white;
}

.waf-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.waf-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.waf-content {
    flex: 1;
}

.waf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.25rem;
}

.waf-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* Checkbox List */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
    padding: 0.25rem 0;
}

.checkbox-item input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--primary);
}


.waf-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.helper-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.3);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.3);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: white;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.875rem;
}

.btn-icon:hover {
    background-color: #f3f4f6;
    color: var(--primary);
    border-color: var(--primary-light);
}

.btn-icon.delete:hover {
    background-color: var(--danger-bg);
    color: var(--danger);
    border-color: #fca5a5;
}

.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

th {
    background-color: #f9fafb; /* Gray 50 */
    text-align: left;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

/* Table Column Truncation */
td {
    padding: 0.5rem 0.75rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    max-width: 200px; /* Force max width for text cells */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

td .action-buttons {
    white-space: normal; /* Allow buttons to wrap if absolutely necessary, though flex usually handles it */
}

/* Specific overrides for columns that need more or less space if possible */
td:first-child { /* Domain */
    max-width: 250px;
}
td:nth-child(5) { /* Upstream */
    max-width: 150px;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background-color: #f9fafb;
}

/* Actions Column Fix */
.actions-cell {
    max-width: none;
    overflow: visible;
    width: auto;
    white-space: nowrap;
}

.actions-cell .action-buttons {
    flex-wrap: nowrap;
    justify-content: flex-end;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.badge-inactive {
    background-color: #f3f4f6;
    color: var(--text-secondary);
}

.badge-admin {
    background-color: #e0e7ff; /* Indigo 100 */
    color: #4338ca; /* Indigo 700 */
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.alert-success {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.alert-danger {
    background-color: var(--danger-bg);
    color: var(--danger-text);
}

/* Dashboard Styles */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    color: white;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2), 0 4px 6px -2px rgba(99, 102, 241, 0.1);
}

.dashboard-welcome h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.dashboard-welcome p {
    color: var(--primary-light);
    font-size: 1.1rem;
    max-width: 600px;
}

.dashboard-welcome::after {
    content: "";
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* Stats Grid & Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    min-height: 140px;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    z-index: 2;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
    margin-bottom: 0.25rem;
    z-index: 2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 2;
}

/* Decorative background icon */
.stat-card .bg-icon {
    position: absolute;
    bottom: -10px;
    right: -10px;
    font-size: 6rem;
    opacity: 0.05;
    color: currentColor;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 1;
}

/* Section Headers in Cards */
.card-header-flex {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 1.5rem; 
    padding-bottom: 1rem; 
    border-bottom: 1px solid var(--border);
}

.card-header-flex h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.login-body {
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

/* Additional Utilities */
.btn-secondary {
    background-color: #e2e8f0;
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background-color: #cbd5e1;
    color: var(--text-main);
}

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.input-disabled, input:disabled {
    background-color: #f3f4f6;
    color: var(--text-secondary);
    cursor: not-allowed;
}

.w-full {
    width: 100%;
}

/* Profile Layout */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Text Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Links */
.link-primary {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}
.link-primary:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Code Blocks */
.code-inline {
    background: #f3f4f6;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
    color: var(--text-main);
}

.code-block {
    background: #111827;
    color: #f3f4f6;
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.9rem;
    margin: 1rem 0;
}

/* Flex Utilities */
.flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }

/* Sizing Utilities */
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-fit { width: fit-content; }
.max-w-600 { max-width: 600px; }
.block { display: block; }
.inline-form { display: inline; }

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mr-1 { margin-right: 0.25rem !important; }
.ml-1 { margin-left: 0.25rem !important; }
.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.py-0-5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.pt-0 { padding-top: 0 !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-8 { margin-bottom: 2rem !important; }

/* Text Utilities */
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.text-main { color: var(--text-main); }
.text-center { text-align: center; }
.align-middle { vertical-align: middle; }
.whitespace-pre-wrap { white-space: pre-wrap; word-break: break-all; }

/* Cursor Utilities */
.cursor-help { cursor: help; }

/* Color Utilities */
.bg-transparent { background-color: transparent; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-blue-100 { background-color: #e0f2fe; }
.text-blue-700 { color: #0369a1; }
.border-blue-200 { border-color: #bae6fd; }

.bg-danger-soft { background-color: var(--danger-bg); }
.border-danger { border-color: var(--danger-text); }
.link-danger { color: var(--danger); text-decoration: underline; }

.bg-warning-soft { background-color: #fef9c3; }
.border-warning { border-color: #fde047; }

.bg-success-soft { background-color: var(--success-bg); }
.border-success { border-color: var(--success); }

.border-0 { border: none !important; }
.rounded { border-radius: 4px; }

/* Component Overrides */
.slider-sm {
    width: 36px;
    height: 20px;
}

.slider-sm:before {
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
}

input:checked + .slider-sm:before {
    transform: translateX(16px);
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

.alert-info i {
    color: #3b82f6;
}

/* Node Stats Specific */
.node-card-body {
    padding: 1.5rem;
}



/* Statistics Styles */
.stats-grid-nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.5rem;
}

.node-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.node-header {
    padding: 1rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.node-name {
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.node-status {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-ok { background: #dcfce7; color: #166534; }
.status-err { background: #fee2e2; color: #991b1b; }

.node-card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-size: 0.85rem;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.info-value {
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.metric-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.progress-bar-bg {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
}

.progress-high { background: #ef4444; }
.progress-med { background: #f59e0b; }
.progress-low { background: #10b981; }

.proc-table {
    width: 100%;
    font-size: 0.75rem;
    border-collapse: collapse;
}

.proc-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 500;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

.proc-table td {
    padding: 4px 0;
    color: var(--text-main);
}

.proc-val {
    text-align: right;
    font-family: monospace;
}

.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.tab {
    padding: 0.25rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 500;
}
