html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  padding-top: 140px; /* Ajustado para acomodar a logo maior */
}

/* Responsividade Mobile */
@media (max-width: 991.98px) {
  body {
    padding-top: 80px; /* Reduzir padding no mobile */
  }
  
  .navbar-logo {
    height: 50px !important; /* Logo menor no mobile */
  }
  
  .navbar-nav .nav-link {
    padding: 12px 16px !important;
    border-bottom: 1px solid #f8f9fa;
  }
  
  .navbar-nav .nav-link:last-child {
    border-bottom: none;
  }
  
  .nav-text {
    font-size: 16px;
  }
  
  .dropdown-menu {
    border: none;
    box-shadow: none;
    background: #f8f9fa;
    margin-left: 20px;
  }
  
  .dropdown-item {
    padding: 10px 16px !important;
    font-size: 15px;
  }
}

@media (min-width: 992px) {
  .navbar-logo {
    height: 96px; /* Logo normal no desktop */
  }
}

.modern-navbar {
    z-index: 1030; /* Garante que a navbar esteja acima de outros elementos */
}
.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px;
}



/* Dashboard Layout Improvements */
.main-content-dashboard {
    min-height: calc(100vh - 180px);
    padding-top: 20px;
}

.modern-body {
    background-color: #f8f9fa;
}

/* Navbar improvements */
.modern-navbar {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-brand img {
    max-height: 102px; /* Aumentado em 70% (60px * 1.7 = 102px) */
    width: auto;
}

/* Card improvements */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

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

/* Page header improvements */
.page-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e9ecef;
}

.page-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.page-title {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.page-subtitle {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

/* Button improvements */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Table improvements */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem 0.75rem;
}

.table tbody td {
    border: none;
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.table tbody tr {
    border-bottom: 1px solid #f1f3f4;
}

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

/* Loading improvements */
.spinner-border {
    border-width: 3px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    body {
        padding-top: 120px;
    }
    
    .main-content-dashboard {
        min-height: calc(100vh - 120px);
        padding-top: 10px;
    }
    
    .page-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* Status badges */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-online {
    background-color: #d4edda;
    color: #155724;
}

.status-offline {
    background-color: #f8d7da;
    color: #721c24;
}

.status-warning {
    background-color: #fff3cd;
    color: #856404;
}

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

.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

/* Notification improvements */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #f1f3f4;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f1f3f4;
    padding: 1.5rem;
}


/* Global Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-content {
    text-align: center;
    padding: 2rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Network Status Indicator */
.network-status {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    background: #dc3545;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    animation: slideDown 0.3s ease-out;
}

.network-status-content {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
}

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

/* Toast Improvements */
.toast {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.toast-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toast-body {
    background: rgba(255, 255, 255, 0.95);
}

/* Loading States for Tables */
.table-loading {
    position: relative;
    overflow: hidden;
}

.table-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    margin-bottom: 0;
    width: 60%;
}

.skeleton-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.skeleton-button {
    height: 2rem;
    width: 80px;
}

/* Progress Indicators */
.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle {
    transition: stroke-dashoffset 0.35s;
    transform-origin: 50% 50%;
}

/* Pulse Animation for Loading Elements */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

/* Loading Button States */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Improved Focus States */
.form-control:focus,
.form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Smooth Transitions */
* {
    transition: all 0.2s ease-in-out;
}

/* Disable transitions during page load */
.preload * {
    transition: none !important;
}

/* Loading Dots Animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0, 0, 0, 0);
        text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0),
                     0.5em 0 0 rgba(0, 0, 0, 0);
    }
    40% {
        color: currentColor;
        text-shadow: 0.25em 0 0 rgba(0, 0, 0, 0),
                     0.5em 0 0 rgba(0, 0, 0, 0);
    }
    60% {
        text-shadow: 0.25em 0 0 currentColor,
                     0.5em 0 0 rgba(0, 0, 0, 0);
    }
    80%, 100% {
        text-shadow: 0.25em 0 0 currentColor,
                     0.5em 0 0 currentColor;
    }
}

/* Melhorias para Botões e Elementos Mobile */
@media (max-width: 767.98px) {
  /* Botões maiores e mais fáceis de tocar no mobile */
  .btn {
    padding: 12px 20px;
    font-size: 16px;
    min-height: 44px; /* Tamanho mínimo recomendado para touch */
  }
  
  .btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
  }
  
  /* Cards responsivos */
  .card {
    margin-bottom: 1rem;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  /* Títulos de página */
  .page-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  /* Grupos de botões empilhados no mobile */
  .btn-group-mobile {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .btn-group-mobile .btn {
    width: 100%;
    margin-bottom: 0;
  }
  
  /* Formulários mais amigáveis ao mobile */
  .form-control {
    font-size: 16px; /* Evita zoom no iOS */
    padding: 12px;
    min-height: 44px;
  }
  
  .form-select {
    font-size: 16px;
    padding: 12px;
    min-height: 44px;
  }
  
  /* Alertas e notificações */
  .alert {
    margin-bottom: 1rem;
    padding: 1rem;
  }
  
  /* Estatísticas em cards */
  .stats-card {
    text-align: center;
    padding: 1.5rem 1rem;
  }
  
  .stats-number {
    font-size: 2rem;
    font-weight: bold;
  }
  
  .stats-label {
    font-size: 0.9rem;
    color: #6c757d;
  }
}

/* Melhorias para tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
  .btn {
    padding: 10px 16px;
    font-size: 15px;
  }
  
  .card-body {
    padding: 1.25rem;
  }
}

/* Otimizações para Tabelas e Grids Mobile */
@media (max-width: 767.98px) {
  /* Tabelas responsivas com scroll horizontal */
  .table-responsive {
    border: none;
    margin-bottom: 1rem;
  }
  
  .table-mobile {
    font-size: 14px;
  }
  
  .table-mobile th,
  .table-mobile td {
    padding: 8px 6px;
    vertical-align: middle;
  }
  
  /* Ocultar colunas menos importantes no mobile */
  .table .d-none-mobile {
    display: none !important;
  }
  
  /* Cards como alternativa às tabelas no mobile */
  .mobile-card-list {
    display: block;
  }
  
  .mobile-card-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f8f9fa;
  }
  
  .mobile-card-title {
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
  }
  
  .mobile-card-body {
    font-size: 0.9rem;
    color: #6c757d;
  }
  
  .mobile-card-actions {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f8f9fa;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .mobile-card-actions .btn {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    padding: 8px 12px;
  }
  
  /* Paginação mobile */
  .pagination {
    justify-content: center;
    margin-top: 1rem;
  }
  
  .pagination .page-link {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  /* Filtros e busca mobile */
  .mobile-filters {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
  }
  
  .mobile-search {
    margin-bottom: 1rem;
  }
  
  .mobile-search .form-control {
    border-radius: 25px;
    padding-left: 2.5rem;
  }
  
  .mobile-search .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
  }
}

/* Grids responsivos */
@media (max-width: 575.98px) {
  .row > [class*="col-"] {
    margin-bottom: 1rem;
  }
  
  /* Forçar colunas a ocupar largura total em telas muito pequenas */
  .col-force-full {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Otimizações para Modais e Formulários Mobile */
@media (max-width: 767.98px) {
  /* Modais ocupam quase toda a tela no mobile */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .modal-dialog-centered {
    min-height: calc(100% - 1rem);
  }
  
  .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  }
  
  .modal-header {
    padding: 1.25rem 1rem 1rem;
    border-bottom: 1px solid #f8f9fa;
  }
  
  .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
  }
  
  .modal-body {
    padding: 1rem;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .modal-footer {
    padding: 1rem;
    border-top: 1px solid #f8f9fa;
    gap: 8px;
  }
  
  .modal-footer .btn {
    flex: 1;
    margin: 0;
  }
  
  /* Formulários mobile-friendly */
  .form-group {
    margin-bottom: 1.25rem;
  }
  
  .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
  }
  
  .form-control,
  .form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }
  
  .form-control:focus,
  .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
  }
  
  /* Checkboxes e radios maiores */
  .form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
  }
  
  .form-check-label {
    margin-left: 0.5rem;
    font-size: 1rem;
  }
  
  /* Grupos de input */
  .input-group {
    margin-bottom: 1rem;
  }
  
  .input-group-text {
    padding: 12px;
    font-size: 16px;
    border: 2px solid #e9ecef;
  }
  
  /* Validação de formulários */
  .invalid-feedback {
    font-size: 0.9rem;
    margin-top: 0.25rem;
  }
  
  .is-invalid {
    border-color: #dc3545 !important;
  }
  
  .is-valid {
    border-color: #198754 !important;
  }
}

/* Melhorias específicas para tablets */
@media (min-width: 768px) and (max-width: 991.98px) {
  .modal-dialog {
    max-width: 600px;
  }
  
  .modal-body {
    padding: 1.5rem;
  }
  
  .form-control,
  .form-select {
    padding: 10px 12px;
    font-size: 15px;
  }
}

/* Melhorias para telas grandes */
@media (min-width: 992px) {
  .modal-lg {
    max-width: 900px;
  }
  
  .modal-xl {
    max-width: 1200px;
  }
}


/* ===== DASHBOARD CARDS STYLES ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color), var(--card-color-light));
}

.stat-card.stat-primary {
    --card-color: #007bff;
    --card-color-light: #66b3ff;
}

.stat-card.stat-success {
    --card-color: #28a745;
    --card-color-light: #71dd8a;
}

.stat-card.stat-warning {
    --card-color: #ffc107;
    --card-color-light: #ffda6a;
}

.stat-card.stat-danger {
    --card-color: #dc3545;
    --card-color-light: #f1959b;
}

.stat-card.stat-info {
    --card-color: #17a2b8;
    --card-color-light: #6edff6;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--card-color), var(--card-color-light));
    color: white;
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: #6c757d;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.stat-status {
    font-size: 0.85rem;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-status.loading {
    color: #007bff;
}

.stat-status.success {
    color: #28a745;
}

.stat-status.error {
    color: #dc3545;
}

/* Responsividade para cards */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}
