/* Estilos personalizados para el Sistema de Gestión Municipal de Lambaré */

:root {
    --primary-color: #4c6ef5;
    --primary-dark: #364fc7;
    --primary-light: #748ffc;
    --secondary-color: #6c757d;
    --success-color: #51cf66;
    --danger-color: #ff6b6b;
    --warning-color: #ffd43b;
    --info-color: #4dabf7;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%);
    --gradient-danger: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-info: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.2);
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    background: var(--gradient-primary) !important;
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.95);
    transition: all 0.3s ease;
    font-weight: 500;
    margin: 0 0.25rem;
    border-radius: 8px;
    padding: 0.5rem 1rem !important;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Cards */
.card {
    border-radius: 16px;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.card-header {
    border-radius: 16px 16px 0 0 !important;
    border: none;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Cards con gradientes */
.card.text-white.bg-primary {
    background: var(--gradient-primary) !important;
    border: none;
}

.card.text-white.bg-success {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%) !important;
    border: none;
}

.card.text-white.bg-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%) !important;
    border: none;
}

.card.text-white.bg-info {
    background: linear-gradient(135deg, #4dabf7 0%, #228be6 100%) !important;
    border: none;
}

.card.text-white.bg-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%) !important;
    border: none;
}

/* Botones */
.btn {
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    padding: 0.625rem 1.5rem;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #4dabf7 0%, #228be6 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Alertas */
.alert {
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    padding: 1.25rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, #d3f9d8 0%, #b2f2bb 100%);
    color: #2b8a3e;
}

.alert-danger {
    background: linear-gradient(135deg, #ffe3e3 0%, #ffc9c9 100%);
    color: #c92a2a;
}

.alert-warning {
    background: linear-gradient(135deg, #fff4e6 0%, #ffe8cc 100%);
    color: #e67700;
}

.alert-info {
    background: linear-gradient(135deg, #d0ebff 0%, #a5d8ff 100%);
    color: #1864ab;
}

/* Login Page */
.min-vh-100 {
    min-height: 100vh;
}

.card.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Dashboard Cards */
.card.text-white .card-footer {
    background-color: rgba(0, 0, 0, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.card.text-white .card-footer a {
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.card.text-white .card-footer a:hover {
    opacity: 0.8;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    font-weight: 600;
}

.table thead th {
    border: none;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

.table-hover tbody tr {
    transition: all 0.3s ease;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Badges */
.badge {
    padding: 0.5em 1em;
    font-size: 0.85em;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-success {
    background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #fa5252 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffd43b 0%, #fab005 100%) !important;
    color: #212529 !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #4dabf7 0%, #228be6 100%) !important;
}

/* Modal */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 1.5rem 2rem;
}

.modal-header.bg-primary,
.modal-header.bg-success,
.modal-header.bg-danger,
.modal-header.bg-warning,
.modal-header.bg-info {
    background: var(--gradient-primary) !important;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #f1f3f5;
    border-radius: 0 0 20px 20px;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
}

.modal-backdrop.show {
    opacity: 0.6;
}

/* Forms */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Utilidades personalizadas */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.box-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mejoras de accesibilidad */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Glassmorphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f3f5;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
}

/* Dashboard cards con iconos grandes */
.dashboard-icon {
    font-size: 3.5rem;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.card:hover .dashboard-icon {
    opacity: 0.5;
    transform: scale(1.1) rotate(5deg);
}

/* Efectos de hover para enlaces */
a:not(.btn):not(.nav-link) {
    transition: all 0.3s ease;
    position: relative;
}

a:not(.btn):not(.nav-link)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

a:not(.btn):not(.nav-link):hover::after {
    width: 100%;
}

/* Print styles */
@media print {
    .navbar, .btn, .modal, .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Loading spinner */
.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* Status indicators */
.status-dot {
    height: 10px;
    width: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-dot.success {
    background-color: var(--success-color);
}

.status-dot.warning {
    background-color: var(--warning-color);
}

.status-dot.danger {
    background-color: var(--danger-color);
}

.status-dot.info {
    background-color: var(--info-color);
}
