html {
    scroll-behavior: smooth;
}

.focus-visible:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.form-input-enhanced {
    transition: all 0.2s ease-in-out;
}

.form-input-enhanced:focus {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.btn-enhanced {
    transition: all 0.2s ease-in-out;
}

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

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

.card-hover {
    transition: all 0.3s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tag-card {
    position: relative;
    overflow: hidden;
}

.tag-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.05), transparent);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.tag-card:hover::before {
    transform: translateX(100%);
}

.tag-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.tag-card.selected {
    animation: tagSelect 0.3s ease;
}

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

.tag-badge {
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Search Input Enhancement */
.search-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Custom Scrollbar for Tags Grid */
.tags-scroll::-webkit-scrollbar {
    width: 6px;
}

.tags-scroll::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.tags-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.tags-scroll::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.btn-loading {
    position: relative;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    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); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.animate-pulse-soft {
    animation: pulse-soft 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.text-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.form-input.error {
    border-color: #fca5a5;
    color: #7f1d1d;
}

.form-input.error::placeholder {
    color: #fca5a5;
}

.form-input.error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.success {
    border-color: #86efac;
    color: #14532d;
}

.form-input.success:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.notification-enter {
    animation: slideInRight 0.3s ease-out;
}

.notification-exit {
    animation: slideOutRight 0.3s ease-in;
}

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

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

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .print-break {
        page-break-before: always;
    }
}

@media (prefers-contrast: high) {
    .form-input {
        border-width: 2px;
    }
    
    .btn-primary {
        border: 2px solid #1e40af;
    }
}

@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;
    }
}


@media (max-width: 640px) {
    .btn, .form-input, .form-select {
        min-height: 48px;
    }

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

/* Estilos para Filtros Admin Ultra Modernos */
.admin-filters-container {
    position: relative;
    overflow: hidden;
}

.admin-filters-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Animação de gradiente para o header */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 4s ease infinite;
}

/* Efeitos de hover para os campos de input */
.input-modern {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.input-modern:focus {
    transform: translateY(-3px);
    box-shadow: 0 25px 30px -5px rgba(147, 51, 234, 0.2), 0 15px 15px -5px rgba(147, 51, 234, 0.1);
}

/* Botões com efeitos avançados */
.btn-gradient-modern {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gradient-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.btn-gradient-modern:hover::before {
    width: 300px;
    height: 300px;
}

.btn-gradient-modern:active {
    transform: translateY(1px) scale(0.98);
}

/* Indicadores de filtros ativos */
.filter-indicator {
    position: relative;
    overflow: hidden;
}

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

.filter-indicator:hover::before {
    left: 100%;
}

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

.animate-slide-in {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Efeitos de foco melhorados */
.focus-ring-modern:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(147, 51, 234, 0.1),
        0 0 0 6px rgba(147, 51, 234, 0.05),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Hover states para elementos interativos */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Estilo para select customizado */
.select-modern {
    background-image: none;
    position: relative;
}

.select-modern::-ms-expand {
    display: none;
}

/* Efeitos de ripple nos botões */
.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:active::after {
    width: 300px;
    height: 300px;
    transition: 0s;
}

/* Animação de pulso para indicadores */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

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

/* Estilos responsivos aprimorados */
@media (max-width: 768px) {
    .admin-filters-container {
        padding: 1rem;
    }
    
    .input-modern, .btn-gradient-modern {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}
