@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;600;700&display=swap');

:root {
    --bg-main: #0a0b0e;
    --bg-surface: rgba(26, 29, 35, 0.7);
    --bg-sidebar: rgba(15, 17, 21, 0.85);
    --accent-primary: #6366f1;
    --accent-verde: #00e676;
    --accent-cabina: #ff3d00;
    --accent-peppa: #ff4081;
    --text-main: #ffffff;
    --text-dim: #cbd5e1;
    --border-color: rgba(255, 255, 255, 0.15);
    --glass-blur: 16px;
    --card-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.9);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Glassmorphism Classes */
.glass {
    background: rgba(30, 35, 45, 0.7);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

/* Sidebar Styling */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    background: rgba(10, 12, 16, 0.95);
    backdrop-filter: blur(30px);
    border-right: 1px solid var(--border-color);
    transition: all 0.3s ease;
    padding: 2.5rem 1.5rem !important;
}

.sidebar h4 {
    letter-spacing: 1.5px;
    font-size: 1.25rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 0px;
}

.sidebar a {
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-radius: 14px;
    margin: 10px 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebar a i {
    margin-right: 14px;
    font-size: 1.3rem;
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(6px);
}

.sidebar a.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0.08) 100%);
    color: #6366f1;
    border: 1px solid rgba(99, 102, 241, 0.4);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Main Content */
.content {
    margin-left: 16.666667%;
    padding: 3rem 4rem;
    min-height: 100vh;
}

/* Cards & Sections */
.card {
    background: rgba(22, 25, 31, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(26, 30, 38, 0.9);
}

.card-header {
    background: rgba(255, 255, 255, 0.04) !important;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    color: #e2e8f0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* List Items */
.list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    padding: 16px 12px;
    margin: 4px 0;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
}

/* Avatara Circles */
.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    margin-right: -8px;
    font-size: 13px;
    border: 2px solid var(--bg-surface);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.2s;
    cursor: default;
}

.avatar-circle:hover {
    transform: translateY(-4px) scale(1.1);
    z-index: 10;
}

/* Custom colors for collectives */
.bg-verde { background-color: var(--accent-verde) !important; }
.bg-lacabina { background-color: var(--accent-cabina) !important; }
.bg-peppa { background-color: var(--accent-peppa) !important; }

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-outline-light {
    border-color: var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
}

/* FullCalendar Customization */
.fc {
    --fc-border-color: rgba(255, 255, 255, 0.1);
    --fc-button-bg-color: rgba(255, 255, 255, 0.05);
    --fc-button-border-color: rgba(255, 255, 255, 0.1);
    --fc-today-bg-color: rgba(99, 102, 241, 0.1);
    background: transparent !important;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.fc-theme-standard td, .fc-theme-standard th {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.fc-daygrid-day-number {
    font-size: 0.85rem;
    padding: 8px !important;
    color: var(--text-dim);
}

.fc-col-header-cell {
    padding: 12px 0 !important;
    background: rgba(255, 255, 255, 0.02);
}

.fc-toolbar-title {
    font-family: 'Outfit', sans-serif !important;
    font-size: 1.4rem !important;
    font-weight: 700;
}

.fc .fc-button-primary {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    text-transform: capitalize;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Eventos como bloques solidos con efecto INSET */
.fc-daygrid-event {
    border-radius: 6px !important;
    margin: 2px 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 3px 6px !important;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.3) !important;
    transition: all 0.2s ease;
}

.fc-daygrid-event:hover {
    transform: translateY(-1px);
    filter: brightness(1.2);
    box-shadow: inset 0 0 15px rgba(255,255,255,0.1), 0 4px 8px rgba(0,0,0,0.4) !important;
}

.fc-event-main {
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Modals */
.modal-content {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: 0 0 100px rgba(0,0,0,0.5);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
}

.form-control, .form-select {
    background: rgba(10, 11, 14, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-radius: 12px;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.form-select {
    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='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 12px 10px !important;
}

.form-select option {
    background-color: #1a1d23 !important;
    color: #fff !important;
}

.form-control:focus, .form-select:focus {
    background: rgba(10, 11, 14, 0.6) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
    color: white !important;
}

/* Avatar Circle */
.avatar-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    overflow: hidden;
}

.avatar-circle:hover {
    transform: scale(1.05);
}

.bg-verde { background-color: #00e676 !important; }
.bg-cabina { background-color: #ff3d00 !important; }
.bg-peppa { background-color: #ff4081 !important; }
.bg-primary { background-color: #6366f1 !important; }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: #1f2937;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        position: fixed;
        left: -280px; /* Oculto por defecto */
        top: 0;
        bottom: 0;
        z-index: 1050;
        box-shadow: 20px 0 60px rgba(0,0,0,0.8);
    }
    .sidebar.show {
        left: 0;
    }
    .content {
        margin-left: 0;
        padding: 80px 20px 20px 20px;
    }
    /* Overlay para cuando el menú está abierto */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(4px);
        z-index: 1040;
        display: none;
    }
    .sidebar-overlay.show {
        display: block;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.content > .row {
    animation: fadeIn 0.6s ease forwards;
}