﻿/* ============================================
   CSS VARIABLES - Global Design Tokens
   ============================================ */
:root {
    /* Primary Colors */
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    /* Secondary & Utility Colors */
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    /* Background Colors */
    --dark-bg: #0f172a;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
    /* Text & Border Colors */
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
}

/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
}

/* ============================================
   Z-INDEX HIERARCHY
   ============================================
   -1: Animated backgrounds (non-interactive)
    0: Base content layer
    1: Main content (cards, text, etc.)
   10: Sidebar navigation
  100: Top navigation bar
 1000: Dropdowns and popovers
 9999: Modal backdrop/overlay
10000: Modal content
   ============================================ */

/* ============================================
   AUTHENTICATION PAGES
   ============================================ */
.auth-page {
    height: 100vh;
/*    overflow: hidden;*/
    position: relative;
    min-height: 100vh;
    padding-bottom: 60px;
}

/* Hero section with gradient background */
.auth-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

    /* Hero background image overlay */
    .auth-hero::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: url("/placeholder.svg?height=1080&width=1920");
        background-size: cover;
        background-position: center;
        opacity: 0.15;
        z-index: 0;
    }

/* Hero content positioned above background */
.auth-hero-content {
    position: relative;
    z-index: 1;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

/* Form container styling */
.auth-form-container {
    width: 100%;
    max-width: 450px;
    padding: 2rem;
}

/* Input group styling */
.input-group-text {
    background-color: #f1f5f9;
    border-right: none;
}

.input-group .form-control {
    border-left: none;
}

    .input-group .form-control:focus {
        border-color: #cbd5e1;
        box-shadow: none;
    }

.input-group-text {
    border-color: #cbd5e1;
}

/* ============================================
   DASHBOARD LAYOUT
   ============================================ */
/* Main wrapper for sidebar + content */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}

/* Sidebar navigation - Fixed position with high z-index */
.sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10; /* Sidebar above content but below dropdowns/modals */
}

    .sidebar.active {
        margin-left: -260px;
    }

/* Sidebar header */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1; /* Above sidebar animated background */
}

    .sidebar-header h3 {
        color: #fff;
        margin: 0;
        font-size: 1.5rem;
    }

/* Sidebar navigation list */
.sidebar ul.components {
    padding: 1rem 0;
}

.sidebar ul {
    position: relative;
    z-index: 1; /* Above sidebar animated background */
}

    .sidebar ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

        .sidebar ul li a {
            padding: 0.875rem 1.5rem;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            color: var(--text-light);
            text-decoration: none;
            transition: all 0.3s;
        }

            .sidebar ul li a i {
                margin-right: 0.75rem;
                font-size: 1.1rem;
            }

            .sidebar ul li a:hover,
            .sidebar ul li.active > a {
                color: #fff;
                background: var(--sidebar-hover);
            }

    .sidebar ul ul a {
        font-size: 0.875rem;
        padding-left: 3.5rem;
        background: rgba(0, 0, 0, 0.2);
    }

/* Main content area - Offset by sidebar width */
#content {
    width: 100%;
    min-height: 100vh;
    transition: all 0.3s;
    margin-left: 260px;
    position: relative;
    z-index: 1; /* Above animated backgrounds */
}

    #content.active {
        margin-left: 0;
    }

/* Navigation bar - Higher z-index for dropdowns */
.navbar {
    position: relative;
    z-index: 100; /* Above sidebar and content for dropdown functionality */
}

/* Dropdown menus - Highest interactive z-index */
.dropdown-menu {
    z-index: 1000; /* Above all content and navigation */
}

/* ============================================
   STATISTICS CARDS
   ============================================ */
.stat-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1; /* Above animated backgrounds */
}

    .stat-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ============================================
   ACTIVITY FEED
   ============================================ */
.activity-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

    .activity-item:last-child {
        border-bottom: none;
    }

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-content {
    margin-left: 1rem;
    flex: 1;
}

/* ============================================
   SESSION & EVENT ITEMS
   ============================================ */
.session-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

    .session-item:last-child {
        border-bottom: none;
    }

.event-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

    .event-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

.event-time {
    min-width: 50px;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1; /* Above animated backgrounds */
}

.card-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-radius: 0.75rem 0.75rem 0 0 !important;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .btn-primary:hover {
        background-color: var(--primary-dark);
        border-color: var(--primary-dark);
    }

/* ============================================
   MODALS - Highest z-index for overlays
   ============================================ */
.modal-backdrop {
    z-index: 9999 !important; /* Modal backdrop above all content */
}

.modal {
    z-index: 10000 !important; /* Modal content above backdrop */
}

/* ============================================
   DATATABLES CUSTOMIZATION
   ============================================ */
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}
/*Responsive*/
@media (max-width: 576px) {
    .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   CALENDAR CUSTOMIZATION (FullCalendar)
   ============================================ */
.fc {
    font-family: inherit;
}

.fc-button-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

    .fc-button-primary:hover {
        background-color: var(--primary-dark) !important;
        border-color: var(--primary-dark) !important;
    }

.fc-event {
    border-radius: 0.25rem;
    border: none;
    padding: 2px 4px;
}

/* === Responsividad === */
@media (max-width: 768px) {
    .fc-toolbar {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .fc-toolbar-chunk {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .fc-toolbar-title {
        font-size: 1rem;
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .sidebar {
        margin-left: -260px;
    }

        .sidebar.active {
            margin-left: 0;
        }

    #content {
        margin-left: 0;
    }

        #content.active {
            margin-left: 260px;
        }

    /* Adjust dashboard animated background for mobile */
    .dashboard-animated-bg {
        left: 0;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
/* Subtle background colors */
.bg-primary-subtle {
    background-color: rgba(37, 99, 235, 0.1);
}

.bg-success-subtle {
    background-color: rgba(16, 185, 129, 0.1);
}

.bg-warning-subtle {
    background-color: rgba(245, 158, 11, 0.1);
}

.bg-danger-subtle {
    background-color: rgba(239, 68, 68, 0.1);
}

.bg-info-subtle {
    background-color: rgba(6, 182, 212, 0.1);
}

.bg-secondary-subtle {
    background-color: rgba(100, 116, 139, 0.1);
}

/* Text colors */
.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.footer {
    margin-top: auto;
    position: relative;
    z-index: 1; /* Above animated backgrounds */
}

    .footer a:hover {
        color: var(--primary-color) !important;
        transition: color 0.2s ease;
    }

/* Auth page footer */
.auth-footer {
    position: relative;
    bottom: auto;
    width: 100%;
    background-color: transparent;
}

/* ============================================
   ANIMATIONS - Keyframes
   ============================================ */
/* Floating animation - Circular motion with rotation */
@keyframes floating {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

/* Alternative floating with scale effect */
@keyframes floatingAlt {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-40px, 40px) rotate(180deg) scale(1.1);
    }
}

/* Slow floating - Simple up/down motion */
@keyframes floatingSlow {
    0%, 100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

/* Pulse animation - Opacity and scale change */
@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* ============================================
   ANIMATED BACKGROUNDS
   ============================================ */
/* Base animated background for auth pages */
.animated-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none; /* Prevents blocking interactions */
    z-index: 0; /* Behind all content */
}

/* Floating circles for auth pages */
.floating-circle {
    position: absolute;
    border-radius: 50%;
    background-color: black;
    animation: floating 20s ease-in-out infinite;
}

.floating-circle-1 {
    top: -8rem;
    right: -8rem;
    width: 20rem;
    height: 20rem;
    opacity: 0.15;
}

.floating-circle-2 {
    bottom: -8rem;
    left: -8rem;
    width: 24rem;
    height: 24rem;
    opacity: 0.1;
    animation-delay: -3s;
}

.floating-circle-3 {
    top: 50%;
    left: 25%;
    width: 8rem;
    height: 8rem;
    opacity: 0.15;
    animation-delay: -1s;
}

/* ============================================
   DASHBOARD ANIMATED BACKGROUND
   ============================================ */
/* Main dashboard background with geometric shapes */
.dashboard-animated-bg {
    position: fixed;
    top: 0;
    left: 260px; /* Offset by sidebar width */
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none; /* Prevents blocking interactions */
    z-index: -1; /* Behind all content including cards */
}

/* Container positioning above animated background */
.container-fluid {
    position: relative;
    z-index: 1;
}

/* Hexagon shapes */
.floating-hexagon {
    position: absolute;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0.03));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: floating 25s ease-in-out infinite;
}

.floating-hexagon-1 {
    top: 10%;
    right: 15%;
    width: 120px;
    height: 120px;
}

.floating-hexagon-2 {
    bottom: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    animation-delay: -5s;
}

/* Triangle shapes */
.floating-triangle {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 100px solid rgba(16, 185, 129, 0.06);
    animation: floatingAlt 20s ease-in-out infinite;
}

.floating-triangle-1 {
    top: 30%;
    left: 20%;
    animation-delay: -2s;
}

.floating-triangle-2 {
    bottom: 15%;
    right: 25%;
    transform: rotate(180deg);
    animation-delay: -8s;
}

/* Dashed lines for visual interest */
.floating-line-dash {
    position: absolute;
    width: 200px;
    height: 2px;
    background: repeating-linear-gradient( to right, rgba(100, 116, 139, 0.15) 0px, rgba(100, 116, 139, 0.15) 10px, transparent 10px, transparent 20px );
    animation: floatingSlow 15s ease-in-out infinite;
}

.floating-line-dash-1 {
    top: 25%;
    right: 10%;
    transform: rotate(-45deg);
}

.floating-line-dash-2 {
    bottom: 30%;
    left: 15%;
    transform: rotate(45deg);
    animation-delay: -4s;
}

/* ============================================
   SIDEBAR ANIMATED BACKGROUND
   ============================================ */
/* Animated background for sidebar with geometric shapes */
.sidebar-animated-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none; /* Prevents blocking sidebar interactions */
    z-index: 0; /* Behind sidebar content */
}

/* Floating squares */
.floating-square {
    position: absolute;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    animation: pulse 8s ease-in-out infinite;
}

.floating-square-1 {
    top: 15%;
    right: 10%;
    width: 60px;
    height: 60px;
    animation-delay: -1s;
}

.floating-square-2 {
    bottom: 25%;
    left: 15%;
    width: 40px;
    height: 40px;
    animation-delay: -4s;
}

/* Floating lines */
.floating-line {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: floatingSlow 12s ease-in-out infinite;
}

.floating-line-1 {
    top: 30%;
    left: 5%;
    transform: rotate(-30deg);
}

.floating-line-2 {
    bottom: 40%;
    right: 5%;
    transform: rotate(30deg);
    animation-delay: -3s;
}

/* Floating dots */
.floating-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite;
}

.floating-dot-1 {
    top: 20%;
    left: 25%;
    animation-delay: -1s;
}

.floating-dot-2 {
    top: 50%;
    right: 20%;
    animation-delay: -3s;
}

.floating-dot-3 {
    bottom: 30%;
    left: 40%;
    animation-delay: -5s;
}
