/* Environment Intel Page Styles */
/* Matches tactical.css color scheme */

:root {
    --cyan: #00f0ff;
    --cyan-dim: #00a0aa;
    --green: #00ff88;
    --green-dim: #00aa55;
    --magenta: #ff00ff;
    --red: #ff3344;
    --yellow: #ffcc00;
    --orange: #ff8800;
    --bg-deep: #030810;
    --bg-panel: #0a1020;
    --bg-card: #0d1528;
    --border-color: #1a3050;
    --text-primary: #e0e8f0;
    --text-secondary: #8090a0;
}

/* Page Layout */
.environment-page {
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
}

/* Header */
.env-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: linear-gradient(180deg, #0a1525 0%, var(--bg-deep) 100%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 20px rgba(0, 240, 255, 0.1);
}

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

.back-link {
    color: var(--cyan-dim);
    text-decoration: none;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.2s;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.back-link:hover {
    color: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.env-title {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    letter-spacing: 3px;
}

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

/* Status Badge */
.status-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: 1px solid;
}

.status-badge.status-inactive {
    background: rgba(128, 144, 160, 0.1);
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}

.status-badge.status-learning {
    background: rgba(255, 136, 0, 0.2);
    color: var(--orange);
    border-color: var(--orange);
    animation: pulse-orange 2s infinite;
}

.status-badge.status-operational {
    background: rgba(0, 255, 136, 0.2);
    color: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

@keyframes pulse-orange {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 10px rgba(255, 136, 0, 0.3);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 20px rgba(255, 136, 0, 0.5);
    }
}

/* Tab Navigation */
.env-tabs {
    display: flex;
    gap: 0;
    background: var(--bg-panel);
    padding: 0 2rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: rgba(0, 240, 255, 0.05);
}

.tab-btn.active {
    color: var(--cyan);
    border-bottom-color: var(--cyan);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
}

/* Main Content */
.env-main {
    padding: 2rem;
    padding-bottom: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
    overflow-y: auto;
}

/* Page-wide scrolling - override tactical.css restrictions */
html.environment-html,
html.environment-html body,
body.environment-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh;
}

.environment-page {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important;
    min-height: 100vh;
}

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

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Panels */
.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.panel h2 {
    margin: 0 0 0.5rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 2px;
}

.panel-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Data Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-deep);
    color: var(--cyan);
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.05);
}

.data-table td {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s;
}

.btn-primary {
    background: rgba(0, 240, 255, 0.1);
    color: var(--cyan);
    border-color: var(--cyan);
}

.btn-primary:hover {
    background: rgba(0, 240, 255, 0.2);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
}

.btn-secondary {
    background: rgba(128, 144, 160, 0.1);
    color: var(--text-secondary);
    border-color: var(--text-secondary);
}

.btn-secondary:hover {
    background: rgba(128, 144, 160, 0.2);
    color: var(--text-primary);
    border-color: var(--text-primary);
}

.btn-danger {
    background: rgba(255, 51, 68, 0.1);
    color: var(--red);
    border-color: var(--red);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(255, 51, 68, 0.2);
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.3);
}

.btn-danger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-warning {
    background: rgba(255, 136, 0, 0.1);
    color: var(--orange);
    border-color: var(--orange);
}

.btn-warning:hover {
    background: rgba(255, 136, 0, 0.2);
    box-shadow: 0 0 15px rgba(255, 136, 0, 0.3);
}

.btn-success {
    background: rgba(0, 255, 136, 0.1);
    color: var(--green);
    border-color: var(--green);
}

.btn-success:hover {
    background: rgba(0, 255, 136, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* Action buttons in table */
.action-btns {
    display: flex;
    gap: 0.5rem;
}

/* Warning Banner */
.warning-banner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: rgba(255, 136, 0, 0.1);
    border: 1px solid var(--orange);
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-icon {
    font-size: 1.5rem;
    color: var(--orange);
}

.warning-text {
    flex: 1;
    line-height: 1.6;
}

.warning-text strong {
    color: var(--orange);
}

/* Modal - Tactical Theme */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 16, 0.92);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-panel);
    border: 1px solid var(--cyan);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.25s ease-out;
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.2),
        0 0 60px rgba(0, 240, 255, 0.1),
        inset 0 0 30px rgba(0, 240, 255, 0.03);
}

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

/* Corner brackets */
.modal-content::before,
.modal-content::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--cyan);
    border-style: solid;
    pointer-events: none;
}

.modal-content::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.modal-content::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.modal-content.modal-warning {
    border-color: var(--orange);
    box-shadow:
        0 0 30px rgba(255, 136, 0, 0.2),
        0 0 60px rgba(255, 136, 0, 0.1),
        inset 0 0 30px rgba(255, 136, 0, 0.03);
}

.modal-content.modal-warning::before,
.modal-content.modal-warning::after {
    border-color: var(--orange);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), transparent);
}

.modal-warning .modal-header {
    background: linear-gradient(90deg, rgba(255, 136, 0, 0.1), transparent);
}

.modal-header h3 {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 0.15em;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
    text-transform: uppercase;
}

.modal-warning .modal-header h3 {
    color: var(--orange);
    text-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
}

.modal-close {
    background: none;
    border: 1px solid transparent;
    color: var(--cyan-dim);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-close:hover {
    color: var(--red);
    border-color: var(--red);
    text-shadow: 0 0 10px var(--red);
}

.modal-body {
    padding: 1.5rem;
}

.modal-form {
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--cyan);
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--cyan);
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(0, 240, 255, 0.4);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--cyan);
    outline: none;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
    background: rgba(0, 240, 255, 0.05);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group select {
    cursor: pointer;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.02));
}

/* Modal buttons - tactical style */
.form-actions .btn {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.6rem 1.5rem;
    text-transform: uppercase;
    border-radius: 0;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.05));
    border-color: var(--green);
    color: var(--green);
}

.form-actions .btn-primary:hover {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.3), rgba(0, 255, 136, 0.1));
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
    transform: translateY(-1px);
}

.form-actions .btn-secondary {
    background: transparent;
    border-color: rgba(0, 240, 255, 0.3);
    color: rgba(0, 240, 255, 0.7);
}

.form-actions .btn-secondary:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--cyan);
    color: var(--cyan);
}

.form-actions .btn-danger {
    background: linear-gradient(135deg, rgba(255, 51, 68, 0.2), rgba(255, 51, 68, 0.05));
    border-color: var(--red);
    color: var(--red);
}

.form-actions .btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(255, 51, 68, 0.3), rgba(255, 51, 68, 0.1));
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.4);
    transform: translateY(-1px);
}

/* Warning Box in Modal */
.warning-box {
    background: rgba(255, 51, 68, 0.1);
    border: 1px solid var(--red);
    border-radius: 4px;
    padding: 1rem;
    margin: 1rem 0;
}

.warning-box strong {
    color: var(--red);
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', monospace;
    letter-spacing: 1px;
}

.warning-box p {
    margin: 0.5rem 0;
    line-height: 1.5;
}

.confirm-input {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255, 51, 68, 0.05);
    border: 1px solid rgba(255, 51, 68, 0.2);
}

.confirm-input label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--cyan-dim);
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.confirm-input label strong {
    color: var(--red);
    text-shadow: 0 0 5px rgba(255, 51, 68, 0.5);
}

.confirm-input input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 51, 68, 0.3);
    color: var(--red);
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.confirm-input input:focus {
    border-color: var(--red);
    outline: none;
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.2);
}

.confirm-input input::placeholder {
    color: rgba(255, 51, 68, 0.4);
    text-transform: uppercase;
}

/* Learning Mode Specific */
.learning-status-panel {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.status-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.status-icon {
    font-size: 2.5rem;
    color: var(--text-secondary);
    line-height: 1;
}

.status-icon.learning {
    color: var(--orange);
    animation: pulse-icon 1.5s infinite;
}

.status-icon.operational {
    color: var(--green);
    text-shadow: 0 0 15px var(--green);
}

@keyframes pulse-icon {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.95); }
}

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

.status-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#learning-status-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.progress-section {
    margin: 1.5rem 0;
}

.progress-bar {
    height: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--cyan);
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.learning-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.learning-config {
    margin: 1.5rem 0;
}

.config-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
}

.config-label select {
    padding: 0.5rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    cursor: pointer;
}

.learning-controls {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* RAG Stats */
.rag-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 2rem;
}

.stat-card .stat-label {
    margin-top: 0.5rem;
}

.rag-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rag-test-section {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-top: 1.5rem;
}

.rag-test-section h3 {
    margin: 0 0 1rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    color: var(--cyan);
    letter-spacing: 1px;
}

.rag-test-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rag-test-input input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
}

#rag-test-result {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1rem;
    margin: 0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--green);
    white-space: pre-wrap;
    max-height: 200px;
    overflow-y: auto;
}

/* Role/Trust Badges */
.role-badge,
.trust-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.role-attacker { background: rgba(255, 51, 68, 0.2); color: var(--red); border: 1px solid var(--red); }
.role-target { background: rgba(255, 136, 0, 0.2); color: var(--orange); border: 1px solid var(--orange); }
.role-router { background: rgba(0, 170, 255, 0.2); color: #00aaff; border: 1px solid #00aaff; }
.role-server { background: rgba(136, 68, 255, 0.2); color: #8844ff; border: 1px solid #8844ff; }
.role-workstation { background: rgba(68, 170, 0, 0.2); color: #44aa00; border: 1px solid #44aa00; }
.role-unknown { background: rgba(128, 144, 160, 0.2); color: var(--text-secondary); border: 1px solid var(--text-secondary); }

.trust-trusted { background: rgba(0, 255, 136, 0.2); color: var(--green); border: 1px solid var(--green); }
.trust-lab { background: rgba(0, 170, 255, 0.2); color: #00aaff; border: 1px solid #00aaff; }
.trust-untrusted { background: rgba(255, 51, 68, 0.2); color: var(--red); border: 1px solid var(--red); }
.trust-external { background: rgba(255, 136, 0, 0.2); color: var(--orange); border: 1px solid var(--orange); }

/* Source Badges - how the host was discovered */
.source-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.source-manual {
    background: rgba(128, 144, 160, 0.15);
    color: var(--text-secondary);
    border: 1px solid rgba(128, 144, 160, 0.4);
}

.source-network_scan {
    background: rgba(0, 255, 255, 0.15);
    color: var(--cyan);
    border: 1px solid rgba(0, 255, 255, 0.4);
}

.source-host_scan {
    background: rgba(136, 68, 255, 0.15);
    color: #8844ff;
    border: 1px solid rgba(136, 68, 255, 0.4);
}

.source-learning {
    background: rgba(0, 255, 136, 0.15);
    color: var(--green);
    border: 1px solid rgba(0, 255, 136, 0.4);
}

.source-imported {
    background: rgba(255, 136, 0, 0.15);
    color: var(--orange);
    border: 1px solid rgba(255, 136, 0, 0.4);
}

/* Status badges for whitelist */
.status-active {
    color: var(--green);
}

.status-disabled {
    color: var(--text-secondary);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.empty-state p {
    margin-bottom: 1rem;
}

/* Hide empty state when table has data */
.data-table:not(.empty) + .empty-state,
.table-container:has(tbody tr) + .empty-state {
    display: none;
}

/* === Tactical Alert/Confirm Modals === */
.tactical-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 8, 16, 0.92);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;  /* High z-index to ensure modals appear above everything */
    animation: tacticalFadeIn 0.2s ease-out;
}

.tactical-modal-overlay.hidden {
    display: none;
}

@keyframes tacticalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tactical-modal-container {
    background: var(--bg-panel);
    border: 1px solid var(--cyan);
    min-width: 350px;
    max-width: 500px;
    position: relative;
    animation: tacticalSlideIn 0.25s ease-out;
    box-shadow:
        0 0 30px rgba(0, 240, 255, 0.2),
        0 0 60px rgba(0, 240, 255, 0.1),
        inset 0 0 30px rgba(0, 240, 255, 0.03);
}

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

/* Corner brackets */
.tactical-modal-container::before,
.tactical-modal-container::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--cyan);
    border-style: solid;
    pointer-events: none;
}

.tactical-modal-container::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
}

.tactical-modal-container::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
}

.tactical-modal-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(90deg, rgba(0, 240, 255, 0.1), transparent);
}

.tactical-modal-icon {
    font-size: 1.2rem;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

.tactical-modal-icon.success {
    color: var(--green);
    text-shadow: 0 0 10px var(--green);
}

.tactical-modal-icon.error {
    color: var(--red);
    text-shadow: 0 0 10px var(--red);
}

.tactical-modal-icon.warning {
    color: var(--yellow);
    text-shadow: 0 0 10px var(--yellow);
}

.tactical-modal-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.tactical-modal-body {
    padding: 1.5rem 1.25rem;
}

.tactical-modal-message {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--cyan-dim);
    margin: 0;
    white-space: pre-wrap;
}

.tactical-modal-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.tactical-modal-btn {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 240, 255, 0.05));
    border: 1px solid var(--cyan);
    color: var(--cyan);
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.tactical-modal-btn:hover {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(0, 240, 255, 0.1));
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), 0 0 30px rgba(0, 240, 255, 0.1);
    transform: translateY(-1px);
}

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

.tactical-modal-btn.primary {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 255, 136, 0.05));
    border-color: var(--green);
    color: var(--green);
}

.tactical-modal-btn.primary:hover {
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4), 0 0 30px rgba(0, 255, 136, 0.1);
}

.tactical-modal-btn.secondary {
    background: transparent;
    border-color: rgba(0, 240, 255, 0.3);
    color: rgba(0, 240, 255, 0.7);
}

.tactical-modal-btn.secondary:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: var(--cyan);
    color: var(--cyan);
}

.tactical-modal-btn.danger {
    background: linear-gradient(135deg, rgba(255, 51, 68, 0.2), rgba(255, 51, 68, 0.05));
    border-color: var(--red);
    color: var(--red);
}

.tactical-modal-btn.danger:hover {
    box-shadow: 0 0 15px rgba(255, 51, 68, 0.4), 0 0 30px rgba(255, 51, 68, 0.1);
}

/* === SSH Key Management Styles === */

.ssh-key-status-panel {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.key-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.key-status-header h3 {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.status-badge.status-active {
    background: rgba(0, 255, 136, 0.2);
    color: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.2);
}

.status-badge.status-error {
    background: rgba(255, 51, 68, 0.2);
    color: var(--red);
    border-color: var(--red);
}

.key-status-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.key-info {
    padding: 0.75rem 1rem;
    background: rgba(0, 240, 255, 0.05);
    border-left: 3px solid var(--cyan);
}

.key-path {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.key-path .label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.key-path code {
    font-family: 'Share Tech Mono', monospace;
    color: var(--cyan);
    font-size: 0.85rem;
}

.key-actions {
    display: flex;
    gap: 0.75rem;
}

.public-key-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.public-key-section h4 {
    margin: 0 0 0.5rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 1px;
}

.public-key-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.public-key-container {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.public-key-display {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.75rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--green);
    resize: none;
    height: 60px;
    line-height: 1.4;
    word-break: break-all;
}

.public-key-display:focus {
    border-color: var(--cyan);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-icon {
    padding: 0.6rem;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* SSH Deploy Section */
.ssh-deploy-section {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.ssh-deploy-section h3 {
    margin: 0 0 0.5rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.deploy-form {
    max-width: 600px;
}

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

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

.form-group-small {
    max-width: 100px;
    flex: 0 0 100px !important;
}

.deploy-form .form-actions {
    padding: 0;
    border: none;
    background: none;
    justify-content: flex-start;
    margin-top: 0.5rem;
}

/* SSH Hosts Section */
.ssh-hosts-section {
    margin-top: 1.5rem;
}

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

.section-header h3 {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
}

/* SSH Status Badges */
.ssh-status-badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.ssh-status-badge.status-deployed {
    background: rgba(0, 255, 136, 0.2);
    color: var(--green);
    border: 1px solid var(--green);
}

.ssh-status-badge.status-pending {
    background: rgba(255, 204, 0, 0.2);
    color: var(--yellow);
    border: 1px solid var(--yellow);
}

.ssh-status-badge.status-failed {
    background: rgba(255, 51, 68, 0.2);
    color: var(--red);
    border: 1px solid var(--red);
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* SSH Hosts Table styling */
#ssh-hosts-table td {
    font-size: 0.85rem;
}

#ssh-hosts-table td:nth-child(7) {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

/* === Network Scanner Styles === */

.scanner-config-panel {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.config-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.config-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.scan-type-descriptions {
    margin-bottom: 1.5rem;
}

.scan-type-desc {
    display: none;
    padding: 0.75rem 1rem;
    background: rgba(0, 240, 255, 0.05);
    border-left: 3px solid var(--cyan-dim);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.scan-type-desc.active {
    display: block;
}

.scan-type-desc strong {
    color: var(--cyan);
}

.scanner-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.scan-status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-secondary);
}

.status-dot.idle {
    background: var(--text-secondary);
}

.status-dot.scanning {
    background: var(--orange);
    animation: pulse-dot 1s infinite;
    box-shadow: 0 0 10px var(--orange);
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

/* Live Output Console */
.scanner-console-section {
    margin-bottom: 1.5rem;
}

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

.console-header h3 {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.scan-console {
    background: #0a0a0a;
    border: 1px solid var(--cyan-dim);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: #00ff88;
    padding: 1rem;
    height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

.scan-console::-webkit-scrollbar {
    width: 8px;
}

.scan-console::-webkit-scrollbar-track {
    background: #0a0a0a;
}

.scan-console::-webkit-scrollbar-thumb {
    background: var(--cyan-dim);
    border-radius: 4px;
}

.scan-console::-webkit-scrollbar-thumb:hover {
    background: var(--cyan);
}

.console-placeholder {
    color: var(--cyan-dim);
}

.console-line {
    line-height: 1.4;
    padding: 1px 0;
}

.console-line.line-error {
    color: #ff3344;
}

.console-line.line-warning {
    color: #ffcc00;
}

.console-line.line-info {
    color: #00f0ff;
}

.console-line.line-success {
    color: #00ff88;
    font-weight: bold;
}

/* Protocol-based packet coloring for Live Packets console */
.console-line.line-tcp {
    color: var(--cyan);
}

.console-line.line-udp {
    color: var(--magenta);
}

.console-line.line-icmp {
    color: var(--orange);
}

.console-line.line-other {
    color: var(--text-secondary);
}

/* Scan Results Section */
.scanner-results-section {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-summary {
    display: flex;
    gap: 1.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.results-summary span {
    padding: 0.3rem 0.75rem;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
}

#scanner-results-table .ports-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    color: var(--cyan);
}

.host-state {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.host-state.state-up {
    background: rgba(0, 255, 136, 0.2);
    color: var(--green);
    border: 1px solid var(--green);
}

.host-state.state-down {
    background: rgba(255, 51, 68, 0.2);
    color: var(--red);
    border: 1px solid var(--red);
}

/* Scan History Section */
.scanner-history-section {
    margin-top: 1.5rem;
}

.scan-status {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Orbitron', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.scan-status.scan-status-running {
    background: rgba(255, 136, 0, 0.2);
    color: var(--orange);
    border: 1px solid var(--orange);
    animation: pulse-status 1.5s infinite;
}

.scan-status.scan-status-completed {
    background: rgba(0, 255, 136, 0.2);
    color: var(--green);
    border: 1px solid var(--green);
}

.scan-status.scan-status-failed {
    background: rgba(255, 51, 68, 0.2);
    color: var(--red);
    border: 1px solid var(--red);
}

.scan-status.scan-status-cancelled {
    background: rgba(255, 204, 0, 0.2);
    color: var(--yellow);
    border: 1px solid var(--yellow);
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Responsive */
@media (max-width: 768px) {
    .env-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .env-tabs {
        overflow-x: auto;
        padding: 0 1rem;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .env-main {
        padding: 1rem;
    }

    .learning-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .learning-controls {
        flex-direction: column;
    }

    .rag-actions {
        flex-direction: column;
    }

    .config-row {
        flex-direction: column;
        gap: 0;
    }

    .scanner-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .scan-console {
        height: 300px;
    }
}

/* === Host Scanner (SSH-based) Styles === */

.host-scanner-section {
    margin-top: 2rem;
}

.section-divider {
    display: flex;
    align-items: center;
    margin: 2rem 0 1.5rem;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan-dim), transparent);
}

.divider-text {
    padding: 0 1.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

.host-scanner-config {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
}

.host-info-label {
    color: var(--text-secondary);
}

#host-scan-username,
#host-scan-port {
    color: var(--cyan);
    font-weight: 600;
}

.host-scanner-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Host scan console specific */
.host-scan-console {
    height: 350px;
}

.console-line.line-output {
    color: #aabbcc;
    padding-left: 1rem;
}

.console-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.scan-progress {
    font-family: 'Orbitron', monospace;
    font-size: 0.75rem;
    color: var(--orange);
    letter-spacing: 1px;
}

.progress-step {
    animation: pulse-text 1.5s infinite;
}

@keyframes pulse-text {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Host Scan Results Grid */
.host-scan-results-section {
    margin-bottom: 1.5rem;
}

.results-meta {
    display: flex;
    gap: 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#host-results-hostname {
    color: var(--cyan);
    font-weight: 600;
}

.host-scan-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.scan-result-card {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: border-color 0.2s;
}

.scan-result-card:hover {
    border-color: var(--cyan-dim);
}

.scan-result-card h4 {
    margin: 0 0 0.75rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 1px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.scan-result-card .card-content {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: auto;
}

.scan-result-card .card-content::-webkit-scrollbar {
    width: 6px;
}

.scan-result-card .card-content::-webkit-scrollbar-track {
    background: transparent;
}

.scan-result-card .card-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.scan-result-card .card-content::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-dim);
}

.scan-result-card pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
    color: var(--green);
    font-size: 0.8rem;
    line-height: 1.5;
}

/* Card subsections */
.subsection {
    margin-bottom: 1rem;
}

.subsection:last-child {
    margin-bottom: 0;
}

.subsection h5 {
    margin: 0 0 0.5rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--magenta);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Info grid for OS info */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.info-item {
    padding: 0.4rem 0;
    color: var(--text-primary);
}

.info-item .label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 0.15rem;
}

/* Interface and port items */
.interface-item,
.port-item,
.user-item {
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.interface-item:last-child,
.port-item:last-child,
.user-item:last-child {
    border-bottom: none;
}

.interface-item code,
.port-item code,
.user-item code {
    color: var(--cyan);
}

/* Resource bar */
.resource-bar {
    height: 8px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.resource-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--green), var(--cyan));
    transition: width 0.5s ease;
}

.resource-info {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Host Scan History */
.host-scan-history-section {
    margin-top: 1.5rem;
}

#host-scan-history-table td small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

/* Responsive adjustments for host scanner */
@media (max-width: 768px) {
    .host-scan-results-grid {
        grid-template-columns: 1fr;
    }

    .host-scanner-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    .host-scan-console {
        height: 250px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* === Live Traffic Capture Styles === */

.live-traffic-section {
    margin-top: 2rem;
}

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

.stat-card {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.2s;
}

.stat-card:hover {
    border-color: var(--cyan-dim);
}

.stat-card .stat-value {
    display: block;
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 0.25rem;
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Protocol Distribution */
.protocol-distribution-panel {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.protocol-distribution-panel h4 {
    margin: 0 0 1rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.protocol-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.protocol-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.protocol-label {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
}

.protocol-name {
    color: var(--text-primary);
    font-weight: 600;
}

.protocol-percent {
    color: var(--text-secondary);
}

.protocol-bar {
    height: 8px;
    background: var(--bg-panel);
    border-radius: 4px;
    overflow: hidden;
}

.protocol-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.no-data {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Traffic Console */
.traffic-console-section {
    margin-bottom: 1.5rem;
}

.traffic-console {
    height: 300px;
    font-size: 0.75rem;
}

.traffic-console .console-line {
    padding: 0.15rem 0.5rem;
}

.traffic-console .line-tcp {
    color: var(--cyan);
}

.traffic-console .line-udp {
    color: var(--magenta);
}

.traffic-console .line-icmp {
    color: var(--orange);
}

.traffic-console .line-other {
    color: var(--text-secondary);
}

/* Traffic Tables Grid */
.traffic-tables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.top-talkers-panel,
.connection-pairs-panel {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.top-talkers-panel h3,
.connection-pairs-panel h3 {
    margin: 0 0 1rem 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 1px;
}

.top-talkers-panel .table-container,
.connection-pairs-panel .table-container {
    max-height: 250px;
    overflow-y: auto;
}

.top-talkers-panel .data-table,
.connection-pairs-panel .data-table {
    font-size: 0.8rem;
}

.top-talkers-panel .data-table td code,
.connection-pairs-panel .data-table td code {
    color: var(--green);
}

/* Responsive adjustments for live traffic */
@media (max-width: 1024px) {
    .traffic-stats-panel {
        grid-template-columns: repeat(2, 1fr);
    }

    .traffic-tables-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .traffic-stats-panel {
        grid-template-columns: 1fr;
    }

    .traffic-console {
        height: 200px;
    }

    .stat-card .stat-value {
        font-size: 1.2rem;
    }
}

/* ============================================================
   UNIFIED CONSOLE AREA
   ============================================================ */

/* Unified console is now removed - using inline expandable consoles per section instead */
.unified-console-area {
    display: none !important;
}

.unified-console-area.maximized {
    display: none !important;
}

/* Resize Handle */
.console-resize-handle {
    height: 6px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--primary-cyan) 20%,
        var(--primary-cyan) 80%,
        transparent 100%);
    cursor: ns-resize;
    position: relative;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.console-resize-handle:hover {
    opacity: 1;
}

.console-resize-handle::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 4px;
    background: var(--primary-cyan);
    border-radius: 2px;
    opacity: 0.7;
}

/* Console Header Bar */
.console-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    flex-shrink: 0;
}

/* Console Tabs */
.console-tabs {
    display: flex;
    gap: 0.25rem;
}

.console-tab {
    padding: 0.5rem 1rem;
    background: rgba(30, 40, 50, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-bottom: none;
    color: rgba(0, 255, 255, 0.6);
    font-family: var(--font-display);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.console-tab:hover {
    background: rgba(0, 255, 255, 0.1);
    color: var(--primary-cyan);
}

.console-tab.active {
    background: rgba(0, 255, 255, 0.15);
    color: var(--primary-cyan);
    border-color: var(--primary-cyan);
}

.console-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-cyan);
}

/* Tab notification for new messages */
.console-tab.has-new {
    animation: tab-pulse 0.5s ease-in-out 3;
}

@keyframes tab-pulse {
    0%, 100% { background: rgba(0, 255, 255, 0.1); }
    50% { background: rgba(0, 255, 255, 0.3); color: #fff; }
}

/* Console Controls */
.console-controls {
    display: flex;
    gap: 0.5rem;
}

.console-controls .btn-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
}

.console-controls .btn-small.paused {
    background: rgba(255, 200, 0, 0.2);
    border-color: #ffc800;
    color: #ffc800;
}

/* Console Panels Container */
.console-panels {
    flex: 1;
    position: relative;
    overflow: hidden;
}

/* Individual Console Panels */
.console-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.5rem 1rem;
    overflow-y: auto;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-secondary);
    display: none;
}

.console-panel.active {
    display: block;
}

/* Console scrollbar */
.console-panel::-webkit-scrollbar {
    width: 8px;
}

.console-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.console-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 255, 0.3);
    border-radius: 4px;
}

.console-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 255, 0.5);
}

/* Console Lines */
.console-line {
    padding: 0.15rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.console-line:hover {
    background: rgba(0, 255, 255, 0.05);
}

.console-timestamp {
    color: rgba(136, 136, 136, 0.7);
    margin-right: 0.75rem;
    font-size: 0.75rem;
}

.console-message {
    word-break: break-word;
}

/* Console message type colors */
.console-info .console-message { color: #00ffff; }
.console-success .console-message { color: #00ff00; }
.console-warning .console-message { color: #ffff00; }
.console-error .console-message { color: #ff4444; }
.console-data .console-message { color: #ffffff; }
.console-tcp .console-message { color: #00ffff; }
.console-udp .console-message { color: #ff00ff; }
.console-icmp .console-message { color: #ff8800; }
.console-system .console-message { color: #888888; font-style: italic; }

/* Console Placeholder */
.console-panel .console-placeholder {
    color: rgba(0, 255, 255, 0.4);
    font-style: italic;
    padding: 1rem 0;
}

/* Main content - no longer needs padding for fixed console */
main {
    padding-bottom: 2rem;
}

/* ============================================================
   EXPANDABLE INLINE CONSOLE (per section)
   ============================================================ */

.expandable-console {
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transition: all 0.3s ease;
}

.expandable-console.collapsed .console-body {
    display: none;
}

.expandable-console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0, 240, 255, 0.05);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.expandable-console-header:hover {
    background: rgba(0, 240, 255, 0.1);
}

.expandable-console-header h4 {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    color: var(--cyan);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.expandable-console-header h4::before {
    content: '▶';
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.expandable-console:not(.collapsed) .expandable-console-header h4::before {
    transform: rotate(90deg);
}

.console-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.console-status-badge.idle {
    background: rgba(128, 144, 160, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

.console-status-badge.active {
    background: rgba(0, 255, 136, 0.2);
    color: var(--green);
    border: 1px solid var(--green);
    animation: pulse-green 2s infinite;
}

.console-status-badge.error {
    background: rgba(255, 51, 68, 0.2);
    color: var(--red);
    border: 1px solid var(--red);
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.expandable-console .console-body {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
}

.expandable-console .console-body::-webkit-scrollbar {
    width: 6px;
}

.expandable-console .console-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.expandable-console .console-body::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.3);
    border-radius: 3px;
}

.expandable-console .console-body::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.5);
}

.expandable-console .console-line {
    padding: 0.2rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.expandable-console .console-placeholder {
    color: rgba(0, 240, 255, 0.4);
    font-style: italic;
}

/* Console line colors */
.expandable-console .line-info { color: var(--cyan); }
.expandable-console .line-success { color: var(--green); }
.expandable-console .line-warning { color: var(--yellow); }
.expandable-console .line-error { color: var(--red); }
.expandable-console .line-cmd { color: var(--magenta); }
.expandable-console .line-data { color: var(--text-primary); }

.expandable-console .console-controls {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.expandable-console .console-controls .btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .unified-console-area {
        height: 250px;
    }

    .console-header-bar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .console-tabs {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .console-tab {
        flex: 1;
        min-width: 70px;
        text-align: center;
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
    }

    .console-controls {
        width: 100%;
        justify-content: center;
    }

    .console-controls .btn-small {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
    }

    main {
        padding-bottom: 270px;
    }
}

/* ============================================================
   RAG INGESTION PIPELINE STYLES
   ============================================================ */

/* Collections Grid */
.rag-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.collection-card {
    background: rgba(0, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.collection-card:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.05);
}

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

.collection-name {
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--primary-cyan);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.collection-count {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ff00;
}

.collection-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.collection-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.collection-updated {
    font-size: 0.7rem;
    color: rgba(0, 255, 255, 0.5);
    font-family: var(--font-mono);
}

.collection-actions {
    display: flex;
    gap: 0.5rem;
}

/* Stats Summary */
.rag-stats-summary {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.rag-stats-summary .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rag-stats-summary .stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.rag-stats-summary .stat-value {
    color: var(--primary-cyan);
    font-family: var(--font-mono);
    font-weight: bold;
}

/* Ingestion Section */
.rag-ingestion-section {
    margin-bottom: 1.5rem;
}

.rag-ingestion-section h3 {
    margin-bottom: 0.5rem;
}

.rag-ingestion-section .hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

/* RAG Actions */
.rag-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Test Query Section */
.rag-test-section {
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.rag-test-section h3 {
    margin-bottom: 0.5rem;
}

.rag-test-section .hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.rag-test-input {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rag-test-input input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.rag-test-input input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Test Results */
.rag-test-results {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.rag-test-results .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.rag-test-results .results-header h4 {
    margin: 0;
    color: var(--primary-cyan);
}

.rag-test-results .query-text {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

.collection-results {
    margin-bottom: 1.5rem;
}

.collection-results h5 {
    color: var(--primary-cyan);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.collection-results .result-count {
    color: var(--text-secondary);
    font-weight: normal;
    font-size: 0.8rem;
}

.collection-results .no-results {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
    padding: 0.5rem 0;
}

.result-doc {
    background: rgba(0, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.result-doc .doc-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.result-doc .doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.result-doc .distance {
    color: #ff8800;
}

.result-doc .meta {
    color: rgba(0, 255, 255, 0.6);
}

.rag-test-results .loading {
    text-align: center;
    color: var(--primary-cyan);
    padding: 2rem;
}

.rag-test-results .error {
    color: #ff4444;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .rag-collections-grid {
        grid-template-columns: 1fr;
    }

    .rag-stats-summary {
        flex-direction: column;
        gap: 0.5rem;
    }

    .rag-test-input {
        flex-direction: column;
    }

    .rag-actions {
        flex-direction: column;
    }
}

/* ============================================================
   RAG ENHANCEMENTS: Pending Counts, Ingestion Log, Query Selector
   ============================================================ */

/* Collection Counts Container */
.collection-counts {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Pending Badge */
.pending-badge {
    background: var(--orange);
    color: var(--bg-deep);
    font-size: 0.65rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 700;
    font-family: var(--font-mono);
    animation: pulse-pending 2s ease-in-out infinite;
    white-space: nowrap;
}

@keyframes pulse-pending {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* RAG Config Section */
.rag-config-section {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.rag-config-section h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-cyan);
    font-size: 0.95rem;
}

.rag-config-section .config-group {
    margin-bottom: 0.75rem;
}

.rag-config-section .config-help {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Ingestion Log Section */
.rag-ingestion-log-section {
    margin-bottom: 1.5rem;
}

.rag-ingestion-log-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.rag-ingestion-log-section h3 {
    margin: 0;
    color: var(--primary-cyan);
    font-size: 0.95rem;
}

/* Ingestion Log Container */
.ingestion-log-container {
    max-height: 300px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    padding: 0.5rem;
}

.ingestion-log-container::-webkit-scrollbar {
    width: 6px;
}

.ingestion-log-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.ingestion-log-container::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 3px;
}

.log-placeholder {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.8rem;
    text-align: center;
    padding: 2rem 1rem;
}

.log-error {
    color: #ff4444;
    font-size: 0.8rem;
    text-align: center;
    padding: 1rem;
}

.log-entry {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
    font-size: 0.8rem;
}

.log-entry:last-child {
    border-bottom: none;
}

.log-timestamp {
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.log-action {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.log-action.action-ingest {
    background: rgba(0, 255, 136, 0.2);
    color: var(--green);
}

.log-action.action-clear {
    background: rgba(255, 136, 0, 0.2);
    color: var(--orange);
}

.log-action.action-backup {
    background: rgba(0, 240, 255, 0.2);
    color: var(--cyan);
}

.log-action.action-restore {
    background: rgba(255, 0, 255, 0.2);
    color: var(--magenta);
}

.log-collection {
    color: var(--magenta);
    font-family: var(--font-mono);
    flex: 1;
}

.log-count {
    color: var(--green);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

/* Query RAG Section */
.rag-query-section {
    border-top: 1px solid rgba(0, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.rag-query-section h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-cyan);
}

.rag-query-section .hint {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.rag-query-input {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.rag-query-input input {
    flex: 1;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.rag-query-input input:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Query Results (reuse test results styles) */
.rag-query-results {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    max-height: 500px;
    overflow-y: auto;
}

.rag-query-results .results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.1);
}

.rag-query-results .results-header h4 {
    margin: 0;
    color: var(--primary-cyan);
}

.rag-query-results .query-text {
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.85rem;
}

.rag-query-results .loading {
    text-align: center;
    color: var(--primary-cyan);
    padding: 2rem;
}

.rag-query-results .error {
    color: #ff4444;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    border-radius: 4px;
}

/* Collection Toggle Buttons (mode-btn style) */
.collection-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.collection-toggle-btn {
    padding: 0.6rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px;
    color: var(--cyan-dim);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.collection-toggle-btn:hover {
    border-color: var(--cyan);
    background: rgba(0, 240, 255, 0.1);
}

.collection-toggle-btn.active {
    border-color: var(--cyan);
    background: rgba(0, 240, 255, 0.15);
    color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.3), inset 0 0 20px rgba(0, 240, 255, 0.1);
}

/* Backup Restore Modal */
.backup-list-container {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.backup-list-container .loading-placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

.backup-list-container .no-backups {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 2rem;
}

.backup-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(0, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.backup-item:hover {
    border-color: var(--primary-cyan);
    background: rgba(0, 255, 255, 0.06);
}

.backup-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.backup-id {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--primary-cyan);
}

.backup-timestamp {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.backup-size {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--green);
}

.backup-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modal Styles for Backup Modal */
#modal-restore-backup .modal-body {
    padding: 1rem 0;
}

#modal-restore-backup .modal-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

#modal-restore-backup .modal-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 255, 255, 0.1);
}

/* ============================================================
   PHASE 7: ENHANCED LEARNING MODE
   ============================================================ */

/* Phase Banner */
.learning-phase-banner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.1), rgba(0, 136, 255, 0.05));
    border: 1px solid var(--cyan);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.15);
}

.learning-phase-banner[data-phase="idle"] {
    background: linear-gradient(135deg, rgba(128, 144, 160, 0.1), rgba(80, 90, 100, 0.05));
    border-color: var(--border-color);
    box-shadow: none;
}

.learning-phase-banner[data-phase="initializing"],
.learning-phase-banner[data-phase="scanning_network"],
.learning-phase-banner[data-phase="scanning_hosts"] {
    background: linear-gradient(135deg, rgba(255, 136, 0, 0.15), rgba(255, 200, 0, 0.05));
    border-color: var(--orange);
    box-shadow: 0 0 20px rgba(255, 136, 0, 0.2);
    animation: pulse-banner 2s infinite;
}

.learning-phase-banner[data-phase="capturing_traffic"] {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.15), rgba(0, 255, 136, 0.05));
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.learning-phase-banner[data-phase="building_baseline"] {
    background: linear-gradient(135deg, rgba(136, 68, 255, 0.15), rgba(255, 0, 255, 0.05));
    border-color: var(--magenta);
    box-shadow: 0 0 20px rgba(136, 68, 255, 0.2);
    animation: pulse-banner 1.5s infinite;
}

.learning-phase-banner[data-phase="completed"] {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(0, 200, 100, 0.05));
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.learning-phase-banner[data-phase="error"] {
    background: linear-gradient(135deg, rgba(255, 51, 68, 0.15), rgba(255, 0, 0, 0.05));
    border-color: var(--red);
    box-shadow: 0 0 20px rgba(255, 51, 68, 0.2);
}

@keyframes pulse-banner {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.phase-icon {
    font-size: 2.5rem;
    line-height: 1;
    min-width: 50px;
    text-align: center;
}

.learning-phase-banner[data-phase="idle"] .phase-icon { color: var(--text-secondary); }
.learning-phase-banner[data-phase="initializing"] .phase-icon,
.learning-phase-banner[data-phase="scanning_network"] .phase-icon,
.learning-phase-banner[data-phase="scanning_hosts"] .phase-icon { color: var(--orange); }
.learning-phase-banner[data-phase="capturing_traffic"] .phase-icon { color: var(--cyan); }
.learning-phase-banner[data-phase="building_baseline"] .phase-icon { color: var(--magenta); }
.learning-phase-banner[data-phase="completed"] .phase-icon { color: var(--green); }
.learning-phase-banner[data-phase="error"] .phase-icon { color: var(--red); }

.phase-info {
    flex: 1;
}

.phase-name {
    font-family: 'Orbitron', monospace;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.phase-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Learning Phases Progress Section */
.learning-phases-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.phase-progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.phase-progress-item.active {
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.phase-progress-item.completed {
    border-color: var(--green-dim);
    opacity: 0.8;
}

.phase-progress-item.pending {
    opacity: 0.5;
}

.phase-progress-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.phase-progress-icon {
    font-size: 1rem;
    width: 1.5rem;
    text-align: center;
}

.phase-progress-label {
    flex: 1;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.phase-progress-status {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 80px;
    text-align: right;
}

.phase-progress-item.active .phase-progress-status {
    color: var(--cyan);
}

.phase-progress-item.completed .phase-progress-status {
    color: var(--green);
}

.phase-progress-bar-container {
    width: 100%;
}

.phase-progress-bar {
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
}

.phase-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    border-radius: 2px;
    transition: width 0.5s ease;
    box-shadow: 0 0 8px var(--cyan);
}

.phase-progress-item.active .phase-progress-fill {
    background: linear-gradient(90deg, var(--cyan), var(--cyan-dim));
    animation: progress-pulse 1.5s ease-in-out infinite;
}

.phase-progress-item.completed .phase-progress-fill {
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
}

@keyframes progress-pulse {
    0%, 100% { box-shadow: 0 0 8px var(--cyan); }
    50% { box-shadow: 0 0 15px var(--cyan); }
}

/* Multi-Progress Section */
.learning-progress-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.progress-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.progress-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 100px;
}

.progress-bar-container {
    flex: 1;
}

.progress-item .progress-bar {
    height: 6px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin: 0;
}

.progress-item .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--green));
    transition: width 0.5s ease;
    box-shadow: 0 0 8px var(--cyan);
}

.progress-item .progress-fill.rag-pulse {
    animation: rag-pulse 2s ease-in-out infinite;
}

@keyframes rag-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.progress-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    min-width: 70px;
    text-align: right;
}

/* Stats Dashboard */
.learning-stats-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.learning-stats-dashboard .stat-card {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    transition: all 0.2s ease;
}

.learning-stats-dashboard .stat-card:hover {
    border-color: var(--cyan-dim);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.learning-stats-dashboard .stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 0.25rem;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.learning-stats-dashboard .stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Timeline */
.learning-timeline {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    max-height: 250px;
    overflow-y: auto;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.timeline-header .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.timeline-header h4 {
    margin: 0;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 1px;
}

.timeline-items {
    position: relative;
}

.timeline-items::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    position: relative;
}

.timeline-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--bg-panel);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-secondary);
    z-index: 1;
}

.timeline-item.completed .timeline-marker {
    background: rgba(0, 255, 136, 0.2);
    border-color: var(--green);
    color: var(--green);
}

.timeline-item.current .timeline-marker {
    background: rgba(0, 240, 255, 0.2);
    border-color: var(--cyan);
    color: var(--cyan);
    animation: pulse-marker 1.5s infinite;
}

@keyframes pulse-marker {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 240, 255, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(0, 240, 255, 0); }
}

.timeline-content {
    flex: 1;
}

.timeline-time {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.15rem;
}

.timeline-event {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Configuration Section */
.learning-config-section {
    background: var(--bg-deep);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.learning-config-section summary {
    padding: 1rem 1.25rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 1px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.learning-config-section summary::before {
    content: '▶';
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.learning-config-section[open] summary::before {
    transform: rotate(90deg);
}

.learning-config-section summary::-webkit-details-marker {
    display: none;
}

#learning-config-form {
    padding: 1.25rem;
    border-top: 1px solid var(--border-color);
}

.config-group {
    margin-bottom: 1.25rem;
}

.config-group:last-child {
    margin-bottom: 0;
}

.config-group > label:not(.checkbox-label) {
    display: block;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--cyan);
    cursor: pointer;
}

.checkbox-label span {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.config-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    background: rgba(255, 136, 0, 0.2);
    border: 1px solid var(--orange);
    border-radius: 3px;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.config-help {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.35rem 0 0 2rem;
    line-height: 1.4;
}

.config-group .config-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.config-group select {
    flex: 1;
    max-width: 200px;
    padding: 0.6rem 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
}

.config-group select:focus {
    border-color: var(--cyan);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.config-group input[type="number"] {
    width: 80px;
    padding: 0.6rem;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: 'Share Tech Mono', monospace;
    text-align: center;
}

.config-group input[type="number"]:focus {
    border-color: var(--cyan);
    outline: none;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.input-with-unit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.input-with-unit span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Learning Actions */
.learning-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.learning-actions .btn {
    padding: 0.75rem 1.5rem;
    font-family: 'Orbitron', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Responsive adjustments for enhanced learning */
@media (max-width: 1024px) {
    .learning-stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .learning-progress-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .learning-phase-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .phase-info {
        order: 1;
    }

    .phase-icon {
        order: 0;
    }

    .phase-progress-ring {
        order: 2;
    }

    .learning-stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }

    .learning-stats-dashboard .stat-value {
        font-size: 1.25rem;
    }

    .progress-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .progress-label {
        min-width: auto;
    }

    .progress-status {
        text-align: left;
    }

    .learning-actions {
        flex-direction: column;
    }

    .learning-actions .btn {
        width: 100%;
    }
}

/* ============================================================
   ENVIRONMENT INTELLIGENCE - TACTICAL UPGRADE
   Match/exceed main Threat Hunter AI styling
   ============================================================ */

/* === Scanlines Overlay === */
.environment-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent 0px,
        transparent 2px,
        rgba(0, 240, 255, 0.015) 2px,
        rgba(0, 240, 255, 0.015) 4px
    );
    pointer-events: none;
    z-index: 1;  /* Low z-index so it doesn't block modals */
}

/* === Enhanced Header with Sweep Animation === */
.env-header {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg,
        var(--bg-panel) 0%,
        rgba(0, 240, 255, 0.05) 50%,
        var(--bg-deep) 100%
    );
    border-bottom: 2px solid var(--magenta);
    box-shadow:
        0 2px 20px rgba(0, 240, 255, 0.1),
        0 4px 40px rgba(255, 0, 255, 0.05);
}

.env-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(0, 240, 255, 0.1) 25%,
        rgba(255, 0, 255, 0.15) 50%,
        transparent 75%
    );
    animation: header-sweep 4s linear infinite;
    pointer-events: none;
}

@keyframes header-sweep {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0%); }
}

/* === Enhanced Title with Glow === */
.env-title {
    font-size: 1.8rem;
    text-shadow:
        0 0 20px var(--cyan),
        0 0 40px rgba(0, 240, 255, 0.5),
        0 0 60px rgba(0, 240, 255, 0.3);
    animation: title-pulse 3s ease-in-out infinite;
}

@keyframes title-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* === Tactical Panels with Corner Brackets === */
.panel {
    position: relative;
    background: linear-gradient(135deg,
        var(--bg-panel) 0%,
        rgba(0, 240, 255, 0.02) 100%
    );
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.5),
        inset 0 0 30px rgba(0, 240, 255, 0.03);
}

.panel::before,
.panel::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-style: solid;
    pointer-events: none;
}

.panel::before {
    top: -1px;
    left: -1px;
    border-width: 2px 0 0 2px;
    border-color: var(--cyan);
}

.panel::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 2px 2px 0;
    border-color: var(--magenta);
}

/* === Enhanced Status Badge with Glow === */
.status-badge {
    box-shadow: 0 0 10px currentColor;
    text-shadow: 0 0 8px currentColor;
}

.status-badge.status-learning {
    animation: pulse-badge 1.5s ease-in-out infinite;
}

.status-badge.status-operational {
    animation: glow-green 2s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        box-shadow: 0 0 10px rgba(255, 136, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 136, 0, 0.8), 0 0 40px rgba(255, 136, 0, 0.4);
    }
}

@keyframes glow-green {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(0, 255, 136, 0.8), 0 0 40px rgba(0, 255, 136, 0.4);
    }
}

/* === Enhanced Tab Navigation === */
.env-tabs {
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-deep) 100%);
    border-bottom: 1px solid var(--magenta);
    position: relative;
}

.tab-btn.active {
    background: linear-gradient(180deg,
        rgba(0, 240, 255, 0.15) 0%,
        rgba(0, 240, 255, 0.05) 100%
    );
    box-shadow:
        inset 0 0 20px rgba(0, 240, 255, 0.1),
        0 2px 10px rgba(0, 240, 255, 0.2);
}

.tab-btn.active::after {
    height: 2px;
    box-shadow: 0 0 15px var(--cyan), 0 0 30px var(--cyan);
}

/* === Enhanced Stat Cards === */
.stat-card {
    position: relative;
    background: linear-gradient(135deg,
        var(--bg-deep) 0%,
        rgba(0, 240, 255, 0.03) 100%
    );
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: var(--cyan);
    box-shadow:
        0 0 20px rgba(0, 240, 255, 0.2),
        inset 0 0 30px rgba(0, 240, 255, 0.05);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-value {
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

/* === Enhanced Buttons with Sweep Effect === */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 20px rgba(0, 240, 255, 0.4),
        0 0 40px rgba(0, 240, 255, 0.2);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow:
        0 0 20px rgba(0, 255, 136, 0.4),
        0 0 40px rgba(0, 255, 136, 0.2);
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
}

/* === Enhanced Console with Glow Border === */
.scan-console {
    border: 1px solid var(--cyan);
    box-shadow:
        0 0 15px rgba(0, 240, 255, 0.1),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    position: relative;
}

.scan-console::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: console-scan 3s linear infinite;
}

@keyframes console-scan {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

/* === Enhanced Data Tables === */
.data-table th {
    background: linear-gradient(180deg,
        rgba(0, 240, 255, 0.15) 0%,
        rgba(0, 240, 255, 0.05) 100%
    );
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(0, 240, 255, 0.08);
    box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
}

/* === Enhanced Scan Result Cards === */
.scan-result-card {
    position: relative;
    transition: all 0.3s ease;
}

.scan-result-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 15px;
    height: 15px;
    border-top: 2px solid var(--cyan);
    border-left: 2px solid var(--cyan);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scan-result-card::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 15px;
    height: 15px;
    border-bottom: 2px solid var(--magenta);
    border-right: 2px solid var(--magenta);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.scan-result-card:hover {
    border-color: var(--cyan);
    box-shadow:
        0 0 20px rgba(0, 240, 255, 0.15),
        inset 0 0 30px rgba(0, 240, 255, 0.03);
}

.scan-result-card:hover::before,
.scan-result-card:hover::after {
    opacity: 1;
}

/* === Learning Mode Status Panel Enhancement === */
.learning-status-panel {
    position: relative;
    background: linear-gradient(135deg,
        var(--bg-deep) 0%,
        rgba(0, 240, 255, 0.02) 100%
    );
    box-shadow:
        0 0 20px rgba(0, 0, 0, 0.3),
        inset 0 0 40px rgba(0, 240, 255, 0.02);
}

.learning-status-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
        transparent,
        var(--cyan) 20%,
        var(--magenta) 80%,
        transparent
    );
}

/* === Pulsing Learning Icon === */
.status-icon.learning {
    text-shadow: 0 0 20px var(--orange);
}

.status-icon.operational {
    text-shadow: 0 0 25px var(--green), 0 0 40px var(--green);
}

/* === Progress Bar Enhancement === */
.progress-bar {
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    animation: progress-shine 2s linear infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* === Section Divider Enhancement === */
.section-divider::before,
.section-divider::after {
    background: linear-gradient(90deg,
        transparent,
        var(--cyan) 30%,
        var(--magenta) 70%,
        transparent
    );
    height: 2px;
}

.divider-text {
    text-shadow:
        0 0 15px var(--cyan),
        0 0 30px rgba(0, 240, 255, 0.3);
}

/* === Back Link Enhancement === */
.back-link {
    position: relative;
    overflow: hidden;
}

.back-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.2), transparent);
    transition: left 0.4s ease;
}

.back-link:hover::before {
    left: 100%;
}

/* === SSH/Scanner Status Dots Enhancement === */
.status-dot.scanning {
    box-shadow:
        0 0 10px var(--orange),
        0 0 20px var(--orange),
        0 0 30px rgba(255, 136, 0, 0.5);
}

/* === Form Inputs Enhancement === */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow:
        0 0 15px rgba(0, 240, 255, 0.3),
        0 0 30px rgba(0, 240, 255, 0.1);
}

/* === Modal Enhancement === */
.modal-content {
    box-shadow:
        0 0 40px rgba(0, 240, 255, 0.3),
        0 0 80px rgba(0, 240, 255, 0.1),
        inset 0 0 40px rgba(0, 240, 255, 0.03);
}

/* === Empty State Enhancement === */
.empty-state {
    position: relative;
    padding: 3rem;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border: 1px dashed var(--border-color);
    border-radius: 50%;
    opacity: 0.3;
}

/* === Learning Stats Enhancement === */
.learning-stats .stat-item {
    position: relative;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 240, 255, 0.02));
    border: 1px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.learning-stats .stat-item:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.learning-stats .stat-value {
    text-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
}

/* === SSH Key Status Panel Enhancement === */
.ssh-key-status-panel {
    position: relative;
    background: linear-gradient(135deg, var(--bg-deep) 0%, rgba(0, 240, 255, 0.02) 100%);
}

.ssh-key-status-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), var(--magenta), transparent);
}

/* === Scanner Config Panel Enhancement === */
.scanner-config-panel {
    position: relative;
    background: linear-gradient(135deg, var(--bg-deep) 0%, rgba(0, 240, 255, 0.02) 100%);
}

.scanner-config-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
