/* Variables con la nueva paleta */
:root {
    --primary: #34846c;
    --primary-light: #4ba58a;
    --primary-dark: #2a6a56;
    --secondary: #377970;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #DDFFDD;
    --warning: #FFF3CD;
    --danger: #FFB9B9;
    --info: #E6E6E6;
    --accent: #53CDE5;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --transition-fast: 0.2s;
    --transition-normal: 0.3s;
    --transition-slow: 0.5s;
    --border-radius-sm: 0.2rem;
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-xl: 1rem;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Reset y estilos base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f0f4f3;
    position: relative;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Footer con nuevo diseño claro */
.header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 1.25rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    position: relative;
}

.header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer {
    background: var(--primary);
    color: white;
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Cards con estilo claro */
.card {
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.75rem;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid var(--gray-200);
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(to right, rgba(240, 255, 250, 0.8), white);
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header h2 i {
    color: var(--primary);
    font-size: 1.2em;
}

.card-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    transition: color var(--transition-fast);
    padding: 0.4rem 0.6rem;
    border-radius: var(--border-radius);
    background-color: rgba(52, 132, 108, 0.1);
}

.card-toggle:hover {
    color: var(--primary);
    background-color: rgba(52, 132, 108, 0.2);
}

.card-body {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, opacity 0.3s;
    opacity: 0;
}

.card-body.active {
    max-height: 2000px;
    opacity: 1;
    padding-bottom: 1rem;
}

/* Tablas */
.table-responsive {
    overflow-x: auto;
    padding: 1rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
}

table th,
table td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

table th {
    background-color: rgba(52, 132, 108, 0.05);
    font-weight: 600;
    color: var(--gray-700);
    position: sticky;
    top: 0;
    z-index: 10;
}

table tr {
    transition: background-color var(--transition-fast);
}

table tr:hover {
    background-color: rgba(52, 132, 108, 0.05);
}

/* Status badges y tags */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: var(--border-radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all var(--transition-normal);
}

.status-pending {
    background-color: var(--danger);
    color: var(--dark);
}

.status-assigned {
    background-color: var(--success);
    color: var(--dark);
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.tag-oral {
    background-color: rgba(83, 205, 229, 0.2);
    color: #0a6e84;
}

.tag-poster {
    background-color: var(--warning);
    color: #856404;
}

.tag-panel {
    background-color: var(--info);
    color: #333;
}

/* Evaluator badges */
.evaluator-badge {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all var(--transition-normal);
    margin: 0 auto;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

.evaluator-badge:not(.assigned) {
    background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
    cursor: pointer;
}

.evaluator-badge:not(.assigned):hover {
    transform: scale(1.15);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.evaluator-badge.assigned {
    background: linear-gradient(135deg, #34846c, #4ba58a);
}

.evaluator-badge.assigned::after {
    content: '✓';
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: white;
    color: var(--primary);
    width: 18px;
    height: 18px;
    font-size: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.evaluator-initials {
    font-size: 0.85rem;
    font-weight: bold;
}

.evaluator-avatar {
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Progress bar */
#assignment-progress .card-body {
    padding: 1.5rem;
}

.progress-container {
    height: 10px;
    background-color: var(--gray-200);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    margin-top: 1.5rem;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-value {
    height: 100%;
    background: linear-gradient(to right, var(--primary-light), var(--primary));
    border-radius: var(--border-radius-xl);
    transition: width 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stats-box {
    display: flex;
    justify-content: space-around;
    margin: 1rem 0 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    min-width: 120px;
    transition: transform var(--transition-normal);
    border: 1px solid var(--gray-200);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.pending-value {
    color: #d63939;
}

.assigned-value {
    color: #2fb344;
}

.total-value {
    color: var(--primary);
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Botones mejorados con CSS5 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: none;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    border-radius: var(--border-radius);
    transition: all 0.3s;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 14px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 1s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-danger {
    background-color: #d63939;
    color: white;
}

.btn-danger:hover {
    background-color: #b02a37;
}

.btn i {
    font-size: 1.1em;
}

@keyframes assignmentPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 132, 108, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(52, 132, 108, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(52, 132, 108, 0);
    }
}

.assignment-pulse {
    animation: assignmentPulse 1.5s ease-out;
}

/* Efecto de Conexión en Asignación */
@keyframes drawLine {
    0% {
        background-position: 0% 0%;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        background-position: 100% 0%;
        opacity: 0;
    }
}

.connection-line {
    position: fixed;
    height: 3px;
    background: linear-gradient(to right, var(--primary), var(--primary-light));
    background-size: 200% 100%;
    z-index: 1000;
    pointer-events: none;
    transform-origin: left center;
}

.connection-line.animated {
    animation: drawLine 1s ease-out forwards;
}

@keyframes moveDot {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(1.5);
    }
}

.connection-dot {
    position: fixed;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    z-index: 1001;
    pointer-events: none;
}

.connection-dot.animated {
    animation: moveDot 1s cubic-bezier(0.42, 0, 0.58, 1) forwards;
}

/* Animación de marca de verificación */
@keyframes showCheckmark {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-45deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(0deg);
    }
    70% {
        transform: scale(0.9) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.checkmark-container {
    position: fixed;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    z-index: 1002;
    opacity: 0;
}

.checkmark-container.animated {
    animation: showCheckmark 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Efecto de Confeti */
@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(360deg);
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 999;
    animation: confettiFall 3s forwards;
}

/* Selector de Evaluadores */
.evaluator-selector {
    position: absolute;
    z-index: 1000;
    background-color: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    width: 320px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    animation: fadeInUp 0.3s ease-out;
}

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

.selector-title {
    padding: 1rem 1.25rem;
    background: var(--primary);
    color: white;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selector-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.selector-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.selector-options {
    max-height: 350px;
    overflow-y: auto;
}

.selector-option {
    padding: 0.875rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--gray-200);
}

.selector-option:hover {
    background-color: rgba(52, 132, 108, 0.1);
}

.selector-option:last-child {
    border-bottom: none;
}

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

.evaluator-name {
    font-weight: 500;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.evaluator-workload {
    font-size: 0.8rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: 30px;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-secondary {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

/* Notificaciones */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.notification-close {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
}

/* Gráfico de carga */
.workload-chart {
    display: flex;
    align-items: flex-end;
    height: 200px;
    gap: 3px;
    margin: 1.5rem;
    padding: 0 0.5rem;
    border-bottom: 1px solid var(--gray-300);
}

.workload-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.workload-value {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--primary-light));
    border-radius: 4px 4px 0 0;
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-height: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.workload-label {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-600);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.workload-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    margin-bottom: 0.25rem;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Animación para el algoritmo */
.algorithm-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s;
}

.algorithm-animation.active {
    opacity: 1;
    visibility: visible;
}

.algorithm-title {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.algorithm-visualization {
    width: 80%;
    max-width: 800px;
    height: 400px;
    position: relative;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    background-color: white;
    box-shadow: var(--shadow);
}

.algorithm-status {
    margin-top: 1.5rem;
    color: var(--gray-700);
    font-size: 1rem;
    text-align: center;
}

.algorithm-progress {
    width: 80%;
    max-width: 800px;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 20px;
}

.algorithm-progress-value {
    height: 100%;
    background-color: var(--primary);
    width: 0;
    transition: width 0.3s ease-out;
}

/* Animaciones para la visualización del algoritmo */
.paper-node, .evaluator-node {
    position: absolute;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.paper-node {
    width: 60px;
    height: 60px;
    background: var(--primary);
    animation: fadeInScale 0.5s forwards;
}

.evaluator-node {
    width: 50px;
    height: 50px;
    background: var(--accent);
    animation: fadeInScale 0.5s forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Línea de conexión en la visualización */
.visualization-link {
    position: absolute;
    height: 2px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    transform-origin: left center;
    z-index: -1;
    animation: growLine 1s forwards;
}

@keyframes growLine {
    from {
        transform: scaleX(0);
        opacity: 0;
    }
    to {
        transform: scaleX(1);
        opacity: 0.7;
    }
}

/* Puntos de carga */
.loading-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 5px;
}

.loading-dots span {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: dotPulse 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotPulse {
    0%, 80%, 100% { 
        transform: scale(0.5);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Efecto de asignación */
@keyframes assignAnimation {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    20% {
        opacity: 1;
        transform: scale(1.1);
    }
    40% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.assign-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(52, 132, 108, 0.1);
    pointer-events: none;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.5s;
}

.assign-effect.active {
    animation: assignEffect 1s forwards;
}

@keyframes assignEffect {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .stats-box {
        flex-direction: column;
    }
    
    .stat-item {
        width: 100%;
    }
}