/* --- Global Styles & Variables --- */
:root {
    --primary-color: #2ECC71;
    --primary-hover: #27ae60;
    --secondary-color: #3498DB;
    --secondary-hover: #2980b9;
    --danger-color: #E74C3C;
    --danger-hover: #c0392b;
    --background-color: #F4F6F9; /* Lighter grey for background */
    --text-color: #34495E;
    --border-color: #e1e4e8;
    --container-bg: #FFFFFF;
    --font-family: 'Inter', sans-serif;
}


body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
}

/* --- Layout --- */
.header-bar {
    background-color: var(--primary-color);
    padding: 15px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-bar .logo-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-bar .logo-placeholder img {
    height: 40px;
    width: auto;
}
.header-bar .logo-placeholder h2 {
    margin-left: 10px;
}
.header-bar .logo-placeholder .logo-box {
    width: 40px;
    height: 40px;
    background-color: rgba(255,255,255,0.2);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-bar .logo-placeholder .logo-box svg {
    width: 24px;
    height: 24px;
    stroke: #fff;
}
.header-bar .logo-placeholder h2 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
}

.header-bar .logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

/* --- Navigation --- */
.primary-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.primary-navigation a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.primary-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--font-family);
    cursor: pointer;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.nav-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}


.nav-dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    padding-top: 5px; /* Use padding to create space inside the element */
    margin-top: 0; /* Remove margin that creates the hover gap */
}

.nav-dropdown:hover .nav-dropdown-content {
    display: block;
}

.nav-dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    border-radius: 0;
}

.nav-dropdown-content a:hover {
    background-color: #f1f1f1;
}

.mobile-nav-toggle {
    display: none;
}

.container {
    width: 95%;
    max-width: none;
    margin: 30px auto; /* Center the container on the page */
    padding: 30px;
    box-sizing: border-box;
}

main h1 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Forms --- */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #FFFFFF;
    padding: 25px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

label {
    font-weight: 600;
    margin-bottom: -10px;
}

input[type="text"],
input[type="password"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* --- Buttons --- */
.btn, input[type="submit"] {
    padding: 12px 22px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}
.btn-secondary:hover {
    background: var(--secondary-hover);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}
.btn-danger:hover {
    background: var(--danger-hover);
}


/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

thead {
    background-color: #f8f9fa;
}

th {
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background-color: #f1f5f8;
}

td a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
}
td a:hover {
    text-decoration: underline;
}
td form {
    display: inline;
}
/* Base style for naked buttons in tables (that don't have .btn class) */
.action-buttons input[type="submit"]:not(.btn) {
    background: none;
    border: none;
    color: var(--danger-color);
    cursor: pointer;
    padding: 0;
    margin: 0;
    font-weight: 600;
    text-decoration: underline;
    font-size: 1rem; /* Match other buttons */
}
.action-buttons input[type="submit"]:not(.btn):hover {
     color: var(--danger-hover);
}
td.action-buttons {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
td.action-buttons form {
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    display: inline; /* This is sufficient now that the parent flex container works */
}

/* Styles for vertical button layouts, like in Pericias */
.action-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 5px; /* Space between buttons */
    align-items: stretch; /* Stretch items to fill the container width */
}
.action-buttons-container .btn,
.action-buttons-container form,
.action-buttons-container input[type="submit"] {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}
.action-buttons-container form {
    padding: 0;
    border: none;
    background: none;
}


/* --- Flashed Messages --- */
.flashes {
    list-style: none;
    padding: 15px;
    margin: 0 0 20px 0;
    border-radius: 5px;
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* --- Login Page Specifics --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}
.login-container {
    max-width: 400px;
    width: 100%;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
}
.input-group input {
    flex-grow: 1;
}

/* --- Profile Dropdown --- */
.profile-area {
    position: relative;
    display: inline-block;
}

.profile-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-btn svg {
    color: white;
    stroke: white;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.dropdown-content.active {
    display: block;
}

.dropdown-content a {
    color: var(--text-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
}
.dropdown-content a:hover {
    background-color: #f1f1f1;
}

.dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    background-color: #f8f9fa;
    color: var(--text-color);
}
.dropdown-header strong {
    color: var(--text-color);
}

/* --- Responsiveness --- */
@media (max-width: 992px) { /* Adjusted breakpoint for better responsive behavior */
    .header-bar {
        position: relative;
    }

    .primary-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        z-index: 100;
    }

    .primary-navigation.nav-open {
        display: flex;
    }

    .primary-navigation a {
        text-align: left;
        padding: 15px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .primary-navigation a:last-child {
        border-bottom: none;
    }

    .nav-dropdown {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .nav-dropdown-toggle {
        text-align: left;
    }
    .nav-dropdown-content {
        position: static;
        display: none; /* Hidden by default */
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: rgba(0,0,0,0.1);
        margin-top: 0;
        padding-left: 15px;
    }
    .nav-dropdown.active .nav-dropdown-content {
        display: block; /* Shown when dropdown is active */
    }
    .nav-dropdown-content a {
        color: white;
    }
    .nav-dropdown:hover .nav-dropdown-content {
        display: none; /* Disable hover effect on mobile */
    }
     .nav-dropdown.active:hover .nav-dropdown-content {
        display: block; /* Re-enable for active state */
    }


    .mobile-nav-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        position: absolute;
        right: 30px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 101;
    }
    .mobile-nav-toggle::before,
    .mobile-nav-toggle::after {
        content: '';
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        background: white;
        transition: transform 0.3s ease;
    }
    .mobile-nav-toggle::before {
        top: 5px;
    }
    .mobile-nav-toggle::after {
        bottom: 5px;
    }
    .nav-open .mobile-nav-toggle::before {
        transform: translateY(8.5px) rotate(45deg);
    }
    .nav-open .mobile-nav-toggle::after {
        transform: translateY(-8.5px) rotate(-45deg);
    }

    .header-bar .profile-area {
        margin-left: auto; /* Push profile to the right */
        padding-right: 50px; /* Space for the hamburger */
    }

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

    .container {
        margin: 15px auto;
        padding: 15px;
    }

    main h1 {
        font-size: 1.5rem;
    }
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0,0,0);
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#modal-results {
    margin-top: 15px;
    max-height: 300px;
    overflow-y: auto;
}
#modal-results .result-item {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}
#modal-results .result-item:hover {
    background-color: #f1f1f1;
}
#modal-results .result-item:last-child {
    border-bottom: none;
}

/* --- PDF Generation Styles --- */
/* These styles are now handled by the dedicated pdf_template.html */
/* No special styling is needed here anymore. */

.new-portaria-menu {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}
.new-portaria-menu h3 {
    margin-top: 0;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}
.btn-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.2s ease-in-out;
}
.btn-menu:hover {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.btn-menu svg {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
    color: var(--primary-color);
}


/* Specific content classes from various templates */
.pdf-body .titulo-doc {
    font-weight: bold; text-transform: uppercase; text-align: center; margin-bottom: 20px;
}
.pdf-body .data-local {
    text-align: right; margin-bottom: 40px;
}
.pdf-body .corpo-texto {
    text-align: justify; text-indent: 4em; margin-bottom: 40px;
}
.pdf-body .assinatura {
    text-align: center; line-height: 1.3; margin-top: 60px;
}

.pdf-body h1 {
    font-size: 16pt;
    text-align: center;
    margin-bottom: 30px;
}

.pdf-body h2 {
    font-size: 14pt;
    text-align: center;
    margin-top: 30px;
    margin-bottom: 15px;
    border-top: 1px solid #ccc;
    padding-top: 20px;
}

.pdf-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11pt; /* Smaller font for tables */
}

.pdf-body th, .pdf-body td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: left;
}

.pdf-body th {
    background-color: #f2f2f2;
}

.pdf-body .info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.pdf-body .info-item {
    display: flex;
}

.pdf-body .info-item strong {
    margin-right: 8px;
}

.pdf-body .full-width {
    grid-column: 1 / -1;
}

.pdf-body .section {
    margin-bottom: 20px;
    border: 1px solid #ccc;
    padding: 15px;
}

.pdf-body .section h2 {
    font-size: 13pt;
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    text-align: left;
    border-top: none;
}

.pdf-body .resultado-box {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ccc;
}

.pdf-body .resultado-box h2 {
    margin-top: 0;
    text-align: left;
    border-top: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.pdf-body .resultado-text {
    text-align: justify;
    white-space: pre-wrap;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
    border-radius: 0.25rem;
    margin-top: 2rem;
    justify-content: center;
}

.page-link {
    position: relative;
    display: block;
    padding: 0.5rem 0.75rem;
    margin-left: -1px;
    line-height: 1.25;
    color: var(--secondary-color);
    background-color: #fff;
    border: 1px solid #dee2e6;
    text-decoration: none;
}

.page-link:hover {
    z-index: 2;
    color: var(--secondary-hover);
    background-color: #e9ecef;
    border-color: #dee2e6;
}

.page-item:first-child .page-link {
    margin-left: 0;
    border-top-left-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.25rem;
    border-bottom-right-radius: 0.25rem;
}

.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* --- Grouped Table Styles --- */
table.table-grouped {
    border-spacing: 0 10px; /* Vertical spacing between tbody groups */
    border-collapse: separate !important; /* Force separation */
    border: none;
}
table.table-grouped thead {
    background-color: transparent;
}
table.table-grouped tbody.server-group {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
table.table-grouped tbody.server-group tr:first-child td:first-child { border-top-left-radius: 8px; }
table.table-grouped tbody.server-group tr:first-child td:last-child { border-top-right-radius: 8px; }
table.table-grouped tbody.server-group tr:last-child td:first-child { border-bottom-left-radius: 8px; }
table.table-grouped tbody.server-group tr:last-child td:last-child { border-bottom-right-radius: 8px; }

table.table-grouped tbody.server-group td {
    border: none;
    border-top: 1px solid var(--border-color);
}
table.table-grouped tbody.server-group tr:first-child td {
    border-top: none;
}
.table-grouped tbody.server-group tr:first-child {
    background-color: #f8f9fa; /* Light grey background for the main server row */
}

/* --- Choice Modal for PDF Format --- */
.choice-modal {
    display: none;
    position: fixed;
    z-index: 1001; /* Higher than other modals */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}
.choice-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 25px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    text-align: center;
    position: relative;
}
.choice-modal-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
}
.choice-modal-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}
.close-choice-modal {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}
.close-choice-modal:hover {
    color: #000;
}

/* --- FullCalendar Custom Styles --- */
.fc {
    max-width: 1100px;
    margin: 0 auto;
}

/* Toolbar and Buttons */
.fc .fc-toolbar.fc-header-toolbar {
    margin-bottom: 1.5rem;
}

.fc .fc-button {
    background-color: var(--primary-color);
    border: 1px solid var(--primary-color);
    color: white;
    text-transform: capitalize;
    box-shadow: none;
    transition: background-color 0.2s;
}

.fc .fc-button:hover {
    background-color: var(--primary-hover);
}

.fc .fc-button-primary:disabled {
    background-color: #a5d6a7;
    border-color: #a5d6a7;
}

.fc .fc-today-button {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.fc .fc-today-button:hover {
    background-color: var(--secondary-hover);
}


.fc .fc-toolbar-title {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-color);
}

/* Calendar View */
.fc-view, .fc-view > table {
    border: 1px solid var(--border-color);
    background-color: var(--container-bg);
    border-radius: 5px;
}

.fc .fc-col-header-cell {
    background-color: #f8f9fa;
    color: var(--text-color);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.fc .fc-daygrid-day-number {
    color: var(--text-color);
    font-weight: 500;
}

.fc .fc-day-today {
    background-color: rgba(46, 204, 113, 0.1); /* Light green for today */
}
.fc .fc-day-today .fc-daygrid-day-number {
    font-weight: 700;
    color: var(--primary-color);
}


/* Events */
.fc-event {
    background-color: var(--secondary-color);
    border: 1px solid var(--secondary-hover);
    font-weight: 500;
    padding: 2px 4px;
}

/* --- Ferias Management Form Styles --- */
#ferias-management-area .card-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#ferias-management-area .close-btn {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    color: #000;
    text-shadow: 0 1px 0 #fff;
    opacity: .5;
    background: transparent;
    border: 0;
    cursor: pointer;
}
#ferias-management-area .close-btn:hover {
    opacity: .75;
}

.ferias-form-container .gozo-slots-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Adds space between each slot */
}

.ferias-form-container .gozo-slot {
    display: grid;
    grid-template-columns: 1fr 100px 1fr auto;
    gap: 15px; /* Adds space between form elements within a slot */
    align-items: flex-end; /* Aligns the remove button nicely */
}

.ferias-form-container .form-group {
    margin-bottom: 0; /* Remove default margin as gap is now used */
}

.ferias-form-container .save-ferias-btn {
    margin-top: 20px;
}

/* --- Planejamento View --- */
.planning-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.planning-view-setorial,
.planning-view-departamento,
.planning-view-individual {
    border-radius: 8px;
    padding: 1px 20px 20px 20px; /* 1px top padding to prevent margin collapse */
    margin: -20px; /* Counteract container padding */
}

.planning-view-setorial {
    background-color: #e7f3ff; /* Light Blue */
}

.planning-view-departamento {
    background-color: #e6ffed; /* Light Green */
}

.planning-view-individual {
    background-color: #f5f5f5; /* Light Gray */
}

/* --- General Card & Grid Styles --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.card-body {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.card-text {
    color: #555;
    line-height: 1.6;
    font-size: 1rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    background-color: #f8f9fa;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* --- Page Header Fix --- */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}
.page-header h1 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    background-color: var(--container-bg);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
}

/* --- Search Bar --- */
.search-bar-container {
    margin-bottom: 2rem;
}

.search-bar-container form {
    display: flex;
    gap: 1rem;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
}

.search-bar-container input[type="text"] {
    flex-grow: 1; /* O campo de busca ocupa o máximo de espaço */
}

/* --- PDF Viewer Modal --- */
.pdf-modal-content {
    background-color: #fefefe;
    margin: 5% auto; /* Menor margem para ocupar mais espaço vertical */
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 800px; /* Mais largo para PDFs */
    border-radius: 8px;
    position: relative;
}

#pdf-viewer-container {
    width: 100%;
    height: 600px; /* Altura fixa para o container do canvas */
    overflow: auto; /* Adiciona scroll se o PDF for maior */
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    background-color: #f0f0f0; /* Fundo cinza claro */
}

#pdf-canvas {
    display: block;
    margin: 0 auto; /* Centraliza o canvas */
}

.pdf-modal-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* New styles for search results */
.result-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item:hover {
    background-color: #f5f5f5;
}

.result-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.result-nome {
    font-weight: 600;
    color: #333;
}

.result-details {
    font-size: 0.85em;
    color: #666;
}

/* --- Notification Dropdown --- */
.profile-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-dropdown {
    position: relative;
}

.notification-bell {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
    padding: 5px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell .fa-bell {
    font-size: 1.2em;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #E74C3C;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7em;
    font-weight: bold;
    border: 1px solid white;
}

#notification-dropdown-content {
    right: 0;
    min-width: 320px;
    max-width: 400px;
}

#notification-dropdown-content a,
#notification-dropdown-content .notification-item {
    display: block;
    white-space: normal;
    border-bottom: 1px solid #eee;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
}
#notification-dropdown-content a:last-child,
#notification-dropdown-content .notification-item:last-child {
    border-bottom: none;
}
.no-notifications {
    padding: 15px;
    color: #666;
    text-align: center;
}
.notification-time {
    display: block;
    font-size: 0.8em;
    color: #999;
    margin-top: 5px;
}

/* --- Lotacao Module Specifics --- */
/* MOVED TO static/css/lotacao.css */
