/* Minimalist Cyber Security Theme CSS */
:root {
    --bg-main: #05070a;
    --card-bg: #0b0c10;
    --border-base: rgba(0, 242, 254, 0.09);
    --border-hover: rgba(0, 242, 254, 0.22);
    
    /* Neon Cyber Accents */
    --cyan: #00f2fe;
    --green: #00ff87;
    --red: #ff3e55;
    --yellow: #ffb300;
    
    /* Text Variables */
    --text-main: #e2e8f0;
    --text-muted: #64748b;
    --text-dim: #334155;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding: 1.5rem;
}

/* Hybrid Download Banner */
.hybrid-download-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0e1017;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.banner-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    color: var(--yellow);
    border: 1px solid rgba(255, 179, 0, 0.3);
    padding: 2px 6px;
    background: rgba(255, 179, 0, 0.05);
    border-radius: 2px;
    font-weight: 600;
}

.banner-text {
    color: var(--text-main);
}

.banner-links {
    display: flex;
    gap: 0.8rem;
}

.btn-banner {
    color: var(--cyan);
    border: 1px solid rgba(0, 242, 254, 0.3);
    padding: 3px 8px;
    text-decoration: none;
    font-size: 0.7rem;
    border-radius: 2px;
    transition: background 0.2s ease;
    background: rgba(0, 242, 254, 0.02);
}

.btn-banner:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--cyan);
}

/* Subtle Tech Scanline Overlay */
.cyber-scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%, 
        rgba(0, 0, 0, 0.12) 50%
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
}

.app-container {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* Header Styles */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: var(--card-bg);
    border: 1px solid var(--border-base);
    border-radius: 4px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tech-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cyan);
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.25);
    padding: 3px 8px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.title-meta h1 {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 400;
}

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

/* Cyber Button Styling */
.btn-primary {
    background: transparent;
    border: 1px solid var(--cyan);
    border-radius: 3px;
    padding: 0.7rem 1.4rem;
    color: var(--cyan);
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: rgba(0, 242, 254, 0.08);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.25);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    border-color: var(--text-dim);
    color: var(--text-muted);
    background: transparent;
    cursor: not-allowed;
    box-shadow: none;
}

/* Dashboard Grid Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
}

/* Minimalist Cyber Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-base);
    border-radius: 4px;
    padding: 1.2rem;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.card-header {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.card-tag {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

/* Grid Placements */
.health-card {
    grid-column: span 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.connection-card {
    grid-column: span 6;
}

.performance-card {
    grid-column: span 3;
}

.inventory-card {
    grid-column: span 12;
}

.vulnerabilities-card {
    grid-column: span 7;
}

.console-card {
    grid-column: span 5;
}

@media (max-width: 1024px) {
    .health-card, .connection-card, .performance-card, .vulnerabilities-card, .console-card {
        grid-column: span 12;
    }
}

/* Precise Circular Score Ring */
.health-score-container {
    position: relative;
    width: 180px;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-ring {
    position: absolute;
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.health-score-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.score-number {
    font-family: 'Fira Code', monospace;
    font-size: 3rem;
    font-weight: 500;
    color: #ffffff;
}

.score-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 1.5px;
}

/* Status Badges */
.safety-badge {
    font-family: 'Fira Code', monospace;
    padding: 0.3rem 0.8rem;
    border-radius: 2px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
    width: 100%;
}

.eval-secure {
    background: rgba(0, 255, 135, 0.04);
    color: var(--green);
    border-color: rgba(0, 255, 135, 0.2);
}

.eval-warning {
    background: rgba(255, 179, 0, 0.04);
    color: var(--yellow);
    border-color: rgba(255, 179, 0, 0.2);
}

.eval-danger {
    background: rgba(255, 62, 85, 0.04);
    color: var(--red);
    border-color: rgba(255, 62, 85, 0.2);
}

.eval-unknown {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--text-dim);
}

/* Telemetry Details Grid */
.telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 1.2rem;
}

.tel-item {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    padding-bottom: 0.4rem;
}

.tel-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.1rem;
}

.tel-value {
    font-size: 0.85rem;
    color: #ffffff;
}

.font-mono {
    font-family: 'Fira Code', monospace !important;
}

/* Performance Metrics Grid */
.perf-metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 2px;
    padding: 0.6rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.metric-indicator-label {
    font-family: 'Fira Code', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--cyan);
}

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

.metric-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #ffffff;
}

.metric-name {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Warnings Feed */
.warnings-feed {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 0.3rem;
}

.feed-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    text-align: center;
    color: var(--text-muted);
    border: 1px dashed var(--text-dim);
    border-radius: 2px;
}

.empty-icon {
    font-size: 0.8rem;
    color: var(--green);
    margin-bottom: 0.4rem;
}

.issue-item {
    background: rgba(255, 255, 255, 0.01);
    padding: 0.8rem;
    border-radius: 2px;
    border: 1px solid var(--text-dim);
}

.issue-item.issue-CRITICAL {
    border-color: rgba(255, 62, 85, 0.35);
    background: rgba(255, 62, 85, 0.02);
}

.issue-item.issue-WARNING {
    border-color: rgba(255, 179, 0, 0.35);
    background: rgba(255, 179, 0, 0.02);
}

.issue-item.issue-INFO {
    border-color: rgba(0, 242, 254, 0.35);
    background: rgba(0, 242, 254, 0.02);
}

.issue-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
}

.issue-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #ffffff;
}

.issue-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 5px;
    border-radius: 2px;
    border: 1px solid transparent;
}

.badge-CRITICAL {
    color: var(--red);
    border-color: rgba(255, 62, 85, 0.3);
}

.badge-WARNING {
    color: var(--yellow);
    border-color: rgba(255, 179, 0, 0.3);
}

.badge-INFO {
    color: var(--cyan);
    border-color: rgba(0, 242, 254, 0.3);
}

.issue-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
    line-height: 1.4;
}

.issue-remedy {
    font-size: 0.75rem;
    color: var(--text-main);
    border-top: 1px dotted rgba(255, 255, 255, 0.05);
    padding-top: 0.3rem;
}

/* Device Inventory Table */
.table-scroll-container {
    width: 100%;
    overflow-x: auto;
}

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

.inventory-table th {
    font-family: 'Fira Code', monospace;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    padding: 0.6rem;
    border-bottom: 1px solid var(--text-dim);
}

.inventory-table td {
    padding: 0.6rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 0.8rem;
    color: var(--text-main);
}

.table-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 1.5rem !important;
}

.role-badge {
    font-family: 'Fira Code', monospace;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 2px;
    border: 1px solid transparent;
}

.role-host {
    color: var(--green);
    border-color: rgba(0, 255, 135, 0.25);
    background: rgba(0, 255, 135, 0.02);
}

.role-gateway {
    color: var(--cyan);
    border-color: rgba(0, 242, 254, 0.25);
    background: rgba(0, 242, 254, 0.02);
}

.role-client {
    color: var(--text-muted);
    border-color: var(--text-dim);
    background: transparent;
}

/* Diagnostics Console Terminal */
.console-box {
    background: #020306;
    border: 1px solid var(--text-dim);
    border-radius: 2px;
    height: 250px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.75rem;
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.console-line {
    line-height: 1.4;
    word-break: break-all;
}

.system-line {
    color: var(--cyan);
}

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

.warning-line {
    color: var(--yellow);
}

.error-line {
    color: var(--red);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
