/* =========================================================
   PULSIDEV // NEXUS TACTICAL OPS CONSOLE
   Confidential Multi-App Central Command Center
   ========================================================= */

.nexus-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #06080d;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: var(--font-mono);
    color: #e2e8f0;
}

.nexus-container.hidden {
    display: none !important;
}

/* Header bar */
.nexus-topbar {
    background: #090d15;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.nexus-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nexus-badge {
    background: rgba(0, 240, 255, 0.1);
    border: 1px solid var(--color-cyan);
    color: var(--color-cyan);
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.nexus-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nexus-topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.btn-nexus-action {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-nexus-action:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-nexus-danger {
    color: var(--color-pink);
    border-color: rgba(255, 45, 117, 0.3);
    background: rgba(255, 45, 117, 0.06);
}

.btn-nexus-danger:hover {
    background: rgba(255, 45, 117, 0.15);
    border-color: var(--color-pink);
}

/* Secondary Navigation Tabs */
.nexus-nav {
    background: #0c111c;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    padding: 0 24px;
    overflow-x: auto;
}

.nexus-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 12px 18px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition-fast);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nexus-tab:hover {
    color: #fff;
}

.nexus-tab.active {
    color: var(--color-cyan);
    border-bottom-color: var(--color-cyan);
    background: rgba(0, 240, 255, 0.03);
}

/* Main workspace */
.nexus-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    background: #07090f;
}

/* Telemetry Cards Row */
.nexus-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.nexus-stat-card {
    background: #0d121c;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.nexus-stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: var(--stat-accent, var(--color-cyan));
    opacity: 0.7;
}

.nexus-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.nexus-stat-val {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 4px;
}

.nexus-stat-sub {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Panel Sections */
.nexus-tab-pane {
    display: none;
}

.nexus-tab-pane.active {
    display: block;
}

/* Table Style */
.nexus-table-wrap {
    background: #0c111a;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 16px;
}

.nexus-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    text-align: left;
}

.nexus-table th {
    background: #111724;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.nexus-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
}

.nexus-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.badge-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 600;
}

.badge-match {
    background: rgba(255, 45, 117, 0.15);
    color: #ff2d75;
    border: 1px solid rgba(255, 45, 117, 0.3);
}

.badge-pass {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
}

.badge-online {
    background: rgba(0, 255, 136, 0.12);
    color: var(--color-emerald);
    border: 1px solid rgba(0, 255, 136, 0.3);
}

.badge-offline {
    background: rgba(255, 45, 117, 0.1);
    color: var(--color-pink);
    border: 1px solid rgba(255, 45, 117, 0.25);
}

/* Chat Transcript Drawer Modal */
.nexus-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 10010;
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.nexus-drawer-backdrop.active {
    opacity: 1;
    pointer-events: all;
}

.nexus-drawer {
    width: 100%;
    max-width: 540px;
    height: 100%;
    background: #090d14;
    border-left: 1px solid rgba(0, 240, 255, 0.3);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.8);
}

.nexus-drawer-head {
    padding: 16px 20px;
    background: #0e1420;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nexus-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-msg {
    background: #111724;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    padding: 10px 14px;
}

.drawer-msg-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.drawer-msg-text {
    font-size: 0.82rem;
    color: #f1f5f9;
}

/* Quick links cards */
.nexus-app-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 16px;
}

.nexus-link-card {
    background: #0d121c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.nexus-link-card h4 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 6px;
}

.nexus-link-card p {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.nexus-btn-group {
    display: flex;
    gap: 10px;
}

@media (max-width: 1024px) {
    .nexus-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nexus-app-links-grid {
        grid-template-columns: 1fr;
    }
}
