/* Modern Animations and Visual Enhancements */

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

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

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

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(13, 110, 253, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Floating Animation */
.float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Bounce Animation */
.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Slide Animations */
.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

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

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

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

/* Fade Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

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

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

/* Rotate Animation */
.rotate {
    animation: rotate 2s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Shake Animation */
.shake {
    animation: shake 0.5s ease-in-out;
}

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

/* Typing Effect */
.typing {
    overflow: hidden;
    border-right: 2px solid #0d6efd;
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #0d6efd; }
}

/* Modern Cards */
.modern-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.modern-card:hover::before {
    transform: scaleX(1);
}

/* Modern Buttons */
.btn-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-modern:hover::before {
    left: 100%;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

/* Modern Form Controls */
.form-modern {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-modern input,
.form-modern select,
.form-modern textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-modern input:focus,
.form-modern select:focus,
.form-modern textarea:focus {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.form-modern label {
    position: absolute;
    top: 12px;
    left: 16px;
    color: #6c757d;
    transition: all 0.3s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

.form-modern input:focus + label,
.form-modern input:not(:placeholder-shown) + label,
.form-modern select:focus + label,
.form-modern select:not([value=""]) + label {
    top: -8px;
    left: 12px;
    font-size: 12px;
    color: #0d6efd;
    font-weight: 500;
}

/* Progress Bar */
.progress-modern {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #0d6efd, #0b5ed7);
    border-radius: 4px;
    animation: progress 2s ease-in-out;
}

@keyframes progress {
    from { width: 0%; }
    to { width: 100%; }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Notification Badge */
.notification-badge {
    position: relative;
    display: inline-block;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: notification-pulse 2s infinite;
}

@keyframes notification-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Responsive Images */
.img-responsive {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.img-hover-zoom {
    overflow: hidden;
    border-radius: 8px;
}

.img-hover-zoom img {
    transition: transform 0.3s ease;
}

.img-hover-zoom:hover img {
    transform: scale(1.1);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #0d6efd;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

/* Dark Mode Enhancements */
[data-bs-theme="dark"] .modern-card {
    background: #2d2d2d;
    border-color: #404040;
}

[data-bs-theme="dark"] .form-modern input,
[data-bs-theme="dark"] .form-modern select,
[data-bs-theme="dark"] .form-modern textarea {
    background: #2d2d2d;
    border-color: #404040;
    color: #e5e5e5;
}

[data-bs-theme="dark"] .form-modern label {
    background: #2d2d2d;
    color: #a3a3a3;
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    .modern-card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .modern-card {
        border: 2px solid #000;
    }
    
    .btn-modern {
        border: 2px solid #000;
    }
} 

/* ===== DASHBOARD MODERNO ===== */

.dashboard-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.dashboard-subtitle {
    font-size: 1.1rem;
    margin: 0.5rem 0 0 0;
    opacity: 0.9;
}

.current-time {
    font-weight: 600;
    color: #ffd700;
}

.dashboard-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.dashboard-content {
    padding: 0 1rem;
}

/* ===== CARDS DE ESTATÍSTICAS ===== */

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

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

.stat-card-primary::before { background: linear-gradient(90deg, #007bff, #0056b3); }
.stat-card-success::before { background: linear-gradient(90deg, #28a745, #1e7e34); }
.stat-card-warning::before { background: linear-gradient(90deg, #ffc107, #e0a800); }
.stat-card-info::before { background: linear-gradient(90deg, #17a2b8, #138496); }

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

.stat-card-primary .stat-card-icon { background: linear-gradient(135deg, #007bff, #0056b3); }
.stat-card-success .stat-card-icon { background: linear-gradient(135deg, #28a745, #1e7e34); }
.stat-card-warning .stat-card-icon { background: linear-gradient(135deg, #ffc107, #e0a800); }
.stat-card-info .stat-card-icon { background: linear-gradient(135deg, #17a2b8, #138496); }

.stat-card-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.5rem 0;
    font-weight: 500;
}

.stat-card-trend {
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-card-trend.up {
    color: #28a745;
}

.stat-card-trend.down {
    color: #dc3545;
}

/* ===== CARDS DE GRÁFICOS ===== */

.chart-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.chart-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.chart-card-title {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.chart-card-actions {
    display: flex;
    gap: 0.5rem;
}

.chart-card-body {
    padding: 1.5rem;
}

/* ===== CARDS DE TABELA ===== */

.table-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.table-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.table-card-title {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.table-card-body {
    padding: 0;
}

.table-modern {
    margin: 0;
}

.table-modern th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-modern td {
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.table-modern tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: scale(1.01);
    transition: all 0.2s ease;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* ===== CARDS DE RECURSOS ===== */

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.15);
}

.feature-card-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.feature-card-content h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.feature-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===== SIDEBAR MODERNA ===== */

.sidebar-modern-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-modern-container.collapsed {
    width: 80px;
}

.sidebar-modern-container.collapsed .nav-link-text,
.sidebar-modern-container.collapsed .nav-section-title,
.sidebar-modern-container.collapsed .profile-info,
.sidebar-modern-container.collapsed .sidebar-footer-actions {
    display: none;
}

/* Perfil do Usuário */
.sidebar-profile {
    padding: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.profile-avatar {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: rgba(255,255,255,0.9);
}

.profile-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.profile-role {
    font-size: 0.9rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Navegação */
.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-header {
    padding: 0 1.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.nav-section-icon {
    color: var(--primary-color);
    font-size: 1rem;
}

.nav-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    gap: 0.75rem;
}

.nav-link:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--primary-color);
    text-decoration: none;
    transform: translateX(4px);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
}

.nav-link-icon {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-link-text {
    flex-grow: 1;
    font-weight: 500;
}

.nav-link-badge {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
}

.nav-link-badge.new {
    background: #28a745;
}

.nav-link-badge.warning {
    background: #ffc107;
    color: #212529;
}

.nav-link-badge.coming-soon {
    background: #6c757d;
    font-size: 0.6rem;
}

/* Footer da Sidebar */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.sidebar-footer-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 768px) {
    .dashboard-title {
        font-size: 2rem;
    }
    
    .dashboard-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .sidebar-modern-container {
        position: relative;
        top: 0;
        margin-bottom: 2rem;
    }
    
    .chart-card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .feature-card-actions {
        flex-direction: column;
    }
    
    .feature-card-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .dashboard-header {
        padding: 1.5rem 0;
    }
    
    .dashboard-title {
        font-size: 1.75rem;
    }
    
    .stat-card-number {
        font-size: 2rem;
    }
    
    .chart-card-body {
        padding: 1rem;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* ===== ANIMAÇÕES ESPECÍFICAS ===== */

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

.stat-card {
    animation: fadeInUp 0.6s ease-out;
}

.chart-card {
    animation: slideInFromRight 0.6s ease-out;
}

.sidebar-modern-container {
    animation: slideInFromLeft 0.6s ease-out;
}

/* ===== DARK MODE ===== */

[data-bs-theme="dark"] .dashboard-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-bs-theme="dark"] .stat-card,
[data-bs-theme="dark"] .chart-card,
[data-bs-theme="dark"] .table-card,
[data-bs-theme="dark"] .feature-card,
[data-bs-theme="dark"] .sidebar-modern-container {
    background: #2d2d2d;
    border-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .stat-card:hover,
[data-bs-theme="dark"] .chart-card:hover,
[data-bs-theme="dark"] .table-card:hover,
[data-bs-theme="dark"] .feature-card:hover {
    background: #333;
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

[data-bs-theme="dark"] .chart-card-header,
[data-bs-theme="dark"] .table-card-header {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
    border-bottom-color: #404040;
}

[data-bs-theme="dark"] .table-modern th {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
    color: #e9ecef;
}

[data-bs-theme="dark"] .table-modern td {
    border-bottom-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .table-modern tbody tr:hover {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
}

[data-bs-theme="dark"] .nav-link:hover {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
}

[data-bs-theme="dark"] .sidebar-footer {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
    border-top-color: #404040;
}

/* ===== ACESSIBILIDADE ===== */

@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .chart-card,
    .sidebar-modern-container,
    .nav-link {
        transition: none;
        animation: none;
    }
    
    .stat-card:hover,
    .chart-card:hover,
    .feature-card:hover {
        transform: none;
    }
    
    .nav-link:hover {
        transform: none;
    }
}

/* ===== ESTADOS DE CARREGAMENTO ===== */

.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* ===== UTILITÁRIOS ===== */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) 1;
}

.shadow-soft {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.shadow-medium {
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.shadow-strong {
    box-shadow: 0 16px 48px rgba(0,0,0,0.16);
} 

/* ===== LOGIN MODERNO ===== */

.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.login-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 10%, rgba(255,255,255,0.05) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.3);
}

/* Header do Login */
.login-header {
    margin-bottom: 2rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

/* Formulário */
.login-form {
    margin-bottom: 2rem;
}

.form-group {
    position: relative;
}

.input-group {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.input-group:focus-within {
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.input-group-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
}

.form-control {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.form-control:focus {
    box-shadow: none;
    background: #f8f9fa;
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}

/* Checkbox personalizado */
.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 6px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.form-check-label {
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

/* Botão de Login */
.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

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

/* Links */
.login-links a {
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-links a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* Separador */
.login-divider {
    position: relative;
    text-align: center;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #dee2e6, transparent);
}

.login-divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Botões Sociais */
.social-login .btn {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #dee2e6;
}

.social-login .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Footer */
.login-footer {
    border-top: 1px solid #e9ecef;
    padding-top: 1.5rem;
}

.login-footer a {
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.login-footer a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

/* ===== RESPONSIVIDADE DO LOGIN ===== */

@media (max-width: 768px) {
    .login-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .login-logo {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .form-control-lg {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 1.5rem 1rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
    }
    
    .input-group-text {
        padding: 0.625rem 0.75rem;
        font-size: 1rem;
    }
    
    .form-control-lg {
        padding: 0.75rem 0.875rem;
    }
}

/* ===== DARK MODE PARA LOGIN ===== */

[data-bs-theme="dark"] .login-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-bs-theme="dark"] .login-card {
    background: rgba(45, 45, 45, 0.95);
    border-color: rgba(255,255,255,0.1);
    color: #e9ecef;
}

[data-bs-theme="dark"] .login-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-bs-theme="dark"] .login-subtitle {
    color: #adb5bd;
}

[data-bs-theme="dark"] .form-control {
    background: #333;
    color: #e9ecef;
    border-color: #404040;
}

[data-bs-theme="dark"] .form-control:focus {
    background: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .input-group-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #404040;
}

[data-bs-theme="dark"] .form-check-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .login-divider span {
    background: rgba(45, 45, 45, 0.95);
    color: #adb5bd;
}

[data-bs-theme="dark"] .social-login .btn {
    background: #333;
    border-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .social-login .btn:hover {
    background: #404040;
    border-color: #667eea;
    color: #667eea;
}

[data-bs-theme="dark"] .login-footer {
    border-top-color: #404040;
}

[data-bs-theme="dark"] .login-footer a {
    color: #667eea;
}

[data-bs-theme="dark"] .login-footer a:hover {
    color: #764ba2;
}

/* ===== ANIMAÇÕES DE ENTRADA ===== */

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

.login-card {
    animation: slideInUp 0.8s ease-out;
}

/* ===== ESTADOS DE CARREGAMENTO ===== */

.login-btn.loading {
    position: relative;
    color: transparent;
}

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

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

/* ===== VALIDAÇÃO DE FORMULÁRIO ===== */

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.valid-feedback {
    display: block;
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ===== ACESSIBILIDADE ===== */

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .input-group,
    .login-btn,
    .social-login .btn {
        transition: none;
        animation: none;
    }
    
    .login-pattern {
        animation: none;
    }
}

/* ===== FOCUS VISIBLE ===== */

.login-btn:focus-visible,
.form-control:focus-visible,
.social-login .btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== UTILITÁRIOS ADICIONAIS ===== */

.text-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-bs-theme="dark"] .bg-glass {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
} 

/* ===== PÁGINAS DE TABELAS ===== */

.table-page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.table-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0 0 1rem 0;
}

.breadcrumb-item {
    color: rgba(255,255,255,0.8);
}

.breadcrumb-item.active {
    color: white;
    font-weight: 600;
}

.breadcrumb-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-link:hover {
    color: white;
    text-decoration: none;
}

.table-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.table-content {
    padding: 0 1rem;
}

.table-sidebar {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
    height: fit-content;
    position: sticky;
    top: 2rem;
}

/* ===== FILTROS ===== */

.filter-section {
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.filter-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.filter-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.filter-title {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.filter-form {
    padding: 1.5rem;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

/* ===== ESTATÍSTICAS DA TABELA ===== */

.table-stats {
    margin-bottom: 2rem;
}

.stat-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-content {
    flex-grow: 1;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0.25rem 0 0 0;
    font-weight: 500;
}

/* ===== TABELAS MODERNAS ===== */

.table-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.table-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.table-modern {
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table-modern th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.table-modern td {
    padding: 1rem;
    border: none;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.table-modern tbody tr {
    transition: all 0.3s ease;
}

.table-modern tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: scale(1.01);
}

.table-actions {
    display: flex;
    gap: 0.25rem;
}

.date-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
}

.cpf-masked {
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.value-badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ===== CARDS DE SEGUROS (MOBILE) ===== */

.insurance-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

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

.insurance-card-header {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.insurance-card-title h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.insurance-card-actions {
    display: flex;
    gap: 0.5rem;
}

.insurance-card-body {
    padding: 1rem;
}

.insurance-info-grid {
    display: grid;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.info-item label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.info-item span {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===== ESTADO VAZIO ===== */

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state-description {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

/* ===== PAGINAÇÃO ===== */

.pagination-wrapper {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.pagination-info {
    color: var(--text-secondary);
}

.pagination-controls .pagination {
    margin: 0;
}

.pagination-controls .page-link {
    border: none;
    color: var(--primary-color);
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination-controls .page-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination-controls .page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

/* ===== FORMULÁRIOS MODERNOS ===== */

.form-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

.form-container:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

.form-header {
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.form-subtitle {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1.1rem;
}

.modern-form {
    padding: 2rem;
}

.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.form-section.highlight-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.section-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-check-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    border-radius: 4px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.form-check-label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
}

.calculated-value {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
    border-radius: 12px;
    border: 2px solid #4caf50;
}

.value-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.currency {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2e7d32;
}

.amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2e7d32;
}

.form-help {
    margin-top: 0.5rem;
}

.form-actions {
    padding: 2rem;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.action-buttons {
    display: flex;
    gap: 1rem;
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 768px) {
    .table-header {
        padding: 1.5rem 0;
    }
    
    .table-title {
        font-size: 2rem;
    }
    
    .table-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .stat-item {
        margin-bottom: 1rem;
    }
    
    .filter-actions {
        flex-direction: column;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .modern-form {
        padding: 1rem;
    }
    
    .form-header {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .table-header {
        padding: 1rem 0;
    }
    
    .table-title {
        font-size: 1.75rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .insurance-card-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .form-section {
        padding: 0.75rem;
    }
    
    .modern-form {
        padding: 0.75rem;
    }
}

/* ===== DARK MODE ===== */

[data-bs-theme="dark"] .table-page-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-bs-theme="dark"] .table-sidebar,
[data-bs-theme="dark"] .filter-card,
[data-bs-theme="dark"] .table-wrapper,
[data-bs-theme="dark"] .form-container,
[data-bs-theme="dark"] .empty-state,
[data-bs-theme="dark"] .pagination-wrapper {
    background: #2d2d2d;
    border-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .stat-item {
    background: #2d2d2d;
    border-color: #404040;
}

[data-bs-theme="dark"] .form-section {
    background: #333;
    border-color: #404040;
}

[data-bs-theme="dark"] .form-section.highlight-section {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    border-color: #3f51b5;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: #333;
    border-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: #404040;
    border-color: #667eea;
}

[data-bs-theme="dark"] .calculated-value {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    border-color: #4caf50;
}

[data-bs-theme="dark"] .currency,
[data-bs-theme="dark"] .amount {
    color: #a5d6a7;
}

[data-bs-theme="dark"] .table-modern th {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
    color: #e9ecef;
}

[data-bs-theme="dark"] .table-modern td {
    border-bottom-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .table-modern tbody tr:hover {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
}

[data-bs-theme="dark"] .insurance-card {
    background: #2d2d2d;
    border-color: #404040;
}

[data-bs-theme="dark"] .insurance-card-header {
    background: linear-gradient(135deg, #333 0%, #404040 100%);
    border-bottom-color: #404040;
}

[data-bs-theme="dark"] .info-item {
    border-bottom-color: #404040;
}

/* ===== ANIMAÇÕES ===== */

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

.filter-section {
    animation: slideInFromTop 0.6s ease-out;
}

/* ===== ACESSIBILIDADE ===== */

@media (prefers-reduced-motion: reduce) {
    .table-wrapper,
    .filter-card,
    .insurance-card,
    .form-container,
    .stat-item {
        transition: none;
        animation: none;
    }
    
    .table-modern tbody tr:hover {
        transform: none;
    }
}

/* ===== UTILITÁRIOS ADICIONAIS ===== */

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.user-select-none {
    user-select: none;
} 

/* ===== PÁGINAS DE FORMULÁRIOS ===== */

.form-page-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.form-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.form-content {
    padding: 0 1rem;
}

.form-sidebar {
    position: sticky;
    top: 2rem;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 1rem;
}

.sidebar-header {
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.sidebar-content {
    padding: 1rem;
}

.info-item, .tip-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.info-item:last-child, .tip-item:last-child {
    margin-bottom: 0;
}

.tip-item {
    color: var(--text-secondary);
}

.form-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ===== MELHORIAS NOS FORMULÁRIOS ===== */

/* Labels melhorados */
.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: block;
    font-size: 1rem;
    line-height: 1.4;
}

.form-label.required {
    position: relative;
}

.required-mark {
    color: var(--danger);
    font-weight: 700;
    margin-left: 0.25rem;
}

/* Input groups melhorados */
.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 8px 0 0 8px;
    transition: all 0.3s ease;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.input-group .form-control:focus + .input-group-text,
.input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Campos de formulário melhorados */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
    background: white;
}

.form-control-lg {
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    border-radius: 10px;
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
}

/* Estados de validação */
.form-control.is-valid {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 2.89 2.89 2.89-2.89.94.94L4.12 9.61z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4m0-1.4-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Texto de ajuda */
.form-text {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-text i {
    font-size: 0.75rem;
}

/* Selects melhorados */
.form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.placeholder-select {
    color: var(--text-secondary) !important;
}

/* Checkboxes e radios melhorados */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0.5rem 0;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 4px;
    border: 2px solid #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-check-input:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

.form-check-input[type="radio"] {
    border-radius: 50%;
}

.form-check-label {
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* Grupos de campos */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Seções do formulário */
.form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    position: relative;
}

.form-section.highlight-section {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
}

.section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.section-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

/* Campos obrigatórios destacados */
.field-required {
    position: relative;
}

.field-required::before {
    content: '*';
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    color: var(--danger);
    font-weight: 700;
    font-size: 1.2rem;
    z-index: 10;
}

/* Responsividade para formulários */
@media (max-width: 768px) {
    .form-page-title {
        font-size: 2rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .form-control-lg {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }
    
    .input-group-text {
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .form-label {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    .form-page-title {
        font-size: 1.75rem;
    }
    
    .form-section {
        padding: 0.75rem;
    }
    
    .section-header h5 {
        font-size: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}

/* Dark mode para formulários */
[data-bs-theme="dark"] .form-page-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

[data-bs-theme="dark"] .form-wrapper,
[data-bs-theme="dark"] .sidebar-card {
    background: #2d2d2d;
    border-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-section {
    background: #333;
    border-color: #404040;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: #333;
    border-color: #404040;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: #404040;
    border-color: #667eea;
}

[data-bs-theme="dark"] .input-group-text {
    background: #404040;
    border-color: #404040;
    color: #adb5bd;
}

[data-bs-theme="dark"] .form-text {
    color: #adb5bd;
}

/* Animações para formulários */
@keyframes fieldFocus {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.form-control:focus,
.form-select:focus {
    animation: fieldFocus 0.3s ease-out;
}

/* Tooltips para campos obrigatórios */
.field-required {
    position: relative;
}

.field-required:hover::after {
    content: 'Campo obrigatório';
    position: absolute;
    top: -2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 1000;
}

/* Melhorias de acessibilidade */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Estados de carregamento */
.form-control:disabled,
.form-select:disabled {
    background-color: #e9ecef;
    opacity: 0.6;
    cursor: not-allowed;
}

[data-bs-theme="dark"] .form-control:disabled,
[data-bs-theme="dark"] .form-select:disabled {
    background-color: #404040;
    opacity: 0.6;
} 

/* Modern CSS Enhancements */

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    color: white;
    z-index: 9999;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.notification-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
}

.notification-warning {
    background: linear-gradient(135deg, #ffc107, #f39c12);
    color: #333;
}

.notification-info {
    background: linear-gradient(135deg, #17a2b8, #3498db);
}

.notification-content {
    display: flex;
    align-items: center;
    font-weight: 500;
}

/* Custom Tooltips */
.custom-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    z-index: 1000;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Form Enhancements */
.form-modern {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control.is-valid {
    border-color: var(--success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 3.03-3.03-1.06-1.06-3.03 3.03-.94.94z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4m0-1.4-1.4 1.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

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

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

/* Performance Optimizations */
.navbar.loading {
    opacity: 0.8;
    pointer-events: none;
}

/* Prevent layout shift */
.navbar-brand img {
    width: auto;
    height: 60px;
    object-fit: contain;
}

/* Smooth transitions */
* {
    transition: all 0.15s ease-in-out;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Dark mode support */
[data-bs-theme="dark"] .form-modern {
    background: #2d2d2d;
    color: #e9ecef;
}

[data-bs-theme="dark"] .custom-tooltip {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
}

/* Accessibility improvements */
@media (prefers-contrast: high) {
    .notification {
        border: 2px solid currentColor;
    }
    
    .form-control:focus {
        outline: 3px solid var(--primary);
        outline-offset: 2px;
    }
}

/* Print styles */
@media print {
    .notification,
    .custom-tooltip,
    .btn-loading::after {
        display: none !important;
    }
} 