* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rethink Sans', sans-serif;
    background-color: #e6e6e6;
    color: #000000;
    overflow-x: hidden; /* Previne scroll horizontal indesejado */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 0;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box {
    background: white;
    padding: 50px 45px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0064d2 0%, #dc1464 100%);
}

.login-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    animation: fadeIn 0.6s ease-out 0.2s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.login-logo .logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    filter: none;
    transition: transform 0.3s ease;
}

.login-logo .logo-img:hover {
    transform: scale(1.05);
}

.login-box h1 {
    color: #0064d2;
    margin-bottom: 8px;
    margin-top: 0;
    text-align: center;
    font-weight: 700;
    font-size: 28px;
    letter-spacing: -0.5px;
    animation: fadeIn 0.6s ease-out 0.3s both;
}

.login-box h2 {
    color: #787878;
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 35px;
    text-align: center;
    animation: fadeIn 0.6s ease-out 0.4s both;
}

.login-box form {
    animation: fadeIn 0.6s ease-out 0.5s both;
}

.login-box .form-group {
    margin-bottom: 25px;
}

.login-box .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
    font-size: 14px;
}

.login-box .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background-color: #fafafa;
    font-family: 'Rethink Sans', sans-serif;
}

.login-box .form-group input:focus {
    outline: none;
    border-color: #0064d2;
    background-color: white;
    box-shadow: 0 0 0 4px rgba(0, 100, 210, 0.1);
    transform: translateY(-1px);
}

.login-box .form-group input:hover {
    border-color: #b9b9b9;
    background-color: white;
}

.login-box .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 10px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #0064d2 0%, #0052a8 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 100, 210, 0.3);
}

.login-box .btn-primary:hover {
    background: linear-gradient(135deg, #0052a8 0%, #004080 100%);
    box-shadow: 0 6px 20px rgba(0, 100, 210, 0.4);
    transform: translateY(-2px);
}

.login-box .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 100, 210, 0.3);
}

.login-box .error-message {
    background: linear-gradient(135deg, #ffe6f0 0%, #ffd6e8 100%);
    color: #c2185b;
    padding: 14px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border-left: 4px solid #dc1464;
    font-size: 14px;
    font-weight: 500;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-box .error-message.show {
    display: block;
}

/* File Upload Styles */
.file-upload-wrapper {
    margin-top: 8px;
}

.file-upload-area {
    border: 2px dashed #b9b9b9;
    border-radius: 8px;
    padding: 20px 15px;
    text-align: center;
    background-color: #fafafa;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.file-upload-area:hover {
    border-color: #0064d2;
    background-color: #f0f7ff;
}

.file-upload-area.drag-over {
    border-color: #0064d2;
    background-color: #e6f0ff;
    border-style: solid;
}

.file-upload-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.file-upload-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.file-upload-main-text {
    font-weight: 600;
    color: #000000;
    font-size: 13px;
}

.file-upload-sub-text {
    font-size: 11px;
    color: #787878;
}

.file-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #e6f0ff;
    border: 1px solid #0064d2;
    border-radius: 8px;
    margin-top: 10px;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.file-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.file-name {
    font-weight: 500;
    color: #000000;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.file-size {
    font-size: 12px;
    color: #787878;
    flex-shrink: 0;
}

.file-remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: 10px;
}

.file-remove-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.file-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background-color: #f0f7ff;
    border: 1px solid #0064d2;
    border-radius: 6px;
}

.file-link {
    color: #0064d2;
    text-decoration: underline;
    font-size: 14px;
    flex: 1;
}

.file-link:hover {
    color: #0052a8;
}

.file-remove-btn-small {
    padding: 4px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.file-remove-btn-small:hover {
    background: #c82333;
}

@media (max-width: 480px) {
    /* Login Mobile */
    .login-page {
        padding: 15px;
    }

    .login-box {
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .login-box h1 {
        font-size: 22px;
    }

    .login-box h2 {
        font-size: 14px;
    }
    
    .login-logo .logo-img {
        height: 60px;
    }

    .login-box .form-group input {
        padding: 12px 14px;
        font-size: 14px;
    }

    .login-box .btn-primary {
        padding: 12px;
        font-size: 15px;
    }
    
    .file-upload-area {
        padding: 15px 10px;
    }
    
    .file-upload-icon {
        font-size: 20px;
    }
    
    .file-upload-main-text {
        font-size: 12px;
    }
    
    .file-upload-sub-text {
        font-size: 10px;
    }
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    display: flex;
    align-items: center;
}

.nav-logo .logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.nav-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.nav-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-user-actions .btn-icon-only {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

.nav-user-actions a.btn-icon-only {
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
}

.nav-user-actions a.btn-icon-only:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.nav-user-actions .btn-icon-only svg {
    stroke: currentColor;
}

/* Menu Hambúrguer */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.nav-hamburger span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.nav-hamburger.active span:nth-child(2) {
    opacity: 0;
}

.nav-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Menu Dropdown */
.nav-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nav-menu-dropdown.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.nav-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    color: #000000;
    transition: background-color 0.2s;
    font-family: 'Rethink Sans', sans-serif;
}

.nav-menu-item:hover {
    background-color: #f0f0f0;
}

.nav-menu-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.nav-menu-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.nav-menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.badge {
    background: rgba(255,255,255,0.3);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
}

.badge.prioridade-alta {
    background: #ff4444;
    color: white;
}

.badge.prioridade-media {
    background: #ffaa00;
    color: white;
}

.badge.prioridade-baixa {
    background: #44aa44;
    color: white;
}

.badge.badge-inactive {
    background: #999999;
    color: white;
    font-size: 10px;
    padding: 3px 8px;
    margin-left: 5px;
}

/* Estilo para linhas de pacientes inativos */
tr.row-inactive {
    opacity: 0.6;
    background-color: #f5f5f5;
}

tr.row-inactive td {
    color: #666666;
    font-style: italic;
}

/* Botão de reativar */
.btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.btn-success:hover {
    background: #218838;
}

/* Toggle Switch para Filtros (Mostrar Inativos) */
.filter-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.filter-toggle-label:hover {
    background: #e9ecef;
    border-color: #0064d2;
}

.filter-toggle-wrapper {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.filter-toggle-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.filter-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.filter-toggle-wrapper input[type="checkbox"]:checked + .filter-toggle-slider {
    background-color: #0064d2;
}

.filter-toggle-wrapper input[type="checkbox"]:checked + .filter-toggle-slider::before {
    transform: translateX(24px);
}

.filter-toggle-wrapper input[type="checkbox"]:focus + .filter-toggle-slider {
    box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.2);
}

.filter-toggle-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.filter-toggle-label:hover .filter-toggle-text {
    color: #0064d2;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
    width: 100%;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    position: relative;
}

.tabs::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: linear-gradient(90deg, #0064d2 0%, #dc1464 100%);
    z-index: 1;
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.tab-btn:hover {
    color: #0064d2;
}

.tab-btn.active {
    color: #0064d2;
    border-bottom-color: #0064d2;
    font-weight: 600;
}

.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
    width: 100%;
}

.tab-content .table-container,
#pessoasTab .table-container,
#locaisTab .table-container,
#usuariosTab .table-container {
    width: 100% !important;
    max-width: 100% !important;
}

/* Garantir que tab de usuários fique oculta por padrão */
#usuariosTab {
    display: none !important;
}

/* Mostrar apenas se tiver a classe admin-visible (adicionada via JS para admins) */
#usuariosTab.admin-visible.active {
    display: block !important;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    color: #000000;
    font-weight: 600;
}

/* Search Container */
/* Tabs Container - Desktop */
.tabs-container {
    margin-bottom: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.tabs-nav-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.tabs-nav {
    display: flex;
    gap: 0;
    overflow-x: auto;
    background: #f8f9fa;
    padding: 0;
    border-bottom: 2px solid #e9ecef;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.tabs-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tab-btn {
    flex: 0 0 auto;
    min-width: 120px;
    padding: 15px 25px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.tab-btn:hover {
    background: rgba(0, 100, 210, 0.05);
    color: #0064d2;
}

.tab-btn.active {
    color: #0064d2;
    background: white;
    border-bottom-color: #0064d2;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0064d2 0%, #dc1464 100%);
}

/* Botões de Navegação das Abas */
.tab-nav-btn {
    flex: 0 0 auto;
    width: 40px;
    height: 56px;
    background: white;
    border: none;
    border-left: 1px solid #e9ecef;
    border-right: 1px solid #e9ecef;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.tab-nav-btn:hover:not(:disabled) {
    background: #f8f9fa;
    color: #0064d2;
}

.tab-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tab-nav-prev {
    border-right: 1px solid #e9ecef;
}

.tab-nav-next {
    border-left: 1px solid #e9ecef;
}

/* Select Container - Mobile */
.tabs-select-container {
    display: none;
    margin-bottom: 20px;
}

.tabs-select {
    width: 100%;
    padding: 12px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%236c757d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.tabs-select:focus {
    outline: none;
    border-color: #0064d2;
    box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.1);
}

.tabs-select option {
    padding: 10px;
}

.search-container {
    margin-bottom: 20px;
}

.search-filters-wrapper {
    display: flex;
    gap: 15px;
    align-items: stretch;
    flex-wrap: nowrap;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 1px solid #b9b9b9;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Rethink Sans', sans-serif;
    color: #000000;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #0064d2;
    box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.1);
}

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #787878;
    pointer-events: none;
    font-size: 18px;
}

.filters-container {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: nowrap;
}

.filter-select {
    padding: 12px 15px;
    border: 1px solid #b9b9b9;
    border-radius: 8px;
    min-width: 200px;
    font-size: 14px;
    font-family: 'Rethink Sans', sans-serif;
    color: #000000;
    background-color: #ffffff;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #0064d2;
    box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.1);
}

.filter-select:hover {
    border-color: #0064d2;
}

/* Buttons */
.btn,
a.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Rethink Sans', sans-serif;
    touch-action: manipulation; /* Melhora a resposta ao toque no mobile */
    -webkit-tap-highlight-color: transparent; /* Remove highlight azul no iOS */
    line-height: 1.5;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
    vertical-align: middle;
}

/* Garante que links com .btn tenham o mesmo alinhamento de texto que buttons */
a.btn {
    line-height: 1.5;
    white-space: nowrap;
}

.btn-primary {
    background: #0064d2;
    color: white;
}

.btn-primary:hover {
    background: #001e9b;
}

.btn-secondary {
    background: #787878;
    color: white;
}

.btn-secondary:hover {
    background: #505050;
}

.btn-danger {
    background: #dc1464;
    color: white;
}

.btn-danger:hover {
    background: #73005f;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon-only {
    padding: 8px 10px;
    min-width: auto;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    border-radius: 6px;
}

.btn-icon-only svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    fill: none;
    stroke: #ffffff;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    display: block;
    transition: all 0.3s ease;
    pointer-events: none;
}

.btn-icon-only:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.btn-icon-only:hover svg {
    stroke: #ffffff;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.5));
}

.btn-icon-only:active {
    transform: translateY(0);
}

.btn-edit {
    background: #0064d2;
    color: white;
    margin-right: 5px;
}

.btn-edit:hover {
    background: #001e9b;
}

.btn-info {
    background: #17a2b8;
    color: white;
    margin-right: 5px;
}

.btn-info:hover {
    background: #138496;
}

/* Table */
.table-container {
    background: white;
    border-radius: 8px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border: 1px solid #e6e6e6;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}

.table-container table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
    min-width: 0 !important;
}

table {
    border-collapse: collapse;
}

thead {
    background: #f0f0f0; /* tom de cinza claro para o cabeçalho da tabela */
    position: sticky;
    top: 0;
    z-index: 10;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #000000;
    border-bottom: 2px solid #b9b9b9;
}

th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    padding-right: 30px;
}

th.sortable:hover {
    background-color: #e0e0e0;
}

th.sortable .sort-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: #787878;
    opacity: 0.5;
}

th.sortable.sort-asc .sort-indicator::after {
    content: '▲';
    opacity: 1;
    color: #0064d2;
}

th.sortable.sort-desc .sort-indicator::after {
    content: '▼';
    opacity: 1;
    color: #0064d2;
}

/* Paginação */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 15px 0;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #000000;
    font-size: 14px;
}

.pagination-select {
    padding: 6px 10px;
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    background-color: white;
    color: #000000;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Rethink Sans', sans-serif;
}

.pagination-select:hover {
    border-color: #0064d2;
}

.pagination-select:focus {
    outline: none;
    border-color: #0064d2;
    box-shadow: 0 0 0 2px rgba(0, 100, 210, 0.2);
}

.pagination-text {
    color: #787878;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-pagination {
    padding: 8px 12px;
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    background-color: white;
    color: #000000;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Rethink Sans', sans-serif;
    transition: all 0.2s;
    min-width: 40px;
}

.btn-pagination:hover:not(:disabled) {
    background-color: #f0f0f0;
    border-color: #0064d2;
    color: #0064d2;
}

.btn-pagination:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f5f5f5;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 5px;
}

.btn-page-number {
    padding: 8px 12px;
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    background-color: white;
    color: #000000;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Rethink Sans', sans-serif;
    transition: all 0.2s;
    min-width: 40px;
}

.btn-page-number:hover {
    background-color: #f0f0f0;
    border-color: #0064d2;
    color: #0064d2;
}

.btn-page-number.active {
    background-color: #0064d2;
    border-color: #0064d2;
    color: white;
    font-weight: 600;
}

.btn-page-number.active:hover {
    background-color: #0052a8;
}

.page-ellipsis {
    padding: 8px 5px;
    color: #787878;
    font-size: 14px;
}

/* Paginação mobile - movida para a seção principal de responsividade */

td {
    padding: 15px;
    border-bottom: 1px solid #e6e6e6;
}

tbody tr:hover {
    background: #e0f0ff; /* tom de azul claro ao passar o mouse na linha */
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #b9b9b9;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Rethink Sans', sans-serif;
    color: #000000;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0064d2;
    box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #787878;
    font-size: 12px;
}

.error-text {
    color: #dc1464;
}

/* Searchable Select */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select input[type="text"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #b9b9b9;
    border-radius: 5px;
    font-size: 14px;
    font-family: 'Rethink Sans', sans-serif;
    color: #000000;
    background-color: white;
}

.searchable-select input[type="text"]:focus {
    outline: none;
    border-color: #0064d2;
    box-shadow: 0 0 0 3px rgba(0, 100, 210, 0.1);
}

.searchable-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #b9b9b9;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.searchable-dropdown.active {
    display: block;
}

.searchable-dropdown-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #e6e6e6;
    transition: background-color 0.2s;
}

.searchable-dropdown-item:hover {
    background-color: #f0f0f0;
}

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

.searchable-dropdown-item.selected {
    background-color: #e6f2ff;
    font-weight: 500;
}

.searchable-dropdown-empty {
    padding: 10px;
    text-align: center;
    color: #787878;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    animation: slideDown 0.3s;
    display: flex;
    flex-direction: column;
    padding-right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-content::-webkit-scrollbar {
    width: 12px;
}

.modal-content::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 5px;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    border-radius: 10px;
    border: 3px solid white;
    min-height: 30px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0052b0 0%, #c01256 100%);
}

/* Firefox scrollbar */
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: #0064d2 #f5f5f5;
}

.modal-content-large {
    max-width: 90%;
    width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 10px;
    padding-right: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-content-large::-webkit-scrollbar {
    width: 12px;
}

.modal-content-large::-webkit-scrollbar-track {
    background: transparent;
    margin: 10px 5px;
    border-radius: 10px;
}

.modal-content-large::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    border-radius: 10px;
    border: 3px solid white;
    min-height: 30px;
}

.modal-content-large::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0052b0 0%, #c01256 100%);
}

/* Firefox scrollbar */
.modal-content-large {
    scrollbar-width: thin;
    scrollbar-color: #0064d2 #f5f5f5;
}

.modal-body-scroll {
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px;
}

.modal-body-scroll::-webkit-scrollbar {
    width: 8px;
}

.modal-body-scroll::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.modal-body-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    border-radius: 4px;
}

.modal-body-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0052b0 0%, #c01256 100%);
}

.modal-body-file {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-body-file::-webkit-scrollbar {
    width: 8px;
}

.modal-body-file::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.modal-body-file::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    border-radius: 10px;
}

.modal-body-file::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0052b0 0%, #c01256 100%);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e6e6e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    font-weight: 600;
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover {
    color: #fad2e6;
}

.modal form {
    padding: 20px;
    padding-right: 32px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.form-col {
    flex: 1;
    margin-bottom: 20px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-row .form-col:last-child {
    margin-bottom: 20px;
}

/* Campos que ocupam largura total */
.form-group:not(.form-col) {
    width: 100%;
    margin-bottom: 20px;
}

/* Esta media query foi movida para a seção principal de responsividade */

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding: 16px 20px 20px;
    border-top: 1px solid #e6e6e6;
}

/* Error Message */
.error-message {
    background: #fad2e6;
    color: #73005f;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: none;
    border-left: 4px solid #dc1464;
}

.error-message.show {
    display: block;
}

/* Success Message */
.success-message {
    background: #c3e6f5;
    color: #001e9b;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: none;
    border-left: 4px solid #0064d2;
}

.success-message.show {
    display: block;
}

/* Loading */
.loading {
    text-align: center;
    padding: 20px;
    color: #787878;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast {
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid;
    min-width: 300px;
}

.toast.success {
    border-left-color: #0064d2;
}

.toast.error {
    border-left-color: #dc1464;
}

.toast.warning {
    border-left-color: #0ac8f5;
}

.toast.info {
    border-left-color: #787878;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #0064d2;
}

.toast.error .toast-icon {
    color: #dc1464;
}

.toast.warning .toast-icon {
    color: #0ac8f5;
}

.toast.info .toast-icon {
    color: #787878;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #000000;
}

.toast-message {
    font-size: 13px;
    color: #505050;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #787878;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}

.toast-close:hover {
    color: #000000;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.fade-out {
    animation: slideOutRight 0.3s ease-in forwards;
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Form Sections - Seções visuais do formulário */
.form-section {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.form-section:hover {
    border-color: #0064d2;
    box-shadow: 0 2px 8px rgba(0, 100, 210, 0.1);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
}

.form-section-header svg {
    color: #0064d2;
    flex-shrink: 0;
}

.form-section-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    letter-spacing: -0.2px;
}

/* Required Indicator - Indicador de campo obrigatório */
.required-indicator {
    color: #dc1464;
    font-weight: 700;
    margin-left: 3px;
    font-size: 16px;
}

/* Field Hint - Dica de ajuda no campo */
.field-hint {
    display: inline-block;
    margin-left: 5px;
    color: #787878;
    cursor: help;
    font-size: 13px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.field-hint:hover {
    opacity: 1;
    color: #0064d2;
}

/* Placeholder styling */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0a0a0;
    font-style: italic;
    opacity: 0.7;
}

.form-group input:focus::placeholder,
.form-group textarea:focus::placeholder {
    opacity: 0.5;
}

/* Input Validation States */
.input-error {
    border-color: #dc3545 !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.input-error:focus {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2) !important;
}

.input-success {
    border-color: #28a745 !important;
    background-color: #f0fff4 !important;
}

.input-success:focus {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.1) !important;
}

/* Button with icon */
.btn-icon-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-icon-left svg {
    flex-shrink: 0;
}

/* Select styling for Status and Priority */
.select-status,
.select-prioridade {
    font-weight: 500;
}

.select-status option,
.select-prioridade option {
    padding: 8px;
}

/* Improved button spacing in form groups */
.form-group .btn-sm {
    margin-top: 8px;
    width: 100%;
}

/* Animation for form sections */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: slideInUp 0.3s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0s; }
.form-section:nth-child(2) { animation-delay: 0.05s; }
.form-section:nth-child(3) { animation-delay: 0.1s; }
.form-section:nth-child(4) { animation-delay: 0.15s; }
.form-section:nth-child(5) { animation-delay: 0.2s; }

/* Loading spinner animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Checkbox Moderno - Toggle Switch */
.checkbox-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin: 0;
    padding: 0;
    min-height: 32px;
}

.checkbox-text {
    font-weight: 500;
    color: #000000;
    font-size: 14px;
    margin-right: 15px;
    line-height: 32px;
    display: flex;
    align-items: center;
}

.checkbox-wrapper {
    position: relative;
    display: inline-block;
}

.checkbox-wrapper input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkbox-slider {
    position: relative;
    display: inline-block;
    width: 70px;
    height: 32px;
    background-color: #b9b9b9;
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkbox-slider::before {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    left: 3px;
    top: 3px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-slider {
    background-color: #28a745;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(40, 167, 69, 0.2);
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-slider::before {
    transform: translateX(38px);
}

.checkbox-wrapper input[type="checkbox"]:not(:checked) + .checkbox-slider {
    background-color: #dc3545;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.checkbox-slider-text {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.checkbox-slider-text-on {
    left: 8px;
    opacity: 0;
}

.checkbox-slider-text-off {
    right: 8px;
    opacity: 1;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-slider .checkbox-slider-text-on {
    opacity: 1;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkbox-slider .checkbox-slider-text-off {
    opacity: 0;
}

.checkbox-wrapper input[type="checkbox"]:not(:checked) + .checkbox-slider .checkbox-slider-text-on {
    opacity: 0;
}

.checkbox-wrapper input[type="checkbox"]:not(:checked) + .checkbox-slider .checkbox-slider-text-off {
    opacity: 1;
}

.checkbox-wrapper input[type="checkbox"]:focus + .checkbox-slider {
    outline: 2px solid #0064d2;
    outline-offset: 2px;
}

.checkbox-wrapper:hover input[type="checkbox"]:not(:disabled) + .checkbox-slider {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(0, 100, 210, 0.15);
}

.checkbox-wrapper input[type="checkbox"]:disabled + .checkbox-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Desktop - Mostrar apenas texto, ocultar ícones */
@media (min-width: 769px) {
    .btn .btn-text {
        display: inline-block !important;
        margin-left: 0;
    }

    .btn .btn-icon {
        display: none !important;
    }

    .btn-edit,
    .btn-danger,
    .btn-secondary,
    .btn-success {
        display: inline-block !important;
        padding: 6px 12px;
        min-width: auto;
    }

    /* Desktop - Mostrar botões originais e ocultar hambúrguer */
    .nav-user-actions {
        display: flex !important;
    }

    .nav-hamburger {
        display: none !important;
    }

    .nav-menu-dropdown {
        display: none !important;
    }
}

/* Responsive - Mobile First Approach */
@media (max-width: 768px) {
    /* Container e espaçamento geral */
    .container {
        padding: 0 15px;
        margin: 15px auto;
    }

    /* Navbar Mobile */
    .navbar {
        padding: 12px 0;
    }

    .nav-container {
        flex-direction: column;
        gap: 12px;
        padding: 0 15px;
        align-items: flex-start;
    }

    .nav-logo-container {
        width: 100%;
        justify-content: space-between;
    }

    .nav-logo .logo-img {
        height: 40px;
    }

    .nav-title {
        font-size: 14px;
    }

    .nav-user {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
        position: relative;
    }

    .nav-user-info {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
    }

    .nav-user-info span {
        font-size: 13px;
    }

    .nav-user-actions {
        display: none; /* Ocultar botões no mobile */
    }

    .nav-hamburger {
        display: flex; /* Mostrar hambúrguer no mobile */
    }

    .badge {
        font-size: 11px;
        padding: 4px 10px;
    }

    /* Tabs Mobile */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        gap: 5px;
        padding-bottom: 2px;
    }

    .tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        padding: 12px 18px;
        font-size: 14px;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 44px; /* Área de toque adequada */
    }

    /* Page Header Mobile */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .page-header h2 {
        font-size: 20px;
    }

    .page-header > div {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .page-header .btn {
        width: 100%;
        padding: 12px;
    }

    /* Filter Toggle Mobile */
    .filter-toggle-label {
        width: 100%;
        justify-content: space-between;
        padding: 12px 16px;
    }

    .filter-toggle-text {
        font-size: 15px;
    }

    /* Search e Filtros Mobile */
    .search-container {
        margin-bottom: 15px;
    }

    .search-filters-wrapper {
        flex-direction: column;
        gap: 10px;
        flex-wrap: wrap;
    }

    .search-box {
        min-width: 100%;
        max-width: 100%;
    }

    .filters-container {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        flex-wrap: wrap;
    }

    .filter-select {
        width: 100%;
        min-width: 100%;
    }

    /* Tabs Mobile - Ocultar abas, mostrar select */
    .tabs-container {
        display: none;
    }

    .tabs-select-container {
        display: block;
    }

    /* Tabelas Mobile */
    .table-container {
        overflow-x: auto;
        width: 100% !important;
        max-width: 100% !important;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }

    table {
        min-width: 500px; /* Reduzido pois vamos ocultar colunas */
        font-size: 13px;
    }

    th {
        padding: 10px 8px;
        font-size: 12px;
    }

    td {
        padding: 10px 8px;
        font-size: 13px;
    }

    /* Ocultar colunas CPF e Titular no mobile */
    #pessoasTable th.col-cpf,
    #pessoasTable td.col-cpf,
    #pessoasTable th.col-titular,
    #pessoasTable td.col-titular {
        display: none;
    }

    /* Ocultar coluna Role na tabela de Usuários no mobile */
    #usuariosTable th.col-role,
    #usuariosTable td.col-role {
        display: none;
    }

    /* Botões de ação na tabela */
    .btn-edit,
    .btn-danger,
    .btn-secondary {
        padding: 8px 12px;
        font-size: 12px;
        margin: 2px;
        min-height: 36px; /* Garante área de toque adequada */
        position: relative;
    }

    /* Estilos para ícones e texto dos botões */
    .btn-icon {
        display: inline-block;
        font-size: 16px;
        line-height: 1;
    }

    .btn-text {
        display: inline-block;
        margin-left: 4px;
    }

    /* No mobile, ocultar texto e mostrar apenas ícones */
    .btn .btn-text {
        display: none;
    }

    .btn .btn-icon {
        display: inline-block;
        margin: 0;
    }

    /* Ajustar padding dos botões para ficarem mais compactos com apenas ícones no mobile */
    .btn-edit,
    .btn-danger,
    .btn-secondary,
    .btn-success {
        padding: 8px 10px;
        min-width: 40px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Garantir área de toque mínima para todos os botões */
    .btn {
        min-height: 44px; /* Tamanho mínimo recomendado para touch */
    }

    /* Paginação Mobile */
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px 0;
    }

    .pagination-info {
        justify-content: center;
        flex-wrap: wrap;
        font-size: 12px;
    }

    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
        gap: 5px;
    }

    .page-numbers {
        order: -1;
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
        flex-wrap: wrap;
    }

    .btn-pagination,
    .btn-page-number {
        padding: 8px 10px;
        font-size: 12px;
        min-width: 36px;
    }

    /* Modais Mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        margin: 10px;
    }

    .modal-content-large {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
    }

    .modal-header {
        padding: 15px;
    }

    .modal-header h3 {
        font-size: 18px;
    }

    .close {
        font-size: 24px;
    }

    .modal form {
        padding: 15px;
        padding-right: 15px;
    }

    .modal-footer {
        flex-direction: column-reverse;
        gap: 10px;
    }

    .modal-footer .btn {
        width: 100%;
        padding: 12px;
    }

    /* Formulários Mobile */
    .form-group {
        margin-bottom: 15px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px;
        font-size: 14px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-col {
        margin-bottom: 15px;
        width: 100%;
    }

    /* Form Sections Mobile */
    .form-section {
        padding: 15px;
        margin-bottom: 15px;
    }

    .form-section-header {
        margin-bottom: 15px;
        padding-bottom: 10px;
    }

    .form-section-header h4 {
        font-size: 14px;
    }

    .form-section-header svg {
        width: 16px;
        height: 16px;
    }

    .field-hint {
        font-size: 12px;
    }

    /* Checkbox Mobile */
    .checkbox-label {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .checkbox-text {
        margin-right: 0;
        font-size: 13px;
    }

    /* Toast Notifications Mobile */
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
    }

    .toast {
        min-width: auto;
        width: 100%;
        padding: 12px 15px;
    }

    .toast-title {
        font-size: 13px;
    }

    .toast-message {
        font-size: 12px;
    }

    /* File Upload Mobile */
    .file-upload-area {
        padding: 15px 10px;
    }

    .file-upload-main-text {
        font-size: 12px;
    }

    .file-upload-sub-text {
        font-size: 10px;
    }

    .file-selected {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .file-info {
        width: 100%;
    }

    .file-remove-btn {
        align-self: flex-end;
        margin-left: 0;
    }
}

/* Tablets (769px a 1200px) - Responsividade intermediária */
@media (min-width: 769px) and (max-width: 1200px) {
    .search-filters-wrapper {
        flex-wrap: wrap;
    }
    
    .search-box {
        min-width: 300px;
    }
    
    .filters-container {
        flex-wrap: wrap;
    }
    
    .filter-select {
        min-width: 180px;
        flex: 1;
    }
}

/* Mobile muito pequeno (até 480px) */
@media (max-width: 480px) {
    html {
        -webkit-text-size-adjust: 100%; /* Previne zoom automático no iOS */
    }

    body {
        font-size: 14px;
    }

    .container {
        padding: 0 10px;
        margin: 10px auto;
    }

    .nav-container {
        padding: 0 10px;
    }

    .nav-title {
        font-size: 12px;
    }

    .page-header h2 {
        font-size: 18px;
    }

    .tab-btn {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 44px;
    }

    table {
        min-width: 450px; /* Reduzido pois vamos ocultar colunas */
        font-size: 12px;
    }

    th, td {
        padding: 8px 6px;
        font-size: 12px;
    }

    /* Garantir que colunas CPF e Titular estejam ocultas em telas muito pequenas */
    #pessoasTable th.col-cpf,
    #pessoasTable td.col-cpf,
    #pessoasTable th.col-titular,
    #pessoasTable td.col-titular {
        display: none !important;
    }

    /* Garantir que coluna Role esteja oculta em telas muito pequenas */
    #usuariosTable th.col-role,
    #usuariosTable td.col-role {
        display: none !important;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .modal-content-large {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .modal-header {
        border-radius: 0;
        padding: 12px 15px;
    }

    .modal-header h3 {
        font-size: 16px;
    }

    .toast-container {
        top: 5px;
        right: 5px;
        left: 5px;
        max-width: calc(100% - 10px);
    }

    /* Melhorar área de toque em telas muito pequenas */
    .btn {
        min-height: 44px;
        padding: 12px 16px;
    }
}

/* ========== DASHBOARD ========== */
.dashboard-menu {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    align-items: stretch;
}

.dashboard-menu > div {
    display: flex;
    height: 100%;
}

.dashboard-menu-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 100%;
}

.dashboard-menu-card:hover {
    border-color: #0064d2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}

.dashboard-menu-icon {
    font-size: 48px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border-radius: 12px;
    flex-shrink: 0;
    color: #0064d2;
    transition: all 0.3s ease;
}

.dashboard-icon-cadastro {
    background: #e3f2fd;
    color: #1976d2;
}

.dashboard-icon-pacientes {
    background: #fce4ec;
    color: #c2185b;
}

.dashboard-icon-usuarios {
    background: #f3e5f5;
    color: #7b1fa2;
}

.dashboard-menu-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.dashboard-menu-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
}

.dashboard-menu-content p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.dashboard-menu-arrow {
    font-size: 24px;
    color: #0064d2;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-menu-card:hover .dashboard-menu-arrow {
    transform: translateX(5px);
}

.dashboard-menu-card:hover .dashboard-menu-icon {
    transform: scale(1.1);
}

.dashboard-menu-card:hover .dashboard-icon-cadastro {
    background: #bbdefb;
}

.dashboard-menu-card:hover .dashboard-icon-pacientes {
    background: #f8bbd0;
}

.dashboard-menu-card:hover .dashboard-icon-usuarios {
    background: #e1bee7;
}

.dashboard-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 10px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card-primary {
    border-left-color: #0064d2;
}

.stat-card-blue {
    border-left-color: #0064d2;
}

.stat-card-pink {
    border-left-color: #dc1464;
}

.stat-card-orange {
    border-left-color: #ff9800;
}

.stat-card-green {
    border-left-color: #4caf50;
}

.stat-card-purple {
    border-left-color: #9c27b0;
}

.stat-card-icon {
    font-size: 40px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Cada tipo de card com sua cor específica */
.stat-card-primary .stat-card-icon {
    background: #e8f4fd;
    color: #0064d2;
}

.stat-card-blue .stat-card-icon {
    background: #e3f2fd;
    color: #1976d2;
}

.stat-card-pink .stat-card-icon {
    background: #fce4ec;
    color: #c2185b;
}

.stat-card-orange .stat-card-icon {
    background: #fff3e0;
    color: #f57c00;
}

.stat-card-green .stat-card-icon {
    background: #e8f5e9;
    color: #388e3c;
}

.stat-card-purple .stat-card-icon {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Hover effect nos ícones */
.stat-card:hover .stat-card-icon {
    transform: scale(1.1);
}

.stat-card-primary:hover .stat-card-icon {
    background: #d0e9fb;
}

.stat-card-blue:hover .stat-card-icon {
    background: #bbdefb;
}

.stat-card-pink:hover .stat-card-icon {
    background: #f8bbd0;
}

.stat-card-orange:hover .stat-card-icon {
    background: #ffe0b2;
}

.stat-card-green:hover .stat-card-icon {
    background: #c8e6c9;
}

.stat-card-purple:hover .stat-card-icon {
    background: #e1bee7;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-card-value {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
    margin-bottom: 2px;
}

.stat-card-sublabel {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    width: 100%;
}

.dashboard-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.chart-container,
.table-container-small {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    min-width: 0;
}

.chart-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.chart-legend {
    display: flex;
    gap: 20px;
    align-items: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-block;
}

.legend-titular {
    background: #0064d2;
}

.legend-dependente {
    background: #dc1464;
}

.legend-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.chart-body {
    min-height: 200px;
}

.chart-placeholder {
    text-align: center;
    padding: 40px;
    color: #999;
}

.chart-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.bar-chart {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bar-chart-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-chart-item-grouped {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

.bar-chart-bars-grouped {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 50px;
}

.bar-chart-bar-container-grouped {
    flex: 1;
    height: 50px;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: stretch;
    border-radius: 6px;
}

.bar-chart-bar-titular {
    background: #0064d2;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    min-width: 0;
    transition: width 0.5s ease;
}

.bar-chart-bar-titular.only-bar {
    border-radius: 6px;
}

.bar-chart-bar-titular.left-bar {
    border-radius: 6px 0 0 6px;
}

.bar-chart-bar-dependente {
    background: #dc1464;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    min-width: 0;
    transition: width 0.5s ease;
}

.bar-chart-bar-dependente.only-bar {
    border-radius: 6px;
}

.bar-chart-bar-dependente.right-bar {
    border-radius: 0 6px 6px 0;
}

.bar-chart-total {
    font-size: 11px;
    color: #666;
    font-weight: 500;
    margin-top: 4px;
    text-align: right;
}

.bar-chart-label {
    min-width: 120px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    padding-top: 0;
    align-self: flex-start;
}

.bar-chart-bar-container {
    flex: 1;
    height: 30px;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
}

.bar-chart-bar {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    transition: width 0.5s ease;
    min-width: 40px;

}

.bar-chart-bar-blue {
    background: linear-gradient(90deg, #0064d2 0%, #4caf50 100%);
}

.bar-chart-bar-cadastros {
    border-radius: 6px;
}

.bar-chart-value {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

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

.table-body table {
    width: 100%;
    border-collapse: collapse;
}

.table-body table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-body table th {
    padding: 12px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
}

.table-body table td {
    padding: 12px;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.table-body table tbody tr:hover {
    background: #f8f9fa;
}

/* Responsivo Dashboard */
/* Tablets (769px a 1200px) - Mesmo padrão da página de pessoas */
@media (min-width: 769px) and (max-width: 1200px) {
    .dashboard-charts {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-card-icon {
        width: 50px;
        height: 50px;
        font-size: 32px;
    }
    
    .stat-card-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .stat-card-value {
        font-size: 24px;
    }
    
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
    
    .dashboard-tables {
        grid-template-columns: 1fr;
    }
    
    .bar-chart-label {
        min-width: 100px;
        font-size: 12px;
    }
}

/* Seção de Log de Auditoria */
.log-info-section {
    margin-top: 20px;
    padding-top: 20px;
}

.log-info-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.log-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.log-info-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0064d2;
    flex-wrap: wrap;
}

.log-info-label {
    font-size: 13px;
    font-weight: 600;
    color: #666;
}

.log-info-value {
    font-size: 13px;
    font-weight: 500;
    color: #333;
}

.log-info-date {
    font-size: 13px;
    color: #787878;
    font-style: italic;
}

/* Responsivo para dashboard menu */
@media (max-width: 1024px) and (min-width: 769px) {
    .dashboard-menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-menu {
        grid-template-columns: 1fr;
    }
    
    .dashboard-menu-card {
        padding: 20px;
    }
    
    .dashboard-menu-icon {
        font-size: 36px;
        width: 60px;
        height: 60px;
    }
    
    .dashboard-menu-icon svg {
        width: 32px;
        height: 32px;
    }
    
    .dashboard-menu-content h3 {
        font-size: 18px;
    }
    
    .dashboard-menu-content p {
        font-size: 13px;
    }
}

/* Responsivo para seção de log */
@media (max-width: 768px) {
    .log-info-item {
        padding: 8px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .log-info-label {
        font-size: 11px;
    }
    
    .log-info-value {
        font-size: 13px;
    }
    
    .log-info-date {
        font-size: 11px;
    }
}

/* ========== PERMISSÕES CARD ========== */
.permissions-card {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.permissions-card:hover {
    border-color: #0064d2;
    box-shadow: 0 2px 8px rgba(0, 100, 210, 0.1);
}

.permissions-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #0064d2 0%, #dc1464 100%);
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.permissions-card-header svg {
    flex-shrink: 0;
    stroke: white;
}

.permissions-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: white;
}

.permissions-card-body {
    padding: 20px;
}

.permissions-card-description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.permission-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    min-height: 48px;
}

.permission-item:hover {
    border-color: #0064d2;
    background: #f0f7ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 100, 210, 0.1);
}

.permission-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    margin-right: 12px;
    cursor: pointer;
    accent-color: #0064d2;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.permission-item input[type="checkbox"]:checked {
    accent-color: #0064d2;
}

.permission-item label {
    flex: 1;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    user-select: none;
    line-height: 1.4;
}

.permission-item input[type="checkbox"]:checked + label {
    color: #0064d2;
    font-weight: 600;
}

/* Estado quando checkbox está marcado */
.permission-item input[type="checkbox"]:checked ~ label,
.permission-item:has(input[type="checkbox"]:checked) label {
    color: #0064d2;
    font-weight: 600;
}

.permission-item:has(input[type="checkbox"]:checked) {
    border-color: #0064d2;
    background: #e6f0ff;
}

/* Fallback para navegadores que não suportam :has() */
.permission-item.checked {
    border-color: #0064d2;
    background: #e6f0ff;
}

.permission-item.checked label {
    color: #0064d2;
    font-weight: 600;
}

/* Responsivo para permissões */
@media (max-width: 768px) {
    .permissions-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .permissions-card-header {
        padding: 14px 16px;
    }
    
    .permissions-card-header h4 {
        font-size: 14px;
    }
    
    .permissions-card-body {
        padding: 16px;
    }
    
    .permissions-card-description {
        font-size: 13px;
        margin-bottom: 16px;
    }
    
    .permission-item {
        padding: 10px 14px;
    }
    
    .permission-item label {
        font-size: 13px;
    }
}

/* Footer */
.main-footer {
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
    width: 100%;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content p {
    color: #666666;
    font-size: 14px;
    margin: 0;
    font-weight: 400;
}

/* Ajuste para páginas com container */
body:not(.login-page) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body:not(.login-page) > .container {
    flex: 1;
}

/* Footer na página de login */
.login-page .main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.login-page .footer-content p {
    color: #666666;
}

@media (max-width: 768px) {
    .main-footer {
        padding: 15px 0;
        margin-top: 30px;
    }
    
    .footer-content p {
        font-size: 12px;
    }
}

/* Conciliação de Titulares */
.form-concilia {
    width: 100%;
    max-width: 100%;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.form-concilia .form-actions {
    margin-top: 16px;
}

.concilia-mensagens {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin: 0;
}

.alert-error {
    background: #fee;
    color: #c00;
    border: 1px solid #fcc;
}

.alert-success {
    background: #efe;
    color: #060;
    border: 1px solid #cfc;
}

.concilia-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #666;
}

.concilia-loading .spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #0064d2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.resultado-concilia {
    margin-top: 24px;
}

.resultado-secao {
    margin-bottom: 32px;
}

.resultado-secao h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: #333;
}

.resultado-resumo {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: #666;
}

.table-concilia {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table-concilia th,
.table-concilia td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table-concilia th {
    background: #f0f0f0;
    font-weight: 600;
    color: #333;
}

.table-concilia tbody tr:hover {
    background: #f8f9fa;
}

.badge-ativo {
    background: #28a745;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.lista-dependentes {
    margin: 0;
    padding-left: 18px;
    list-style: disc;
}

.lista-dependentes li {
    margin: 4px 0;
}

/* Prévia da conciliação */
.preview-concilia {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.preview-concilia h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #333;
}

.preview-desc {
    margin: 0 0 16px 0;
    font-size: 0.95rem;
    color: #555;
    line-height: 1.4;
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.preview-actions .btn,
.preview-actions .btn-primary,
.preview-actions .btn-secondary,
.resultado-actions .btn,
.resultado-actions .btn-secondary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    height: 40px;
    line-height: 1.5;
    vertical-align: middle;
    box-sizing: border-box;
}

.preview-actions .btn-secondary,
.resultado-actions .btn-secondary {
    text-decoration: none;
}

/* De-Para Arquivo Origem → Local */
.depara-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.depara-section h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: #333;
}

.depara-desc {
    margin: 0 0 12px 0;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.table-depara .depara-select {
    min-width: 220px;
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
}

/* Passo 2: Preview por local (mantidos × inativados) */
.preview-por-local {
    margin-bottom: 24px;
}

.preview-por-local .local-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: 0;
    border-bottom: 2px solid #e0e0e0;
    padding: 0 12px 0 0;
}

.preview-por-local .btn-tab {
    padding: 12px 20px;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    background: #f0f0f0;
    color: #555;
    cursor: pointer;
    margin-bottom: -2px;
}

.preview-por-local .btn-tab:hover {
    background: #e8e8e8;
}

.preview-por-local .btn-tab.active {
    background: #fff;
    color: #0064d2;
    border-color: #e0e0e0;
    border-bottom: 2px solid #fff;
    font-weight: 600;
}

.preview-por-local .local-tabs {
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
}

.preview-por-local .local-tab-panel {
    margin-bottom: 0;
    padding: 20px;
    background: #fff;
    min-height: 200px;
}

.preview-por-local .local-tab-title {
    margin: 0 0 16px 0;
    font-size: 1.05rem;
    color: #333;
}

.preview-por-local .local-section {
    margin-bottom: 32px;
    padding-top: 20px;
}

.preview-por-local .local-section:first-child {
    padding-top: 0;
}

.preview-por-local .local-section:last-child {
    margin-bottom: 0;
}

.preview-por-local .local-section h5 {
    margin: 0 0 8px 0;
    font-size: 0.95rem;
    color: #555;
}

.preview-por-local .local-section.mantidos h5 {
    color: #28a745;
}

.preview-por-local .local-section.inativados h5 {
    color: #dc3545;
}

.preview-por-local .local-section.novos h5 {
    color: #0064d2;
}

.preview-por-local .local-resumo {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #666;
}

/* Ícones no fim da linha (Check, X, Plus) */
.preview-por-local .table-icons .col-icon {
    width: 44px;
    text-align: right;
    white-space: nowrap;
}

.preview-por-local .icon-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

.preview-por-local .icon-status.icon-check {
    background: #28a745;
    color: #fff;
}

.preview-por-local .icon-status.icon-x {
    background: #dc3545;
    color: #fff;
}

.preview-por-local .icon-status.icon-plus {
    background: #0064d2;
    color: #fff;
}

