/* ========================================
   QUANTUM THEME - SANTIAGO & ASSOCIADOS
   Padrão NASA • Neon Law • Global UI
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@600;800&display=swap');

:root {
    /* Paleta principal – igual Lista de Processos */
    --c-cyan: #00F0FF;
    --c-cyan-soft: rgba(0, 240, 255, 0.15);
    --c-blue-900: #050810;
    --c-text: #e6f6ff;

    --c-warning: #FFCC00;
    --c-danger: #FF3333;
    --c-success: #10B981;

    --radius: 16px;
    --shadow-cyan: 0 0 18px rgba(0, 240, 255, .5),
                   0 0 32px rgba(0, 240, 255, .25);
    --border-cyan: 1px solid rgba(0, 240, 255, 0.35);

    --font-title: 'Orbitron', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;

    --background-global-blue: radial-gradient(ellipse at center,
                                #0a0f1e 0%,
                                #050810 100%);
    --background-card-transp: rgba(0, 0, 0, .65);
    --background-input-dark: rgba(0, 0, 0, 0.6);

    --grid-line: rgba(0, 240, 255, 0.04);
}

/* ====================
   FUNDO GLOBAL + GRID
   ==================== */
html,
body {
    background: var(--background-global-blue) !important;
    background-attachment: fixed !important;
    color: var(--c-text) !important;
    font-family: var(--font-body) !important;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

#page-content-wrapper,
#wrapper,
.container,
.container-xxl,
main {
    background: transparent !important;
    position: relative;
    z-index: 1;
}

/* ====================
   TEXTO
   ==================== */
body * ,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
td,
th {
    color: var(--c-text) !important;
}

/* Título com glow (Lista de Processos) */
.text-gradient,
h2.text-gradient {
    color: #ffffff !important;
    font-weight: 700;
    text-shadow:
        0 0 18px rgba(162, 0, 255, 0.55),
        0 0 32px rgba(0, 240, 255, 0.35);
}

/* Santiago & Associados no topo / sidebar */
.sidebar-heading,
.sidebar-heading strong,
.sidebar-heading h3 {
    color: var(--c-cyan) !important;
    font-family: var(--font-title) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
}

/* ====================
   CARDS / PAINÉIS
   ==================== */
.card,
.bg-white,
.bg-surface,
.shadow-soft {
    background: var(--background-card-transp) !important;
    border: var(--border-cyan) !important;
    box-shadow: var(--shadow-cyan) !important;
    border-radius: var(--radius) !important;
    backdrop-filter: blur(12px);
}

.card-header {
    background: rgba(0, 240, 255, 0.08) !important;
    border-bottom: 1px solid var(--c-cyan);
    color: var(--c-cyan) !important;
}

/* ====================
   TECH-ICON-BOX
   ==================== */
.tech-icon-box {
    min-width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.45);
    border-radius: 10px;
    color: var(--c-cyan) !important;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.tech-icon-box:hover {
    background: var(--c-cyan-soft);
    border-color: var(--c-cyan);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-cyan);
}

.tech-icon-box.primary {
    border-color: var(--c-cyan);
    background: rgba(0, 240, 255, 0.18);
}

.tech-icon-box.danger {
    border-color: var(--c-danger);
    color: #ffc8c8 !important;
}

.tech-icon-box.danger:hover {
    background: rgba(255, 51, 51, 0.2);
    box-shadow: 0 0 15px rgba(255, 51, 51, 0.6);
}

.tech-icon-box.success {
    border-color: var(--c-success);
    color: #b7f6de !important;
}

.tech-icon-box.success:hover {
    background: rgba(16, 185, 129, 0.22);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6);
}

/* ====================
   FORMULÁRIOS
   ==================== */
.form-control,
.form-select,
input,
select,
textarea {
    background: var(--background-input-dark) !important;
    border: 1px solid rgba(0, 240, 255, 0.28) !important;
    color: var(--c-text) !important;
    border-radius: 10px !important;
    padding: 12px 15px !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--c-cyan) !important;
    box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.35) !important;
}

.form-label,
label {
    color: var(--c-cyan) !important;
    font-weight: 600;
}

.input-group-text {
    background: rgba(0, 0, 0, 0.7) !important;
    border-color: rgba(0, 240, 255, 0.3) !important;
    color: var(--c-cyan) !important;
}

/* ====================
   TABELAS
   ==================== */
.table {
    --bs-table-bg: transparent !important;
    --bs-table-color: var(--c-text) !important;
    --bs-table-border-color: rgba(0, 240, 255, 0.2) !important;
    --bs-table-hover-bg: rgba(0, 240, 255, 0.12) !important;
    background: rgba(5, 10, 20, 0.65) !important;
}

.table thead th {
    background: #050810 !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3) !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 14px 12px;
}

.table tbody tr:hover {
    background: rgba(0, 240, 255, 0.06) !important;
}

.table tbody td {
    color: var(--c-text) !important;
    padding: 12px;
}

/* ====================
   BOTÕES (inclui VOLTAR)
   ==================== */
.btn-primary,
.btn-accent,
.btn-nexus,
.btn-back-panel {
    background: transparent !important;
    border: 1px solid var(--c-cyan) !important;
    color: var(--c-cyan) !important;
    border-radius: 6px;
    padding: 8px 18px;
    font-weight: 600;
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.18) !important;
    transition: all 0.25s ease;
    text-decoration: none;
}

.btn-primary:hover,
.btn-accent:hover,
.btn-nexus:hover,
.btn-back-panel:hover {
    background: rgba(0, 240, 255, 0.12) !important;
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.6) !important;
    transform: translateY(-2px);
    color: var(--c-cyan) !important;
}

/* ====================
   SIDEBAR (base, mas refinado no sidebar.css)
   ==================== */
#sidebar-wrapper {
    background: rgba(2, 10, 25, 0.95) !important;
    border-right: var(--border-cyan) !important;
}

.list-group-item {
    background: transparent !important;
    color: var(--c-text) !important;
    border: none !important;
    border-left: 3px solid transparent !important;
}

.list-group-item:hover {
    background: rgba(0, 240, 255, 0.12) !important;
    border-left-color: var(--c-cyan) !important;
}

.list-group-item.active {
    background: rgba(0, 240, 255, 0.20) !important;
    color: var(--c-cyan) !important;
    border-left-color: var(--c-cyan) !important;
    box-shadow: inset 4px 0 0 var(--c-cyan);
    font-weight: 700;
}

/* ====================
   NAVBAR
   ==================== */
.navbar,
.nasa-topbar {
    background: rgba(0, 0, 0, 0.75) !important;
    border-bottom: 1px solid rgba(0, 240, 255, 0.3) !important;
    backdrop-filter: blur(10px);
}

.navbar-brand,
.navbar-brand h3 {
    color: var(--c-cyan) !important;
    font-family: var(--font-title);
    font-weight: 700 !important;
}

.navbar a {
    color: var(--c-text) !important;
}

.navbar a:hover {
    color: var(--c-cyan) !important;
}

/* ====================
   ALERTS & BADGES / PILLS
   ==================== */
.alert {
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border-width: 2px !important;
}

.alert-info {
    background: rgba(0, 240, 255, 0.18) !important;
    border-color: var(--c-cyan) !important;
}

/* Mesmas cores dos avisos da Lista de Processos */
.pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.pill-warning {
    background: rgba(255, 204, 0, 0.12) !important;
    color: var(--c-warning) !important;
    border: 1px solid var(--c-warning);
}

.pill-danger {
    background: rgba(255, 51, 51, 0.12) !important;
    color: var(--c-danger) !important;
    border: 1px solid var(--c-danger);
}

.pill-info {
    background: rgba(0, 240, 255, 0.12) !important;
    color: var(--c-cyan) !important;
    border: 1px solid var(--c-cyan);
}

.pill-success {
    background: rgba(16, 185, 129, 0.12) !important;
    color: var(--c-success) !important;
    border: 1px solid var(--c-success);
}

/* ====================
   PAGINAÇÃO
   ==================== */
.pagination .page-link {
    background: rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(0, 240, 255, 0.3) !important;
    color: var(--c-text) !important;
    border-radius: 6px;
}

.pagination .page-link:hover {
    background: rgba(0, 240, 255, 0.14) !important;
    border-color: var(--c-cyan) !important;
    box-shadow: 0 0 14px rgba(0, 240, 255, 0.5);
}

.pagination .page-item.active .page-link {
    background: var(--c-cyan) !important;
    color: var(--c-blue-900) !important;
    font-weight: 700;
}

/* ====================
   NOTICE BAR (Notificações de Prazos)
   ==================== */
.notice-bar {
    background: #050810 !important;
    border-radius: 12px;
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-left: 4px solid #ff8800;
    padding: 18px;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.8);
}

/* ====================
   SCROLLBAR
   ==================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 10, 26, 0.7);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--c-cyan), #00b6ff);
    border-radius: 8px;
}

/* ========================================
   FORMULÁRIOS HUD - BLUE TECH GLASS
   ======================================== */

.form-glass-container {
    background: rgba(15, 23, 42, 0.7) !important;
    border: 1px solid rgba(56, 189, 248, 0.18) !important;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
}

/* Tech Inputs */
.tech-input {
    background-color: rgba(0, 0, 0, 0.25) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    height: 50px;
    border-radius: 8px !important;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    padding: 0 1rem;
}

.tech-input:focus {
    background-color: rgba(0, 0, 0, 0.45) !important;
    border-color: var(--c-cyan) !important;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.25) !important;
    outline: none;
}

.tech-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

textarea.tech-input {
    height: auto;
    min-height: 100px;
    padding: 1rem;
}

select.tech-input {
    cursor: pointer;
}

/* Tech Labels */
.tech-label {
    color: #94a3b8;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

/* ========================================
   SELETOR DE ADVOGADOS (GRID)
   ======================================== */

.lawyer-checkbox {
    display: none;
}

.lawyer-tile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #cbd5e1;
    min-width: 180px;
    font-size: 0.9rem;
}

.lawyer-tile:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
}

.lawyer-checkbox:checked + .lawyer-tile {
    background: rgba(0, 240, 255, 0.1);
    border-color: var(--c-cyan);
    color: #fff;
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
    font-weight: 600;
}

.lawyer-tile .check-icon {
    margin-left: auto;
    opacity: 0;
    color: var(--c-cyan);
    transition: opacity 0.2s;
    font-size: 1.1rem;
}

.lawyer-checkbox:checked + .lawyer-tile .check-icon {
    opacity: 1;
}

.lawyer-tile .lawyer-icon {
    font-size: 1.2rem;
    color: var(--c-cyan);
    opacity: 0.7;
}

.lawyer-checkbox:checked + .lawyer-tile .lawyer-icon {
    opacity: 1;
}

.lawyer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 1rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .tech-icon-box {
        min-width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lawyer-grid {
        grid-template-columns: 1fr;
    }
}
