﻿/* ============================================
   TIPOGRAFIA E BASE GLOBAL
   ============================================ */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html { font-size: 15px; }
}

html {
    position: relative;
    min-height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f4f6f9;
    color: #2d3748;
    margin-bottom: 60px;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   CABEÇALHO DE PÁGINA — padrão <b>Título</b><hr>
   ============================================ */
main > b:first-child,
main > div > b:first-child {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e3a5f;
    margin-bottom: 0.4rem;
    letter-spacing: -0.01em;
}

main > hr:first-of-type,
main > b + hr,
main > div > b + hr {
    border: none;
    border-top: 2px solid #e8edf3;
    margin-top: 0;
    margin-bottom: 1.25rem;
    opacity: 1;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #d1d9e0;
    font-size: 0.875rem;
    color: #2d3748;
    background-color: #fff;
    transition: border-color .18s, box-shadow .18s;
    padding: 0.5rem 0.85rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #2471a3;
    box-shadow: 0 0 0 3px rgba(36,113,163,0.12);
    outline: none;
}

.form-control:disabled,
.form-control[readonly] {
    background-color: #f8fafc;
    border-color: #e4e8ed;
    color: #4a5568;
    cursor: default;
}

.form-label,
label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 0.3rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-check-input:checked {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
}

.btn:focus, .btn:active:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(36,113,163,0.15);
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
    border-radius: 8px;
    font-size: 0.83rem;
    font-weight: 500;
    padding: 0.45rem 1.05rem;
    transition: background .18s, border-color .18s, box-shadow .18s, transform .1s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #2471a3;
    border-color: #2471a3;
}

.btn-outline-primary {
    color: #1e3a5f;
    border-color: #1e3a5f;
}
.btn-outline-primary:hover {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
}

.btn-sm {
    font-size: 0.775rem;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
}

/* ============================================
   TABELAS
   ============================================ */
.table {
    font-size: 0.855rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background-color: #f4f7fb;
    border-bottom: 2px solid #e4e8ed;
    border-top: none;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    white-space: nowrap;
    padding: 0.7rem 0.9rem;
    vertical-align: middle;
}

.table tbody td {
    padding: 0.7rem 0.9rem;
    vertical-align: middle;
    border-top: 1px solid #f0f2f5;
    color: #374151;
}

.table-bordered thead th,
.table-bordered tbody td {
    border: 1px solid #e8edf3;
}

.table-hover tbody tr:hover td {
    background-color: #f0f5fb;
}

.table-responsive {
    border-radius: 10px;
    border: 1px solid #e4e8ed;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.32em 0.65em;
    letter-spacing: 0.02em;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: 1px solid #e4e8ed;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.card-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #e4e8ed;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.85rem 1.25rem;
    color: #1e3a5f;
}

.card-body { padding: 1.25rem; }

/* ============================================
   PAGINAÇÃO
   ============================================ */
.pagination {
    gap: 3px;
    flex-wrap: wrap;
}

.pagination .page-link {
    border-radius: 7px !important;
    color: #1e3a5f;
    border-color: #e4e8ed;
    font-size: 0.83rem;
    padding: 0.35rem 0.7rem;
    font-weight: 500;
    transition: all .15s;
}

.pagination .page-link:hover {
    background-color: #f0f5fb;
    border-color: #2471a3;
    color: #1e3a5f;
}

.pagination .page-item.active .page-link {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #adb5bd;
    background-color: #f8f9fa;
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.875rem;
}

.alert-primary {
    background-color: #eef4fb;
    color: #1e3a5f;
}

/* ============================================
   LINKS
   ============================================ */
a {
    color: #2471a3;
    text-decoration: none;
}
a:hover { color: #1e3a5f; text-decoration: underline; }

/* ============================================
   HR
   ============================================ */
hr {
    border-color: #e8edf3;
    opacity: 1;
}

/* ============================================
   INPUT GROUP
   ============================================ */
.input-group .form-control { border-radius: 8px !important; }

#ParteInteressadaPosicao, #ParteContrariaPosicao {
    background-color: #ededed;
    width: 100%;
    margin-top: 1%;
    height: 25px !important;
    margin-bottom: 1%;
    border-radius: 8px;
    text-indent: 1em;
}
.fc .fc-toolbar-title {
    font-size: 1.2em;
}

.checkBoxConcluido {
    border: 0px;
    width: 25px;
    height: 30px;
    vertical-align: middle;
}

.checkBoxListarConcluidos {
    border: 0px;
    width: 18px;
    height: 23px;
    vertical-align: middle;
}

.alert-small-text {
    font-size: 0.75rem; /* Ajuste o valor conforme necessário */
}

.fc-event-time {
    display: none;
}

.container {
    /*max-width: 80% !important;
    width: 80% !important;*/
}

.table {
    width: 100%;
    word-wrap: break-word;
    white-space: normal;
}
.camposDeAudiencia, .camposPrazo {
    display: none;
}


.container-custom {
    margin-left: 5%;
    margin-right: 5%;
    width: auto; /* necessário para não limitar o tamanho fixamente */
}

@media (max-width: 768px) {
    .container-custom {
        margin-left: 0;
        margin-right: 0;
        padding-left: 12px;
        padding-right: 12px;
    }
}

#mydiv {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: max-content; /* tamanho exato do conteúdo */
    max-width: 50%; /* evita quebrar em telas menores */
    font-size: 0.85rem; /* deixa mais compacto */
}

#info-usuario table {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    min-width: 300px; /* largura mínima pra manter legível */
}

#info-usuario button {
    margin-top: 0.5rem;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

/* PRIMEIRO NÍVEL NORMAL */
.dropdown-menu {
    position: absolute !important;
}

/* SUBMENU (segundo nível) – aparece à direita, afastado */
.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu > .dropdown-menu {
        top: 0;
        left: 100%; /* já joga para a direita */
        margin-left: 0.5rem; /* aumenta o espaço lateral entre menus */
        margin-top: -0.25rem; /* alinha verticalmente */
        border-radius: 0.25rem;
    }

/* Setinha indicando submenu */
.dropdown-submenu > a::after {
    content: "▶";
    float: right;
    margin-left: .5rem;
}

#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none; /* começa oculto; ativado via JS quando necessário */
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Spinner circular */
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #3498db;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}
table {
    width: 100%;
}

.table-fit {
    width: auto !important; /* Tira a largura 100% */
    display: inline-table; /* Faz ocupar só o necessário */
    white-space: nowrap; /* Impede quebra de linha */
}

/* ============================================
   NAVBAR MODERNA — DESKTOP
   ============================================ */
:root {
    --nav-primary: #1e3a5f;
    --nav-accent: #2471a3;
    --nav-height: 60px;
    --nav-link-color: #3d3d3d;
}

.navbar-modern {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--nav-height);
    background: #fff;
    border-bottom: 1px solid #e4e8ed;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
}


.navbar-brand-modern img {
    height: 36px;
    transition: opacity .2s;
}
.navbar-brand-modern:hover img { opacity: .8; }

.nav-modern-list {
    display: flex;
    align-items: stretch;
    height: var(--nav-height);
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    flex: 1 1 0;
    min-width: 0;
    /* Scroll horizontal automático quando itens não cabem na tela.
       Dropdowns usam position:fixed via Popper (site.js) e não causam overflow vertical. */
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #d1d9e0 transparent;
}
.nav-modern-list::-webkit-scrollbar { height: 3px; }
.nav-modern-list::-webkit-scrollbar-track { background: transparent; }
.nav-modern-list::-webkit-scrollbar-thumb { background: #d1d9e0; border-radius: 3px; }

.nav-modern-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    height: 100%;
    padding: 0 0.85rem;
    color: var(--nav-link-color) !important;
    font-size: 0.83rem;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .18s, border-color .18s;
    white-space: nowrap;
}
.nav-modern-link i { font-size: 0.85rem; color: #7a8ea6; transition: color .18s; }
.nav-modern-link:hover,
.nav-modern-link.active {
    color: var(--nav-primary) !important;
    border-bottom-color: var(--nav-accent);
}
.nav-modern-link:hover i,
.nav-modern-link.active i { color: var(--nav-accent); }

/* Remove position:relative do .dropdown para que o dropdown-menu use
   .navbar-modern como containing block. Como .navbar-modern é ancestral
   do nav-modern-list, o overflow deste não clipa o menu (CSS spec). */
.nav-modern-list .dropdown {
    position: static;
}

/* Dropdown moderno */
.nav-modern-list .dropdown-menu {
    border: 1px solid #e4e8ed;
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    border-radius: 10px;
    padding: 0.4rem 0;
    margin-top: 0 !important;
    min-width: 200px;
}
.nav-modern-list .dropdown-item {
    font-size: 0.83rem;
    padding: 0.5rem 1.1rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-modern-list .dropdown-item i { font-size: 0.8rem; color: #7a8ea6; width: 14px; }
.nav-modern-list .dropdown-item:hover {
    background: #f0f5fb;
    color: var(--nav-primary);
}
.nav-modern-list .dropdown-item:hover i { color: var(--nav-accent); }

/* Avatar do usuário */
.user-avatar-circle {
    width: 32px; height: 32px;
    background: var(--nav-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    flex-shrink: 0;
    text-transform: uppercase;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: var(--nav-height);
    padding: 0 0.5rem 0 0.85rem;
    border-bottom: 2px solid transparent;
    color: var(--nav-link-color) !important;
    font-size: 0.83rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color .18s;
}
.nav-user-btn:hover { border-bottom-color: var(--nav-accent); }
.nav-user-btn::after { margin-left: 2px; }

/* Compacta navbar em monitores menores (lg..xl):
   reduz padding dos links e esconde o nome do usuário, mantendo apenas o avatar. */
@media (max-width: 1399px) {
    .nav-modern-link {
        padding: 0 0.55rem;
        font-size: 0.79rem;
    }
    .nav-username {
        display: none;
    }
    .nav-user-btn {
        padding: 0 0.4rem;
    }
}

/* ============================================
   MOBILE TOPBAR
   ============================================ */
.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: 52px;
    background: #fff;
    border-bottom: 1px solid #e4e8ed;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    gap: 0.6rem;
}
.mobile-topbar .app-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--nav-primary);
    flex: 1;
}
.mobile-topbar .user-avatar-circle {
    width: 30px; height: 30px;
    font-size: 0.72rem;
    cursor: pointer;
}

/* ============================================
   BOTTOM NAV — MOBILE
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: #fff;
    border-top: 1px solid #e4e8ed;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.09);
    display: flex;
    z-index: 1030;
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8a9ab0;
    font-size: 0.62rem;
    font-weight: 500;
    border: none;
    background: none;
    gap: 3px;
    transition: color .18s;
    padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item i { font-size: 1.15rem; }
.bottom-nav-item.active,
.bottom-nav-item:hover { color: var(--nav-primary); }
.bottom-nav-item.active i { color: var(--nav-accent); }

@media (max-width: 991.98px) {
    body { padding-bottom: 62px; }
}

/* ============================================
   OFFCANVAS MENU — MOBILE
   ============================================ */
#offcanvasMobileMenu {
    width: 290px;
    z-index: 1055;
}
#offcanvasMobileMenu.offcanvas.show,
#offcanvasMobileMenu.offcanvas.showing {
    pointer-events: auto;
}
.offcanvas-backdrop.show {
    z-index: 1050;
}
#offcanvasMobileMenu .offcanvas-header {
    background: #fff;
    border-bottom: 1px solid #e4e8ed;
    padding: 1rem 1.2rem;
}
.offcanvas-user-block {
    padding: 1rem 1.2rem;
    background: #f4f7fb;
    border-bottom: 1px solid #e4e8ed;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.offcanvas-user-block .user-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2d3748;
}

.offcanvas-nav { list-style: none; padding: 0.5rem 0; margin: 0; }
.offcanvas-nav-section {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9aa8bc;
    padding: 0.75rem 1.2rem 0.25rem;
}
.offcanvas-nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.2rem;
    font-size: 0.875rem;
    color: #3d4f63;
    text-decoration: none;
    font-weight: 500;
    transition: background .15s, color .15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
    pointer-events: auto;
}
.offcanvas-nav-item i { width: 16px; text-align: center; font-size: 0.85rem; color: #7a8ea6; }
.offcanvas-nav-item:hover { background: #f0f5fb; color: var(--nav-primary); }
.offcanvas-nav-item:hover i { color: var(--nav-accent); }
.offcanvas-nav-item.danger { color: #c0392b; }
.offcanvas-nav-item.danger i { color: #c0392b; }
.offcanvas-nav hr { margin: 0.4rem 0; border-color: #e8ecf1; }
