/* Reset e Configurações Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 50%, #1B5E20 100%);
    min-height: 100vh;
    color: #333;
}

/* Tela de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 
                0 10px 20px rgba(46, 139, 87, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(244, 67, 54, 0.1);
}

.logo {
    margin-bottom: 30px;
}

.logo i {
    font-size: 60px;
    color: #F44336;
    margin-bottom: 10px;
}

.logo h1 {
    color: #333;
    font-size: 32px;
    margin-bottom: 5px;
    font-weight: 700;
}

.logo p {
    color: #666;
    font-size: 16px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #F44336;
    font-size: 18px;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-group input:focus {
    outline: none;
    border-color: #F44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(244, 67, 54, 0.3);
}

.btn-login i {
    margin-right: 8px;
}

.error-message {
    background: #ff4757;
    color: white;
    padding: 10px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}



/* Tela Principal */
.header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 
                0 2px 8px rgba(46, 139, 87, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(244, 67, 54, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 30px;
    /* max-width: 1200px; */
    margin: 0 auto;
}

.logo-header {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

.logo-header i {
    color: #F44336;
    margin-right: 10px;
    font-size: 28px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.badge {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-logout {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: #ff3742;
    transform: translateY(-1px);
}

/* Navegação */
.nav-tabs {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 0 30px;
    display: flex;
    border-bottom: 3px solid rgba(244, 67, 54, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-tab {
    background: none;
    border: none;
    padding: 15px 25px;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-tab:hover {
    color: #F44336;
    background: #f8f9fa;
}

.nav-tab.active {
    color: #F44336;
    border-bottom-color: #F44336;
    font-weight: 600;
}

/* Conteúdo Principal */
.main-content {
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    min-height: calc(100vh - 140px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.content-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

@media (min-width: 769px) {
    .content-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }
    
    .relatorio-buttons {
        flex-direction: row !important;
    }
}

/* Para todas as telas - botões sempre lado a lado */
.relatorio-buttons {
    flex-direction: row !important;
}

#relatorioButtonsContainer {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
}

#relatorioButtonsContainer button {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Forçar layout horizontal para os botões em todas as situações */
#imprimirRelatorioBtn,
#exportPdfBtn,
#exportRelatorioBtn {
    display: inline-block !important;
    float: none !important;
    clear: none !important;
}

#relatorioButtonsContainer {
    white-space: nowrap;
}

#relatorioButtonsContainer::after {
    content: "";
    display: table;
    clear: both;
}

.content-header h2 {
    color: #333;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(244, 67, 54, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #C62828 0%, #B71C1C 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

#exportPdfBtn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
    color: white !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#exportPdfBtn:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%) !important;
}

.btn-edit {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.btn-edit:hover {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-disabled {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: not-allowed;
    opacity: 0.6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 5px;
}

/* Tabelas */
.table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1), 
                0 4px 10px rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.05);
}

/* Mobile cards - escondidos no desktop */
.mobile-cards {
    display: none;
}

/* Estilos para Relatórios */
.relatorio-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.relatorio-buttons button {
    display: inline-block !important;
    margin: 0 !important;
}

.filtros-container {
    margin-bottom: 25px;
}

.filtros-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.filtros-card h3 {
    color: #2E7D32;
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filtros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.filtro-group {
    display: flex;
    flex-direction: column;
}

.filtro-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    font-size: 14px;
}

.filtro-input {
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.filtro-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.filtros-buttons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.resumo-container {
    margin-bottom: 25px;
}

.resumo-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.resumo-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.resumo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
}

.resumo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.resumo-info h4 {
    margin: 0 0 5px 0;
    color: #495057;
    font-size: 14px;
    font-weight: 600;
}

.resumo-info span {
    font-size: 20px;
    font-weight: 700;
    color: #2E7D32;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

tbody td {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

tbody tr:hover {
    background: #f8f9fa;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25), 
                0 10px 20px rgba(76, 175, 80, 0.1);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(244, 67, 54, 0.1);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex-grow: 1;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox personalizado */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom {
    background: #4CAF50;
    border-color: #4CAF50;
}

.checkbox-label input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label:hover .checkbox-custom {
    border-color: #4CAF50;
}

/* Badges para status */
.badge-success {
    background: #4CAF50;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-danger {
    background: #F44336;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.btn-warning {
    background: #FF9800;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.btn-warning:hover {
    background: #F57C00;
    transform: translateY(-1px);
}

.btn-success {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin: 0 2px;
}

.btn-success:hover {
    background: #388E3C;
    transform: translateY(-1px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #F44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
}

/* Loading */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #F44336;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 4000;
    transform: translateX(400px);
    transition: all 0.3s ease;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background: #2ed573;
}

.toast.error {
    background: #ff4757;
}

.toast.info {
    background: #3742fa;
}

/* Modal de Confirmação */
.confirm-modal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.confirm-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    margin: 10% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 
                0 10px 20px rgba(244, 67, 54, 0.15);
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(244, 67, 54, 0.1);
    overflow: hidden;
    position: relative;
}

@keyframes slideIn {
    from {
        transform: translateY(-100px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.confirm-modal-header {
    background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.confirm-modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

.confirm-modal-header i {
    font-size: 36px;
    margin-bottom: 10px;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-8px); }
    60% { transform: translateY(-4px); }
}

.confirm-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
    position: relative;
}

.confirm-modal-body {
    padding: 30px 25px;
    text-align: center;
}

.confirm-modal-body p {
    font-size: 16px;
    color: #495057;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

.confirm-modal-buttons {
    display: flex;
    gap: 15px;
    padding: 0 25px 25px;
    justify-content: space-between;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

.btn-confirm {
    background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #E53935 0%, #B71C1C 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 67, 54, 0.5);
}

.btn-cancel i,
.btn-confirm i {
    font-size: 12px;
}

/* Responsivo para modal de confirmação */
@media (max-width: 768px) {
    .confirm-modal-content {
        margin: 20% auto;
        width: 95%;
        max-width: 400px;
    }

    .confirm-modal-header {
        padding: 20px;
    }

    .confirm-modal-header i {
        font-size: 32px;
    }

    .confirm-modal-header h3 {
        font-size: 18px;
    }

    .confirm-modal-body {
        padding: 25px 20px;
    }

    .confirm-modal-body p {
        font-size: 15px;
    }

    .confirm-modal-buttons {
        flex-direction: column;
        gap: 12px;
        padding: 0 20px 20px;
    }

    .btn-cancel,
    .btn-confirm {
        padding: 12px 15px;
        font-size: 13px;
    }

    /* Relatórios responsivos */
    .filtros-card {
        padding: 20px 15px;
    }

    .filtros-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filtros-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .filtros-buttons button {
        width: 100%;
        justify-content: center;
    }

    .relatorio-buttons {
        flex-direction: column !important;
        gap: 10px;
        justify-content: center;
        flex-wrap: nowrap;
        align-items: stretch;
    }

    .relatorio-buttons button {
        flex: 1 1 auto;
        width: 100%;
        min-width: auto;
        margin-bottom: 0;
        padding: 12px 20px;
        font-size: 14px;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }

    .resumo-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
    }

    .resumo-card {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .resumo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .resumo-info span {
        font-size: 18px;
    }
}

.screen {
    min-height: 100vh;
}

/* Tablets - versão híbrida */
@media (max-width: 1024px) and (min-width: 769px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        font-size: 13px;
        min-width: 800px;
    }

    thead th,
    tbody td {
        padding: 10px 8px;
    }

    .btn-edit,
    .btn-danger {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Responsividade Mobile */
@media (max-width: 768px) {
    .header {
        background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
        color: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .header-content {
        padding: 15px;
        /* flex-direction: column; */
        gap: 15px;
        position: relative;
    }

    .logo-header {
        font-size: 18px;
        color: white;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 15px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .logo-header img {
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    }

    .logo-header span {
        color: white;
        font-weight: 700;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .user-info {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 20px;
        padding: 15px 20px;
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        position: relative;
        overflow: hidden;
    }

    .user-info::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        animation: shimmer 3s infinite;
    }

    @keyframes shimmer {
        0% { transform: translateX(-100%); }
        50% { transform: translateX(100%); }
        100% { transform: translateX(100%); }
    }

    .user-info-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        z-index: 1;
    }

    .user-info #userName {
        color: white;
        font-weight: 600;
        font-size: 16px;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
        margin: 0;
    }

    .user-info .badge {
        background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
        color: white;
        padding: 4px 12px;
        border-radius: 15px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    .btn-logout {
        background: linear-gradient(135deg, #F44336 0%, #C62828 100%);
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: 15px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
        border: 1px solid rgba(255, 255, 255, 0.2);
        z-index: 1;
        backdrop-filter: blur(5px);
    }

    .btn-logout:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
    }

    .btn-logout i {
        margin-right: 6px;
        font-size: 12px;
    }

    .nav-tabs {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
        backdrop-filter: blur(10px);
        padding: 8px 15px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-bottom: none;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tab {
        padding: 12px 18px;
        font-size: 13px;
        min-width: 110px;
        flex-shrink: 0;
        background: rgba(255, 255, 255, 0.7);
        margin: 4px 6px;
        border-radius: 12px;
        border: 1px solid rgba(76, 175, 80, 0.1);
        transition: all 0.3s ease;
        color: #495057;
        font-weight: 500;
        backdrop-filter: blur(5px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .nav-tab:hover {
        background: rgba(76, 175, 80, 0.1);
        color: #2E7D32;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.15);
    }

    .nav-tab.active {
        background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
        color: white;
        border-color: #2E7D32;
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
        font-weight: 600;
    }

    .nav-tab i {
        margin-right: 6px;
        font-size: 12px;
    }

    .main-content {
        padding: 20px 15px;
        margin-top: -10px;
        border-radius: 25px 25px 0 0;
        background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
        box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.1);
        position: relative;
        z-index: 10;
    }

    .main-content::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #e9ecef;
        border-radius: 2px;
    }

    .content-header {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(46, 125, 50, 0.05) 100%);
        padding: 20px;
        border-radius: 20px;
        border: 1px solid rgba(76, 175, 80, 0.1);
        margin-bottom: 25px;
    }

    .content-header h2 {
        font-size: 20px;
        text-align: center;
        color: #2E7D32;
        margin: 0;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .content-header h2 i {
        background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin-right: 8px;
        font-size: 18px;
    }

    /* Tabelas responsivas - Layout de Cards */
    .table-container {
        overflow: visible;
        border-radius: 8px;
        box-shadow: none;
    }

    .main-content > .tab-content > .table-container table {
        display: none; /* Esconde tabela tradicional no mobile apenas para as abas principais */
    }
    
    /* Manter tabelas do dashboard visíveis no mobile */
    .dashboard-table-card table {
        display: table !important;
    }

    /* Container de cards para mobile */
    .mobile-cards {
        display: block;
    }

    .mobile-card {
        background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
        border-radius: 18px;
        margin-bottom: 16px;
        padding: 20px;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(76, 175, 80, 0.1);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }

    .mobile-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    }

    .mobile-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(76, 175, 80, 0.15);
        border-color: rgba(76, 175, 80, 0.2);
    }

    .mobile-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #f8f9fa;
    }

    .mobile-card-id {
        background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
        color: white;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: bold;
    }

    .mobile-card-body {
        display: grid;
        gap: 12px;
    }

    .mobile-card-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
    }

    .mobile-card-label {
        font-weight: 600;
        color: #495057;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .mobile-card-value {
        color: #333;
        font-size: 14px;
        text-align: right;
        flex: 1;
        margin-left: 10px;
    }

    .mobile-card-actions {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f8f9fa;
        display: flex;
        gap: 8px;
        justify-content: flex-end;
    }

    .btn-edit,
    .btn-danger {
        padding: 8px 12px;
        font-size: 12px;
        margin-right: 0;
        border-radius: 8px;
        display: flex;
        align-items: center;
        gap: 5px;
    }

    .btn-edit i,
    .btn-danger i {
        font-size: 12px;
    }

    /* Modal responsivo */
    .modal-content {
        margin: 5% auto;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-body {
        padding: 20px 15px;
    }

    .modal-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .modal-buttons button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }

    /* Login responsivo */
    .login-box {
        padding: 30px 20px;
        margin: 20px;
        max-width: 350px;
    }

    .logo i {
        font-size: 50px;
    }

    .logo h1 {
        font-size: 28px;
    }

    .input-group input {
        padding: 12px 12px 12px 45px;
        font-size: 16px; /* Evita zoom no iOS */
    }

    .input-group i {
        left: 12px;
        font-size: 16px;
    }

    /* Botões responsivos */
    .btn-primary {
        padding: 12px 15px;
        font-size: 14px;
        justify-content: center;
    }

    /* Toast responsivo */
    .toast {
        right: 10px;
        left: 10px;
        transform: translateY(-100px);
        margin: 0 10px;
    }

    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 12px;
        gap: 12px;
    }

    .logo-header {
        padding: 8px;
        font-size: 16px;
    }

    .logo-header img {
        width: 80px;
    }

    .user-info {
        padding: 12px 16px;
        border-radius: 16px;
    }

    .user-info #userName {
        font-size: 14px;
    }

    .btn-logout {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 12px;
    }

    .nav-tabs {
        padding: 6px 10px;
    }

    .nav-tab {
        padding: 10px 14px;
        font-size: 12px;
        min-width: 90px;
        margin: 3px 4px;
        border-radius: 10px;
    }

    .main-content {
        padding: 15px 10px;
        border-radius: 20px 20px 0 0;
    }

    .content-header {
        padding: 15px;
        gap: 15px;
        border-radius: 16px;
        margin-bottom: 20px;
    }

    .content-header h2 {
        font-size: 18px;
    }

    .content-header h2 i {
        font-size: 16px;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 14px;
        border-radius: 12px;
        font-size: 14px;
        font-weight: 600;
    }

    /* Cards ainda menores em telas muito pequenas */
    .mobile-card {
        padding: 15px;
        margin-bottom: 12px;
    }

    .mobile-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .mobile-card-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        padding: 6px 0;
    }

    .mobile-card-label {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .mobile-card-value {
        font-size: 14px;
        text-align: left;
        margin-left: 0;
        font-weight: 500;
    }

    .mobile-card-actions {
        flex-direction: column;
        gap: 8px;
    }

    .btn-edit,
    .btn-danger {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .modal-content {
        width: 98%;
        margin: 2% auto;
    }

    .modal-body {
        padding: 15px 10px;
    }

    .login-box {
        padding: 25px 15px;
        margin: 15px;
    }

    .nav-tab {
        padding: 10px 15px;
        font-size: 12px;
        min-width: 100px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 12px;
    }

    .badge {
        padding: 3px 8px;
        font-size: 10px;
    }

    /* Botões de relatório em telas pequenas */
    .relatorio-buttons {
        flex-direction: column !important;
        gap: 12px;
        align-items: stretch;
    }
    
    #relatorioButtonsContainer {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }
    
    .relatorio-buttons button,
    #imprimirRelatorioBtn,
    #exportPdfBtn,
    #exportRelatorioBtn {
        width: 100% !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
        text-align: center !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        flex: 1 1 auto !important;
        min-width: auto !important;
        float: none !important;
        clear: none !important;
        white-space: nowrap !important;
    }
}

/* Melhorias de toque para mobile */
@media (hover: none) and (pointer: coarse) {
    .btn-primary:hover,
    .btn-secondary:hover,
    .btn-danger:hover,
    .btn-edit:hover,
    .btn-logout:hover {
        transform: none;
        box-shadow: none;
    }

    .btn-login:hover {
        transform: none;
        box-shadow: none;
    }

    .nav-tab:hover {
        background: none;
    }
}

/* Acessibilidade */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Estilos de Impressão */
@media print {
    /* Esconder elementos desnecessários na impressão */
    .header,
    .nav-tabs,
    .filtros-container,
    .relatorio-buttons,
    #relatorioButtonsContainer,
    #imprimirRelatorioBtn,
    #exportPdfBtn,
    #exportRelatorioBtn,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .btn-edit,
    .toast,
    .modal,
    .loading,
    .mobile-cards {
        display: none !important;
    }

    /* Esconder todas as outras abas exceto relatórios */
    #lancamentos,
    #empresas,
    #maquinas,
    #usuarios {
        display: none !important;
    }

    /* Configurações gerais de impressão */
    * {
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    html, body {
        background: white !important;
        color: black !important;
        font-family: Arial, sans-serif !important;
        font-size: 12px !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        padding: 5px !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .main-content {
        background: white !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        page-break-after: avoid !important;
        overflow: visible !important;
    }

    /* Container de relatórios específico */
    #relatorios {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    /* Cabeçalho do relatório para impressão */
    .tab-content {
        page-break-inside: auto;
    }

    .tab-content h2 {
        color: black !important;
        text-align: center;
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 20px;
        border-bottom: 2px solid black;
        padding-bottom: 10px;
        page-break-after: avoid;
    }

    /* Resumo na impressão */
    .resumo-container {
        background: white !important;
        border: 1px solid black !important;
        margin-bottom: 20px;
        page-break-inside: avoid;
        page-break-after: avoid;
        padding: 15px;
    }

    .resumo-cards {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 15px !important;
    }

    .resumo-card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        margin-bottom: 0;
        padding: 10px;
        display: flex !important;
        flex-direction: column !important;
        align-items: center;
        text-align: center;
        border-radius: 0 !important;
    }

    .resumo-icon {
        background: #f0f0f0 !important;
        color: #333 !important;
        width: 30px !important;
        height: 30px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-bottom: 8px;
        font-size: 14px !important;
    }

    .resumo-info h4 {
        color: black !important;
        font-size: 12px;
        margin: 0;
    }

    .resumo-info span {
        color: black !important;
        font-weight: bold;
        font-size: 12px;
    }

    /* Tabela para impressão */
    .mobile-cards {
        display: none !important;
    }

    table {
        display: table !important;
        width: 100% !important;
        border-collapse: collapse;
        margin: 10px 0 0 0 !important;
        page-break-inside: auto;
    }

    table thead {
        display: table-header-group;
        page-break-after: avoid;
    }

    table tbody {
        display: table-row-group;
    }
    
    /* Repetir cabeçalho da tabela em cada página */
    @page {
        margin: 1cm;
    }
    
    thead {
        display: table-header-group;
    }

    table th,
    table td {
        border: 1px solid black !important;
        padding: 4px 3px !important;
        text-align: left;
        background: white !important;
        color: black !important;
        font-size: 9px !important;
        vertical-align: top;
        line-height: 1.1 !important;
    }

    table th {
        background: #f0f0f0 !important;
        font-weight: bold;
        text-align: center;
        padding: 3px 2px !important;
    }

    table tr {
        page-break-inside: avoid;
    }

    /* Forçar quebra de página quando necessário */
    .page-break {
        page-break-before: always;
    }

    /* Configuração da página */
    @page {
        margin: 1cm;
        size: A4;
        padding: 0;
        @bottom-right {
            content: "Página " counter(page);
            font-size: 10px;
        }
        @bottom-left {
            content: "Manhattan";
            font-size: 10px;
        }
    }

    /* Evitar quebras de página desnecessárias */
    @page :last {
        margin-bottom: 0;
    }

    /* Ajustes para economizar papel */
    .table-container {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
    }

    /* Forçar fim do conteúdo da página */
    body::after {
        content: "";
        display: block;
        height: 0 !important;
        page-break-after: auto !important;
    }

    /* Controle rigoroso de elementos */
    .tab-content {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        height: auto !important;
        page-break-after: avoid !important;
    }

    .content-header {
        background: white !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 0 10px 0 !important;
        page-break-after: avoid !important;
    }

    /* Garantir que nenhum elemento force nova página */
    .resumo-container {
        background: white !important;
        border: 1px solid black !important;
        margin: 0 0 15px 0 !important;
        padding: 15px !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important;
    }

    .table-container {
        background: white !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        page-break-after: avoid !important;
    }

    /* Último elemento sem margem para evitar página extra */
    .table-container:last-child,
    table:last-child,
    .tab-content:last-child {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        page-break-after: avoid !important;
    }
}

/* Estilos para o aviso de usuário limitado */
.aviso-container {
    margin: 15px 0;
    padding: 0;
}

.aviso-card {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 8px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.2);
    border-left: 4px solid #1abc9c;
    animation: slideInInfo 0.3s ease-out;
}

.aviso-card i {
    font-size: 18px;
    color: #ecf0f1;
    opacity: 0.9;
}

.aviso-card span {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

@keyframes slideInInfo {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsivo para mobile */
@media (max-width: 768px) {
    .aviso-card {
        padding: 10px 14px;
        border-radius: 6px;
        gap: 10px;
    }
    
    .aviso-card i {
        font-size: 16px;
    }
    
    .aviso-card span {
        font-size: 13px;
    }
}

/* SOBRESCREVER PARA MOBILE - BOTÕES EM COLUNA */
@media (max-width: 768px) {
    .relatorio-buttons {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    #relatorioButtonsContainer {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    #imprimirRelatorioBtn,
    #exportPdfBtn,
    #exportRelatorioBtn {
        display: flex !important;
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        float: none !important;
        clear: none !important;
        white-space: nowrap !important;
    }
}

/* =========================
   DASHBOARD ADMINISTRATIVO
   ========================= */

/* Dashboard Stats Cards */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.stat-info h3 {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info span {
    color: #2E7D32;
    font-size: 28px;
    font-weight: 700;
    display: block;
    margin-bottom: 5px;
}

.stat-info small {
    color: #666;
    font-size: 12px;
}

/* Dashboard Charts */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.chart-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.chart-card {
    padding: 25px;
}

.chart-card h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chart-card h3 i {
    color: #4CAF50;
}

.chart-content {
    position: relative;
    height: 300px;
}

.chart-content canvas {
    max-height: 100%;
}

/* Dashboard Tables */
.dashboard-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.table-dashboard-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.dashboard-table-card {
    padding: 25px;
}

.dashboard-table-card h3 {
    color: #333;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-table-card h3 i {
    color: #4CAF50;
}

.dashboard-table-card .table-container {
    margin: 0;
    box-shadow: none;
    border: 1px solid #e0e0e0;
    min-height: 200px; /* Altura mínima para garantir visibilidade */
    max-height: 400px;
    overflow-y: auto;
}

/* Estilos específicos para as tabelas do dashboard */
.dashboard-table-card table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
}

.dashboard-table-card table thead th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: 600;
    padding: 12px 8px;
    border-bottom: 2px solid #4CAF50;
    text-align: left;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dashboard-table-card table tbody td {
    padding: 10px 8px;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: middle;
}

.dashboard-table-card table tbody tr:nth-child(even) {
    background-color: rgba(248, 249, 250, 0.5);
}

.dashboard-table-card table tbody tr:hover {
    background-color: rgba(76, 175, 80, 0.1);
    transition: background-color 0.2s ease;
}

/* Mensagem quando não há dados */
.dashboard-table-card .no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.dashboard-table-card .loading-table {
    text-align: center;
    padding: 40px 20px;
    color: #4CAF50;
}

/* Responsividade para Dashboard */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .stat-info span {
        font-size: 24px;
    }

    .dashboard-charts {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .chart-container {
        margin-bottom: 20px;
    }

    .chart-card {
        padding: 20px;
    }

    .chart-content {
        height: 250px;
    }

    .dashboard-tables {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .dashboard-table-card {
        padding: 20px;
    }

    /* Tabelas do Dashboard - Manter como tabela no mobile */
    .dashboard-table-card .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-table-card table {
        min-width: 100%;
        width: auto;
        font-size: 12px;
    }

    .dashboard-table-card table th,
    .dashboard-table-card table td {
        padding: 8px 4px;
        white-space: nowrap;
        font-size: 11px;
    }

    .dashboard-table-card table th {
        background-color: #f8f9fa;
        font-weight: 600;
        color: #333;
        border-bottom: 2px solid #4CAF50;
    }

    .dashboard-table-card table tbody tr:nth-child(even) {
        background-color: #f8f9fa;
    }

    .dashboard-table-card table tbody tr:hover {
        background-color: #e8f5e8;
    }

    /* Ajustar larguras específicas das colunas */
    #ultimosLancamentosTable th:nth-child(1),
    #ultimosLancamentosTable td:nth-child(1) {
        min-width: 80px;
    }

    #ultimosLancamentosTable th:nth-child(2),
    #ultimosLancamentosTable td:nth-child(2) {
        min-width: 80px;
        text-align: right;
    }

    #ultimosLancamentosTable th:nth-child(3),
    #ultimosLancamentosTable td:nth-child(3) {
        min-width: 70px;
        font-weight: bold;
    }

    #ultimosLancamentosTable th:nth-child(4),
    #ultimosLancamentosTable td:nth-child(4) {
        min-width: 100px;
    }

    #ultimosLancamentosTable th:nth-child(5),
    #ultimosLancamentosTable td:nth-child(5) {
        min-width: 80px;
    }

    #topEmpresasTable th:nth-child(1),
    #topEmpresasTable td:nth-child(1) {
        min-width: 30px;
        text-align: center;
    }

    #topEmpresasTable th:nth-child(2),
    #topEmpresasTable td:nth-child(2) {
        min-width: 120px;
    }

    #topEmpresasTable th:nth-child(3),
    #topEmpresasTable td:nth-child(3) {
        min-width: 80px;
        text-align: center;
    }

    #topEmpresasTable th:nth-child(4),
    #topEmpresasTable td:nth-child(4) {
        min-width: 100px;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        gap: 10px;
    }

    .stat-card {
        padding: 15px;
        gap: 10px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stat-info h3 {
        font-size: 12px;
    }

    .stat-info span {
        font-size: 20px;
    }

    .chart-card {
        padding: 15px;
    }

    .chart-card h3 {
        font-size: 16px;
    }

    .chart-content {
        height: 200px;
    }

    .dashboard-table-card {
        padding: 15px;
    }

    .dashboard-table-card h3 {
        font-size: 16px;
    }

    /* Tabelas ainda menores no mobile pequeno */
    .dashboard-table-card table {
        font-size: 10px;
    }

    .dashboard-table-card table th,
    .dashboard-table-card table td {
        padding: 6px 2px;
        font-size: 10px;
    }

    /* Ajustar larguras para telas pequenas */
    #ultimosLancamentosTable th:nth-child(1),
    #ultimosLancamentosTable td:nth-child(1) {
        min-width: 70px;
    }

    #ultimosLancamentosTable th:nth-child(2),
    #ultimosLancamentosTable td:nth-child(2) {
        min-width: 70px;
    }

    #ultimosLancamentosTable th:nth-child(3),
    #ultimosLancamentosTable td:nth-child(3) {
        min-width: 60px;
    }

    #ultimosLancamentosTable th:nth-child(4),
    #ultimosLancamentosTable td:nth-child(4) {
        min-width: 80px;
    }

    #ultimosLancamentosTable th:nth-child(5),
    #ultimosLancamentosTable td:nth-child(5) {
        min-width: 70px;
    }

    #topEmpresasTable th:nth-child(2),
    #topEmpresasTable td:nth-child(2) {
        min-width: 100px;
    }

    #topEmpresasTable th:nth-child(4),
    #topEmpresasTable td:nth-child(4) {
        min-width: 80px;
    }
}

/* Estilos para status dos serviços */
.status-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-ativo {
    background-color: #4CAF50;
    color: white;
}

.status-inativo {
    background-color: #f44336;
    color: white;
}

.status-editavel {
    background-color: #2196F3;
    color: white;
}

.status-fixo {
    background-color: #9E9E9E;
    color: white;
}

/* Estilos para serviços adicionais */
.servico-adicional-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
    background: #f9f9f9;
    transition: background-color 0.2s;
}

.servico-adicional-item:hover {
    background: #f0f0f0;
}

#servicosAdicionaisContainer {
    margin-top: 15px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
}

#servicosAdicionaisContainer label {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
}

#addServicoBtn {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

#addServicoBtn:hover {
    background: #45a049;
}

/* Ajustar botões de remover serviço */
.servico-adicional-item .btn-danger {
    background: #f44336;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.servico-adicional-item .btn-danger:hover {
    background: #d32f2f;
}

/* Melhorar visualização do campo preço editável */
#precoGroup {
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.3s ease;
}

#precoGroup.editavel {
    border-color: #2196F3;
    background: #e3f2fd;
}

.editavel-hint {
    animation: pulse-hint 2s infinite;
}

@keyframes pulse-hint {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Estilos para a tela de Contadores */
.contador-form-container {
    margin-bottom: 30px;
}

.contador-form-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.1);
    transition: all 0.3s ease;
}

.contador-form-card:hover {
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.contador-form-card h3 {
    color: #333;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contador-form-card h3 i {
    color: #F44336;
    font-size: 20px;
}

.contador-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    align-items: end;
}

.contador-form-group {
    display: flex;
    flex-direction: column;
}

.contador-form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.contador-input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.contador-input:focus {
    outline: none;
    border-color: #F44336;
    box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.1);
}

.contador-input:readonly {
    background: #f5f5f5;
    cursor: not-allowed;
    font-weight: 600;
    color: #4CAF50;
    font-size: 18px;
    text-align: center;
}

.contador-input:not(:readonly) {
    background: white;
    color: #333;
    font-weight: normal;
    border: 2px solid #4CAF50;
}

.contador-input:not(:readonly):focus {
    border-color: #2E7D32;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-increment {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.btn-increment:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.btn-increment:disabled {
    background: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-increment i {
    font-size: 16px;
}

.contador-info {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
}

.contador-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.contador-info-item:last-child {
    border-bottom: none;
}

.contador-info-label {
    font-weight: 600;
    color: #333;
}

.contador-info-item span:last-child {
    color: #4CAF50;
    font-weight: 600;
}

/* Estilos para dispositivos móveis */
@media (max-width: 768px) {
    .contador-form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contador-form-card {
        padding: 20px 15px;
        margin: 0 15px;
    }
    
    .contador-form-card h3 {
        font-size: 16px;
    }
    
    .contador-input {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .btn-increment {
        padding: 10px 15px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .contador-info {
        margin: 15px;
        padding: 15px;
    }
    
    .contador-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .contador-form-container {
        margin-bottom: 20px;
    }
    
    .contador-form-card {
        border-radius: 10px;
        padding: 15px 10px;
    }
    
    .contador-form-card h3 {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .contador-form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .contador-input {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .btn-increment {
        padding: 8px 12px;
        font-size: 13px;
        min-height: 40px;
    }
}

/* Estilos de Paginação */
.pagination-container {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    background: white;
    border: 2px solid #e0e0e0;
    color: #333;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.pagination-btn:hover {
    background: #f5f5f5;
    border-color: #4CAF50;
    color: #4CAF50;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
    font-weight: 700;
}

.pagination-btn:disabled {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #999;
    cursor: not-allowed;
    transform: none;
}

.pagination-ellipsis {
    color: #999;
    font-weight: bold;
    padding: 8px 4px;
    user-select: none;
}

.pagination-info {
    text-align: center;
    color: #666;
    font-size: 14px;
    font-weight: 500;
    background: #f8f9fa;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Responsividade da Paginação */
@media (max-width: 768px) {
    .pagination-container {
        margin: 15px 0;
        gap: 10px;
    }
    
    .pagination {
        gap: 5px;
        padding: 0 10px;
    }
    
    .pagination-btn {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 32px;
    }
    
    .pagination-btn i {
        font-size: 10px;
    }
    
    .pagination-info {
        font-size: 12px;
        padding: 8px 15px;
    }
}

@media (max-width: 480px) {
    .pagination {
        gap: 3px;
        padding: 0 5px;
    }
    
    .pagination-btn {
        padding: 5px 6px;
        font-size: 11px;
        min-width: 28px;
    }
    
    .pagination-btn span {
        display: none;
    }
    
    .pagination-info {
        font-size: 11px;
        padding: 6px 12px;
        text-align: center;
        line-height: 1.3;
    }
}

/* Modal de Edição de Contador */
#editContadorModal {
    display: none;
    position: fixed;
    z-index: 5000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

#editContadorModal .modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3), 
                0 10px 20px rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.1);
    overflow: hidden;
    animation: slideIn 0.3s ease;
    width: 90%;
    max-width: 400px;
}

#editContadorModal .modal-header {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#editContadorModal .modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 3s infinite;
}

#editContadorModal .modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 1;
    position: relative;
}

#editContadorModal .modal-header i {
    margin-right: 10px;
    font-size: 18px;
}

#editContadorModal .modal-body {
    padding: 30px 25px;
}

#editContadorModal .form-group {
    margin-bottom: 20px;
}

#editContadorModal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#editContadorModal .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

#editContadorModal .form-control:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#editContadorModal .form-control:readonly {
    background: #f5f5f5;
    color: #666;
    cursor: not-allowed;
}

#editContadorModal .modal-buttons {
    display: flex;
    gap: 15px;
    padding: 0 25px 25px;
    justify-content: space-between;
}

#editContadorModal .modal-buttons button {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#editContadorModal .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#editContadorModal .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

#editContadorModal .btn-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#editContadorModal .btn-primary:hover {
    background: linear-gradient(135deg, #45A049 0%, #1B5E20 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.5);
}

/* Responsivo para modal de edição */
@media (max-width: 768px) {
    #editContadorModal .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }

    #editContadorModal .modal-header {
        padding: 20px;
    }

    #editContadorModal .modal-header h3 {
        font-size: 18px;
    }

    #editContadorModal .modal-body {
        padding: 25px 20px;
    }

    #editContadorModal .modal-buttons {
        padding: 0 20px 20px;
    }

    #editContadorModal .modal-buttons button {
        padding: 12px 16px;
        font-size: 13px;
    }
}
