/*
 * Estilos customizados para a aplicação Controle de Prazos.
 *
 * Este arquivo complementa o Bootstrap com cores e tamanhos
 * inspirados no layout fornecido nas imagens. Ajuste as
 * variáveis abaixo conforme necessário para adequar à sua marca.
 */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #f4f7fb;
    --sidebar-bg: #ffffff;
    --sidebar-active-bg: var(--primary-color);
    --sidebar-active-color: #ffffff;
}

html, body {
    height: 100%;
}

body {
    background-color: var(--secondary-color);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
}

.sidebar .brand {
    margin-bottom: 2rem;
    text-align: center;
}

.sidebar .brand-link {
    display: inline-block;
}

.sidebar .brand-logo {
    max-width: 100%;
    width: 200px;
    height: auto;
}

.sidebar .brand .small {
    font-size: 0.875rem;
    color: #6b7280;
}

.sidebar .nav-link {
    color: var(--primary-color);
    font-weight: 500;
    padding: 0.6rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
    transition: background-color 0.15s ease;
}

.sidebar .nav-link.active {
    background-color: var(--sidebar-active-bg);
    color: var(--sidebar-active-color) !important;
}

.sidebar .nav-link:hover {
    background-color: #eef2ff;
    color: var(--primary-color);
    text-decoration: none;
}

.sidebar .nav-link i {
    font-size: 1.25rem;
}

.sidebar .user-info {
    margin-top: auto;
    font-size: 0.875rem;
    color: #4b5563;
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.sidebar .user-info .initial {
    width: 36px;
    height: 36px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 0.5rem;
}

.sidebar .logout {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.875rem;
}

.sidebar .logout:hover {
    text-decoration: underline;
}

/* Content area */
.content {
    flex: 1;
    padding: 2rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Cards for Protocolos Vencendo */
.deadline-card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    background-color: #fff;
    /* Adiciona transição suave para animação de relevo ao passar o mouse */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Animação de relevo ao passar o mouse sobre os cartões de prazos */
.deadline-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.deadline-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem 0.5rem 1rem;
    border-bottom: none;
    font-weight: 600;
    font-size: 1rem;
}

.deadline-card .card-body {
    padding: 1rem;
}

.deadline-card .date-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #f1f5f9;
    padding: 0.75rem;
    border-radius: 0.5rem;
}

.deadline-card .date-box i {
    font-size: 1.5rem;
}

/* Borda superior colorida para cada tipo de prazo */
.card-blue {
    border-top: 4px solid #2563eb;
}
.card-green {
    border-top: 4px solid #16a34a;
}
.card-orange {
    border-top: 4px solid #f59e0b;
}
.card-red {
    border-top: 4px solid #dc2626;
}

/* Botões personalizados */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #16388a;
    border-color: #16388a;
}

/* ===== Responsivo (celular) ===== */
/* Barra superior e overlay ficam escondidos no desktop */
.mobile-topbar { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 768px) {
    /* layout deixa de ser lado-a-lado */
    .app-container { display: block; }

    /* barra superior fixa com menu + logo */
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 1040;
        background: #fff;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.5rem 0.75rem;
    }
    .mobile-topbar .menu-toggle {
        border: none;
        background: transparent;
        color: var(--primary-color);
        font-size: 1.7rem;
        line-height: 1;
        padding: 0.1rem 0.4rem;
        cursor: pointer;
    }
    .mobile-topbar .topbar-logo {
        height: 34px;
        width: auto;
    }

    /* sidebar vira gaveta deslizante */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 80%;
        max-width: 300px;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 1050;
        overflow-y: auto;
        box-shadow: 0 0 24px rgba(0, 0, 0, 0.15);
    }
    .sidebar.open { transform: translateX(0); }

    /* fundo escuro quando o menu está aberto */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s ease;
        z-index: 1045;
    }
    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }

    /* conteúdo ocupa a tela toda */
    .content { padding: 1.25rem; }
    .page-title { font-size: 1.35rem; }
}