/* ==========================================================================
   NexoADV v3.0.0 — Design System Corporativo Jurídico Avançado (Sem Neon)
   ========================================================================== */
:root {
    --nexo-bg: #F0F4F9;
    --nexo-navy: #0B1B3D;
    --nexo-navy-deep: #07132E;
    --nexo-blue: #007AFF;
    --nexo-blue-dark: #0056D2;
    --nexo-green: #00BA4A;
    --nexo-orange: #FF8800;
    --nexo-purple: #7C3AED;
    --nexo-yellow: #FFB703;
    --nexo-red: #FF3B30;
    --nexo-cyan: #0EA5E9;
    --nexo-white: #FFFFFF;
    --nexo-graphite: #1E293B;
    --nexo-slate: #64748B;
    --nexo-border: rgba(15, 23, 42, 0.08);
    --nexo-glass: rgba(255, 255, 255, 0.86);
    --nexo-shadow: 0 10px 30px -8px rgba(11, 27, 61, 0.10), 0 2px 6px rgba(11, 27, 61, 0.04);
    --nexo-shadow-hover: 0 18px 36px -10px rgba(11, 27, 61, 0.16);
    --nexo-radius: 16px;
}

[data-theme="dark"] {
    --nexo-bg: #0F172A;
    --nexo-white: #1E293B;
    --nexo-graphite: #F1F5F9;
    --nexo-slate: #94A3B8;
    --nexo-glass: rgba(30, 41, 59, 0.88);
    --nexo-border: rgba(255, 255, 255, 0.09);
    --nexo-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--nexo-bg);
    color: var(--nexo-graphite);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Cards & Glassmorphism 3D ---------- */
@keyframes nexoFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nexo-card {
    background: var(--nexo-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--nexo-radius);
    box-shadow: 0 12px 28px -8px rgba(11, 27, 61, 0.12),
                0 3px 8px rgba(11, 27, 61, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.75);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    animation: nexoFadeUp 0.28s ease-out both;
}

[data-theme="dark"] .nexo-card {
    border-color: rgba(255, 255, 255, 0.10);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nexo-card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 38px -10px rgba(11, 27, 61, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ---------- Botões Corporativos Suaves (Mesmo Efeito Clean do Exportar DRE) ---------- */
.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 3px 0 rgba(11, 27, 61, 0.08), 0 4px 10px -2px rgba(11, 27, 61, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 rgba(11, 27, 61, 0.10), 0 8px 16px -4px rgba(11, 27, 61, 0.14);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 1px 0 rgba(11, 27, 61, 0.08);
}

.btn-primary {
    background-color: #007AFF;
    border-color: #007AFF;
    color: #FFFFFF;
}
.btn-primary:hover {
    background-color: #0066D6;
    border-color: #005EC4;
}

.btn-success {
    background-color: #00BA4A;
    border-color: #00BA4A;
    color: #FFFFFF;
}
.btn-success:hover {
    background-color: #00A340;
    border-color: #00943A;
}

.btn-warning {
    background-color: #FFB703;
    border-color: #FFB703;
    color: #0B1B3D;
}
.btn-warning:hover {
    background-color: #EAA600;
    border-color: #DC9C00;
}

.btn-danger {
    background-color: #FF3B30;
    border-color: #FF3B30;
    color: #FFFFFF;
}
.btn-danger:hover {
    background-color: #E03127;
    border-color: #D42C22;
}

.btn-outline-primary, .btn-outline-success, .btn-outline-secondary, .btn-outline-dark, .btn-outline-danger, .btn-light {
    box-shadow: 0 3px 0 rgba(11, 27, 61, 0.08), 0 4px 10px -2px rgba(11, 27, 61, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.btn-sm {
    border-radius: 10px;
}

/* ---------- Pills, Inputs, Modals & Tables ---------- */
.nav-pills .nav-link {
    background: rgba(255, 255, 255, 0.86);
    color: var(--nexo-graphite);
    border: 1px solid rgba(11, 27, 61, 0.08);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.5rem 1rem;
    box-shadow: 0 3px 0 rgba(11, 27, 61, 0.06), 0 4px 10px -2px rgba(11, 27, 61, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    transition: all 0.16s ease;
}

.nav-pills .nav-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 rgba(11, 27, 61, 0.08), 0 8px 16px -4px rgba(11, 27, 61, 0.12);
}

.nav-pills .nav-link.active {
    background-color: #007AFF !important;
    color: #FFFFFF !important;
    border-color: #007AFF;
    box-shadow: 0 3px 0 rgba(11, 27, 61, 0.10), 0 6px 14px -3px rgba(0, 122, 255, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.form-control, .form-select {
    border-radius: 11px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: inset 0 1px 2px rgba(11, 27, 61, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #007AFF;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.14);
}

.modal-content {
    border-radius: 18px !important;
    box-shadow: 0 24px 54px -12px rgba(11, 27, 61, 0.28) !important;
    border: 1px solid rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(18px);
}

[data-theme="dark"] .nav-pills .nav-link:not(.active) {
    background: rgba(30, 41, 59, 0.9);
    color: #E2E8F0;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .table {
    --bs-table-bg: transparent;
    --bs-table-color: #E2E8F0;
    --bs-table-border-color: rgba(255, 255, 255, 0.08);
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .table-light {
    --bs-table-bg: rgba(15, 23, 42, 0.55);
    --bs-table-color: #CBD5E1;
}

[data-theme="dark"] .app-content .bg-light,
[data-theme="dark"] .app-content .bg-white:not(.legal-editor-page) {
    background-color: rgba(15, 23, 42, 0.55) !important;
    color: #F1F5F9 !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

[data-theme="dark"] .modal-content {
    background-color: #1E293B;
    color: #F1F5F9;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: rgba(15, 23, 42, 0.72);
    color: #F1F5F9;
    border-color: rgba(255, 255, 255, 0.14);
}

/* ---------- Public Landing Page ---------- */
.public-navbar {
    background: linear-gradient(90deg, #07132E 0%, #0B1B3D 55%, #0F2759 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.7rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.public-navbar .nav-link {
    color: rgba(255, 255, 255, 0.86) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.45rem 0.85rem !important;
    border-radius: 8px;
    transition: all 0.2s;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: #FFFFFF !important;
    background: rgba(0, 122, 255, 0.18);
}

.hero-banner {
    position: relative;
    background: linear-gradient(125deg, #06122B 0%, #0B1B3D 45%, #0D2D6B 100%);
    color: #FFFFFF;
    overflow: hidden;
    padding: 3.4rem 0 3.6rem;
}

.hero-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 25%, rgba(0, 122, 255, 0.22), transparent 55%),
                radial-gradient(circle at 20% 80%, rgba(255, 183, 3, 0.12), transparent 45%);
    pointer-events: none;
}

.hero-themis-img {
    max-height: 360px;
    width: 100%;
    object-fit: cover;
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-title {
    font-size: clamp(1.9rem, 3.2vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.hero-highlight {
    color: #FFB703;
}

.hero-script {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-style: italic;
    font-size: 1.55rem;
    color: #FDE68A;
    font-weight: 600;
}

.feature-tile {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 16px;
    padding: 1.15rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 25px -8px rgba(11, 27, 61, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.feature-tile:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 34px -10px rgba(11, 27, 61, 0.18);
}

.icon-badge-3d {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.35rem;
    box-shadow: 0 8px 18px -4px rgba(11, 27, 61, 0.25), inset 0 2px 3px rgba(255, 255, 255, 0.35);
}

.bg-grad-blue   { background: linear-gradient(135deg, #007AFF 0%, #0056D2 100%); }
.bg-grad-green  { background: linear-gradient(135deg, #00BA4A 0%, #008E38 100%); }
.bg-grad-orange { background: linear-gradient(135deg, #FF8800 0%, #D96B00 100%); }
.bg-grad-purple { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); }
.bg-grad-cyan   { background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%); }
.bg-grad-red    { background: linear-gradient(135deg, #FF3B30 0%, #C81E1E 100%); }
.bg-grad-yellow { background: linear-gradient(135deg, #FFB703 0%, #FF8800 100%); }
.bg-grad-navy   { background: linear-gradient(135deg, #0B1B3D 0%, #0056D2 100%); }

.icon-badge-soft {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    font-size: 1.15rem;
    box-shadow: 0 8px 16px -4px rgba(11, 27, 61, 0.22), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    transition: transform 0.2s ease;
}

.nexo-card:hover .icon-badge-soft {
    transform: scale(1.04);
}

/* ---------- Admin Layout (Sidebar + Topbar + Content + Footer) ---------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 262px;
    min-width: 262px;
    background: linear-gradient(180deg, #07132E 0%, #0B1B3D 55%, #09193A 100%);
    color: #CBD5E1;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1020;
    box-shadow: 4px 0 24px rgba(7, 19, 46, 0.18);
    transition: transform 0.25s ease;
}

.sidebar-brand {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem 0.75rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    color: #CBD5E1;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.18s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

.sidebar-link.active {
    background: linear-gradient(90deg, #007AFF 0%, #0056D2 100%);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.35);
}

.sidebar-link-left {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.sidebar-footer-card {
    margin: 0.75rem;
    padding: 0.85rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    text-align: center;
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-topbar {
    background: var(--nexo-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--nexo-border);
    padding: 0.65rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 1010;
}

.topbar-search {
    position: relative;
    flex: 1;
    max-width: 460px;
}

.topbar-search input {
    background: rgba(240, 244, 249, 0.95);
    border: 1px solid var(--nexo-border);
    border-radius: 999px;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 100%;
    font-size: 0.88rem;
    color: var(--nexo-graphite);
}

[data-theme="dark"] .topbar-search input {
    background: rgba(15, 23, 42, 0.75);
}

.topbar-search .search-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nexo-slate);
}

.search-dropdown {
    position: absolute;
    top: 108%;
    left: 0;
    right: 0;
    background: var(--nexo-white);
    border: 1px solid var(--nexo-border);
    border-radius: 14px;
    box-shadow: var(--nexo-shadow-hover);
    z-index: 1050;
    display: none;
    max-height: 360px;
    overflow-y: auto;
}

.app-content {
    flex: 1;
    padding: 1.25rem 1.4rem 1.75rem;
}

/* ---------- Dashboard Welcome Banner & KPI Cards ---------- */
.dash-welcome-banner {
    background: linear-gradient(120deg, #07132E 0%, #0D2658 55%, #163A70 100%);
    border-radius: 18px;
    color: #FFFFFF;
    padding: 1.1rem 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 30px -10px rgba(11, 27, 61, 0.35);
}

.kpi-grad-card {
    border-radius: 16px;
    padding: 1.1rem 1.15rem;
    color: #FFFFFF;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 24px -8px rgba(11, 27, 61, 0.25);
    transition: transform 0.2s ease;
    height: 100%;
}

.kpi-grad-card:hover {
    transform: translateY(-3px);
}

.kpi-grad-card::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -24px;
    width: 110px;
    height: 110px;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    pointer-events: none;
}

.kpi-icon-box {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1.1;
}

.shortcut-tile {
    background: rgba(240, 244, 249, 0.72);
    border: 1px solid var(--nexo-border);
    border-radius: 14px;
    padding: 0.9rem 0.6rem;
    text-align: center;
    text-decoration: none;
    color: var(--nexo-graphite);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.18s ease;
}

[data-theme="dark"] .shortcut-tile {
    background: rgba(15, 23, 42, 0.5);
}

.shortcut-tile:hover {
    background: var(--nexo-white);
    transform: translateY(-2px);
    box-shadow: var(--nexo-shadow);
    color: var(--nexo-blue);
}

/* ---------- Footer Institucional ---------- */
.app-footer {
    background: linear-gradient(90deg, #07132E 0%, #0B1B3D 100%);
    color: #CBD5E1;
    padding: 0.65rem 1.4rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Stepper Processos ---------- */
.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ---------- Legal Editor ---------- */
.legal-editor-page {
    background: #FFFFFF;
    color: #111827;
    min-height: 760px;
    padding: 2.5cm 2.2cm;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #E2E8F0;
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.65;
    outline: none;
}

/* ---------- Signature Pad ---------- */
.sig-canvas {
    border: 2px dashed #94A3B8;
    border-radius: 12px;
    background: #FFFFFF;
    width: 100%;
    height: 190px;
    touch-action: none;
    cursor: crosshair;
}

/* ---------- Responsive Sidebar ---------- */
@media (max-width: 991.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
}

/* ---------- Module Hero Headers, Palette KPIs & Microinteractions ---------- */
.nexo-module-hero {
    background: linear-gradient(125deg, #07132E 0%, #0B1B3D 52%, #0056D2 100%);
    border-radius: 18px;
    color: #FFFFFF;
    padding: 1.2rem 1.45rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 14px 32px -10px rgba(11, 27, 61, 0.34);
    animation: nexoFadeUp 0.26s ease-out both;
}

.nexo-module-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 84% 18%, rgba(0, 122, 255, 0.25), transparent 52%),
                radial-gradient(circle at 12% 88%, rgba(255, 183, 3, 0.14), transparent 44%);
    pointer-events: none;
}

.nexo-hero-img {
    max-height: 98px;
    width: 100%;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 12px 24px rgba(7, 19, 46, 0.36);
}

.nexo-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    background: rgba(255, 183, 3, 0.16);
    color: #FFB703;
    border: 1px solid rgba(255, 183, 3, 0.35);
}

.kpi-blue   { background: linear-gradient(135deg, #007AFF 0%, #0056D2 100%); }
.kpi-green  { background: linear-gradient(135deg, #00BA4A 0%, #008E38 100%); }
.kpi-orange { background: linear-gradient(135deg, #FF8800 0%, #D96B00 100%); }
.kpi-purple { background: linear-gradient(135deg, #7C3AED 0%, #5B21B6 100%); }
.kpi-yellow { background: linear-gradient(135deg, #FFB703 0%, #FF8800 100%); color: #0B1B3D; }
.kpi-red    { background: linear-gradient(135deg, #FF3B30 0%, #C81E1E 100%); }
.kpi-navy   { background: linear-gradient(135deg, #0B1B3D 0%, #0056D2 100%); }
.kpi-cyan   { background: linear-gradient(135deg, #0EA5E9 0%, #0056D2 100%); }

.kpi-yellow .kpi-icon-box {
    background: rgba(11, 27, 61, 0.14);
    color: #0B1B3D;
}

.nexo-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.9);
    color: var(--nexo-graphite);
    border: 1px solid rgba(15, 23, 42, 0.10);
    cursor: pointer;
    transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nexo-chip:hover {
    transform: translateY(-1px);
    background: #FFFFFF;
    color: #007AFF;
    border-color: rgba(0, 122, 255, 0.35);
    box-shadow: 0 4px 12px -3px rgba(0, 122, 255, 0.18);
}

.nexo-chip.active {
    background: #007AFF;
    color: #FFFFFF;
    border-color: #007AFF;
}

[data-theme="dark"] .nexo-chip {
    background: rgba(30, 41, 59, 0.9);
    color: #E2E8F0;
    border-color: rgba(255, 255, 255, 0.12);
}

.nexo-kanban-col {
    border-radius: 16px;
}

.nexo-kanban-item {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-left: 4px solid #007AFF;
    background: rgba(255, 255, 255, 0.92);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.nexo-kanban-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -8px rgba(11, 27, 61, 0.15);
}

.nexo-kanban-item.prio-urgente { border-left-color: #FF3B30; }
.nexo-kanban-item.prio-alta    { border-left-color: #FF8800; }
.nexo-kanban-item.prio-normal  { border-left-color: #007AFF; }
.nexo-kanban-item.prio-baixa   { border-left-color: #00BA4A; }

[data-theme="dark"] .nexo-kanban-item {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.nexo-timeline-card {
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-left: 4px solid #007AFF;
    background: rgba(255, 255, 255, 0.9);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.nexo-timeline-card.prio-urgente { border-left-color: #FF3B30; }

.nexo-timeline-card:hover {
    transform: translateX(3px);
    box-shadow: 0 8px 18px -6px rgba(11, 27, 61, 0.12);
}

[data-theme="dark"] .nexo-timeline-card {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(255, 255, 255, 0.1);
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.nexo-toast-wrap {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.nexo-toast-item {
    pointer-events: auto;
    background: #0B1B3D;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    padding: 0.7rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 14px 30px -8px rgba(7, 19, 46, 0.45);
    display: flex;
    align-items: center;
    gap: 0.55rem;
    animation: nexoFadeUp 0.22s ease-out both;
}

.h-chart-210 { height: 210px; position: relative; }
.h-chart-230 { height: 230px; position: relative; }
.h-chart-250 { height: 250px; position: relative; }

/* ---------- Calendário Forense Avançado ---------- */
.nexo-cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.15rem;
    border-radius: 16px;
    background: linear-gradient(125deg, #07132E 0%, #0B1B3D 55%, #0056D2 100%);
    color: #FFFFFF;
    margin-bottom: 1rem;
    box-shadow: 0 12px 26px -10px rgba(11, 27, 61, 0.35);
}

.nexo-cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.nexo-cal-wday {
    text-align: center;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    background: rgba(11, 27, 61, 0.06);
    color: var(--nexo-navy);
}

.nexo-cal-wday.weekend {
    background: rgba(255, 136, 0, 0.10);
    color: #B45309;
}

[data-theme="dark"] .nexo-cal-wday {
    background: rgba(255, 255, 255, 0.07);
    color: #E2E8F0;
}

.nexo-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.nexo-cal-cell {
    min-height: 112px;
    border-radius: 14px;
    padding: 0.55rem 0.55rem 0.45rem;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 12px -6px rgba(11, 27, 61, 0.08);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    position: relative;
}

.nexo-cal-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 22px -10px rgba(0, 122, 255, 0.24);
    border-color: rgba(0, 122, 255, 0.45);
}

.nexo-cal-cell.is-weekend {
    background: rgba(240, 244, 249, 0.85);
}

.nexo-cal-cell.is-holiday {
    background: linear-gradient(180deg, rgba(255, 183, 3, 0.12) 0%, rgba(255, 255, 255, 0.96) 100%);
    border-color: rgba(255, 183, 3, 0.45);
}

.nexo-cal-cell.is-today {
    background: linear-gradient(180deg, rgba(0, 122, 255, 0.10) 0%, rgba(255, 255, 255, 0.98) 100%);
    border: 2px solid #007AFF;
    box-shadow: 0 10px 22px -8px rgba(0, 122, 255, 0.25);
}

.nexo-cal-cell.is-out {
    opacity: 0.42;
    background: rgba(240, 244, 249, 0.45);
    box-shadow: none;
}

[data-theme="dark"] .nexo-cal-cell {
    background: rgba(30, 41, 59, 0.86);
    border-color: rgba(255, 255, 255, 0.09);
}

[data-theme="dark"] .nexo-cal-cell.is-today {
    background: rgba(0, 122, 255, 0.18);
}

.nexo-cal-daybar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.nexo-cal-daynum {
    font-weight: 800;
    font-size: 0.86rem;
    color: var(--nexo-navy);
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .nexo-cal-daynum {
    color: #F1F5F9;
}

.nexo-cal-cell.is-today .nexo-cal-daynum {
    background: #007AFF;
    color: #FFFFFF;
}

.nexo-cal-count {
    font-size: 0.66rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(11, 27, 61, 0.08);
    color: var(--nexo-slate);
}

.nexo-cal-pill {
    font-size: 0.69rem;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 7px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nexo-cal-pill.ev-audiencia { background: rgba(0, 122, 255, 0.14); color: #0056D2; border-left: 3px solid #007AFF; }
.nexo-cal-pill.ev-prazo     { background: rgba(255, 59, 48, 0.13); color: #C81E1E; border-left: 3px solid #FF3B30; }
.nexo-cal-pill.ev-feriado   { background: rgba(255, 183, 3, 0.22); color: #92400E; border-left: 3px solid #FFB703; }

[data-theme="dark"] .nexo-cal-pill.ev-audiencia { color: #93C5FD; }
[data-theme="dark"] .nexo-cal-pill.ev-prazo     { color: #FCA5A5; }
[data-theme="dark"] .nexo-cal-pill.ev-feriado   { color: #FDE68A; }

@media (max-width: 767.98px) {
    .nexo-cal-grid, .nexo-cal-weekdays { gap: 4px; }
    .nexo-cal-cell { min-height: 76px; padding: 0.35rem; border-radius: 10px; }
}

/* ---------- Impressão Corporativa Global & PDF Limpo ---------- */
.nexo-print-header,
.nexo-print-footer,
.nexo-print-chart-img {
    display: none;
}

@media print {
    @page { size: A4; margin: 1.3cm 1.2cm; }
    html, body {
        background: #FFFFFF !important;
        color: #0F172A !important;
        font-size: 10pt !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    .app-shell { display: block !important; }
    .app-main { display: block !important; }
    .app-sidebar, .app-topbar, .app-footer, .nexo-no-print, .nav-pills, .btn, .modal, .nexo-toast-wrap, .alert-dismissible .btn-close {
        display: none !important;
    }
    .nexo-print-header {
        display: flex !important;
        justify-content: space-between;
        align-items: flex-end;
        border-bottom: 2.5px solid #0B1B3D;
        padding-bottom: 8px;
        margin-bottom: 14px;
    }
    .nexo-print-footer {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        border-top: 1px solid #CBD5E1;
        padding-top: 8px;
        margin-top: 18px;
        font-size: 8pt;
        color: #64748B !important;
    }
    .app-content { padding: 0 !important; }
    .nexo-card, .kpi-grad-card, .nexo-module-hero, .dash-welcome-banner, .nexo-cal-toolbar {
        box-shadow: none !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .nexo-module-hero, .dash-welcome-banner, .nexo-cal-toolbar {
        background: #F8FAFC !important;
        color: #0B1B3D !important;
        border: 1.5px solid #CBD5E1 !important;
        border-left: 6px solid #0B1B3D !important;
        padding: 0.75rem 1rem !important;
    }
    .nexo-module-hero .text-white-50,
    .dash-welcome-banner .text-white-50,
    .nexo-cal-toolbar .text-white-50,
    .nexo-module-hero .text-white,
    .dash-welcome-banner .text-white {
        color: #334155 !important;
    }
    .nexo-hero-pill {
        background: #FEF3C7 !important;
        color: #92400E !important;
        border-color: #F59E0B !important;
    }
    .kpi-grad-card {
        background: #FFFFFF !important;
        color: #0B1B3D !important;
        border: 1px solid #CBD5E1 !important;
        border-left: 5px solid #007AFF !important;
        padding: 0.75rem 0.9rem !important;
    }
    .kpi-grad-card.kpi-green  { border-left-color: #00BA4A !important; }
    .kpi-grad-card.kpi-orange { border-left-color: #FF8800 !important; }
    .kpi-grad-card.kpi-purple { border-left-color: #7C3AED !important; }
    .kpi-grad-card.kpi-red    { border-left-color: #FF3B30 !important; }
    .kpi-grad-card.kpi-yellow { border-left-color: #FFB703 !important; }
    .kpi-grad-card.kpi-navy   { border-left-color: #0B1B3D !important; }
    .kpi-grad-card::after { display: none !important; }
    .kpi-icon-box {
        background: #F0F4F9 !important;
        color: #0B1B3D !important;
        border: 1px solid #CBD5E1 !important;
    }
    .nexo-card {
        background: #FFFFFF !important;
        border: 1px solid #CBD5E1 !important;
        backdrop-filter: none !important;
    }
    .table-responsive { overflow: visible !important; }
    .sign-doc-preview { max-height: none !important; overflow: visible !important; }
    thead { display: table-header-group !important; }
    tr { break-inside: avoid !important; page-break-inside: avoid !important; }
    table th {
        background: #F0F4F9 !important;
        color: #0B1B3D !important;
        border-bottom: 2px solid #0B1B3D !important;
    }
    a { text-decoration: none !important; color: #0B1B3D !important; }
    a[href]:after { content: none !important; }
    .tab-content > .tab-pane {
        display: block !important;
        opacity: 1 !important;
        margin-bottom: 1.15rem;
    }
    canvas:not(#sigCanvas) { display: none !important; }
    .nexo-print-chart-img {
        display: block !important;
        width: 100% !important;
        max-height: 230px !important;
        object-fit: contain !important;
        margin: 0 auto;
    }
    .nexo-cal-cell {
        min-height: 68px !important;
        background: #FFFFFF !important;
        border: 1px solid #94A3B8 !important;
        break-inside: avoid !important;
    }
    .nexo-cal-pill {
        white-space: normal !important;
        font-size: 0.64rem !important;
        color: #0B1B3D !important;
        background: #F8FAFC !important;
        border: 1px solid #CBD5E1 !important;
    }
    .nexo-editor-col {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .legal-editor-page {
        padding: 0 !important;
        border: 0 !important;
        box-shadow: none !important;
        min-height: auto !important;
    }
}

.nexo-fs-xs { font-size: 0.75rem; }
.nexo-pix-thumb { max-width: 110px; max-height: 110px; object-fit: contain; }
.nexo-scroll-180 { max-height: 180px; overflow-y: auto; }
