/* --- ESTILOS GLOBAIS E RESET BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: #333;
    background-color: #f0f4f8; /* ADAPTADO: Cor de fundo do nosso projeto */
}

a {
    color: #1e3a8a; /* ADAPTADO: Cor principal de link */
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* --- LAYOUT PRINCIPAL COM SIDEBAR --- */
.sidebar {
    width: 260px;
    background-color: #1e3a8a; /* ADAPTADO: Cor principal da sidebar */
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    transition: left 0.3s ease-in-out;
    z-index: 100;
}

.main-content-wrapper {
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: margin-left 0.3s ease-in-out;
}

.main-content {
    padding: 30px;
}

/* --- ESTILOS DA SIDEBAR --- */
.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* ADAPTADO */
}

.sidebar-logo {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    color: #ecf0f1;
    text-decoration: none;
    padding: 15px 25px;
    gap: 15px;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar-menu li a:hover, .sidebar-menu li a.active {
    background-color: #60a5fa; /* ADAPTADO: Cor de hover/ativo */
    color: #ffffff;
}

.sidebar-menu li a i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* ADAPTADO */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-footer .user-info i {
    font-size: 36px;
}

.sidebar-footer .user-details {
    display: flex;
    flex-direction: column;
}

.sidebar-footer .user-details strong {
    font-size: 14px;
}

.sidebar-footer .user-details span {
    font-size: 12px;
    color: #bfdbfe; /* ADAPTADO */
}

.sidebar-footer .logout-button {
    color: #ecf0f1;
    font-size: 20px;
    padding: 5px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.sidebar-footer .logout-button:hover {
    background-color: #e74c3c;
}

/* --- COMPONENTES GERAIS (CARDS, BOTÕES, ETC) --- */
.card {
    background-color: #ffffff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.card h1, .card h2 {
    margin-bottom: 10px;
    font-size: 22px;
}

.btn {
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
}
.btn:hover {
    opacity: 0.9;
    color: white;
    text-decoration: none;
}
.btn-primary { background-color: #1e3a8a; } /* ADAPTADO */
.btn-secondary { background-color: #6c757d; }
.btn-danger { background-color: #dc3545; }


/* --- ESTILOS PARA FORMULÁRIOS PROFISSIONAIS --- */
fieldset {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

legend {
    font-size: 18px;
    font-weight: 500;
    padding: 0 10px;
    color: #495057;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group textarea,
.form-group select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: 0;
    border-color: #80bdff;
    box-shadow: 0 0 0 3px rgba(30, 90, 255, 0.25); /* ADAPTADO */
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 10px;
}

/* --- ESTILOS PARA LISTAGEM E DATATABLES --- */
.table-responsive {
    overflow-x: auto;
}

/* --- ESTRUTURA RESPONSIVA --- */
.main-header-mobile {
    display: none;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

@media (max-width: 1200px) {
    .sidebar {
        left: -260px;
    }
    .main-content-wrapper {
        margin-left: 0;
        width: 100%;
    }
    .main-header-mobile {
        display: flex;
        align-items: center;
        gap: 15px;
        background-color: #ffffff;
        padding: 10px 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        position: sticky;
        top: 0;
        z-index: 90;
    }
    .sidebar-toggle {
        background: none;
        border: none;
        font-size: 20px;
        cursor: pointer;
        color: #333;
    }
    .mobile-logo a {
        font-size: 18px;
        font-weight: 700;
        color: #1e3a8a; /* ADAPTADO */
        text-decoration: none;
    }
    body.sidebar-open .sidebar {
        left: 0;
        box-shadow: 3px 0 15px rgba(0,0,0,0.2);
    }
    body.sidebar-open .sidebar-overlay {
        display: block;
    }
}