/* ============ LAYOUT ============ */

.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* Sidebar fixa � esquerda */
.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
}

/* �rea principal (header + conte�do) */
.main {
    flex: 1;
    margin-left: 250px; /* espa�o da sidebar */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* BARRA SUPERIOR - AGORA SEM position: fixed */
.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 1rem;
}

    /* Links dentro do header */
    .top-row a,
    .top-row .btn-link {
        margin-left: 1rem;
    }

/* Conte�do abaixo da barra */
.content {
    flex: 1;
    padding: 1.5rem;
    padding-top: 1.5rem;
}

/* Responsivo */
@media (max-width: 640.98px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }

    .main {
        margin-left: 0;
    }
}

/* ============ TOAST FLUTUANTE ============ */
.fc-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1090;
    min-width: 280px;
    max-width: min(420px, calc(100vw - 2rem));
    padding: 0.85rem 1rem;
    border-radius: 0.5rem;
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.4;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    animation: fc-toast-in .2s ease;
}

.fc-toast--sucesso { background: #198754; }
.fc-toast--erro    { background: #dc3545; }

@keyframes fc-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Cards expansíveis/minimizáveis (módulo Jurídico e demais telas) */
.collapsible-card {
    padding: 0;
}

.collapsible-card-header {
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    user-select: none;
}

.collapsible-card-header::-webkit-details-marker {
    display: none;
}

.collapsible-card-header::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.15s ease-in-out;
    color: #6c757d;
}

.collapsible-card[open] > .collapsible-card-header::before {
    transform: rotate(90deg);
}

.collapsible-card-title {
    font-weight: 600;
}
