/* Custom CSS for LAN Guardian - Cyberpunk Glassmorphism Theme */

:root {
    --bg-dark: #07070e;
    --bg-card: rgba(18, 18, 36, 0.6);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-active: rgba(0, 229, 255, 0.3);
    
    --color-primary: #00e5ff;
    --color-primary-glow: rgba(0, 229, 255, 0.4);
    --color-secondary: #7f00ff;
    --color-secondary-glow: rgba(127, 0, 255, 0.4);
    
    --color-text-main: #f3f3f6;
    --color-text-muted: #8e8e9f;
    
    /* Semantic Colors */
    --color-safe: #00ff66;
    --color-safe-glow: rgba(0, 255, 102, 0.25);
    --color-warning: #ffb700;
    --color-warning-glow: rgba(255, 183, 0, 0.25);
    --color-danger: #ff0055;
    --color-danger-glow: rgba(255, 0, 85, 0.25);
    
    --sidebar-width: 280px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--color-text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Glow Blobs */
.glow-blob {
    position: fixed;
    border-radius: 50%;
    filter: blur(140px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.blob-1 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
    bottom: -150px;
    left: -100px;
}

.blob-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, var(--color-danger) 0%, transparent 70%);
    top: 40%;
    left: 45%;
    opacity: 0.15;
}

/* Container Layout */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 10, 22, 0.8);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-right: 1px solid var(--border-glass);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.brand-icon {
    font-size: 2.2rem;
    color: var(--color-primary);
    text-shadow: 0 0 15px var(--color-primary-glow);
}

.brand-text h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--color-primary), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1.2rem;
    color: var(--color-text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
}

.nav-item i {
    font-size: 1.1rem;
}

.nav-item:hover {
    color: var(--color-text-main);
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: var(--color-primary);
    background: rgba(0, 229, 255, 0.06);
    border-color: var(--border-glass-active);
    box-shadow: inset 0 0 12px rgba(0, 229, 255, 0.05);
}

.badge {
    margin-left: auto;
    background: var(--color-danger);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    box-shadow: 0 0 8px var(--color-danger-glow);
}

.badge-pulse {
    background: var(--color-safe);
    box-shadow: 0 0 8px var(--color-safe-glow);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; box-shadow: 0 0 14px var(--color-safe-glow); }
    100% { transform: scale(0.95); opacity: 0.9; }
}

.sidebar-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.host-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.host-info .label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.host-info .value {
    font-size: 0.85rem;
    font-family: monospace;
    color: var(--color-primary);
    font-weight: 600;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-safe);
    box-shadow: 0 0 8px var(--color-safe-glow);
    display: inline-block;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2.5rem 3rem;
    width: calc(100% - var(--sidebar-width));
}

/* Header Bar */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.header-title h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.2rem;
}

.header-title p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.4rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #00b0ff);
    color: #000;
    box-shadow: 0 4px 15px var(--color-primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-main);
    border-color: var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline {
    background: transparent;
    color: var(--color-text-main);
    border-color: var(--border-glass);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.btn-danger-outline {
    background: transparent;
    color: var(--color-danger);
    border-color: rgba(255, 0, 85, 0.3);
}

.btn-danger-outline:hover {
    background: var(--color-danger);
    color: #fff;
    box-shadow: 0 0 12px var(--color-danger-glow);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.25);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-glass);
}

.card-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.card-header p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
}

.stat-title {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.icon-blue { background: rgba(0, 229, 255, 0.1); color: var(--color-primary); }
.icon-green { background: rgba(0, 255, 102, 0.1); color: var(--color-safe); }
.icon-red { background: rgba(255, 0, 85, 0.1); color: var(--color-danger); }
.icon-purple { background: rgba(127, 0, 255, 0.1); color: #b388ff; }
.icon-yellow { background: rgba(255, 183, 0, 0.1); color: var(--color-warning); }

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.stat-desc {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* Red Glow Texts */
.text-glow-red {
    color: var(--color-danger) !important;
    text-shadow: 0 0 10px rgba(255, 0, 85, 0.3);
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

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

.h-full {
    height: 100%;
}

.mt-2 { margin-top: 0.6rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1.5rem; }

/* Bandwidth Live Chart Styling */
.chart-wrapper {
    width: 100%;
    height: 180px;
    position: relative;
}

#bandwidth-chart {
    width: 100% !important;
    height: 100% !important;
}

/* Urgent Notification Section */
.urgent-alerts-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.urgent-alert-box {
    padding: 1.2rem 1.5rem;
    border-radius: 14px;
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    border: 1px solid transparent;
    animation: border-glow-pulse 2s infinite alternate;
}

.urgent-alert-box.critical {
    background: rgba(255, 0, 85, 0.08);
    border-color: rgba(255, 0, 85, 0.3);
    box-shadow: 0 4px 20px rgba(255, 0, 85, 0.1);
}

.urgent-alert-box.warning {
    background: rgba(255, 183, 0, 0.08);
    border-color: rgba(255, 183, 0, 0.3);
    box-shadow: 0 4px 20px rgba(255, 183, 0, 0.1);
}

@keyframes border-glow-pulse {
    0% { box-shadow: 0 4px 15px rgba(255, 0, 85, 0.08); }
    100% { box-shadow: 0 4px 25px rgba(255, 0, 85, 0.25); }
}

.urgent-alert-box i.alert-icon {
    font-size: 1.5rem;
    margin-top: 0.1rem;
}

.urgent-alert-box.critical i.alert-icon { color: var(--color-danger); text-shadow: 0 0 10px var(--color-danger); }
.urgent-alert-box.warning i.alert-icon { color: var(--color-warning); text-shadow: 0 0 10px var(--color-warning); }

.alert-content {
    flex-grow: 1;
}

.alert-content h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.urgent-alert-box.critical h4 { color: var(--color-danger); }
.urgent-alert-box.warning h4 { color: var(--color-warning); }

.alert-content p {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--color-text-main);
}

.alert-actions {
    display: flex;
    gap: 0.5rem;
    align-self: center;
}

/* Regular Alert List Dashboard */
.custom-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.alert-list-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.alert-list-item-left {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.alert-list-item-left i {
    font-size: 1.1rem;
}

.alert-list-item-left.critical i { color: var(--color-danger); }
.alert-list-item-left.warning i { color: var(--color-warning); }

.alert-list-text h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.alert-list-text p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.no-alerts-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
}

.no-alerts-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.8rem;
}

/* Bandwidth Hog List (Right Column) */
.bandwidth-hog-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hog-item {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1rem;
}

.hog-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.hog-name {
    font-size: 0.85rem;
    font-weight: 600;
}

.hog-speed {
    font-size: 0.85rem;
    color: var(--color-primary);
    font-weight: 700;
}

.hog-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

.hog-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 4px;
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hog-item.danger .hog-bar-fill {
    background: linear-gradient(90deg, var(--color-warning), var(--color-danger));
}

/* Tab Switching Control */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Devices Table Styling */
.table-responsive {
    overflow-x: auto;
}

.devices-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.devices-table th, .devices-table td {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border-glass);
}

.devices-table th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.01);
}

.devices-table tbody tr {
    transition: background-color 0.2s ease;
}

.devices-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.015);
}

/* Device Hostname Editing */
.device-name-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.device-name-container span {
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-edit-name {
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.75rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.device-name-container:hover .btn-edit-name {
    opacity: 1;
}

.device-name-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    color: #fff;
    padding: 2px 6px;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    width: 130px;
}

/* Device Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-badge.online {
    background: rgba(0, 255, 102, 0.08);
    color: var(--color-safe);
    border: 1px solid rgba(0, 255, 102, 0.2);
}

.status-badge.offline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--color-text-muted);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-badge.blocked {
    background: rgba(255, 0, 85, 0.08);
    color: var(--color-danger);
    border: 1px solid rgba(255, 0, 85, 0.2);
}

.status-badge.limited {
    background: rgba(255, 183, 0, 0.08);
    color: var(--color-warning);
    border: 1px solid rgba(255, 183, 0, 0.2);
}

/* Device Threat Tags */
.threat-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
}

.threat-tag.safe {
    color: var(--color-safe);
}

.threat-tag.warning {
    color: var(--color-warning);
}

.threat-tag.critical {
    color: var(--color-danger);
    font-weight: 600;
    text-shadow: 0 0 8px var(--color-danger-glow);
}

/* Search Bar in Device Card */
.search-bar {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 0.4rem 0.8rem;
    gap: 0.5rem;
    width: 250px;
}

.search-bar i {
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    width: 100%;
}

/* Threat Log Tab Detail Card */
.alerts-log-container {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.log-item-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.log-item-card.critical { border-left: 4px solid var(--color-danger); }
.log-item-card.warning { border-left: 4px solid var(--color-warning); }

.log-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.log-title-sec {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.log-title-sec h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.log-item-card.critical .log-title-sec h4 { color: var(--color-danger); }
.log-item-card.warning .log-title-sec h4 { color: var(--color-warning); }

.log-time {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.log-body p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.log-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    background: rgba(0, 0, 0, 0.15);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

.log-meta-item span.label {
    color: var(--color-text-muted);
    margin-right: 0.4rem;
}

.log-meta-item span.value {
    font-weight: 600;
    color: var(--color-primary);
}

/* Simulator Grid Styling */
.simulator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.simulator-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.simulator-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.12);
}

.sim-info {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex-grow: 1;
}

.sim-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.sim-text h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.sim-text p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    line-height: 1.4;
    max-width: 600px;
}

/* iOS Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border: 1px solid var(--border-glass);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary-glow);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--color-primary);
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #000;
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Modal Windows */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 450px;
    animation: modal-anim 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-anim {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.8rem;
    margin-bottom: 1.2rem;
}

.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text-muted);
}

.close-btn:hover {
    color: #fff;
}

.modal-body {
    font-size: 0.9rem;
    line-height: 1.4;
}

.limit-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.6rem;
    margin-top: 1rem;
}

.limit-btn {
    padding: 0.6rem 0.2rem !important;
    text-align: center;
    justify-content: center;
}

.limit-btn.active {
    background: var(--color-primary);
    color: #000;
    border-color: var(--color-primary);
}

.input-custom-limit {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-custom-limit label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.input-custom-limit input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 0.6rem;
    color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.input-custom-limit input:focus {
    border-color: var(--color-primary);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    border-top: 1px solid var(--border-glass);
    padding-top: 1.2rem;
    margin-top: 1.5rem;
}

/* --- ADDED FOR ROUTER & SERVER INTEGRATION --- */

.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    color: #fff;
    padding: 0.75rem;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--transition-speed);
    width: 100%;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

select.form-control {
    cursor: pointer;
}

select.form-control option {
    background: #0e0e1b;
    color: #fff;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .col {
    flex: 1;
}

.w-full {
    width: 100%;
}

.hide {
    display: none !important;
}

.router-status-display {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.router-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.8rem;
}

.router-stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.router-stat-item .label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.router-stat-item .value {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Server Monitor Layout */
.gauge-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-value {
    position: absolute;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.align-center { align-items: center; }
.text-center { text-align: center; }
.flex-column { display: flex; flex-direction: column; }
.justify-center { justify-content: center; }

.server-status-box h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Terminal Emulator Style */
.terminal-emulator {
    background: rgba(3, 3, 8, 0.7);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-screen {
    height: 200px;
    padding: 1.2rem;
    overflow-y: auto;
    font-size: 0.85rem;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.terminal-line {
    color: #00ff66;
    white-space: pre-wrap;
    word-break: break-all;
}

.terminal-line.text-muted {
    color: var(--color-text-muted);
}

.terminal-line.text-error {
    color: var(--color-danger);
}

.terminal-line.cmd-echo {
    color: #fff;
    font-weight: 600;
}

.terminal-input-row {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.6rem 1.2rem;
    border-top: 1px solid var(--border-glass);
    gap: 0.5rem;
}

.terminal-prompt {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

#terminal-cmd-input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    flex-grow: 1;
}

.btn-terminal-send {
    background: transparent;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 4px;
    transition: transform 0.2s;
}

.btn-terminal-send:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Scrollbar styling for terminal screen */
.terminal-screen::-webkit-scrollbar {
    width: 6px;
}
.terminal-screen::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}
.terminal-screen::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.terminal-screen::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* --- MULTI-SERVER SUB-LAYOUT --- */

.server-layout-split {
    display: flex;
    gap: 1.5rem;
    width: 100%;
}

.server-sidebar {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.server-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.8rem;
    margin-bottom: 1rem;
}

.server-sidebar-header h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
}

.btn-add-server {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--border-glass-active);
    color: var(--color-primary);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.btn-add-server:hover {
    background: var(--color-primary);
    color: #000;
    box-shadow: 0 0 8px var(--color-primary-glow);
    transform: scale(1.05);
}

.server-list-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 500px;
    overflow-y: auto;
}

.server-item-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid var(--border-glass);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.server-item-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 255, 255, 0.12);
}

.server-item-card.active {
    background: rgba(0, 229, 255, 0.06);
    border-color: var(--color-primary);
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.05);
}

.server-item-icon {
    font-size: 1.2rem;
    color: var(--color-text-muted);
}

.server-item-card.active .server-item-icon {
    color: var(--color-primary);
    text-shadow: 0 0 8px var(--color-primary-glow);
}

.server-item-info {
    flex-grow: 1;
    min-width: 0;
}

.server-item-info h5 {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.1rem;
}

.server-item-info p {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}

.btn-delete-server {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px;
    opacity: 0;
    transition: opacity 0.2s, color 0.2s;
    font-size: 0.8rem;
}

.server-item-card:hover .btn-delete-server {
    opacity: 1;
}

.btn-delete-server:hover {
    color: var(--color-danger);
}

.server-main-panel {
    flex-grow: 1;
    min-width: 0;
}

/* --- ADDED FOR DETAILED HARDWARE SPECS GRID --- */

.hardware-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.hw-col {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.border-left-glass {
    border-left: 1px solid var(--border-glass);
    padding-left: 1.5rem;
}

.hw-col h5 {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hw-item-desc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.hw-item-desc .label {
    color: var(--color-text-muted);
}

.hw-item-desc .value {
    font-weight: 600;
    text-align: right;
}

.ram-slots-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ram-slot-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.ram-slot-row .slot-lbl {
    color: var(--color-text-muted);
}

.ram-slot-row .slot-val {
    color: var(--color-primary);
    font-weight: 600;
}

.hw-traffic-widget {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.traffic-speed-box {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
}

.traffic-speed-box i {
    font-size: 1.1rem;
}

.traffic-speed-box div {
    display: flex;
    flex-direction: column;
}

.traffic-speed-box .label {
    font-size: 0.65rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.traffic-speed-box .value {
    font-size: 0.85rem;
    font-weight: 700;
}

.text-glow-green {
    color: var(--color-safe) !important;
    text-shadow: 0 0 8px var(--color-safe-glow);
}

.text-glow-blue {
    color: var(--color-primary) !important;
    text-shadow: 0 0 8px var(--color-primary-glow);
}

/* Scrollbars */
.server-list-group::-webkit-scrollbar {
    width: 4px;
}
.server-list-group::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

/* Responsive splits */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .hardware-detail-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .border-left-glass {
        border-left: none;
        border-top: 1px solid var(--border-glass);
        padding-left: 0;
        padding-top: 1rem;
    }
}

@media (max-width: 992px) {
    .server-layout-split {
        flex-direction: column;
    }
    .server-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 2rem 0.5rem;
    }
    .brand-text, .sidebar-footer, .nav-item span {
        display: none;
    }
    .nav-item {
        justify-content: center;
        padding: 0.9rem;
    }
    .main-content {
        margin-left: 70px;
        width: calc(100% - 70px);
        padding: 1.5rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .top-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
}
