/**
 * Cohorte GTM 2026 - Estilos Principales
 * roCloud Casa - Roberto Ocampo
 */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #f97316;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
}

/* General */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #334155;
}

/* Navbar */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(37, 99, 235, 0.95) !important;
}

.navbar-brand {
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding-top: 80px;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Cards */
.problema-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
}

.problema-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.problema-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

/* Semana Cards */
.semana-card {
    transition: transform 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

.semana-card:hover {
    transform: translateY(-5px);
}

.semana-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Caso Cards */
.caso-card {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #1e293b;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.4);
}

.btn-lg {
    border-radius: 0.75rem;
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* Dashboard Styles */
.sidebar {
    background: var(--dark);
    min-height: 100vh;
    position: fixed;
    width: 260px;
    top: 0;
    left: 0;
    z-index: 1000;
    padding-top: 1rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    margin: 0.25rem 0.75rem;
    transition: all 0.2s ease;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar .nav-link i {
    width: 24px;
}

.main-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    background: var(--light);
}

/* Progress Cards */
.progress-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.progress-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--progress, 0%), #e2e8f0 0%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 90px;
    height: 90px;
    background: white;
    border-radius: 50%;
}

.progress-circle span {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Semana Progress */
.semana-progress {
    background: white;
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

.semana-progress:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.semana-progress.active {
    border-left: 4px solid var(--primary);
}

.semana-progress.completed {
    border-left: 4px solid var(--success);
}

.semana-progress.locked {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Lesson List */
.lesson-item {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.lesson-item:hover {
    background: var(--light);
}

.lesson-item.completed .lesson-icon {
    background: var(--success);
    color: white;
}

.lesson-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.lesson-info {
    flex-grow: 1;
}

.lesson-type {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
}

/* Entregable Card */
.entregable-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #e2e8f0;
}

.entregable-card.pendiente {
    border-left-color: var(--warning);
}

.entregable-card.entregado {
    border-left-color: var(--success);
}

.entregable-card.vencido {
    border-left-color: var(--danger);
}

/* Stats Grid */
.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
}

.stat-icon.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
}

.stat-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
}

/* Table Styles */
.table-dashboard {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
}

.table-dashboard th {
    background: var(--light);
    border: none;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 1rem;
}

.table-dashboard td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

/* Responsive */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    .hero-section {
        text-align: center;
    }

    .display-4 {
        font-size: 2rem;
    }

    .display-5 {
        font-size: 1.75rem;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

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

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