body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.topbar {
    height: 60px;
    background: #3c3f44;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.topbar-logo {
    height: 100%;
    padding: 6px 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.topbar-logo img {
    display: block;
    height: 100%;
    width: auto;
}

.container {
    display: flex;
    height: calc(100vh - 100px);
}

.sidebar {
    width: 220px;
    background: #d1d3d6;
    padding: 10px;
}

.content {
    flex: 1;
    padding: 20px;
    background: #f5f5f5;
}

.footer {
    height: 40px;
    background: #3c3f44;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.footer a,
.footer a:visited,
.footer a:hover,
.footer a:active {
    color: #ffffff;
    font-weight: bold;
    margin: 0 4px;
    text-decoration: none;
}

.menu-item {
    padding: 10px 5px;
    cursor: pointer;
    color: #333;
    text-decoration: none;
}

.menu-item:hover {
    background: #bfc3c7;
}

.submenu {
    display: none;
    flex-direction: column;
    margin-left: 30px;
}

.submenu.show {
    display: flex;
}

.submenu-item,
.submenu-item:visited {
    color: #333;
    font-size: 14px;
    padding: 8px 5px;
    text-decoration: none;
}

.submenu-item:hover {
    background: #bfc3c7;
}

.sidebar.collapsed .submenu {
    display: none;
}

.login-page {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #d1d3d6;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 350px;
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
}

.login-header,
.login-footer {
    background-color: #3c3f44; 
}

.login-header {
    height: 40px;
}

.login-footer {
    height: 40px;
}

.login-body {
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-body img {
    display: block;
    max-width: 100%;
    height: auto;
}

.login-body h2 {
    margin: 0;
    text-align: center;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.login-form input,
.login-form button {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
    border-radius: 3px;
    font-size: 14px;
}

.login-form input {
    border: 1px solid #ccc;
}

.login-form button {
    background-color: #3f444a;
    color: #ffffff;
    border: none;
    cursor: pointer;
}

.login-form button:hover {
    background-color: #2f3338;
}

.login-error {
    color: red;
    text-align: center;
    font-size: 14px;
}

.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.profile-icon {
    width: 20px;
    height: 20px;
    fill: white;
}

.profile-trigger {
    cursor: pointer;
    font-size: 18px;
}

.profile-dropdown {
    position: absolute;
    right: 0;
    top: 30px;
    background: #ffffff;
    color: #000;
    min-width: 150px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    border-radius: 3px;
    display: none;
    flex-direction: column;
    z-index: 1000;
}

.profile-dropdown a {
    padding: 10px;
    text-decoration: none;
    color: #000;
    display: block;
}

.profile-dropdown a:hover {
    background: #bfc3c7; 
}

.profile-dropdown.show {
    display: flex;
}

.menu-toggle {
    cursor: pointer;
    padding: 10px 5px;
}

.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .menu-item {
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .menu-toggle {
    text-align: center;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-icon svg {
    width: 18px;
    height: 18px;
    fill: #333;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .menu-item {
    justify-content: center;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #d1d3d6;
    width: 320px;
}

.dashboard-card-title {
    background: #3c3f44;
    color: #ffffff;
    font-weight: bold;
    padding: 8px 12px;
}

.dashboard-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.page-title-bar {
    background: #3c3f44;
    color: #ffffff;
    padding: 8px 12px;
    margin-bottom: 10px;
}

.page-title-bar h2 {
    font-size: 18px;
    margin: 0;
}

.table-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    max-width: 720px;
}

.table-filter input {
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    padding: 9px 10px;
}

.table-filter input[name="name"] {
    flex: 1;
    min-width: 260px;
}

.table-filter input[name="cpf"] {
    width: 180px;
}

.table-filter button {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 3px;
    background: #3c3f44;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-filter button:hover {
    background: #2f3338;
}

.table-filter svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table th,
.data-table td {
    border: 1px solid #d1d3d6;
    padding: 7px 8px;
    text-align: left;
}

.data-table th {
    background: #e6e8ea;
}

.data-table th a,
.data-table th a:visited {
    color: #333;
    display: block;
    text-decoration: none;
}

.data-table th a:hover {
    text-decoration: underline;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #f0f2f4;
}

.empty-table {
    text-align: center;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 8px;
}

.pagination a,
.pagination a:visited {
    background: #3f444a;
    color: #ffffff;
    padding: 5px 9px;
    text-decoration: none;
}

.pagination a:hover {
    background: #2f3338;
}

.form-message {
    margin-bottom: 16px;
    padding: 10px 12px;
}

.form-message-success {
    background: #dff0d8;
    border: 1px solid #c8e5bc;
    color: #2f5d2f;
}

.form-message-alert {
    background: #fff3cd;
    border: 1px solid #ffe08a;
    color: #664d03;
}

.detail-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 140px);
    min-height: 0;
}

.detail-page .page-title-bar {
    flex: 0 0 auto;
}

.detail-form {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
}

.detail-form-body {
    background: #ffffff;
    border: 1px solid #d1d3d6;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.detail-section {
    border-bottom: 1px solid #d1d3d6;
    color: #3c3f44;
    font-weight: bold;
    margin: 18px 0 12px;
    padding-bottom: 6px;
}

.detail-section:first-of-type {
    margin-top: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 18px;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-field-wide {
    grid-column: 1 / -1;
}

.detail-field span {
    color: #555;
    font-size: 12px;
}

.detail-field strong {
    color: #222;
    font-size: 14px;
    font-weight: normal;
    min-height: 18px;
}

.detail-field input {
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 14px;
    padding: 9px 10px;
    width: 100%;
}

.form-actions {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.form-actions button,
.form-actions a {
    border: none;
    border-radius: 3px;
    box-sizing: border-box;
    cursor: pointer;
    font-size: 14px;
    padding: 7px 10px;
    text-decoration: none;
}

.form-actions button {
    background: #3c3f44;
    color: #ffffff;
}

.form-actions button:hover {
    background: #2f3338;
}

.form-actions a,
.form-actions a:visited {
    background: #d1d3d6;
    color: #222;
}

.form-actions a:hover {
    background: #bfc3c7;
}

.join-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
}

.join-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* <-- chave */
    padding: 20px 0;
}

.join-container {
    width: 700px;
}

.join-form {
    display: flex;
    flex-direction: column;
}

.join-section {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.join-row {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.join-row label {
    width: 180px;
    font-size: 13px;
}

.join-row input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.join-row select {
    flex: 1;
    padding: 8px;
    padding-right: 30px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    background-color: #fff;

    appearance: none;

    background-image: url("/assets/img/chevron-down.svg");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.join-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 13px;
}

.join-form button {
    margin-top: 10px;
    width: 100%;
    padding: 10px;
    background-color: #3f444a;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.captcha-container {
    display: flex;
    justify-content: center;
    margin: 5px 0;
}

.captcha-container img {
    cursor: pointer;
}

.form-highlight {
    background-color: #eef1f4;
    border-left: 4px solid #3c3f44;
    padding: 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.autocomplete-list {
    position: absolute;
    top: 100%; 
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    max-height: 150px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.autocomplete-item {
    padding: 5px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #eee;
}

.autocomplete-list.show {
    display: block;
}

.autocomplete-item.disabled {
    color: #999;
    cursor: default;
    pointer-events: none;
}

.autocomplete-wrapper {
    position: relative;
    flex: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-box {
    width: 500px;
    background: #ffffff;
    border: 4px solid #3c3f44;
    border-radius: 4px;
    overflow: hidden;
}

.modal-header {
    background: #3c3f44;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    padding: 10px;
}

.modal-body {
    padding: 20px;
    text-align: justify;
    font-size: 14px;
}

.modal-footer {
    padding: 10px;
    text-align: center;
}

.modal-footer button {
    padding: 8px 20px;
    background-color: #3f444a;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.modal-footer button:hover {
    background-color: #2f3338;
}
