/* ========== CARD DETAILS MODAL ========== */
.card-details-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.card-details-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.card-details-content {
    position: relative;
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

.card-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-details-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.card-details-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-secondary);
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.card-details-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: rotate(90deg);
}

.card-details-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Loading State */
.details-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.details-loading p {
    color: var(--text-tertiary);
    font-size: 0.9rem;
}

/* Details List */
.details-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s;
}

.detail-item:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.detail-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.detail-item-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.detail-item-badge.realizada {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.detail-item-badge.agendada {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.detail-item-badge.cancelada {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.detail-item-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-field-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-field-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Empty State */
.details-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.details-empty-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.details-empty p {
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .card-details-content {
        width: 95%;
        max-height: 90vh;
    }

    .card-details-header {
        padding: 1rem;
    }

    .card-details-header h2 {
        font-size: 1.2rem;
    }

    .card-details-body {
        padding: 1rem;
    }

    .detail-item-body {
        grid-template-columns: 1fr;
    }
}