/* ==========================================================================
   NEXUS DATA X - MODO RED / GRAFO (LINK ANALYSIS 360°)
   Estilos Tácticos Neón Cyberpunk para Análisis de Red y Vínculos
   ========================================================================== */

#view-modo-red.view-section {
    padding: 16px 20px !important;
    height: calc(100vh - 70px) !important;
    overflow: hidden !important;
    box-sizing: border-box;
}

.graph-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #090e1b;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 16px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.graph-select-box {
    position: relative;
    min-width: 95px;
}

.graph-select-box select {
    width: 100%;
    background: #0d1527;
    border: 1px solid rgba(234, 179, 8, 0.45);
    border-radius: 8px;
    color: #fef08a;
    font-weight: 800;
    font-size: 13px;
    padding: 9px 28px 9px 12px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: 0.2s ease;
}

.graph-select-box select:focus {
    border-color: #facc15;
    box-shadow: 0 0 14px rgba(250, 204, 21, 0.35);
}

.graph-select-box::after {
    content: '\ea4a';
    font-family: 'boxicons' !important;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #facc15;
    pointer-events: none;
    font-size: 14px;
}

.graph-input-group {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.graph-search-input {
    width: 100%;
    background: #060a15;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #f8fafc;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 14px;
    outline: none;
    transition: 0.2s ease;
    box-sizing: border-box;
}

.graph-search-input:focus {
    border-color: #facc15;
    background: #080e1e;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.25);
}

.graph-btn-search {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    color: #050811;
    border: none;
    border-radius: 8px;
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 0 16px rgba(250, 204, 21, 0.4);
    transition: 0.2s ease;
    flex-shrink: 0;
}

.graph-btn-search:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 22px rgba(250, 204, 21, 0.6);
}

.graph-btn-top-pdf {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: 0.2s;
    flex-shrink: 0;
}

.graph-btn-top-pdf:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.graph-btn-icon {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 17px;
    transition: 0.15s;
    flex-shrink: 0;
}

.graph-btn-icon:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* SUBNAV TABS */
.graph-subnav-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.graph-subnav-tabs::-webkit-scrollbar {
    height: 3px;
}
.graph-subnav-tabs::-webkit-scrollbar-thumb {
    background: rgba(234, 179, 8, 0.3);
    border-radius: 2px;
}

.graph-tab-pill {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 700;
    padding: 7px 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: 0.2s ease;
    user-select: none;
}

.graph-tab-pill:hover {
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.03);
}

.graph-tab-pill.active {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.16) 0%, rgba(202, 138, 4, 0.08) 100%);
    border: 1.5px solid #eab308;
    color: #fef08a;
    box-shadow: 0 0 14px rgba(234, 179, 8, 0.25);
}

/* WORKSPACE GRID */
.graph-workspace {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    height: calc(100vh - 200px);
    min-height: 580px;
    box-sizing: border-box;
}

/* CANVAS WRAPPER */
.graph-canvas-wrapper {
    position: relative;
    background: #03060f;
    background-image: 
        radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 28px 28px, 112px 112px, 112px 112px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 8px 30px rgba(0, 0, 0, 0.5);
}

#graph-vis-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* SCANNING OVERLAY */
.graph-scanning-overlay {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 16, 32, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid #eab308;
    border-radius: 20px;
    padding: 8px 18px;
    color: #fef08a;
    font-size: 12px;
    font-weight: 800;
    display: none;
    align-items: center;
    gap: 10px;
    z-index: 20;
    box-shadow: 0 0 25px rgba(234, 179, 8, 0.35);
    pointer-events: none;
}

/* LEGEND */
.graph-legend {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(8, 12, 24, 0.90);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 16px;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    user-select: none;
}

.graph-legend-title {
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 8px;
}

.graph-legend-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.graph-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11.5px;
    color: #e2e8f0;
    font-weight: 600;
}

.graph-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
    flex-shrink: 0;
}

/* CONTROLS */
.graph-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(8, 12, 24, 0.90);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 4px;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.graph-ctrl-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: 0.15s;
}

.graph-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* RIGHT PANEL */
.graph-right-panel {
    background: #070b16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow-y: auto;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

.graph-right-panel::-webkit-scrollbar {
    width: 4px;
}
.graph-right-panel::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* PROFILE CARD */
.graph-profile-box {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.graph-avatar-halo {
    position: relative;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    margin-bottom: 12px;
}

.graph-avatar-halo img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2.5px solid #facc15;
    box-shadow: 0 0 20px rgba(250, 204, 21, 0.55);
}

.graph-profile-name {
    font-size: 15px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 4px;
}

.graph-profile-dni {
    font-size: 12px;
    font-weight: 800;
    color: #facc15;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.graph-profile-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    margin-bottom: 14px;
}

.graph-profile-row {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    justify-content: space-between;
    gap: 6px;
}

.graph-profile-row strong {
    color: #e2e8f0;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.graph-btn-fullprofile {
    width: 100%;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.45);
    color: #fef08a;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: 0.2s;
}

.graph-btn-fullprofile:hover {
    background: #eab308;
    color: #000;
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.4);
}

/* SUMMARY CARD */
.graph-summary-box {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
}

.graph-card-title {
    font-size: 12px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.graph-summary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.graph-summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
    font-weight: 700;
}

.graph-summary-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 900;
}

/* ACTIONS CARD */
.graph-actions-box {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
}

.graph-action-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    padding: 9px 12px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    transition: 0.2s;
    text-align: left;
}

.graph-action-btn:last-child {
    margin-bottom: 0;
}

.graph-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
}

.graph-action-btn i {
    font-size: 16px;
    color: #facc15;
}

/* RESPONSIVE */
@media (max-width: 1080px) {
    .graph-workspace {
        grid-template-columns: 1fr;
        height: auto;
    }
    .graph-canvas-wrapper {
        height: 520px;
    }
    .graph-right-panel {
        max-height: 400px;
    }
}
