/* Import Google Fonts: Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors */
    --primary-color: #2563EB;
    /* Vibrant Blue */
    --primary-hover: #1D4ED8;
    --secondary-color: #F59E0B;
    /* Vibrant Orange */
    --secondary-hover: #D97706;
    --accent-color: #3B82F6;

    /* Semantic Colors */
    --success-color: #10B981;
    --danger-color: #EF4444;
    --warning-color: #F59E0B;
    --info-color: #3B82F6;

    /* Backgrounds & Surfaces */
    --bg-body: #F3F4F6;
    /* Cool Gray 100 */
    --bg-card: #FFFFFF;
    --bg-glass: rgba(255, 255, 255, 0.85);

    /* Typography - Sizes Reduced */
    --text-main: #111827;
    --text-muted: #6B7280;
    --text-light: #F9FAFB;
    
    /* UI Elements */
    --border-radius-sm: 6px; /* Slightly tighter */
    --border-radius-md: 10px;
    --border-radius-lg: 14px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-premium: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5; /* Reduced from 1.6 */
    font-size: 0.925rem; /* Base size reset to smaller */
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 0.75rem; /* Slightly tighter spacing */
}

h1 {
    font-size: 1.75rem; /* Reduced from 2.25rem */
}

h2 {
    font-size: 1.5rem; /* Reduced from 1.875rem */
}

h3 {
    font-size: 1.25rem; /* Reduced from 1.5rem */
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* --- GLASSMORPHISM NAVBAR --- */
.navbar {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav .nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(37, 99, 235, 0.1);
    /* Primary with opacity */
}

/* Dropdown Menu Premium */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.4rem;
    margin-top: 0.5rem;
    animation: fadeInDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 0.85rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--bg-body);
    color: var(--primary-color);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- CARDS & CONTAINERS --- */
.card {
    background-color: var(--bg-card);
    border: none;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-premium);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid #E5E7EB;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 1.5rem;
}

/* --- BUTTONS --- */
.btn {
    padding: 0.4rem 0.85rem; /* Reduced padding */
    font-size: 0.9rem; /* Smaller font size */
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, #1540af 100%);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #D1D5DB;
}

.btn-secondary:hover {
    background-color: #f3f4f6;
    border-color: #9CA3AF;
    color: var(--text-main);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #DC2626 100%);
    color: white;
}

/* --- FORMS --- */
.form-control,
.form-select {
    border-radius: var(--border-radius-sm);
    border: 1px solid #D1D5DB;
    padding: 0.5rem 0.75rem; /* Reduced vertical padding */
    font-size: 0.9rem; /* Smaller input text */
    transition: var(--transition-fast);
    background-color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    outline: none;
}

.form-label {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

/* --- TABLES --- */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    font-size: 0.875rem; /* Global smaller table font */
}

.table thead th {
    background-color: #F8FAFC;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 0.75rem 0.75rem; /* Reduced padding */
    border-bottom: 2px solid #E2E8F0;
    border-top: none;
    white-space: nowrap; /* Prevent headers from wrapping too much */
}

.table tbody td {
    padding: 0.65rem 0.75rem; /* Reduced padding */
    vertical-align: middle;
    border-bottom: 1px solid #F1F5F9;
    color: var(--text-main);
}

.table-hover tbody tr:hover {
    background-color: #F1F5F9;
}

.badge {
    padding: 0.35em 0.65em;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* --- UTILITIES --- */
.shadow-box {
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-md);
    background: white;
    padding: 2rem;
}


.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-consent-banner {
    position: fixed;
    bottom: -100%; /* Oculto inicialmente por abajo */
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 9999; /* Por encima de todo */
    padding: 1.5rem 0;
    transition: bottom 0.5s cubic-bezier(0.19, 1, 0.22, 1); /* Ease out custom */
    border-top: 1px solid rgba(0,0,0,0.05);
}

.cookie-consent-banner.show {
    bottom: 0;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .cookie-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .cookie-text {
        max-width: 65%;
    }
    
    .cookie-buttons {
        display: flex;
        gap: 1rem;
        flex-shrink: 0;
    }
}

.cookie-title {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* --- LANDING PAGE --- */
.hero-section {
    position: relative;
    padding: 8rem 0 6rem;
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
    color: white;
}

/* Animated background blobs */
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.hero-section::before {
    top: -200px;
    left: -200px;
}

.hero-section::after {
    bottom: -200px;
    right: -200px;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.feature-card {
    height: 100%;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.cta-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 5rem 0;
}

/* Utility for premium shadow */
.shadow-premium {
    box-shadow: var(--shadow-premium) !important;
}

/* Animations */
@keyframes floatBlob {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }

    100% {
        transform: translate(0, 0);
    }
}

.hero-section::before {
    animation: floatBlob 10s infinite ease-in-out;
}

.hero-section::after {
    animation: floatBlob 12s infinite ease-in-out reverse;
}

.max-w-700 {
    max-width: 700px;
}

/* --- DASHBOARD STYLES --- */
.dashboard-welcome-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    padding: 2rem 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.dashboard-welcome-banner h2 {
    color: white;
    margin-bottom: 0.5rem;
}

.dashboard-welcome-banner p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.dashboard-welcome-banner::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.dashboard-stat-card {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    border: 1px solid rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
}

.stat-card-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: #F59E0B;
}

.stat-icon.red {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

.dashboard-stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.quick-action-card {
    background: white;
    border-radius: var(--border-radius-md);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    color: var(--text-main);
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.quick-action-card:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateY(-2px);
    color: var(--primary-color);
}

.quick-action-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.quick-action-card:hover .quick-action-icon {
    transform: scale(1.1);
}


/* --- ANIMATION UTILITIES --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}
