/* ===================================
   CIRCUITO SUR MATCHING - ESTILOS
   =================================== */

:root {
    --csm-primary: #6366f1;
    --csm-secondary: #8b5cf6;
    --csm-success: #10b981;
    --csm-warning: #f59e0b;
    --csm-danger: #ef4444;
    --csm-dark: #1f2937;
    --csm-light: #f3f4f6;
    --csm-glass-bg: rgba(255, 255, 255, 0.1);
    --csm-glass-border: rgba(255, 255, 255, 0.2);
    --csm-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===================================
   COMPONENTES BASE
   =================================== */

.csm-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glass Morphism Base */
.csm-glass {
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--csm-glass-border);
    border-radius: 12px;
    box-shadow: var(--csm-shadow);
}

/* Botones */
.csm-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.csm-btn-primary {
    background: linear-gradient(135deg, var(--csm-primary), var(--csm-secondary));
    color: white;
}

.csm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

.csm-btn-secondary {
    background: var(--csm-glass-bg);
    border: 1px solid var(--csm-glass-border);
    color: var(--csm-dark);
}

.csm-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ===================================
   PERFILES
   =================================== */

.csm-profile-page {
    animation: fadeIn 0.5s ease;
}

.csm-profile-header {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 2rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.csm-profile-avatar {
    position: relative;
    width: 200px;
    height: 200px;
}

.csm-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--csm-glass-border);
}

.csm-availability-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.csm-availability-badge.available {
    background: var(--csm-success);
    color: white;
}

.csm-profile-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--csm-primary), var(--csm-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.csm-profile-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--csm-dark);
}

.csm-role {
    font-weight: 600;
    color: var(--csm-primary);
}

.csm-location {
    color: #6b7280;
}

/* Rating Stars */
.csm-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
}

.csm-stars {
    color: var(--csm-warning);
    font-size: 1.25rem;
}

.csm-stars .star.filled {
    color: var(--csm-warning);
}

.csm-stars .star.half {
    background: linear-gradient(90deg, var(--csm-warning) 50%, #d1d5db 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.csm-bio {
    margin: 1rem 0;
    line-height: 1.6;
    color: var(--csm-dark);
}

/* Tags */
.csm-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.csm-tag {
    padding: 0.25rem 0.75rem;
    background: var(--csm-glass-bg);
    border: 1px solid var(--csm-glass-border);
    border-radius: 20px;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.csm-tag:hover {
    background: var(--csm-primary);
    color: white;
    transform: translateY(-2px);
}

/* Stats Cards */
.csm-profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.csm-stat-card {
    padding: 1.5rem;
    text-align: center;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--csm-glass-border);
    transition: transform 0.3s ease;
}

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

.csm-stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--csm-primary), var(--csm-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.csm-stat-label {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Social Links */
.csm-social-links {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.csm-social-link {
    padding: 0.5rem 1rem;
    background: var(--csm-glass-bg);
    border: 1px solid var(--csm-glass-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--csm-dark);
    transition: all 0.3s ease;
}

.csm-social-link:hover {
    background: var(--csm-primary);
    color: white;
    transform: translateY(-2px);
}

/* History */
.csm-profile-history {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
}

.csm-profile-history h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.csm-history-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.csm-history-item {
    display: grid;
    grid-template-columns: 120px 1fr 150px 120px;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    align-items: center;
}

.csm-history-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.csm-history-event {
    font-weight: 500;
}

.csm-history-role {
    color: var(--csm-primary);
    font-size: 0.875rem;
}

.csm-history-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.csm-history-status.status-participated {
    background: var(--csm-success);
    color: white;
}

.csm-history-status.status-confirmed {
    background: var(--csm-primary);
    color: white;
}

.csm-history-status.status-cancelled {
    background: var(--csm-danger);
    color: white;
}

/* ===================================
   FORMULARIOS
   =================================== */

.csm-form {
    max-width: 800px;
    margin: 0 auto;
}

.csm-form-section {
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.csm-form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--csm-primary);
}

.csm-form-group {
    margin-bottom: 1.5rem;
}

.csm-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--csm-dark);
}

.csm-form-group input,
.csm-form-group textarea,
.csm-form-group select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--csm-glass-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.csm-form-group input:focus,
.csm-form-group textarea:focus,
.csm-form-group select:focus {
    outline: none;
    border-color: var(--csm-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.csm-form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.csm-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.csm-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.csm-checkbox input[type="checkbox"] {
    width: auto;
}

.csm-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* ===================================
   DASHBOARD
   =================================== */

.csm-dashboard {
    animation: fadeIn 0.5s ease;
}

.csm-dashboard h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--csm-primary), var(--csm-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.csm-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.csm-user-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.csm-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--csm-glass-border);
}

.csm-user-info h2 {
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
}

.csm-user-info p {
    color: #6b7280;
}

.csm-quick-stats {
    display: flex;
    gap: 2rem;
}

.csm-stat {
    text-align: center;
}

.csm-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--csm-primary);
}

.csm-stat-label {
    display: block;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

.csm-dashboard-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.csm-dashboard-section {
    margin-bottom: 3rem;
}

.csm-dashboard-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--csm-dark);
}

/* Applications List */
.csm-applications-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.csm-application-card {
    padding: 1.5rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--csm-glass-border);
    transition: transform 0.3s ease;
}

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

.csm-application-card h4 {
    margin-bottom: 0.75rem;
    color: var(--csm-primary);
}

.csm-application-card p {
    margin-bottom: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.csm-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.csm-status.pending {
    background: var(--csm-warning);
    color: white;
}

.csm-status.confirmed {
    background: var(--csm-success);
    color: white;
}

.csm-status.rejected {
    background: var(--csm-danger);
    color: white;
}

.csm-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--csm-primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.csm-link:hover {
    text-decoration: underline;
}

/* ===================================
   MATCHING SYSTEM
   =================================== */

.csm-matching-panel {
    padding: 2rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.csm-match-score {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--csm-primary), var(--csm-secondary));
    color: white;
    border-radius: 20px;
    font-weight: 600;
}

.csm-match-score-value {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.csm-match-explanation {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid var(--csm-primary);
    border-radius: 4px;
    font-size: 0.875rem;
}

.csm-candidates-grid {
    display: grid;
    gap: 1.5rem;
}

.csm-candidate-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--csm-glass-border);
    transition: all 0.3s ease;
}

.csm-candidate-card:hover {
    transform: translateX(5px);
    border-color: var(--csm-primary);
}

.csm-candidate-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--csm-glass-border);
}

.csm-candidate-info h4 {
    margin-bottom: 0.25rem;
    color: var(--csm-primary);
}

.csm-candidate-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.csm-candidate-bio {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--csm-dark);
}

.csm-candidate-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

/* ===================================
   RATING SYSTEM
   =================================== */

.csm-rating-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
}

.csm-star-rating {
    display: flex;
    gap: 0.5rem;
    cursor: pointer;
}

.csm-star-rating .star {
    font-size: 2rem;
    color: #d1d5db;
    transition: color 0.2s ease;
}

.csm-star-rating .star.filled {
    color: var(--csm-warning);
}

.csm-star-rating .star.hover {
    color: rgba(245, 158, 11, 0.5);
}

.csm-rating-summary {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 2rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.csm-rating-average {
    text-align: center;
}

.csm-rating-number {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--csm-warning);
}

.csm-rating-count {
    display: block;
    margin-top: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.csm-rating-distribution {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.csm-rating-bar {
    display: grid;
    grid-template-columns: 40px 1fr 40px;
    gap: 0.5rem;
    align-items: center;
}

.csm-rating-label {
    text-align: right;
    font-size: 0.875rem;
}

.csm-bar-container {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.csm-bar-fill {
    height: 100%;
    background: var(--csm-warning);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.csm-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.csm-review-item {
    padding: 1.5rem;
    background: var(--csm-glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid var(--csm-glass-border);
}

.csm-review-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.csm-review-event {
    color: #6b7280;
}

.csm-review-rating {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.csm-review-date {
    color: #6b7280;
    font-size: 0.75rem;
}

.csm-review-text {
    line-height: 1.6;
    color: var(--csm-dark);
}

/* ===================================
   NOTIFICACIONES
   =================================== */

.csm-notifications {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 400px;
    max-height: 600px;
    overflow-y: auto;
    z-index: 1000;
}

.csm-notification {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.csm-notification.unread {
    border-left: 4px solid var(--csm-primary);
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .csm-profile-header {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .csm-profile-avatar {
        margin: 0 auto;
    }
    
    .csm-dashboard-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .csm-quick-stats {
        width: 100%;
        justify-content: space-around;
    }
    
    .csm-candidate-card {
        grid-template-columns: 60px 1fr;
    }
    
    .csm-candidate-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .csm-rating-summary {
        grid-template-columns: 1fr;
    }
    
    .csm-notifications {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }
}

/* ===================================
   ANIMACIONES
   =================================== */

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.csm-pulse {
    animation: pulse 2s infinite;
}
