/* ========== PERFIL MODAL OVERLAY ========== */
.perfil-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.perfil-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ========== PERFIL MODAL CONTAINER ========== */
.perfil-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.2s ease-out;
}

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

/* ========== PERFIL HEADER ========== */
.perfil-header {    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f3f4f6;
}

.perfil-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    flex-shrink: 0;
    stroke: #1a1a1a;
}

.perfil-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.perfil-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 4px 0 0 0;
}

.perfil-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: #1a1a1a;
    font-size: 28px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.perfil-close:hover {
    background: #e5e7eb;
    color: #1a1a1a;
}

/* ========== PERFIL TABS ========== */
.perfil-tabs {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.perfil-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.2s ease;
}

.perfil-tab-btn:hover {
    background: rgba(26, 26, 26, 0.08);
    color: #1a1a1a;
}

.perfil-tab-btn.active {
    background: #374151;
    color: white;
}

.perfil-tab-btn svg {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

/* ========== PERFIL CONTENT ========== */
.perfil-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.perfil-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.perfil-tab-content.active {
    display: block;
}

/* ========== PERFIL FORM ========== */
.perfil-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
}

.form-group input {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

/* Estilos para input con error */
.form-group input.error {
    border-color: #ef4444;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.error:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.form-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 8px 0;
}

/* ========== ALERT MESSAGES ========== */
.perfil-alert {
    padding: 12px 16px;
    border-radius: 10px;
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

.perfil-success {
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.1);
    border-left: 4px solid #22c55e;
    color: #15803d;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== PERFIL ACTIONS ========== */
.perfil-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.perfil-btn-primary {
    flex: 1;
    padding: 12px;
    background: #374151;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.perfil-btn-primary:hover {
    background: #1f2937;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.perfil-btn-primary:active {
    transform: translateY(0);
}

.perfil-btn-secondary {
    flex: 1;
    padding: 12px;
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.perfil-btn-secondary:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    color: black;
}

/* ========== PERFIL STATS ========== */
.perfil-stats {
    display: grid;
    grid-template-areas: 'myHeader myHeader';
    gap: 16px;
    margin-bottom: 24px;
}

@media (max-width: 600px) {
    .perfil-stats {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}
.stat-card-dist {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    grid-area: myHeader;
    background: #f9fafb;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.stat-card:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    margin: 4px 0 0 0;
}

/* ========== PERFIL INFO BOX ========== */
.perfil-info-box {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.08) 0%, rgba(107, 114, 128, 0.04) 100%);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
}

.perfil-info-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px 0;
}

.limit-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.limit-item > span:first-child {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4b5563;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.limit-item > span:last-child {
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
    .perfil-modal {
        width: 95%;
        border-radius: 12px;
    }

    .perfil-header {
        padding: 16px;
    }

    .perfil-content {
        padding: 16px;
    }

    .perfil-tabs {
        padding: 12px;
    }

    .perfil-tab-btn {
        font-size: 13px;
        padding: 8px 12px;
    }

    .stat-card {
        gap: 12px;
        padding: 12px;
    }

    .stat-value {
        font-size: 18px;
    }
}
