/* ═══════════════════════════════════════════════════════════
   NEXUS DESIGN SYSTEM - MISSION: DEEP NEBULA & WIREFRAME HUD (V2.0)
   Target: High Contrast, Wireframe Hexagons, Deep Atmosphere
   ═══════════════════════════════════════════════════════════ */

:root {
    /* ══ BASE COLORS (DEEP NEBULA) ══ */
    --nx-bg-void: #050A14;
    --nx-nebula-purple: #2b003e;

    /* ══ NEON PALETTE ══ */
    --nx-cyan: #00FFFF;
    --nx-magenta: #D500F9;
    --nx-green: #00FF00;
    --nx-orange: #FF4500;
    --nx-purple: #9D00FF;

    /* ══ TEXT ══ */
    --nx-text-main: #FFFFFF;
    --nx-text-sub: #E0E0E0;

    /* ══ SHAPES ══ */
    --nx-hex-clip: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* ═══════════════════════════════════════════════════════════
   1. ATMOSPHERE (DEEP NEBULA)
   ═══════════════════════════════════════════════════════════ */

body,
html {
    background-color: var(--nx-bg-void) !important;
    /* Deep Nebula Gradient: Purple Top-Left -> Deep Blue/Black */
    background: radial-gradient(circle at 0% 0%, var(--nx-nebula-purple) 0%, var(--nx-bg-void) 60%, #000000 100%) !important;
    background-attachment: fixed;
    color: var(--nx-text-main) !important;
    font-family: 'Segoe UI', system-ui, sans-serif !important;
    font-weight: 600;
    min-height: 100vh;
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   2. HEADER & NAVIGATION (HIGH CONTRAST)
   ═══════════════════════════════════════════════════════════ */

/* Navbar Container */
.nasa-topbar {
    background: rgba(5, 10, 20, 0.8);
    /* Slight dark tint for readability */
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Logo/Brand Gradient */
.navbar-brand .text-gradient {
    background: linear-gradient(90deg, var(--nx-cyan), var(--nx-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(213, 0, 249, 0.3);
    /* Glow to pop against purple */
}

/* "Olá, Admin" - CRITICAL FIX */
.navbar-text,
.navbar-text.text-muted {
    color: #FFFFFF !important;
    /* Force Pure White */
    opacity: 1 !important;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Button "Voltar ao Painel" */
.btn-back-nasa {
    background: transparent !important;
    border: 1px solid var(--nx-cyan) !important;
    color: var(--nx-cyan) !important;
    font-weight: 700;
    text-transform: uppercase;
    padding: 8px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.btn-back-nasa:hover {
    background: rgba(0, 255, 255, 0.2) !important;
    /* Soft Cyan Fill */
    color: #fff !important;
    box-shadow: 0 0 20px var(--nx-cyan);
    text-shadow: 0 0 5px var(--nx-cyan);
}

/* ═══════════════════════════════════════════════════════════
   3. WIREFRAME HEXAGONAL CARDS
   ═══════════════════════════════════════════════════════════ */

.modules-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 40px 20px;
}

.module-card {
    position: relative;
    width: 260px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    text-decoration: none;
    transition: all 0.4s ease;

    /* HEXAGON SHAPE */
    clip-path: var(--nx-hex-clip);

    /* WIREFRAME BACKGROUND (Transparent) */
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);

    /* BORDER HACK (Thin Glowing Line) */
    /* Note: clip-path cuts off borders, so we use an inset shadow or a pseudo-element trick. 
       For true wireframe with clip-path, we need a container or SVG. 
       Here we use a pseudo-element slightly smaller to create a 'border' look or just a glow. */
}

/* The Glowing Border Effect */
.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: transparent;
    /* Simulate border via inset shadow since clip-path hides real borders */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

/* Category Glow (Inner) */
.module-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background: radial-gradient(circle at center, rgba(var(--card-color-rgb), 0.2), transparent 70%);
    opacity: 0.5;
    transition: all 0.4s ease;
}

/* Hover Effects - ACTIVE HOLOGRAM */
.module-card:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.08);
}

.module-card:hover::before {
    /* Brighten the border */
    box-shadow: inset 0 0 0 2px var(--card-color), 0 0 20px var(--card-color);
}

.module-card:hover::after {
    opacity: 1;
    background: radial-gradient(circle at center, rgba(var(--card-color-rgb), 0.4), transparent 70%);
}

/* Icons - WHITE OUTLINE & FLOATING */
.module-card-icon {
    font-size: 3.5rem;
    color: #FFFFFF;
    /* Pure White */
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
    transition: all 0.4s ease;
}

.module-card:hover .module-card-icon {
    transform: translateY(-5px) scale(1.1);
    color: #FFFFFF;
    filter: drop-shadow(0 0 15px var(--card-color));
    /* Glow with category color */
}

/* Typography */
.module-card-title {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1);
}

.module-card-description {
    color: var(--nx-text-sub);
    font-size: 0.8rem;
    opacity: 0.8;
}

.module-card:hover .module-card-title {
    color: var(--card-color);
    text-shadow: 0 0 10px var(--card-color);
}

/* ═══════════════════════════════════════════════════════════
   4. COLOR CATEGORIES (RGB for opacity)
   ═══════════════════════════════════════════════════════════ */

/* Comunicação: Verde Neon */
.module-card-green {
    --card-color: var(--nx-green);
    --card-color-rgb: 0, 255, 0;
}

/* Administração: Azul/Ciano */
.module-card-blue,
.module-card-cyan {
    --card-color: var(--nx-cyan);
    --card-color-rgb: 0, 255, 255;
}

/* Prazos: Laranja/Vermelho */
.module-card-red,
.module-card-amber {
    --card-color: var(--nx-orange);
    --card-color-rgb: 255, 69, 0;
}

/* Jurídico: Roxo */
.module-card-purple,
.module-card-gold {
    --card-color: var(--nx-purple);
    --card-color-rgb: 157, 0, 255;
}

/* ═══════════════════════════════════════════════════════════
   5. TYPOGRAPHY GLOBAL
   ═══════════════════════════════════════════════════════════ */

h1,
h2,
h3 {
    color: #FFFFFF !important;
}

.display-4 {
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    /* Color handled by inline style or context, defaulting to white with shadow */
    text-shadow: 0 0 10px currentColor;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--nx-cyan);
}

/* ═══════════════════════════════════════════════════════════
   6. RESPONSIVE DATA GRID (MOBILE FIRST)
   ═══════════════════════════════════════════════════════════ */

.doc-grid-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    /* Name, Date, Visible, Actions */
    gap: 15px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 700;
    color: var(--nx-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doc-grid-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 15px;
    padding: 20px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
}

.doc-grid-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* MOBILE CARD TRANSFORMATION (< 768px) */
@media (max-width: 768px) {
    .doc-grid-header {
        display: none;
        /* Hide header on mobile */
    }

    .doc-grid-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        background: rgba(255, 255, 255, 0.03);
        margin-bottom: 15px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        padding: 20px;
        position: relative;
    }

    /* Icon & Name Grouping */
    .doc-cell-name {
        font-size: 1.1rem;
        font-weight: 700;
        color: #fff;
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* Labels for mobile context */
    .doc-cell-date::before {
        content: "Enviado em: ";
        color: var(--nx-text-sub);
    }

    .doc-cell-visible::before {
        content: "Visível: ";
        color: var(--nx-text-sub);
    }

    .doc-cell-actions {
        width: 100%;
        display: flex;
        justify-content: space-between;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .btn-action-mobile {
        flex: 1;
        margin: 0 5px;
        padding: 10px;
        border-radius: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════
   7. NEON UPLOAD ZONE
   ═══════════════════════════════════════════════════════════ */

.upload-zone {
    position: relative;
    border: 2px dashed var(--nx-cyan);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    background: rgba(0, 255, 255, 0.02);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
}

.upload-zone:hover {
    background: rgba(0, 255, 255, 0.05);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.1);
}

.upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-icon {
    font-size: 3rem;
    color: var(--nx-cyan);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px var(--nx-cyan));
    animation: floatIcon 3s ease-in-out infinite;
}

.upload-text {
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.upload-subtext {
    color: var(--nx-text-sub);
    font-size: 0.9rem;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Custom Select */
.nexus-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--nx-cyan);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    width: 100%;
}

.nexus-btn-full {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(90deg, rgba(0, 255, 255, 0.1), rgba(0, 255, 255, 0.3));
    border: 1px solid var(--nx-cyan);
    color: #fff;
    transition: all 0.3s;
}

.nexus-btn-full:hover {
    background: var(--nx-cyan);
    color: #000;
    box-shadow: 0 0 20px var(--nx-cyan);
}

/* ═══════════════════════════════════════════════════════════
   8. FORM UI - DATA ENTRY TERMINAL (SCIFI INPUTS)
   ═══════════════════════════════════════════════════════════ */

/* Container Spacing */
.nexus-form-container {
    padding: 30px;
    background: rgba(5, 10, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 30px;
}

/* DIGITAL INPUTS (No Box, Just Data) */
.digital-input {
    background: rgba(0, 20, 40, 0.3);
    border: none;
    border-bottom: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 4px 4px 0 0;
    color: #fff !important;
    padding: 15px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.digital-input:focus {
    background: rgba(0, 20, 40, 0.5);
    border-bottom-color: var(--nx-cyan);
    box-shadow: 0 4px 10px rgba(0, 255, 255, 0.1);
    outline: none;
}

/* Labels as Technical Tags */
.digital-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--nx-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    opacity: 0.8;
}

/* CYBER SWITCH (Toggle) */
.cyber-switch-container {
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.cyber-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cyber-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Active State handled via JS or Checkbox sibling */
.cyber-switch.active {
    background: rgba(0, 255, 0, 0.2);
    border-color: var(--nx-green);
    box-shadow: 0 0 15px var(--nx-green);
}

.cyber-switch.active::after {
    transform: translateX(30px);
    background: var(--nx-green);
    box-shadow: 0 0 10px var(--nx-green);
}

/* EXECUTION BAR (Submit Button) */
.execution-bar {
    width: 100%;
    padding: 20px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    border: 1px solid var(--nx-cyan);
    color: var(--nx-cyan);
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.execution-bar:hover {
    background: linear-gradient(90deg, transparent, var(--nx-cyan), transparent);
    color: #000;
    letter-spacing: 4px;
    box-shadow: 0 0 30px var(--nx-cyan);
}

/* RESPONSIVE FORM LAYOUT */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
        /* Stack everything */
    }

    .nexus-form-container {
        padding: 20px;
    }

    .digital-input {
        min-height: 50px;
        /* Touch friendly */
    }
}

/* ═══════════════════════════════════════════════════════════
   9. MODULES: TACTICAL TEAM & SCANNERS
   ═══════════════════════════════════════════════════════════ */

/* TACTICAL CARDS (Lawyer Selection) */
.tactical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.tactical-card {
    position: relative;
    background: rgba(0, 20, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tactical-card:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.3);
}

/* Hidden Checkbox Logic */
.tactical-check {
    display: none;
}

.tactical-check:checked+.tactical-card {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--nx-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.tactical-check:checked+.tactical-card .tactical-icon {
    color: var(--nx-cyan);
    text-shadow: 0 0 10px var(--nx-cyan);
}

.tactical-icon {
    font-size: 1.5rem;
    color: var(--nx-text-sub);
    transition: color 0.3s;
}

.tactical-info {
    display: flex;
    flex-direction: column;
}

.tactical-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.tactical-role {
    font-size: 0.75rem;
    color: var(--nx-text-sub);
    text-transform: uppercase;
}

/* CPF SCANNER & INPUT GROUPS */
.input-group-nexus {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-group-nexus .digital-input {
    border-radius: 4px 0 0 0;
    /* Corner adjustment */
    border-right: none;
}

.btn-scanner {
    background: rgba(0, 255, 255, 0.1);
    border: none;
    border-bottom: 2px solid var(--nx-cyan);
    color: var(--nx-cyan);
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-scanner:hover {
    background: var(--nx-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--nx-cyan);
}

.btn-scanner:active {
    transform: scale(0.95);
}

/* Loading Spinner for Scanner */
@keyframes spin {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cyber-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Active State handled via JS or Checkbox sibling */
.cyber-switch.active {
    background: rgba(0, 255, 0, 0.2);
    border-color: var(--nx-green);
    box-shadow: 0 0 15px var(--nx-green);
}

.cyber-switch.active::after {
    transform: translateX(30px);
    background: var(--nx-green);
    box-shadow: 0 0 10px var(--nx-green);
}

/* EXECUTION BAR (Submit Button) */
.execution-bar {
    width: 100%;
    padding: 20px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    border: 1px solid var(--nx-cyan);
    color: var(--nx-cyan);
    font-size: 1.2rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.execution-bar:hover {
    background: linear-gradient(90deg, transparent, var(--nx-cyan), transparent);
    color: #000;
    letter-spacing: 4px;
    box-shadow: 0 0 30px var(--nx-cyan);
}

/* RESPONSIVE FORM LAYOUT */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

@media (max-width: 992px) {

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
        /* Stack everything */
    }

    .nexus-form-container {
        padding: 20px;
    }

    .digital-input {
        min-height: 50px;
        /* Touch friendly */
    }
}

/* ═══════════════════════════════════════════════════════════
   9. MODULES: TACTICAL TEAM & SCANNERS
   ═══════════════════════════════════════════════════════════ */

/* TACTICAL CARDS (Lawyer Selection) */
.tactical-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.tactical-card {
    position: relative;
    background: rgba(0, 20, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tactical-card:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.3);
}

/* Hidden Checkbox Logic */
.tactical-check {
    display: none;
}

.tactical-check:checked+.tactical-card {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--nx-cyan);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
}

.tactical-check:checked+.tactical-card .tactical-icon {
    color: var(--nx-cyan);
    text-shadow: 0 0 10px var(--nx-cyan);
}

.tactical-icon {
    font-size: 1.5rem;
    color: var(--nx-text-sub);
    transition: color 0.3s;
}

.tactical-info {
    display: flex;
    flex-direction: column;
}

.tactical-name {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.tactical-role {
    font-size: 0.75rem;
    color: var(--nx-text-sub);
    text-transform: uppercase;
}

/* CPF SCANNER & INPUT GROUPS */
.input-group-nexus {
    display: flex;
    align-items: stretch;
    position: relative;
}

.input-group-nexus .digital-input {
    border-radius: 4px 0 0 0;
    /* Corner adjustment */
    border-right: none;
}

.btn-scanner {
    background: rgba(0, 255, 255, 0.1);
    border: none;
    border-bottom: 2px solid var(--nx-cyan);
    color: var(--nx-cyan);
    padding: 0 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.btn-scanner:hover {
    background: var(--nx-cyan);
    color: #000;
    box-shadow: 0 0 15px var(--nx-cyan);
}

.btn-scanner:active {
    transform: scale(0.95);
}

/* Loading Spinner for Scanner */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.bi-arrow-repeat.spinning {
    animation: spin 1s linear infinite;
}

/* ═══════════════════════════════════════════════════════════
   10. TACTICAL TEAM MODAL (LIST VIEW)
   ═══════════════════════════════════════════════════════════ */

/* Modal Overlay */
.tactical-modal-overlay {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.tactical-modal-overlay.active {
    display: flex;
}

/* Modal Content */
.tactical-modal {
    background: rgba(5, 10, 20, 0.95);
    border: 1px solid var(--nx-cyan);
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal Header */
.tactical-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 255, 255, 0.05);
}

.tactical-modal-title {
    color: var(--nx-cyan);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
}

.btn-close-modal {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.btn-close-modal:hover {
    color: var(--nx-orange);
}

/* Modal Body (Scrollable List) */
.tactical-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* List Item */
.tactical-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.tactical-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tactical-list-item.selected {
    border-color: var(--nx-cyan);
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
}

.tactical-lawyer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tactical-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nx-cyan);
    border: 1px solid rgba(0, 255, 255, 0.3);
    font-size: 1.2rem;
}

.tactical-details {
    display: flex;
    flex-direction: column;
}

.tactical-name {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
}

.tactical-oab {
    color: var(--nx-text-sub);
    font-size: 0.75rem;
}

/* Action Button inside List */
.btn-toggle-lawyer {
    background: transparent;
    border: 1px solid var(--nx-text-sub);
    color: var(--nx-text-sub);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.tactical-list-item.selected .btn-toggle-lawyer {
    border-color: var(--nx-cyan);
    background: var(--nx-cyan);
    color: #000;
    font-weight: 700;
}

/* Main Button to Open Modal */
.btn-manage-team {
    width: 100%;
    padding: 15px;
    background: rgba(0, 20, 40, 0.6);
    border: 1px dashed var(--nx-cyan);
    color: var(--nx-cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    font-weight: 600;
}

.btn-manage-team:hover {
    background: rgba(0, 255, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
    color: #fff;
}

/* Selected Team Summary (Visible on Form) */
.selected-team-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    min-height: 30px;
}

.summary-chip {
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid var(--nx-cyan);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.summary-chip i {
    color: var(--nx-cyan);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

    /* ═══════════════════════════════════════════════════════════
   11. NEON INPUTS & TABLES (DEADLINES MODULE)
   ═══════════════════════════════════════════════════════════ */

    /* NEON INPUT (Translucent + Cyan Border) */
    .neon-input {
        background: rgba(255, 255, 255, 0.05);
        border: none;
        border-bottom: 1px solid var(--nx-cyan);
        color: #fff !important;
        padding: 12px 15px;
        border-radius: 4px 4px 0 0;
        transition: all 0.3s ease;
        width: 100%;
    }

    .neon-input:focus {
        background: rgba(0, 255, 255, 0.1);
        box-shadow: 0 4px 15px rgba(0, 255, 255, 0.1);
        outline: none;
    }

    .neon-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    /* NEXUS TABLE (No Borders, Neon Rows) */
    .table-nexus {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 10px;
        /* Space between rows */
        color: #fff;
    }

    .table-nexus thead th {
        background: rgba(0, 255, 255, 0.1);
        color: var(--nx-cyan);
        text-transform: uppercase;
        letter-spacing: 1px;
        border: none;
        padding: 15px;
        font-weight: 700;
    }

    .table-nexus tbody tr {
        background: rgba(255, 255, 255, 0.02);
        transition: all 0.3s;
    }

    .table-nexus tbody tr:hover {
        background: rgba(255, 255, 255, 0.05);
        transform: scale(1.01);
    }

    .table-nexus td {
        border: none;
        border-bottom: 1px solid rgba(0, 255, 255, 0.2);
        padding: 15px;
        vertical-align: middle;
    }

    /* MOBILE TABLE CARDS */
    @media (max-width: 768px) {
        .table-nexus thead {
            display: none;
        }

        .table-nexus tbody tr {
            display: flex;
            flex-direction: column;
            background: rgba(0, 20, 40, 0.6);
            border: 1px solid rgba(0, 255, 255, 0.2);
            border-radius: 10px;
            margin-bottom: 15px;
            padding: 15px;
        }

        .table-nexus td {
            border: none;
            padding: 5px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .table-nexus td::before {
            content: attr(data-label);
            font-weight: 700;
            color: var(--nx-cyan);
            margin-right: 10px;
            text-transform: uppercase;
            font-size: 0.8rem;
        }
    }

    /* GLOW BUTTON */
    .btn-glow {
        background: linear-gradient(90deg, rgba(0, 255, 255, 0.2), rgba(0, 255, 255, 0.4));
        border: 1px solid var(--nx-cyan);
        color: #fff;
        text-transform: uppercase;
        font-weight: 700;
        padding: 10px 20px;
        border-radius: 5px;
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
        transition: all 0.3s;
        width: auto;
    }

    .btn-glow:hover {}

    /* Action Button inside List */
    .btn-toggle-lawyer {
        background: transparent;
        border: 1px solid var(--nx-text-sub);
        color: var(--nx-text-sub);
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 0.75rem;
        text-transform: uppercase;
        cursor: pointer;
        transition: all 0.3s;
    }

    .tactical-list-item.selected .btn-toggle-lawyer {
        border-color: var(--nx-cyan);
        background: var(--nx-cyan);
        color: #000;
        font-weight: 700;
    }

    /* Main Button to Open Modal */
    .btn-manage-team {
        width: 100%;
        padding: 15px;
        background: rgba(0, 20, 40, 0.6);
        border: 1px dashed var(--nx-cyan);
        color: var(--nx-cyan);
        text-transform: uppercase;
        letter-spacing: 1px;
        cursor: pointer;
        transition: all 0.3s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        border-radius: 8px;
        font-weight: 600;
    }

    .btn-manage-team:hover {
        background: rgba(0, 255, 255, 0.1);
        box-shadow: 0 0 15px rgba(0, 255, 255, 0.2);
        color: #fff;
    }

    /* Selected Team Summary (Visible on Form) */
    .selected-team-summary {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 15px;
        min-height: 30px;
    }

    .summary-chip {
        background: rgba(0, 255, 255, 0.1);
        border: 1px solid var(--nx-cyan);
        color: #fff;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 0.85rem;
        display: flex;
        align-items: center;
        gap: 8px;
        animation: fadeIn 0.3s ease;
    }

    .summary-chip i {
        color: var(--nx-cyan);
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(5px);
            margin-top: 10px;
        }
    }

    /* ═══════════════════════════════════════════════════════════
   12. NAVIGATION & UTILITIES (FIXES)
   ═══════════════════════════════════════════════════════════ */

    /* Back Button (NASA Style) */
    .btn-back-nasa {
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.8);
        border: 1px solid rgba(255, 255, 255, 0.1);
        padding: 8px 20px;
        border-radius: 4px;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 0.9rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        transition: all 0.3s ease;
    }

    .btn-back-nasa:hover {
        background: rgba(0, 255, 255, 0.1);
        color: var(--nx-cyan);
        border-color: var(--nx-cyan);
        box-shadow: 0 0 10px rgba(0, 255, 255, 0.1);
    }

    /* Ensure btn-glow is not white */
    .btn-glow {
        background: linear-gradient(90deg, rgba(0, 20, 40, 0.8), rgba(0, 255, 255, 0.2)) !important;
        color: #fff !important;
        border: 1px solid var(--nx-cyan) !important;
    }

    .btn-glow:hover {
        background: var(--nx-cyan) !important;
        color: #000 !important;
    }