/* Estilos gerais */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Página de login */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.card {
    border-radius: 15px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Dashboard */
.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.state-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

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

.state-flag {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 5px;
    border: 2px solid #e9ecef;
}

.state-name {
    font-weight: 600;
    color: #495057;
}

.state-capital {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Formulários */
.form-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.nav-tabs .nav-link {
    border-radius: 10px 10px 0 0;
    border: none;
    color: #6c757d;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
}

.tab-content {
    padding: 2rem;
    background: white;
    border-radius: 0 0 15px 15px;
}

/* Responsividade */
@media (max-width: 1200px) {
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 992px) {
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
    
    .state-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem 0;
        text-align: center;
    }
    
    .dashboard-header .row {
        flex-direction: column;
    }
    
    .dashboard-header .col-md-6:last-child {
        margin-top: 1rem;
        text-align: center !important;
    }
    
    .state-card {
        margin-bottom: 1rem;
    }
    
    .form-section {
        padding: 1rem;
    }
    
    .nav-tabs {
        flex-wrap: wrap;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .state-flag-placeholder {
        width: 60px !important;
        height: 40px !important;
    }
    
    .state-name {
        font-size: 1rem;
    }
    
    .state-capital {
        font-size: 0.8rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .form-control {
        font-size: 1rem; /* Evita zoom no iOS */
    }
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Estados específicos - cores personalizadas */
.state-ac { border-left: 4px solid #228B22; }
.state-al { border-left: 4px solid #FF6347; }
.state-ap { border-left: 4px solid #4169E1; }
.state-am { border-left: 4px solid #32CD32; }
.state-ba { border-left: 4px solid #FFD700; }
.state-ce { border-left: 4px solid #FF4500; }
.state-df { border-left: 4px solid #8A2BE2; }
.state-es { border-left: 4px solid #20B2AA; }
.state-go { border-left: 4px solid #FF1493; }
.state-ma { border-left: 4px solid #DC143C; }
.state-mt { border-left: 4px solid #8FBC8F; }
.state-ms { border-left: 4px solid #4682B4; }
.state-mg { border-left: 4px solid #DAA520; }
.state-pa { border-left: 4px solid #2E8B57; }
.state-pb { border-left: 4px solid #FF69B4; }
.state-pr { border-left: 4px solid #9370DB; }
.state-pe { border-left: 4px solid #FF8C00; }
.state-pi { border-left: 4px solid #CD853F; }
.state-rj { border-left: 4px solid #1E90FF; }
.state-rn { border-left: 4px solid #FF6B6B; }
.state-rs { border-left: 4px solid #32CD32; }
.state-ro { border-left: 4px solid #8B4513; }
.state-rr { border-left: 4px solid #FFB6C1; }
.state-sc { border-left: 4px solid #00CED1; }
.state-sp { border-left: 4px solid #FF0000; }
.state-se { border-left: 4px solid #FFA500; }
.state-to { border-left: 4px solid #9ACD32; }

/* Animações avançadas */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

.pulse-animation {
    animation: pulse 2s infinite;
}

.shake-animation {
    animation: shake 0.5s ease-in-out;
}

/* Efeitos de hover aprimorados */
.state-card:hover .state-flag-placeholder {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    transition: all 0.3s ease;
}

.form-control:focus {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Tooltips personalizados */
.custom-tooltip {
    position: relative;
    cursor: help;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.custom-tooltip:hover::after {
    opacity: 1;
}

/* Alertas personalizados */
.alert {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Melhorias nos cards */
.card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Breadcrumb personalizado */
.custom-breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
}

.custom-breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.custom-breadcrumb a:hover {
    color: #764ba2;
}

/* Indicadores de status */
.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-active {
    background-color: #28a745;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

.status-inactive {
    background-color: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
}

.status-pending {
    background-color: #ffc107;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

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

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Modo escuro (preparação para futuras implementações) */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        color: #e2e8f0;
    }
    
    .form-control {
        background-color: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
    
    .form-control:focus {
        background-color: #4a5568;
        border-color: #667eea;
        color: #e2e8f0;
    }
}

/* Utilitários */
.cursor-pointer {
    cursor: pointer;
}

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

.overflow-hidden {
    overflow: hidden;
}

.position-relative {
    position: relative;
}

.z-index-1000 {
    z-index: 1000;
}

/* Efeitos de foco para acessibilidade */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .dashboard-header,
    .btn,
    .nav-tabs {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    body {
        background: white !important;
    }
}
